Skip to content

Type unions are previewed out of order #59746

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

Closed
1 of 4 tasks
Nixinova opened this issue Aug 25, 2024 · 2 comments
Closed
1 of 4 tasks

Type unions are previewed out of order #59746

Nixinova opened this issue Aug 25, 2024 · 2 comments

Comments

@Nixinova
Copy link

🔎 Search Terms

type union vscode preview display out of order digits/numbers

🕗 Version & Regression Information

  • This changed between versions ______ and _______
  • This changed in commit or PR _______
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
  • I was unable to test this on prior versions because this behavior is from the VSCode previewer.

⏯ Playground Link

No response

💻 Code

type digit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'

🙁 Actual behavior

image
Why is 0 between 2 and 3?

🙂 Expected behavior

Preview says type digit = "0" | "1" | "2" | "3" ...

Additional information about the issue

No response

@MartinJohns
Copy link
Contributor

You forgot to fill out the issue template.

Duplicate of #17944. The order of types in a union is not guaranteed.

@Nixinova
Copy link
Author

no i didn't? and okay will close as duplicate. still weird that only 0 is out of place though.

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

No branches or pull requests

2 participants