@visulima/packem
Version:
A fast and modern bundler for Node.js and TypeScript.
11 lines (10 loc) • 437 B
text/typescript
/**
* Modified copy of https://github.com/huozhi/bunchee/blob/main/src/lib/memoize.ts
*
* The MIT License (MIT)
*
* Copyright (c) 2018 these people -> https://github.com/huozhi/bunchee/graphs/contributors
*/
type CacheKeyResolver = string | ((...arguments_: any[]) => string);
declare const memoizeByKey: <T extends (...arguments_: any[]) => any>(function_: T) => ((cacheKey?: CacheKeyResolver) => T);
export default memoizeByKey;