Skip to content

Commit

Permalink
fix(types): Allow any object to be passed as meta to logger.profile (w…
Browse files Browse the repository at this point in the history
…instonjs#2314)

It was typed as `LogEntry` which requires both `level` and `message` to be set. That contradicts the implementation that treats these fields as optional.

fixes winstonjs#1969
  • Loading branch information
sokki authored Jun 28, 2023
1 parent 06e3165 commit 9d6001a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ declare namespace winston {
stream(options?: any): NodeJS.ReadableStream;

startTimer(): Profiler;
profile(id: string | number, meta?: LogEntry): Logger;
profile(id: string | number, meta?: Record<string, any>): Logger;

configure(options: LoggerOptions): void;

Expand Down

0 comments on commit 9d6001a

Please sign in to comment.