UNPKG

@newdash/newdash

Version:

javascript/typescript utility library

12 lines (11 loc) 375 B
import { GeneralFunction } from "../types"; /** * fallback to cache, if runner throw error, will try to return the latest cached value * * @since 5.15.0 * @category Fallback * * @param runner * @param cacheSize the maximum number cache item (different parameters) */ export declare function fallbackCache<T extends GeneralFunction>(runner: T, cacheSize?: number): T;