Closed optifunc closed 2 years ago
Hi,
I suspect you need to manipulate the prototype of XDerived
at the JavaScript side. Something like
class XDerived {
constructor() { _proto_.m = this.m; }
}
Sorry, don't know how to express it in TypeScript.
Hi, Thank you for your work on this library! Is it possible to override a class function defined in C++ in JavaScript? Something like:
What I tried is:
-- but that of course leads to stack overflow. And even if it worked it would only allow to override a set of special designated methods with such "trampolines" embedded in their base C++ implementations.
Maybe you have some thoughts or pointers on how to tackle this problem? What would be the ways of allowing to extend in JS some classes defined in C++?