BigInt should be allowed to use as object key
See original GitHub issuerequire('meriyah').parse('{1n:1n}',{next:true})
Uncaught [ParseError [SyntaxError]: [1:4]: Unexpected token: ':'
] {
index: 4,
line: 1,
column: 4,
description: "[1:4]: Unexpected token: ':'",
loc: { line: 1, column: 4 }
}
console.log({1n:1})
{ '1': 1 }
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
BigInt - JavaScript - MDN Web Docs
BigInt values represent numeric values which are too large to be represented by the number primitive.
Read more >Is there any way to use a numeric type as an object key?
No, this is not possible. The key will always be converted to a string. See Property Accessor docs. Property names must be strings....
Read more >BigInt in JavaScript - GeeksforGeeks
BigInt is a built-in object in JavaScript that provides a way to represent whole numbers larger than 2 53 -1.
Read more >What is BigInt in JavaScript, Why was BigInt needed, and how ...
We look into BigInt in JavaScript in Depth and see how Big. ... BigInt in JavaScript 07:43 JavaScript Math object cannot be used...
Read more >All about the BigInt - New Javascript Data Type - YouTube
We will take a dive into a ECMAscript 2020 feature coming soon to Javascript: the BigInt primitive data type. Learn everything you need...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
yes, I am adding the line to parseLiteral, if you add the line outside of parseLiteral, you need to add it in many places after Token.IsStringOrNumber check.
It’s a valid case. BigInt can be a property key. Also for Class