I'm getting errors for this: ``` @JsExport.Igno...
# javascript
d
I'm getting errors for this:
Copy code
@JsExport.Ignore
    val Double.const: KslValueFloat1
        get() = KslValueFloat1(this.toFloat())
    @JsExport.Ignore
    val Float.const: KslValueFloat1
        get() = KslValueFloat1(this)
    @JsExport.Ignore
    val Float.const2: KslValueFloat2
        get() = KslValueFloat2(this, this)
    @JsExport.Ignore
    val Float.const3: KslValueFloat3
        get() = KslValueFloat3(this, this, this)
    @JsExport.Ignore
    val Float.const4: KslValueFloat4
        get() = KslValueFloat4(this, this, this, this)
The error is "JavaScript name (<get-const>) generated for this declaration clashes with another declaration: fun Vec4i.`<get-const>`(): KslValueInt4". I've tried to ignore. How can I get past this without changing the code?
a
When you want to export overloaded functions / properties, you need to specify JsName annotation on all of the overloaded declarations, so, it should fix the problem
d
Declaration of such kind (extension property) can't be exported to JS so I have to @JsExport.Ignore it
@JsName is prohibited for extension properties apparently.
a
It's true, is hard to represent extension property for different module systems, so, the only way is Ignore them
d
I ignore it but the error still exists.
a
Hmm, could you please create an issue in YouTrack, I will try to add the fix to the next release (1.9.20)
d
Will do.
a
Thank you 🙏
d
Done.