Promise.then

Special overload of then with no onFulfilled function. In this scenario, onRejected can act as a filter, converting errors into values for the next promise in the chain.

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

Meta