UNPKG

abort-utils

Version:

Utility functions to use and combine `AbortSignal` and `AbortController` with Promises

12 lines (11 loc) 313 B
type Handle = { disconnect(): void; } | { abort(reason: any): void; } | { abortAndReset(reason: any): void; } | ((reason: any) => void); export declare function onAbort(signal: AbortController | AbortSignal | undefined, ...handles: Handle[]): { [Symbol.dispose](): void; } | undefined; export {};