Class InitializationObserver<T, E>
Constructors
constructor
- new InitializationObserver<T, E>(timeout, timeoutMessage?): InitializationObserver<T, E>
Parameters
- timeout: number
Optional
timeoutMessage: E
Properties
Private
_acceptRejectPairs
_acceptRejectPairs: IAccepptRejectPair<T, E>[] Private
_initializedValue
Private
_isInitialized
_isInitialized: boolean
Methods
Private
_fireAccept
- _fireAccept(value): void
Returns void
Private
_fireReject
- _fireReject(error): void
Returns void
accept
- accept(value): void
Returns void
waitForInitialized
- waitForInitialized(): Promise<T>
Returns Promise<T>