@shopware-ag/dive
Version:
Shopware Spatial Framework
18 lines (17 loc) • 866 B
TypeScript
export declare class DIVEAbortablePromise<T> implements Promise<T> {
private _executor;
readonly isDIVEAbortablePromise: true;
readonly [Symbol.toStringTag]: string;
private _abortController;
private _promise;
private _settled;
constructor(_executor: (signal: AbortSignal) => Promise<T>);
get signal(): AbortSignal;
get pending(): boolean;
get settled(): boolean;
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
catch<TResult = never>(onrejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
finally(onfinally?: (() => void) | null): Promise<T>;
abort(reason?: unknown): void;
private _execute;
}