pinojs/pino

Type errors when using `log.child()`

Closed this issue · 1 comments

When using the Logger type exported in a function to get a child logger, I am getting a TypeScript error because the redactOptions is not exported

Return type of exported function has or is using name 'redactOptions' from external module "node_modules/pino/pino" but cannot be named.
import type { type Logger } from "pino";

function foo(log: Logger) {
   return log.child({ name: "foo" })
}

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.