abort-controller.d.ts 598 B

123456789101112
  1. declare const AbortControllerConstructor: AbortController
  2. declare var AbortSignal: {
  3. prototype: typeof AbortSignal
  4. new (): typeof AbortSignal
  5. /** Returns an AbortSignal instance which will be aborted in milliseconds milliseconds. Its abort reason will be set to a "TimeoutError" DOMException. */
  6. timeout(milliseconds: number): AbortSignal
  7. /** Returns an AbortSignal instance whose abort reason is set to reason if not undefined; otherwise to an "AbortError" DOMException. */
  8. abort(reason?: string): AbortSignal
  9. }
  10. export { AbortControllerConstructor as AbortController, AbortSignal };