Class ExposedPromise<T, U>
Constructors
constructor
- new ExposedPromise<T, U>(): ExposedPromise<T, U>
-
Properties
Private
Readonly
_promise
_promise: any
Private
_promiseError
_promiseError: any
Private
_promiseResult
_promiseResult: any
Private
_reject
_reject: any
Private
_resolve
_resolve: any
Private
_status
_status: any
Accessors
promise
- get promise(): Promise<T>
-
Returns Promise<T>
promiseError
- get promiseError(): undefined | U
-
Returns undefined | U
promiseResult
- get promiseResult(): undefined | T
-
Returns undefined | T
reject
- get reject(): Reject<U>
-
Returns Reject<U>
resolve
- get resolve(): Resolve<T>
-
Returns Resolve<T>
Methods
isPending
- isPending(): boolean
-
Returns boolean
isRejected
- isRejected(): boolean
-
Returns boolean
isResolved
- isResolved(): boolean
-
Returns boolean
isSettled
- isSettled(): boolean
-
Returns boolean
Static
reject
- reject<T, U>(reason?): ExposedPromise<T, U>
-
Static
resolve
- resolve<T>(value): ExposedPromise<T, unknown>
-
Exposed promise allow you to create a promise and then resolve it later, from the outside