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

Type order is random in hover highlight dialog #61336

Closed
Gumichocopengin8 opened this issue Mar 3, 2025 · 2 comments
Closed

Type order is random in hover highlight dialog #61336

Gumichocopengin8 opened this issue Mar 3, 2025 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@Gumichocopengin8
Copy link

Gumichocopengin8 commented Mar 3, 2025

πŸ”Ž Search Terms

  • unordered type
  • random order type in highlight

πŸ•— Version & Regression Information

  • I was unable to test this on prior versions because its a type highlight feature

⏯ Playground Link

https://www.typescriptlang.org/play/?#code/C4TwDgpgBAymCGBjCAnACig9mAzlAvFAN4BQUUOAlgF4QD8AXFAOQ4C28ANp81AD4s2EACaUArm14DmneCgDmEKVAAM-KAEZ1AJnUBmdQBZ1AVgDcJAL4WSJRJgB2OYBSZwkqDNjyEiVWkysHNzMlnaOzsT+0IQycoqhBBThTpicEAB0nJjyABTRAJRAA

πŸ’» Code

type SpacerProps = {
  size?: 'small' | 'medium' | 'large' | 0 | 1 | 2 | 3 | 4 | 5;
};


const s: SpacerProps = {size: 'small'}
const {size = 'large'} = s
console.log(size)

πŸ™ Actual behavior

When there is a union of string and number. the order becomes random

TS Playground

Image

VS Code (1.97.2)

Image

πŸ™‚ Expected behavior

The type order should follow the order as declared

Additional information about the issue

No response

@nmain
Copy link

nmain commented Mar 3, 2025

Duplicate of #59746 -> #17944.

My search terms were "union order".

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Mar 3, 2025
@typescript-bot
Copy link
Collaborator

This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes.

@typescript-bot typescript-bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

4 participants