computed-async-mobx
Version:
Define a computed by returning a Promise
13 lines (12 loc) • 450 B
TypeScript
/**
* Like computed, except that after creation, subsequent re-evaluations
* are throttled to occur at the specified minimum interval.
*
* @param compute The function to evaluate in reaction
* @param delay The minimum delay between evaluations
* @param name (optional) For MobX debug purposes
*/
export declare function throttledComputed<T>(compute: () => T, delay: number, name?: string): {
get(): NonNullable<T>;
refresh(): void;
};