Is there possibility to enrich JS `prototype` via ...
# compiler
t
Is there possibility to enrich JS
prototype
via compiler plugin?
Copy code
// Kotlin
class A: B

// compiled JS
A.prototype = Object.create(B)

// compiled JS + enrich
A.prototype = Object.create(enrichMethod(B))
Can it be realized using
JsSyntheticTranslateExtension
?
@bashor?
b
what do you want to do inside
enrichMethod
?
I think
JsSyntheticTranslateExtension
can’t help you to change generated code in this place
you can replace
Object.create
in generated code 🙂
t
Is it legal? 🙂
b
Why not? 🙂