Closed joeythomaschaske closed 2 months ago
For whatever reason this works
import express from 'express'
import { pinoHttp } from 'pino-http';
const app = express();
app.use(pinoHttp());
I just don't understand why the original example doesn't work, the type definitions assign the default export to PinoHttp
export default PinoHttp;
export { PinoHttp as pinoHttp };
it depends on some settings you have on your tsconfig.json
.
I am trying to import this into a typescript project and typescript is complaining that the library is not callable
Can this library be used with import syntax?
System info
pino-http: 10.1.0 node: 20.14.0 typescript: 5.4.3