@isaacs/cached
    Preparing search index...

    Function cached

    • Cache an arbitrary function of arity 0 or 1. May provide an optional Map<argType, returnType>, or one will be created.

      Type Parameters

      • R

      Parameters

      • fn: () => R
      • Optionalcache: MapLike<undefined, R>

      Returns () => R & { cache: Map<undefined, R> }

    • Cache an arbitrary function of arity 0 or 1. May provide an optional Map<argType, returnType>, or one will be created.

      Type Parameters

      • A
      • R

      Parameters

      Returns (arg: A) => R & { cache: Map<A, R> }