Promise

expect class Promise<T : JsAny?>(executor: (resolve: (T) -> Unit, reject: (JsAny) -> Unit) -> Unit) : JsAny
actual external class Promise<T : JsAny?>(executor: (resolve: (T) -> Unit, reject: (JsAny) -> Unit) -> Unit) : JsAny
actual external class Promise<T : JsAny?> : JsAny

Constructors

Link copied to clipboard
expect constructor(executor: (resolve: (T) -> Unit, reject: (JsAny) -> Unit) -> Unit)
actual constructor(executor: (resolve: (T) -> Unit, reject: (JsAny) -> Unit) -> Unit)

Types

Link copied to clipboard
expect object Companion
actual object Companion
actual object Companion

Functions

Link copied to clipboard
expect fun <S : JsAny?> catch(onRejected: (JsAny) -> S): Promise<S>
actual fun <S : JsAny?> catch(onRejected: (JsAny) -> S): Promise<S>
Link copied to clipboard
expect fun finally(onFinally: () -> Unit): Promise<T>
actual fun finally(onFinally: () -> Unit): Promise<T>
actual fun finally(onFinally: () -> Unit): Promise<T>
Link copied to clipboard
expect fun <S : JsAny?> then(onFulfilled: (T) -> S?): Promise<S>
expect fun <S : JsAny?> then(onFulfilled: (T) -> S?, onRejected: (JsAny) -> S?): Promise<S>
actual fun <S : JsAny?> then(onFulfilled: (T) -> S?): Promise<S>
actual fun <S : JsAny?> then(onFulfilled: (T) -> S?, onRejected: (JsAny) -> S?): Promise<S>