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 template parameters to mixins #5140

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

awikkerink
Copy link
Contributor

@awikkerink awikkerink commented Nov 10, 2024

This is the trickiest part to automate, but with #5139, it's possible to verify which mixins aren't typed correctly

Copy link
Contributor

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-5140/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* @template {ReactiveElementClassType} S
* @param {S} superclass
*/
const InternalSkeletonGroupMixin = superclass => class extends SkeletonMixin(superclass) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using Internal mixin constant to avoid unnecessary whitespace changes.

constructor() {
super();
constructor(...args) {
super(...args);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The typescript compiler is picky with mixin constructor arguments, and won't type things correctly if ...args are missing.

@awikkerink awikkerink force-pushed the awikkerink/inspiration-add-template-parameters-to-mixins branch from a8cfdb2 to 1bda15f Compare November 13, 2024 15:42
@awikkerink awikkerink force-pushed the awikkerink/inspiration-add-template-parameters-to-mixins branch 3 times, most recently from 36b0f26 to 967d71a Compare November 20, 2024 01:25
@awikkerink awikkerink force-pushed the awikkerink/inspiration-add-template-parameters-to-mixins branch from 967d71a to f9d6339 Compare November 21, 2024 15:14
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

Successfully merging this pull request may close these issues.

1 participant