You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm volunteering to update documentation with the "officially blessed" content from the 2 links above.
The problem with the approach from the handbook, is that it uses ad-hoc copying of properties from one prototype to another and mixins will not compose well, because one can't use super in methods. Such copying also feels not type-safe. The new approach is free from these drawbacks.
If someone can point me to the canonical source of the mixins docs page (source file in some repo or a wiki page?) I'm volunteering to update the docs with the "modern" mixin pattern.
The text was updated successfully, but these errors were encountered:
orta
transferred this issue from microsoft/TypeScript
Nov 12, 2019
Hello! As per #2804, we are automatically closing all open issues. Please see #2804 for a description of what issues and PRs can be accepted going forward.
The official documentation contains very old docs for mixins: https://www.typescriptlang.org/docs/handbook/mixins.html
Since then, the mixin pattern has evolved:
https://mariusschulz.com/blog/typescript-2-2-mixin-classes
https://www.bryntum.com/blog/the-mixin-pattern-in-typescript-all-you-need-to-know/
I'm volunteering to update documentation with the "officially blessed" content from the 2 links above.
The problem with the approach from the handbook, is that it uses ad-hoc copying of properties from one prototype to another and mixins will not compose well, because one can't use
super
in methods. Such copying also feels not type-safe. The new approach is free from these drawbacks.If someone can point me to the canonical source of the mixins docs page (source file in some repo or a wiki page?) I'm volunteering to update the docs with the "modern" mixin pattern.
The text was updated successfully, but these errors were encountered: