Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AbortSignal

Package version

An aborter instance implements AbortSignal interface, can abort HTTP requests.

  • Call AbortSignal.none to create a new AbortSignal instance that cannot be cancelled. Use AbortSignal.none when you are required to pass a cancellation token but the operation cannot or will not ever be cancelled.
example

// Abort without timeout await doAsyncWork(AbortSignal.none);

export
class

AbortSignal

implements

{AbortSignalLike}

Hierarchy

  • AbortSignal

Implements

Index

Constructors

constructor

Properties

onabort

onabort: function | null = null

onabort event listener.

memberof

AbortSignal

Accessors

aborted

  • get aborted(): boolean

Static none

Methods

addEventListener

  • addEventListener(_type: "abort", listener: function): void

dispatchEvent

  • dispatchEvent(_event: Event): boolean

removeEventListener

  • removeEventListener(_type: "abort", listener: function): void

Generated using TypeDoc