question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

rejectionHandlers type definition does not exist

See original GitHub issue

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 https://github.com/winstonjs/winston/blob/9354721af36af51b127f489a366d5d8602a37049/index.d.ts#L77

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 https://github.com/winstonjs/winston/blob/9354721af36af51b127f489a366d5d8602a37049/lib/winston.js#L58

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:18
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
Eghiziocommented, Sep 14, 2021

Issue still exists

1reaction
vanfluxcommented, Jan 11, 2022

I don’t know exactly why this issue still exists, but I opened a pull request about it. My PR: https://github.com/winstonjs/winston/pull/2021 Adds rejectionHandlers and handleRejections fields

There is another PR about that: https://github.com/winstonjs/winston/pull/1847 The 1847 PR doesn’t add the rejectionHandlers field and it’s from a year ago.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rejections - spray - Read the Docs
A rejection encapsulates a specific reason why a Route was not able to handle a request. It is modeled as an object of...
Read more >
Window: unhandledrejection event - Web APIs | MDN
The unhandledrejection event is sent to the global scope of a script when a JavaScript Promise that has no rejection handler is rejected; ......
Read more >
A Complete Guide to Winston Logging in Node.js - Better Stack
Winston is the most popular logging library for Node.js. It aims to make logging more flexible and extensible by decoupling different aspects such...
Read more >
Events | Node.js v19.3.0 Documentation
If an EventEmitter does not have at least one listener registered for the ... The EventEmitter class is defined and exposed by the...
Read more >
Rejections - Akka Documentation
If there are more rejections all of them will be picked up and collected. ... As you can see from its definition above...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found