minishouyin/node_modules/schema-utils/declarations/util/memorize.d.ts

13 lines
334 B
TypeScript
Raw Permalink Normal View History

2025-11-12 11:35:57 +08:00
export default memoize;
export type FunctionReturning<T> = () => T;
/**
* @template T
* @typedef {() => T} FunctionReturning
*/
/**
* @template T
* @param {FunctionReturning<T>} fn memorized function
* @returns {FunctionReturning<T>} new function
*/
declare function memoize<T>(fn: FunctionReturning<T>): FunctionReturning<T>;