Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Improve the docs for mixins #125

Closed
canonic-epicure opened this issue Mar 19, 2019 · 2 comments
Closed

[Suggestion] Improve the docs for mixins #125

canonic-epicure opened this issue Mar 19, 2019 · 2 comments

Comments

@canonic-epicure
Copy link

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.

@orta orta transferred this issue from microsoft/TypeScript Nov 12, 2019
@elibarzilay
Copy link
Contributor

(See also the examples that @orta added recently...)

@typescript-bot
Copy link
Collaborator

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.

@typescript-bot typescript-bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants