UNPKG

abort-utils

Version:

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

6 lines (5 loc) 241 B
/** * @param promise The promise to watch for resolution or rejection. * @returns An `AbortSignal` that aborts when the promise is resolved or rejected */ export declare function signalFromPromise(promise: Promise<unknown>): AbortSignal;