diff --git a/index.d.ts b/index.d.ts index 027379c39..de31fbdb2 100644 --- a/index.d.ts +++ b/index.d.ts @@ -34,6 +34,21 @@ declare namespace winston { new(logger: Logger): ExceptionHandler; } + interface RejectionHandler { + logger: Logger; + handlers: Map; + catcher: Function | boolean; + + handle(...transports: Transport[]): void; + unhandle(...transports: Transport[]): void; + getAllInfo(err: string | Error): object; + getProcessInfo(): object; + getOsInfo(): object; + getTrace(err: Error): object; + + new(logger: Logger): RejectionHandler; + } + interface QueryOptions { rows?: number; limit?: number; @@ -93,6 +108,7 @@ declare namespace winston { level: string; transports: Transport[]; exceptions: ExceptionHandler; + rejections: RejectionHandler; profilers: object; exitOnError: Function | boolean; defaultMeta?: any;