-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type incompatibility after upgrading pino to 8.6.0 #247
Comments
Thanks for reporting! Can you provide steps to reproduce? We often need a reproducible example, e.g. some code that allows someone else to recreate your problem by just copying and pasting it. If it involves more than a couple of different file, create a new repository on GitHub and add a link to that. cc @kibertoad for his TS experience |
Hey @mcollina I've noticed the similar behavior after upgrading to latest
And then the error looks like this:
Previously it was possible to use Is this example enough? |
@thomas-yaa |
I'm on the latest version of typescript (4.8.4) and I'm still experiencing the same issue. I'm trying to pass an existing pino logger instance to pino-http and I get the same error. Here is a simple example: import pino from "pino";
import pinoHttp from "pino-http";
const log = pino();
const httpLogger = pinoHttp({ logger: log });
const httpLogger2 = pinoHttp({ logger: log.child({ m: "test" }) }); Casting the logger to |
cc @kibertoad |
Upgraded pino to latest release, 8.6.0 in a project using Next.js, pino, and pino-http.
A test that assigns the
log
field on aNextApiRequest
as part of its setup now fails with the following error:Type 'Logger<LoggerOptions | DestinationStream>' is not assignable to type 'LoggerExtras<LoggerOptions>'
I tried to use a mock instead and still encountered the error.
The text was updated successfully, but these errors were encountered: