Options
All
  • Public
  • Public/Protected
  • All
Menu

Module utils/memoize

Index

Functions

Functions

Const memoize

  • memoize<Argument, Result>(fn: (input: Argument) => Promise<Result>, getIdentifier?: (input: Argument) => string): (input: Argument) => Promise<Result>
  • Returns a memoized version of a function.

    Type parameters

    • Argument

    • Result

    Parameters

    • fn: (input: Argument) => Promise<Result>
        • (input: Argument): Promise<Result>
        • Parameters

          • input: Argument

          Returns Promise<Result>

    • getIdentifier: (input: Argument) => string = ...
        • (input: Argument): string
        • Parameters

          • input: Argument

          Returns string

    Returns (input: Argument) => Promise<Result>

      • (input: Argument): Promise<Result>
      • Parameters

        • input: Argument

        Returns Promise<Result>

Generated using TypeDoc