Skip to content

Commit

Permalink
fix(types): Allow any object to be passed as meta to logger.profile
Browse files Browse the repository at this point in the history
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 committed Jun 26, 2023
1 parent 06e3165 commit 5c3f3ba
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 5c3f3ba

Please sign in to comment.