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
The TypeScript compiler does not support BigInt literal properties on objects/classes (without square brackets)
bigint literal object key class property
Playground link with relevant code
const obj = { 1n: 123 }; class A { 1n = 123; }
Various parser errors:
Anything but a parser error
The text was updated successfully, but these errors were encountered:
Is there any legit reason why you would write code like this?
Sorry, something went wrong.
Duplicate of #35982.
It’s interesting that #35982 says this wasn’t implemented on purpose, since it’s legal JS syntax.
No branches or pull requests
Bug Report
The TypeScript compiler does not support BigInt literal properties on objects/classes (without square brackets)
🔎 Search Terms
bigint literal object key class property
🕗 Version & Regression Information
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
Various parser errors:
🙂 Expected behavior
Anything but a parser error
The text was updated successfully, but these errors were encountered: