Functions
Const memoize
- memoize<Argument, Result>(fn: (input: Argument) => Promise<Result>, getIdentifier?: (input: Argument) => string): (input: Argument) => Promise<Result>
-
Type parameters
Parameters
-
fn: (input: Argument) => Promise<Result>
-
- (input: Argument): Promise<Result>
-
Parameters
Returns Promise<Result>
-
getIdentifier: (input: Argument) => string = ...
-
- (input: Argument): string
-
Parameters
Returns string
Returns (input: Argument) => Promise<Result>
-
- (input: Argument): Promise<Result>
-
Parameters
Returns Promise<Result>
Returns a memoized version of a function.