TheAppleFreak / winston-slack-webhook-transport

A Slack transport for Winston 3 that logs to a channel via webhooks
MIT License
35 stars 14 forks source link

Update type definition for SlackHookOptions #26

Closed DominicRoyStang closed 1 year ago

DominicRoyStang commented 1 year ago

Options are passed to the parent Transport class (named TransportStream in the winston-transport package) via super(opts) in the constructor, so those properties should also be exposed when initializing SlackHook.

Those properties are:

format?: logform.Format;
level?: string;
silent?: boolean;
handleExceptions?: boolean;
handleRejections?: boolean;

In my case, I needed this personally to access the format key to use winston.format.timestamp() and winston.format.metadata().

TheAppleFreak commented 1 year ago

Looks good! Just merged, gonna push to NPM momentarily.

TheAppleFreak commented 1 year ago

New release made! Should be live on NPM momentarily.