Skip to content

Commit

Permalink
Avoid any when instanciating from this.constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
terehov committed Nov 25, 2020
1 parent ab2be4f commit a980619
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/LoggerWithoutCallSite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,12 @@ export class LoggerWithoutCallSite {
const childSettings: ISettings = {
...this.settings,
};
//eslint-disable-next-line @typescript-eslint/no-explicit-any
const childLogger: Logger = new (this.constructor as any)(
settings,
childSettings
);

const childLogger: Logger = new (this.constructor as new (
settings?: ISettingsParam,
parentSettings?: ISettings
) => this)(settings, childSettings);

this._childLogger.push(childLogger);
return childLogger;
}
Expand Down

0 comments on commit a980619

Please sign in to comment.