Skip to content

Commit a980619

Browse files
committed
Avoid any when instanciating from this.constructor
1 parent ab2be4f commit a980619

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/LoggerWithoutCallSite.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,12 @@ export class LoggerWithoutCallSite {
200200
const childSettings: ISettings = {
201201
...this.settings,
202202
};
203-
//eslint-disable-next-line @typescript-eslint/no-explicit-any
204-
const childLogger: Logger = new (this.constructor as any)(
205-
settings,
206-
childSettings
207-
);
203+
204+
const childLogger: Logger = new (this.constructor as new (
205+
settings?: ISettingsParam,
206+
parentSettings?: ISettings
207+
) => this)(settings, childSettings);
208+
208209
this._childLogger.push(childLogger);
209210
return childLogger;
210211
}

0 commit comments

Comments
 (0)