All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jsMain.js.promise.PromiseResult.kt Maven / Gradle / Ivy

@file:Suppress(
    "NOTHING_TO_INLINE",
)

package js.promise

import kotlin.js.Promise

// T | Promise
sealed external interface PromiseResult

inline fun  PromiseResult(
    value: T,
): PromiseResult =
    value.unsafeCast>()

inline fun  PromiseResult(
    value: Promise,
): PromiseResult =
    value.unsafeCast>()

inline fun  PromiseResult.toPromise(): Promise =
    Promise.resolve(unsafeCast())




© 2015 - 2025 Weber Informatics LLC | Privacy Policy