Closed trentjones21 closed 6 years ago
By default @use decorators ignore properties and only mixes in methods. That is why the first example fails
That said I can see why you'd want to use getters. Would look into it. But for now you can keep using methods as they won't give any problems.
Support for getters and setters added from typescript-mix@3.1.3
Also feel free to make pull requests and contribute.
Thanks.
I just started using this library today. I love it so far. Thanks for maintaining it.
From what I can tell, typescript getters don't work with mixins (at least in my specific case). Here is an example I am trying to get to work.
However, if I edit the mixin to use a regular function rather than a getter, the error goes away:
I realize I'm probably doing something unconventional by trying to access the
config
object in the mixin class. But if it works with a regular function I feel like it should work with a getter as well. Do you know if this would be possible to fix? I'm happy to help out with a pull request. I just wanted to get your thoughts first.