-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
types(runtime-dom): type for class property #8012
Merged
yyx990803
merged 18 commits into
vuejs:main
from
basil-gor:type-for-html-attributes-class-prop
Nov 10, 2023
Merged
Changes from 3 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
05886c3
types: add type for 'class' prop of 'HTMLAttributes' type
86081a2
test: add more tests for 'normalizeClass'
e4e56ac
test(dts-test): add tests for element's 'class' attribute usage
2f81d54
types: allow truthy/falsy values in `ClassValue` type
2ba87e3
test: add tests for truthy/falsy values in `ClassValue` type
b7cec7c
Merge branch 'main' into type-for-html-attributes-class-prop
basil-gor 6be1bd0
Merge branch 'main' into type-for-html-attributes-class-prop
basil-gor 080e487
Merge branch 'main' into type-for-html-attributes-class-prop
basil-gor b7d6dbd
Merge branch 'main' into type-for-html-attributes-class-prop
basil-gor 30da39f
types: allow numbers as keys in ClassValue type
basil-gor 6a856fe
Merge branch 'main' into type-for-html-attributes-class-prop
basil-gor 5139781
Merge branch 'main' into type-for-html-attributes-class-prop
basil-gor b1de9cb
Merge branch 'main' into type-for-html-attributes-class-prop
basil-gor d53bf59
Merge branch 'main' into type-for-html-attributes-class-prop
basil-gor 6319fbd
Merge branch 'main' into type-for-html-attributes-class-prop
basil-gor 2e03b76
Merge branch 'main' into type-for-html-attributes-class-prop
basil-gor c22fe2b
Merge branch 'main' into type-for-html-attributes-class-prop
yyx990803 9827bbb
[autofix.ci] apply automated fixes
autofix-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Technically the Record value can be any truthy/falsy value.
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.
If I understand correctly, you want me to extend the possible accepted values in the
Record
type to also accept truthy/falsy types for maximum backward compatibility with older versions of Vue?For example:
and result record type will be:
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.
Not really, what I mean is the value should technically allow
any
since any value in JS is either truthy or falsy.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.
Yeah. I understand what you mean.
So, then there are two possible solutions:
unknown
type (orany
at the very least):I think the second option will be easier and more priority, right?
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.
@yyx990803 I'm sorry to bother you, but could you please rerewiew the changes? It's been two months since the last activity here. Thanks!