OpenPromise
-
class
wv.Util.OpenPromise() This represents a
Promisethat has itsresolveandrejectfunctions bundled as methods attached to the promise object.
Properties
-
wv.Util.OpenPromise.[toStringTag] readonly inherited
[toStringTag]: string
Methods
-
wv.Util.OpenPromise.catch() inherited
catch(onrejected: (None | (reason: any) => (TResult | PromiseLike))): PromiseAttaches a callback for only the rejection of the Promise.
Parameters
onrejected: (None | (reason: any) => (TResult | PromiseLike))
The callback to execute when the Promise is rejected.Returns: Promise
A Promise for the completion of the callback.
-
wv.Util.OpenPromise.finally() inherited
finally(onfinally: (None | () => void)): PromiseAttaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.
Parameters
onfinally: (None | () => void)
The callback to execute when the Promise is settled (fulfilled or rejected).Returns: Promise
A Promise for the completion of the callback.
-
wv.Util.OpenPromise.reject() - reject(error: any): void
Parameters
error: anyReturns: void
-
wv.Util.OpenPromise.resolve() - resolve(this:
OpenPromise<T>, value: (T | PromiseLike)): voidParameters
this:
OpenPromise<T>value: (T | PromiseLike)
Returns: void
resolve(this:OpenPromise<void>): voidParameters
this:OpenPromise<void>Returns: void
-
wv.Util.OpenPromise.then() inherited
then(onfulfilled: (None | (value: T) => (TResult1 | PromiseLike)), onrejected: (None | (reason: any) => (TResult2 | PromiseLike))): PromiseAttaches callbacks for the resolution and/or rejection of the Promise.
Parameters
onfulfilled: (None | (value: T) => (TResult1 | PromiseLike))
The callback to execute when the Promise is resolved.onrejected: (None | (reason: any) => (TResult2 | PromiseLike))
The callback to execute when the Promise is rejected.Returns: Promise
A Promise for the completion of which ever callback is executed.