hard-rejection
Note: That might not be desirable as unhandled rejections can be handled at a future point in time, although not common.
Official Documentation ↗v2.1.0. Check the official docs for the latest API surface.Installation
npm install hard-rejectionpnpm add hard-rejectionMethods
No methods match this filter.
Overview
Note: That might not be desirable as unhandled rejections can be handled at a future point in time, although not common. You’ve been warned. For command-line apps and tests, see loud-rejection.
API reference status
This page lists only entry points that appear verbatim in the official README examples: error, promiseFunction, hardRejection. Parameter and return types are not given by the official README, so signatures are marked unverified.
Errors
The following points are quoted verbatim from the official documentation. 来源:https://cdn.jsdelivr.net/gh/sindresorhus/hard-rejection@latest/readme.md · 取证方式:HTTP GET 官方 README/文档页(HTML 去标签) · 抓取时间:2026-11-07T13:50:12.674Z. Any error type, throw condition or recovery step not stated there is left unspecified; this page does not infer exception classes or return values.
- This module exits the process with an error message right away when an unhandled rejection is encountered. (https://cdn.jsdelivr.net/gh/sindresorhus/hard-rejection@latest/readme.md)
- Related - loud-rejection - Make unhandled promise rejections fail loudly instead of the default silent fail - More… ## License MIT © Sindre Sorhus (https://cdn.jsdelivr.net/gh/sindresorhus/hard-rejection@latest/readme.md)
Verification notes
- Official source: https://github.com/sindresorhus/hard-rejection
- Evidence: https://cdn.jsdelivr.net/gh/sindresorhus/hard-rejection@latest/readme.md
- Checked on 2026-11-04 by
scripts/phase11/build-api-profiles.mjs
API reference evidence
Fetched from official sources on 2026-11-08T18:03:00+08:00 via WebFetch https://raw.githubusercontent.com/sindresorhus/hard-rejection/main/index.d.ts.
hardRejection→ signature from https://raw.githubusercontent.com/sindresorhus/hard-rejection/main/index.d.ts; official text: “declare const hardRejection: { /** Make unhandled promise rejections fail hard right away instead of the default silent fail. @param log - Custom logging functio”
FAQ
- What does hard-rejection do?
- Note: That might not be desirable as unhandled rejections can be handled at a future point in time, although not common.
- How do I install hard-rejection?
- Run `npm install hard-rejection`.
- Where can I verify the API details?
- Official repository/documentation: https://github.com/sindresorhus/hard-rejection. Checked on 2026-11-04; signatures and return values not stated in the official README are marked unverified.
Report a problem with this API docOpens a pre-filled issue on GitHub.