Class: Promise

ko/promise~ Promise


Promise()

Methods


<static> catch(onRejected)

Parameters:
Name Type Description
onRejected function

A Function called if the Promise is rejected. This function has one argument, the rejection reason.

Returns:

Returns the current Promise instance

Type
this

<static> each(callback)

Parameters:
Name Type Description
callback function

Invoked for each callback

Returns:

Returns the current Promise instance

Type
this

<static> then(onFulfilled [, onRejected])

Parameters:
Name Type Argument Description
onFulfilled function

A Function called if the Promise is fulfilled. This function has one argument, the fulfillment value.

onRejected function <optional>

A Function called if the Promise is rejected. This function has one argument, the rejection reason.

Returns:

Returns the current Promise instance

Type
this