UNPKG

@visulima/packem

Version:

A fast and modern bundler for Node.js and TypeScript.

12 lines (10 loc) 432 B
/** * 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 = memoizeByKey;