Constructors
constructor
- new default<T, R>(factory, checker?): default<T, R>
Parameters
- factory: ((r: R) => Promise<T>)
- (r): Promise<T>
Returns Promise<T>
- checker: ((value: T) => Promise<boolean>) = ...
- (value): Promise<boolean>
Returns Promise<boolean>
Methods
clear
- clear(): void
Returns void
getValue
- getValue(): undefined | T
Returns undefined | T
instance
- instance(r): Promise<T>
Returns Promise<T>
Represents a class that can be used to create a singleton instance of a class that is created asynchronously.