Package-level declarations

Types

Link copied to clipboard
external interface DisposablePromise<out T> : Promise<T> , Disposable
Link copied to clipboard
open external class Promise<out T>(executor: (resolve: PromiseResolve<T>) -> Unit) : PromiseLike<T>
Link copied to clipboard
Link copied to clipboard
external interface PromiseLike<out T> : PromiseResult<T>
Link copied to clipboard
sealed external interface PromiseReject
Link copied to clipboard
Link copied to clipboard
sealed external interface PromiseResolve<T>
Link copied to clipboard
sealed external interface PromiseResult<out T>
Link copied to clipboard
sealed external interface PromiseSettledResult<T>
Link copied to clipboard
sealed external interface PromiseWithResolvers<T>

Functions

Link copied to clipboard
inline fun <T> Promise<T>.asDeferred(): Deferred<T>
Link copied to clipboard
inline fun <T> Promise<T>.catch(noinline onRejected: (JsError) -> T): Promise<T>
Link copied to clipboard
fun <T> DisposablePromise(promise: Promise<T>, dispose: () -> Unit): DisposablePromise<T>
Link copied to clipboard
inline fun <T> Promise<T>.flatCatch(noinline onRejected: (JsError) -> PromiseResult<T>): Promise<T>
Link copied to clipboard
inline fun <T> PromiseResult(value: T): PromiseResult<T>
Link copied to clipboard
inline fun <T> PromiseResult<T>.toPromise(): Promise<T>
Link copied to clipboard