DisposablePromise

external interface DisposablePromise<out T> : Promise<T> , Disposable(source)

Functions

Link copied to clipboard
inline fun <T> Promise<T>.asDeferred(): Deferred<T>
Link copied to clipboard
open inline suspend override fun await(): T
Link copied to clipboard
inline fun <T> Promise<T>.catch(noinline onRejected: (JsError) -> T): Promise<T>
Link copied to clipboard
fun finally(onFinally: () -> Unit): Promise<T>
Link copied to clipboard
inline fun <T> Promise<T>.flatCatch(noinline onRejected: (JsError) -> PromiseResult<T>): Promise<T>
Link copied to clipboard
override fun <R> flatThen(onFulfilled: (T) -> PromiseResult<R>): Promise<R>
override fun <R> flatThen(onFulfilled: (T) -> PromiseResult<R>, onRejected: (JsError) -> PromiseResult<R>): Promise<R>
Link copied to clipboard
open operator fun get(key: Symbol.dispose): () -> Unit
Link copied to clipboard
override fun <R> then(onFulfilled: (T) -> R): Promise<R>
override fun <R> then(onFulfilled: (T) -> R, onRejected: (JsError) -> R): Promise<R>
Link copied to clipboard
open inline fun thenTo(continuation: Continuation<T>)
Link copied to clipboard
inline fun <T> PromiseResult<T>.toPromise(): Promise<T>
Link copied to clipboard
suspend fun <T> PromiseLike<T>.toResult(): Result<T>