OpenPromise

class wv.Util.OpenPromise()

This represents a Promise that has its resolve and reject functions bundled as methods attached to the promise object.

Index

Properties

Methods

Properties

wv.Util.OpenPromise.[toStringTag]

readonly inherited

[toStringTag]: string

Methods

wv.Util.OpenPromise.catch()

inherited

catch(onrejected: (None | (reason: any) => (TResult | PromiseLike))): Promise

Attaches 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)): Promise

Attaches 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: any

Returns: void

wv.Util.OpenPromise.resolve()
resolve(this: OpenPromise<T>, value: (T | PromiseLike)): void

Parameters

this: OpenPromise<T>

value: (T | PromiseLike)

Returns: void

resolve(this: OpenPromise<void>): void

Parameters

this: OpenPromise<void>

Returns: void

wv.Util.OpenPromise.then()

inherited

then(onfulfilled: (None | (value: T) => (TResult1 | PromiseLike)), onrejected: (None | (reason: any) => (TResult2 | PromiseLike))): Promise

Attaches 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.