Promise.then

Registers the specified fulfillment and rejection handlers. If the promise is already resolved, they are called as soon as possible (but not immediately).

  1. Promise!(Unpromise!R, F) then(R delegate(A) onFulfilled, R delegate(E) onRejected)
    class Promise(T, E : Throwable = Exception)
    Promise!(Unpromise!R, F)
    then
    (
    R
    F = E
    )
    (
    R delegate
    (
    A
    )
    onFulfilled
    ,
    R delegate
    (
    E
    )
    onRejected = null
    )
  2. Promise!(CommonType!(Unpromise!R, T), F) then(typeof(null) onFulfilled, R delegate(E) onRejected)

Meta