then

open fun <S> then(onFulfilled: (T) -> S?): Promise<S>(source)
open fun <S> then(onFulfilled: (T) -> S?, onRejected: (Throwable) -> S?): Promise<S>(source)

Since Kotlin

1.1