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

Add mixins #5

Merged
merged 71 commits into from
Feb 12, 2024
Merged

Add mixins #5

merged 71 commits into from
Feb 12, 2024

Conversation

aedart
Copy link
Owner

@aedart aedart commented Feb 12, 2024

PR adds the @aedart/support/mixins submodule. It offers an adaptation of Justin Fagnani's mixwith.js.

Details

See additional details in CHANGELOG.ms

aedart added 30 commits February 2, 2024 19:24
This is the first draft implementation. Unit testing can now begin...
This should allow accepting ClassDecorator as argument(s) for other mixin related functions / utils.
Found ref. to mozilla's documentation of "abstract subclass or mix-in"...
Still not really applicable when defining a mixin, but still accepted by the @mixin decorator.
Mixins must be applied on the "parent" class, if any is available such that the target class still can overwrite methods defined in a mixin.
aedart and others added 26 commits February 9, 2024 19:46
This seems to be problematic, because we are dynamically extending the target. Need to find correct way of doing this, such that super() calls can work.
Naming seems more convenient now.
The attempt was good, but it seems impossible to respect true class inheritance via the class decorator. For this reason, the original Mixin Builder (mix -> with) component should be adapted / ported into this submodule instead.
Class decorator and tests will be removed, as soon as the original Mixin Builder component has been implemented.
Has now been replaced with the original mix() / Mixin Builder component.
@aedart aedart added the enhancement New feature or request label Feb 12, 2024
@aedart aedart self-assigned this Feb 12, 2024
@aedart aedart merged commit 9757bc9 into main Feb 12, 2024
2 checks passed
@aedart aedart deleted the add-mixins branch February 12, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant