nodejs-whisper
nodejs-whisper copied to clipboard
Do not use Console type for logger
I see for the new logger option, the Node.js Console type is used:
https://github.com/ChetanXpro/nodejs-whisper/blob/main/src/index.d.ts#L18
Although this conflicts with many other logging mechanisms which do not extend from Console, for example, I use PinoJS which has an entirely different interface. It uses streaming and does not have all the Console functions. Too many TS errors on my app.
I'd try to generalise it as much as possible, and only use the absolute minimum. Something like
interface WhisperConnsole {
debug: (any) => void
error: (any) => void
// etc ...
}