Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rejectionHandlers type definition does not exist #1801

Closed
1 of 2 tasks
Shahaed opened this issue May 22, 2020 · 5 comments
Closed
1 of 2 tasks

rejectionHandlers type definition does not exist #1801

Shahaed opened this issue May 22, 2020 · 5 comments

Comments

@Shahaed
Copy link

Shahaed commented May 22, 2020

Please tell us about your environment:

  • winston version?
    • winston@2
    • winston@3
  • Language ( TypeScript )

What is the problem?

In the index.d.ts type defeintions of RejectionHandler does not exist. Neither does the rejectionHandler option in LoggerOptions

interface LoggerOptions {

What do you expect to happen instead?

Since this is an actual feature of this library (see below), expectation is it is typed and available to typescript users

winston.RejectionHandler = require('./winston/rejection-handler');

@oakgary
Copy link

oakgary commented May 22, 2020

this functionality does not seem to be working at all
see: #1673

@cupidchan
Copy link

The fix should be as simple as adding this one line in the index.d.ts so that the compiler can recognize it.
rejectionHandlers: any

@Eghizio
Copy link

Eghizio commented Sep 14, 2021

Issue still exists

vanflux added a commit to vanflux/winston that referenced this issue Jan 11, 2022
The 'rejectionHandlers' field was missing on LoggerOptions interface at index.d.ts.
Issue: winstonjs#1801
@vanflux
Copy link
Contributor

vanflux commented Jan 11, 2022

I don't know exactly why this issue still exists, but I opened a pull request about it.
My PR: #2021
Adds rejectionHandlers and handleRejections fields

There is another PR about that: #1847
The 1847 PR doesn't add the rejectionHandlers field and it's from a year ago.

fearphage pushed a commit that referenced this issue Jan 13, 2022
* RejectionHandlers added to LoggerOptions

The 'rejectionHandlers' field was missing on LoggerOptions interface at index.d.ts.
Issue: #1801

* Added handleRejections field to LoggerOptions.

A complement to rejectionHandlers commit.

* Added RejectionHandler to Logger interface

Added RejectionHandler to Logger interface,
Basically the same of PR: #1929
Suggest by: #2021 (comment)
@DABH
Copy link
Contributor

DABH commented Jan 13, 2022

Looks like this is merged now so I'm going to close out this issue. Thank you!

@DABH DABH closed this as completed Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants