diff --git a/test/types/pino.test-d.ts b/test/types/pino.test-d.ts index dbfd0852d..6ae04f542 100644 --- a/test/types/pino.test-d.ts +++ b/test/types/pino.test-d.ts @@ -329,3 +329,15 @@ pino({ crlf: true, }); +const customLevels = { foo: 99 }; + +const customLevelLogger = pino({ customLevels }); + +type CustomLevelLogger = typeof customLevelLogger +type CustomLevelLoggerLevels = pino.Level | keyof typeof customLevels + +const fn = (logger: Pick) => {} + +const customLevelChildLogger = customLevelLogger.child({ name: "child" }) + +fn(customLevelChildLogger); // missing foo typing