Function: memoizer
lib.memoizer
▸ memoizer<Func
>(sourceFunc
): (...args
: any
[]) => ReturnType
<Func
>
Wraps a function for memoization. The resulting function will return the same result if given the same arguments.
Type parameters
Name | Type |
---|---|
Func |
extends (...args : any []) => any |
Parameters
Name | Type |
---|---|
sourceFunc |
Func |
Returns
fn
▸ (...args
): ReturnType
<Func
>
Parameters
Name | Type |
---|---|
...args |
any [] |
Returns
ReturnType
<Func
>