[Wasm] Deprecate @JsFun with warning
kotlin.js.js("code") should be used instead
This commit is contained in:
committed by
Space Team
parent
01fcc84d73
commit
3566d918d2
@@ -1,3 +1,5 @@
|
|||||||
|
@file:Suppress("DEPRECATION")
|
||||||
|
|
||||||
@JsFun("() => {}")
|
@JsFun("() => {}")
|
||||||
external fun topLevelExternalFun(): Unit
|
external fun topLevelExternalFun(): Unit
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ package kotlin
|
|||||||
*
|
*
|
||||||
* This is a temporary annotation because K/Wasm <-> JS interop is not designed yet.
|
* This is a temporary annotation because K/Wasm <-> JS interop is not designed yet.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated("@JsFun annotation is deprecated, use `fun f() = js(\"code\")` instead.")
|
||||||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
|
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
|
||||||
@Retention(AnnotationRetention.BINARY)
|
@Retention(AnnotationRetention.BINARY)
|
||||||
public annotation class JsFun(val code: String)
|
public annotation class JsFun(val code: String)
|
||||||
Reference in New Issue
Block a user