nodejs-whisper icon indicating copy to clipboard operation
nodejs-whisper copied to clipboard

Do not use Console type for logger

Open binarykitchen opened this issue 9 months ago • 0 comments

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 ...
}

binarykitchen avatar Jan 10 '25 05:01 binarykitchen