UNPKG

react-history-switch

Version:

Self-hosted context-free Switch routing component for History.js library (React). The library was created to transfer navigation responsibility from a view into Mobx state container (MVC). Also can be used separately as a self-hosted router

8 lines (7 loc) 376 B
export interface IWrappedFn<T extends any = any, P extends any[] = any> { (...args: P): Promise<T | typeof CANCELED_SYMBOL>; cancel(): void; } export declare const CANCELED_SYMBOL: unique symbol; export declare const cancelable: <T extends any = any, P extends any[] = any[]>(promise: (...args: P) => Promise<T>) => IWrappedFn<T, P>; export default cancelable;