-
Notifications
You must be signed in to change notification settings - Fork 25
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
base: main
Are you sure you want to change the base?
Add template parameters to mixins #5140
Conversation
Thanks for the PR! 🎉 We've deployed an automatic preview for this PR - you can see your changes here:
Note The build needs to finish before your changes are deployed. |
helpers/composeMixins.d.ts
Outdated
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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.
a8cfdb2
to
1bda15f
Compare
This is the trickiest part to automate, but with #5139, it's possible to verify which mixins aren't typed correctly