Skip to content

Commit

Permalink
Update wrapSerializers type to be optional (#173)
Browse files Browse the repository at this point in the history
Co-authored-by: Matteo Collina <hello@matteocollina.com>
  • Loading branch information
jonathansamines and mcollina authored Aug 26, 2022
1 parent 0056841 commit b6916c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ declare namespace HapiPino {
allTags?: pino.Level | undefined;
instance?: pino.Logger | undefined;
logEvents?: string[] | false | null | undefined;
wrapSerializers: boolean | undefined;
wrapSerializers?: boolean | undefined;
mergeHapiLogData?: boolean | undefined;
ignorePaths?: string[] | undefined;
ignoreTags?: string[] | undefined;
Expand Down
3 changes: 3 additions & 0 deletions index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ const options: HapiPino.Options = {

expectType<Promise<void>>(server.register({ plugin: HapiPino, options }));

const emptyOptions: HapiPino.Options = {};
expectType<Promise<void>>(server.register({ plugin: HapiPino, options: emptyOptions }));

server.logger.info('some message');
server.logger.error(new Error('some error'));

Expand Down

0 comments on commit b6916c6

Please sign in to comment.