You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NumericLiteral nodes with value 9007199254740993 claim to have .text = 9007199254740992 #33298
I found this issue while fixing #46195. Looking at the explanation for the text property of LiteralLikeNode (link), it seems like it is actually working as intended. I'm not sure it’s always been like so since when this issue was opened, though.
I could argue that the property name text is confusing as one would expect it to be the node's textual representation in the source code.
Activity
JoshuaKGoldberg commentedon Sep 7, 2019
Did a little bit of digging. This happens in
checkBigIntSuffix(inscanner.ts):TypeScript/src/compiler/scanner.ts
Line 1478 in 73a2146
Removing that
+fixes the issue. Happy to send a PR if this is desirable!lowr commentedon Dec 3, 2021
I found this issue while fixing #46195. Looking at the explanation for the
textproperty ofLiteralLikeNode(link), it seems like it is actually working as intended. I'm not sure it’s always been like so since when this issue was opened, though.I could argue that the property name
textis confusing as one would expect it to be the node's textual representation in the source code.RyanCavanaugh commentedon Mar 4, 2024
Agreed this is operating as documented.