async-wrappers
Version:
A set of wrapper functions to perform debouncing, throttling, retrying etc.
16 lines (15 loc) • 1.14 kB
TypeScript
export { default as debounce } from './debounce';
export { default as throttle } from './throttle';
export { default as wait } from './wait';
export { default as retry } from './retry';
export { latestArguments, combineArguments, callArguments, extendArguments } from './callReducers';
import { CallFunction as CF } from './callReduce';
export declare type CallFunction<F extends (...args: any[]) => any, Args extends any[]> = CF<F, Args>;
import { ArgumentsReducer as AR, ReducerFunction as RF } from './callReducers';
export declare type ArgumentsReducer<InvokeArgs extends any[] = any[], CallArgs extends any[] = any[]> = AR<InvokeArgs, CallArgs>;
declare type FuncOrArray = (...args: any[]) => any | any[];
export declare type ReducerFunction<IF extends (...args: any[]) => any, CallFuncOrArgs extends FuncOrArray = IF> = RF<IF, CallFuncOrArgs>;
import { Debounced as DB } from './debounce';
export declare type Debounced<F extends (...args: any[]) => any, R extends RF<F, any>> = DB<F, R>;
import { Throttled as TH } from './throttle';
export declare type Throttled<F extends (...args: any[]) => any, R extends RF<F, any>> = TH<F, R>;