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
TypeScript Version: 2.3.4 Code
const obj = {}; let foo = "__id__"; /* 1 */ obj["__id__"] = "foobar"; /* 2 */
Expected behavior:
the text property of StringLiteral contains __id__ in both cases.
text
StringLiteral
__id__
Actual behavior: case 1: node.text === "__id__" as expected case 2: node.text === "___id__" (note the third underscore)
node.text === "__id__"
node.text === "___id__"
It seems like typescript encodes the second StringLiteral similar to Identifiers, but the current behavior is inconsistent.
Ref: palantir/tslint#2965
The text was updated successfully, but these errors were encountered:
As of v2.5.0 this is no longer an issue. Seems to be fixed by the changed handling of escaped identifiers.
Sorry, something went wrong.
No branches or pull requests
TypeScript Version: 2.3.4
Code
Expected behavior:
the
text
property ofStringLiteral
contains__id__
in both cases.Actual behavior:
case 1:
node.text === "__id__"
as expectedcase 2:
node.text === "___id__"
(note the third underscore)It seems like typescript encodes the second StringLiteral similar to Identifiers, but the current behavior is inconsistent.
Ref: palantir/tslint#2965
The text was updated successfully, but these errors were encountered: