kotlin-stdlib / kotlin.js / Promise / then then JS 1.1 open fun <S> then(onFulfilled: ((T) -> S)?): Promise<S> open fun <S> then( onFulfilled: ((T) -> S)?, onRejected: ((Throwable) -> S)?): Promise<S>