mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 04:43:37 -05:00
When creating string literal for property access, unescape the identifier text
Fixes #12562
This commit is contained in:
committed by
Mohamed Hegazy
parent
86f69f13fa
commit
e5b5fe1bd7
@@ -1905,7 +1905,7 @@ namespace ts {
|
||||
: (<ComputedPropertyName>name).expression;
|
||||
}
|
||||
else if (isIdentifier(name)) {
|
||||
return createLiteral(name.text);
|
||||
return createLiteral(unescapeIdentifier(name.text));
|
||||
}
|
||||
else {
|
||||
return getSynthesizedClone(name);
|
||||
|
||||
@@ -34,4 +34,4 @@ var A = (function () {
|
||||
}());
|
||||
__decorate([
|
||||
dec()
|
||||
], A.prototype, "___foo");
|
||||
], A.prototype, "__foo");
|
||||
|
||||
Reference in New Issue
Block a user