UNPKG

619 BTypeScriptView Raw
1import { Observable } from '../data/observable';
2/**
3 * The signal class.
4 * @see https://dom.spec.whatwg.org/#abortsignal
5 */
6export default class AbortSignal extends Observable {
7 /**
8 * AbortSignal cannot be constructed directly.
9 */
10 constructor();
11 /**
12 * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise.
13 */
14 get aborted(): boolean;
15}
16/**
17 * Create an AbortSignal object.
18 */
19export declare function createAbortSignal(): AbortSignal;
20/**
21 * Abort a given signal.
22 */
23export declare function abortSignal(signal: AbortSignal): void;