Skip to content

Commit

Permalink
Fix issue #1817 (#1819)
Browse files Browse the repository at this point in the history
* fix: replace type with generic

* fix: typo
  • Loading branch information
Pigotz committed Jun 23, 2020
1 parent 5c8da2d commit bc6f681
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.d.ts
Expand Up @@ -86,7 +86,7 @@ declare namespace winston {
exceptionHandlers?: any;
}

type DefaulLevels = {
type DefaultLevels = {
// for cli and npm levels
error: number;
warn: number;
Expand All @@ -108,10 +108,10 @@ declare namespace winston {
notice: number;
}

type Logger<T extends Config.AbstractConfigSetLevels = DefaulLevels> = NodeJSStream.Transform & {
type Logger<T extends Config.AbstractConfigSetLevels = DefaultLevels> = NodeJSStream.Transform & {
silent: boolean;
format: logform.Format;
levels: Config.AbstractConfigSetLevels;
levels: T;
level: string;
transports: Transport[];
exceptions: ExceptionHandler;
Expand Down Expand Up @@ -164,7 +164,7 @@ declare namespace winston {
let loggers: Container;

let addColors: (target: Config.AbstractConfigSetColors) => any;
let createLogger: <T extends Config.AbstractConfigSetLevels = DefaulLevels>(options?: LoggerOptions<T>) => Logger<T>;
let createLogger: <T extends Config.AbstractConfigSetLevels = DefaultLevels>(options?: LoggerOptions<T>) => Logger<T>;

// Pass-through npm level methods routed to the default logger.
let error: LeveledLogMethod;
Expand Down

0 comments on commit bc6f681

Please sign in to comment.