Does typegoose support TypeScript's mixins (multiple inheritence)? #936
Unanswered
tomerh2001
asked this question in
Q&A
Replies: 1 comment 5 replies
-
i have personally not used mixins and they are not tested in typegoose, but from what i read i dont see a reason on why they shouldnt work, you will just need to in addition to the normal properties also copy / merge the reflection metadata, as that is how the decorators work. btw, running |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have failed to find any info about it online, and have also failed getting a working example.
Is TypeScript's Mixin supported?
Can I create small helper classes like:
Then when I create a class for a collection, which has both
fatherId
andmotherId
, I could use mixins to inherit both of them like:And then be able to do:
Is it possible?
Beta Was this translation helpful? Give feedback.
All reactions