Current section

Files

Jump to
spellweaver priv bun node_modules cspell-lib dist lib util memorizeLastCall.d.ts
Raw

priv/bun/node_modules/cspell-lib/dist/lib/util/memorizeLastCall.d.ts

/**
* Create a function that memorizes the last call. If the next call is called with the same arguments, the
* the last value is returned.
* @param fn - function to memorize
* @returns a new function.
*/
export declare function memorizeLastCall<T>(fn: (...p: []) => T): (...p: []) => T;
export declare function memorizeLastCall<T, K0>(fn: (...p: [K0]) => T): (...p: [K0]) => T;
export declare function memorizeLastCall<T, K0, K1>(fn: (...p: [K0, K1]) => T): (...p: [K0, K1]) => T;
export declare function memorizeLastCall<T, K0, K1, K2>(fn: (...p: [K0, K1, K2]) => T): (...p: [K0, K1, K2]) => T;
export declare function memorizeLastCall<T, K0, K1, K2, K3>(fn: (...p: [K0, K1, K2, K3]) => T): (...p: [K0, K1, K2, K3]) => T;
export declare function memorizeLastCall<T, K>(fn: (...p: [...K[]]) => T): (...p: [...K[]]) => T;
//# sourceMappingURL=memorizeLastCall.d.ts.map