/** * Simple memoization using WeakMap. * Only suitable for functions with single argument of non-primitive type. * * @param {Function} fn * @returns {Function} * @example * const addFlag = obj => ({...obj, flag: true }); * const memoize = memoizeWeak(addFlag)); * const test = {test: 1}; * memoize(test); // from addFlag call * memoize({test: 1}); // from addFlag call; * memoize(test); // from cache */ declare const _default: (fn: T) => T; export default _default;