/** * Creates a function that memoizes the result of 'fn'. * * @param {function} fn The function to have its result memoized. * @param {function} [toKey] Function to resolve the cache key. * * @returns {function} Returns the new memoized function. */ export default function createMemoized(fn: Function, toKey?: Function): Function;