We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://www.typescriptlang.org/play/?#code/C4TwDgpgBAymCGBjCAnACig9mAzlAvFAN4BQUUOAlgF4QD8AXFAOQ4C28ANp81AD4s2EACaUArm14DmneCgDmEKVAAM-KAEZ1AJnUBmdQBZ1AVgDcJAL4WSJRJgB2OYBSZwkqDNjyEiVWkysHNzMlnaOzsT+0IQycoqhBBThTpicEAB0nJjyABTRAJRAA
type SpacerProps = { size?: 'small' | 'medium' | 'large' | 0 | 1 | 2 | 3 | 4 | 5; }; const s: SpacerProps = {size: 'small'} const {size = 'large'} = s console.log(size)
When there is a union of string and number. the order becomes random
The type order should follow the order as declared
No response
The text was updated successfully, but these errors were encountered:
Duplicate of #59746 -> #17944.
My search terms were "union order".
Sorry, something went wrong.
This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes.
No branches or pull requests
π Search Terms
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?#code/C4TwDgpgBAymCGBjCAnACig9mAzlAvFAN4BQUUOAlgF4QD8AXFAOQ4C28ANp81AD4s2EACaUArm14DmneCgDmEKVAAM-KAEZ1AJnUBmdQBZ1AVgDcJAL4WSJRJgB2OYBSZwkqDNjyEiVWkysHNzMlnaOzsT+0IQycoqhBBThTpicEAB0nJjyABTRAJRAA
π» Code
π Actual behavior
When there is a union of string and number. the order becomes random
TS Playground
VS Code (1.97.2)
π Expected behavior
The type order should follow the order as declared
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: