• Creates a memoized function with LRU caching

    Type Parameters

    • T

      Cache key type

    • V

      Cache value type

    • Args extends any[]

      Function argument types

    Parameters

    • __namedParameters: { getKey: (args: Args) => T; getValue: (args: Args) => V; maxSize: number }

    Returns {
        cache: LRUCache<T, V>;
        getKey: (args: Args) => T;
        getValue: (args: Args) => V;
        (...args: Args): NonNullable<V>;
    }