Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #1817 #1819

Merged
merged 2 commits into from
Jun 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
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