Open leanalcabasa opened 7 years ago
@leanalcabasa ChakraCore might be the better place to discuss this 😄 so please open the same issue there. Btw are you using Chakra and ChakraCore, and how do you project the classes to JS?
Thanks liminzhu! We are actually using ChakraBridge for our UWP project. We project the classes using Interfaces. That is why we are trying to overcome the 1 interface limitation because Javascript can only see the properties / methods of the 1st interface of the class. The problem is, we have a BaseClass that is inherited by a lot of other classes.
Hello,
Not sure if this is the best place to ask this (is there a forum for chakra)?
I have a problem with the limitation of only having the 1st interface projected to Javascript. I would like to know if there are any workarounds / methods of solving it.
I have around 20 classes I want to access in Javascript. These 20 classes inherit from a BaseModel, which contains code that are important and used by all 20 classes. Below is a simple example:
If I want to access it in Javascript, I would have to create BaseModel for ALL 20 of the classes. This is because Javascript can only see the properties / methods of the 1st Interface. So then my code becomes something like:
Which becomes hard to maintain, especially since I have around 20 methods.
I am looking if I can override the setter for Javascript but not sure how to do it. The idea is this:
And then I can define my classes to be simpler like this:
Is there such a way?
Thank you