UNPKG

race-cancellation

Version:

Utilities for using Promise.race([task, cancellation]) for async/await code.

14 lines 499 B
import { RaceCancelFn } from "./interfaces.js"; /** * A no-op implemenation of a {@link RaceCancelFn} function. * * @remarks * Allows an async function to add cancellation support in a backwards compatible way by * adding optional param by providing this as a default. * * @param asyncFnOrPromise - an {@link AsyncFn} or `PromiseLike` that will be resolved. * @public */ declare const noopRaceCancel: RaceCancelFn; export default noopRaceCancel; //# sourceMappingURL=noopRaceCancel.d.ts.map