Skip to content

Commit

Permalink
Merge pull request #109 from vercel/fix/runtime-types
Browse files Browse the repository at this point in the history
fix(primitives): expose AbortController & AbortSignal types properly
  • Loading branch information
Kikobeats committed Aug 24, 2022
2 parents 364d69f + 7b183d8 commit ac82545
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions packages/primitives/type-definitions/abort-controller.d.ts
@@ -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 }

1 comment on commit ac82545

@vercel
Copy link

@vercel vercel bot commented on ac82545 Aug 24, 2022

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

Please sign in to comment.