UNPKG

async-selector-kit

Version:

An opinionated API to simplify using async-selector

6 lines (5 loc) 332 B
import { PromiseStatus } from "./types"; declare type AsyncFunction = (...params: any[]) => Promise<any>; export declare function abortableFetch<F extends AsyncFunction>(status: PromiseStatus | undefined, f: F): F; export declare function cancellable<F extends AsyncFunction>(status: PromiseStatus | undefined, f: F): F; export {};