Promise

interface Promise<T>

Deprecated

Use CompletableDeferred instead

A simple interface compatible with JS Promise used for interop. In other cases just use CompletableDeferred instead.

Functions

Link copied to clipboard
suspend fun <T> Promise<T>.await(): T
Link copied to clipboard
abstract fun <S> then(onFulfilled: (T) -> S?, onRejected: (Throwable) -> S?): Promise<S>
Link copied to clipboard
fun <T> Promise<T>.toDeferred(): Deferred<T>