Skip to content

Commit

Permalink
Replace new with constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
flappyBug authored and wbt committed Jun 30, 2022
1 parent afd389a commit 6217120
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ declare namespace winston {
export import transport = Transport;

class ExceptionHandler {
constructor(logger: Logger);
logger: Logger;
handlers: Map<any, any>;
catcher: Function | boolean;
Expand All @@ -30,11 +31,10 @@ declare namespace winston {
getProcessInfo(): object;
getOsInfo(): object;
getTrace(err: Error): object;

new(logger: Logger): ExceptionHandler;
}

class RejectionHandler {
constructor(logger: Logger);
logger: Logger;
handlers: Map<any, any>;
catcher: Function | boolean;
Expand All @@ -45,8 +45,6 @@ declare namespace winston {
getProcessInfo(): object;
getOsInfo(): object;
getTrace(err: Error): object;

new(logger: Logger): RejectionHandler;
}

interface QueryOptions {
Expand Down Expand Up @@ -109,6 +107,8 @@ declare namespace winston {
}

class Logger extends NodeJSStream.Transform {
constructor(options?: LoggerOptions);

silent: boolean;
format: logform.Format;
levels: Config.AbstractConfigSetLevels;
Expand Down Expand Up @@ -166,8 +166,6 @@ declare namespace winston {
isVerboseEnabled(): boolean;
isDebugEnabled(): boolean;
isSillyEnabled(): boolean;

new(options?: LoggerOptions): Logger;
}

class Container {
Expand All @@ -179,7 +177,7 @@ declare namespace winston {
has(id: string): boolean;
close(id?: string): void;

new(options?: LoggerOptions): Container;
constructor(options?: LoggerOptions);
}

let version: string;
Expand Down

0 comments on commit 6217120

Please sign in to comment.