Options
All
  • Public
  • Public/Protected
  • All
Menu

A signal object that allows you to communicate with a request and abort it if required via its associated AbortController object.

remarks

This interface is compatible with the AbortSignal interface defined in TypeScript's DOM types. It is redefined here, so it can be polyfilled without a DOM, for example with abortcontroller-polyfill in a Node environment.

Hierarchy

  • AbortSignal

Index

Properties

Readonly aborted

aborted: boolean

Whether the request is aborted.

Methods

addEventListener

  • addEventListener(type: "abort", listener: () => void): void
  • Add an event listener to be triggered when this signal becomes aborted.

    Parameters

    • type: "abort"
    • listener: () => void
        • (): void
        • Returns void

    Returns void

removeEventListener

  • removeEventListener(type: "abort", listener: () => void): void
  • Remove an event listener that was previously added with AbortSignal.addEventListener.

    Parameters

    • type: "abort"
    • listener: () => void
        • (): void
        • Returns void

    Returns void

Generated using TypeDoc