reusePending()
Function
reusePending<Args, Return>(fn:
Function
):Function
In case a previous invocation is still running, return the result of that invocation when it is done instead of executing the function again.
Source: packages/concurrency-utils/src/lib/reuse-pending.ts:6
Type parameters
Parameter |
---|
Args extends unknown [] |
Return |
Parameters
Parameter | Type |
---|---|
fn | (...params: Args ) => Promise <Return > |
Returns
Function
(...args:
Args
):Promise
<Return
>Parameters
Parameter Type ...args Args
Returns
Promise
<Return
>