Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from vercel/fix/runtime-types
fix(primitives): expose AbortController & AbortSignal types properly
- Loading branch information
Showing
1 changed file
with
5 additions
and
11 deletions.
There are no files selected for viewing
16 changes: 5 additions & 11 deletions
16
packages/primitives/type-definitions/abort-controller.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,12 @@ | ||
declare const AbortControllerConstructor: typeof AbortController | ||
declare const AbortSignalConstructor: typeof AbortSignal | ||
declare const DOMExceptionConstructor: typeof DOMException | ||
declare const AbortControllerConstructor: AbortController | ||
|
||
declare var WathwgAbortSignal: { | ||
prototype: AbortSignalConstructor | ||
new (): AbortSignalConstructor | ||
declare var AbortSignal: { | ||
prototype: typeof AbortSignal | ||
new (): typeof AbortSignal | ||
/** Returns an AbortSignal instance which will be aborted in milliseconds milliseconds. Its abort reason will be set to a "TimeoutError" DOMException. */ | ||
timeout(milliseconds: number): AbortSignal | ||
/** Returns an AbortSignal instance whose abort reason is set to reason if not undefined; otherwise to an "AbortError" DOMException. */ | ||
abort(reason?: string): AbortSignal | ||
} | ||
|
||
export { | ||
AbortControllerConstructor as AbortController, | ||
DOMExceptionConstructor as DOMException, | ||
WathwgAbortSignal as AbortSignal, | ||
} | ||
export { AbortControllerConstructor as AbortController, AbortSignal } |
ac82545
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
edge-runtime – ./
edge-runtime.vercel.app
edge-runtime-git-main.vercel.sh
edge-runtime.vercel.sh