kotlin.js.JsName.<init>
<init>
JsName(name: String)
Platform and version requirements: JS
Gives a declaration (a function, a property or a class) specific name in JavaScript.
This may be useful in the following cases:
- There are two functions for which the compiler gives same name in JavaScript, you can mark one with
@JsName(...)
to prevent the compiler from reporting error. - You are writing a JavaScript library in Kotlin. The compiler produces mangled names for functions with parameters, which is unnatural for usual JavaScript developer. You can put
@JsName(