Skip to content

Commit

Permalink
add logger instance as third parameter (#1977)
Browse files Browse the repository at this point in the history
  • Loading branch information
emmyakin authored May 15, 2024
1 parent 206edee commit 2af5abd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pino.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import type { WorkerOptions } from "worker_threads";
type ThreadStream = any

type TimeFn = () => string;
type MixinFn = (mergeObject: object, level: number) => object;
type MixinFn<CustomLevels extends string = never> = (mergeObject: object, level: number, logger:pino.Logger<CustomLevels>) => object;
type MixinMergeStrategyFn = (mergeObject: object, mixinObject: object) => object;

type CustomLevelLogger<CustomLevels extends string> = { [level in CustomLevels]: LogFn }
Expand Down Expand Up @@ -373,7 +373,7 @@ declare namespace pino {
* is called. The function must synchronously return an object. The properties of the
* returned object will be added to the logged JSON.
*/
mixin?: MixinFn;
mixin?: MixinFn<CustomLevels>;

/**
* If provided, the `mixinMergeStrategy` function is called each time one of the active
Expand Down

0 comments on commit 2af5abd

Please sign in to comment.