AbortController.d.ts 535 B

123456789101112131415
  1. /** @private */
  2. export declare class AbortController implements AbortSignal {
  3. private _isAborted;
  4. onabort: (() => void) | null;
  5. abort(): void;
  6. get signal(): AbortSignal;
  7. get aborted(): boolean;
  8. }
  9. /** Represents a signal that can be monitored to determine if a request has been aborted. */
  10. export interface AbortSignal {
  11. /** Indicates if the request has been aborted. */
  12. aborted: boolean;
  13. /** Set this to a handler that will be invoked when the request is aborted. */
  14. onabort: (() => void) | null;
  15. }