After updating versions of dependencies on a TS li...
# javascript
a
After updating versions of dependencies on a TS library, I've started getting the following error:
Copy code
Class constructor Vector3 cannot be invoked without 'new'
The problematic code is here: https://github.com/Jiro-Digital/three-csg-ts/blob/79723fb92e3fd57725306f5d273333341df2a40d/src/index.ts#L205-L217 (in particular call of
super(x,y,z)
). As far as I can undersand it could be fixed by turning on ES6 features, but Kotlin does not support them. Is there any way to fix that?
t
You can fix it via gradle plugin
a
How?
t
You can replace invalid JS with valid
a
It is not the way I am willing to take. I think it would be easier to pre-compile TS file and modify it manually. But I was wandering if there are simpler way. As far as I undersotood, all I need is to somehow tweak TS compiler.
Do you extend
Vector3
?
a
No, it is extended inside the three-csg, which I use