[stdlib] Explicit visibility and return types: Wasm
This commit is contained in:
committed by
Space Team
parent
381a8fd55f
commit
cfa8a1dc0f
@@ -17,14 +17,14 @@ public external interface Dynamic : JsAny
|
||||
* Reinterprets this value as a value of the Dynamic type.
|
||||
*/
|
||||
@Deprecated("If value is a subtype of JsAny, use JsAny instead. Otherwise, use toJsReference", level = DeprecationLevel.ERROR)
|
||||
fun Any.asDynamic(): JsAny = this.toJsReference()
|
||||
public fun Any.asDynamic(): JsAny = this.toJsReference()
|
||||
|
||||
/**
|
||||
* Reinterprets this value as a value of the Dynamic type.
|
||||
*/
|
||||
@Deprecated("Use toJsString instead", level = DeprecationLevel.ERROR, replaceWith = ReplaceWith("this.toJsString()"))
|
||||
@kotlin.internal.InlineOnly
|
||||
fun String.asDynamic(): JsString = this.toJsString()
|
||||
public fun String.asDynamic(): JsString = this.toJsString()
|
||||
|
||||
private fun jsThrow(e: JsAny) {
|
||||
js("throw e;")
|
||||
|
||||
@@ -8,7 +8,7 @@ package kotlin.js
|
||||
/** JavaScript Array */
|
||||
@JsName("Array")
|
||||
public external class JsArray<T : JsAny?> : JsAny {
|
||||
val length: Int
|
||||
public val length: Int
|
||||
}
|
||||
|
||||
public operator fun <T : JsAny?> JsArray<T>.get(index: Int): T? =
|
||||
|
||||
@@ -20,7 +20,7 @@ public external class Promise<out T : JsAny?>(executor: (resolve: (T) -> Unit, r
|
||||
public fun <S : JsAny?> catch(onRejected: (JsAny) -> S): Promise<S>
|
||||
public fun finally(onFinally: () -> Unit): Promise<T>
|
||||
|
||||
companion object {
|
||||
public companion object {
|
||||
public fun <S : JsAny?> all(promise: JsArray<out Promise<S>>): Promise<JsArray<out S>>
|
||||
public fun <S : JsAny?> race(promise: JsArray<out Promise<S>>): Promise<S>
|
||||
public fun reject(e: JsAny): Promise<Nothing>
|
||||
|
||||
Reference in New Issue
Block a user