open class Promise<out T>
Exposes the JavaScript Promise object to Kotlin.
Exposes the JavaScript Promise object to Kotlin.
Promise( executor: (resolve: (T) -> Unit, reject: (Throwable) -> Unit) -> Unit)
open fun <S> catch(onRejected: (Throwable) -> S): Promise<S>
open fun <S> then(onFulfilled: ((T) -> S)?): Promise<S>
open fun <S> then( onFulfilled: ((T) -> S)?, onRejected: ((Throwable) -> S)? ): Promise<S>
fun <S> all( promise: Array<out Promise<S>> ): Promise<Array<out S>>
fun <S> race(promise: Array<out Promise<S>>): Promise<S>
fun reject(e: Throwable): Promise<Nothing>
fun <S> resolve(e: S): Promise<S>
fun <S> resolve(e: Promise<S>): Promise<S>
fun <T, S> Promise<Promise<T>>.then( onFulfilled: ((T) -> S)? ): Promise<S>
fun <T, S> Promise<Promise<T>>.then( onFulfilled: ((T) -> S)?, onRejected: ((Throwable) -> S)? ): Promise<S>
© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.js/-promise/index.html