lazywithclass / winston-cloudwatch

Send logs to Amazon Cloudwatch using Winston.
MIT License
258 stars 104 forks source link

Adjust the signature of kthxbye in the TypeScript bindings #187

Closed andrisak closed 2 years ago

andrisak commented 2 years ago

In the TypeScript bindings, the kthxbye function has this signature:

kthxbye(callback: () => void): void;

However, the callback is called with a parameter here. Because of this, all errors from the library can't be handled properly in a TypeScript app.

Can the TypeScript bindings for kthxbye be adjusted to something like this?

kthxbye(callback: (err: Error) => void): void;