Function memo

  • Description

    Cache the specified function, and return the result directly if the parameters are consistent.

    Returns

    Return a function to transfer.

    Parameters

    • handler: ((...args: unknown[]) => unknown)

      The function to cache.

        • (...args: unknown[]): unknown
        • Parameters

          • Rest ...args: unknown[]

          Returns unknown

    Returns ((...args: unknown[]) => any)

      • (...args: unknown[]): any
      • Parameters

        • Rest ...args: unknown[]

        Returns any

Generated using TypeDoc