Skip to content

Commit

Permalink
Fix: add missing useOnlyCustomProps options to type definitions (#514)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcdevil authored Jun 11, 2024
1 parent af7ae26 commit 6d10717
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@ interface PrettyOptions_ {
* @example ( Object ) customColors: { info: 'white', some_level: 'red' }
*/
customColors?: string|object;
/**
* Only use custom levels and colors (if provided); else fallback to default levels and colors.
*
* @default true
*/
useOnlyCustomProps?: boolean;
}

declare function build(options: PrettyOptions_): PinoPretty.PrettyStream;
Expand Down
1 change: 1 addition & 0 deletions test/types/pino-pretty.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const options: PinoPretty.PrettyOptions = {
destination: 2,
append: true,
mkdir: true,
useOnlyCustomProps: false,
};

expectType<PrettyStream>(pretty()); // #326
Expand Down

0 comments on commit 6d10717

Please sign in to comment.