Class BindOnceFuture<R, This, T>
Type Parameters
R
This = unknown
T extends ((this: This, ...args: unknown[]) => R) = (() => R)
Constructors
constructor
- new BindOnceFuture<R, This, T>(_callback: T, _that: This): BindOnceFuture<R, This, T>
Type Parameters
R
This = unknown
T extends ((this: This, ...args: unknown[]) => R) = (() => R)
Parameters
Accessors
promise
- get promise(): Promise<R>
Methods
call
- call(...args: Parameters<T>): Promise<R>
Parameters
Rest ...args: Parameters<T>
Returns Promise<R>
Bind the callback and only invoke the callback once regardless how many times
BindOnceFuture.call
is invoked.