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

docs(async): add note about deadline() DOMException name of TimeoutError #5833

Merged
merged 3 commits into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions async/deadline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ export interface DeadlineOptions {
* Note: Prefer to use {@linkcode AbortSignal.timeout} instead for the APIs
* that accept {@linkcode AbortSignal}.
*
* @throws {DOMException} When the provided duration runs out before resolving
* or if the optional signal is aborted, and `signal.reason` is undefined.
* @throws {DOMException & { name: "TimeoutError" }} If the provided duration
* runs out before resolving.
* @throws {DOMException & { name: "AbortError" }} If the optional signal is
* aborted with the default `reason` before resolving or timing out.
* @throws {AbortSignal["reason"]} If the optional signal is aborted with a
* custom `reason` before resolving or timing out.
* @typeParam T The type of the provided and returned promise.
* @param p The promise to make rejectable.
* @param ms Duration in milliseconds for when the promise should time out.
Expand Down