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

TypeScript does not support bigint literals in type literal keys #58532

Closed
lucacasonato opened this issue May 14, 2024 · 1 comment
Closed

TypeScript does not support bigint literals in type literal keys #58532

lucacasonato opened this issue May 14, 2024 · 1 comment

Comments

@lucacasonato
Copy link

πŸ”Ž Search Terms

  • type literal
  • bigint literal
  • type literal key

πŸ•— Version & Regression Information

5.4.5

⏯ Playground Link

https://www.typescriptlang.org/play/?#code/KYDwDg9gTgLgBDAnmYcCCcC8cDeAoOQuASwBNgA7GALgSgFdgAaAogIgGcYo3bvGWROAEY+DZq0LCKtAGYBDADYdgeAL4BuIA

πŸ’» Code

export type A = {
    ident: true,
    "str": true,
    1: true,
    1n: false
};

πŸ™ Actual behavior

Property or signature expected.
';' expected.
Declaration or statement expected.

πŸ™‚ Expected behavior

1n is parsed correctly.

Additional information about the issue

No response

@lucacasonato lucacasonato changed the title TypeScript does not support bigint literals in type literals TypeScript does not support bigint literals in type literal keys May 14, 2024
@MartinJohns
Copy link
Contributor

Duplicate of #35982.

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