Skip to content

PromiseUtil

Static Badge

These APIs provide a wrapper for Promise to use that API across the two standard required by JS and WasmJs targets in the web target without any extra boilerplate

await

Description

Wrapper method to use await correctly a Promise

Usage

fun getValue(): String {
    val anyPromise: Promise<String> = anyPromiseRoutineProducer()

    return anyPromise.await()
}