mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 15:45:27 -05:00
Retain name and propertyName in declaration emit copies of binding patterns if property name is a keyword (#50537)
* Retain name and propertyName in declaration emit copies of binding patterns if property name is a keyword * Accept baselines * Remove out of date file
This commit is contained in:
@@ -6122,7 +6122,7 @@ namespace ts {
|
||||
}
|
||||
let visited = visitEachChild(node, elideInitializerAndPropertyRenamingAndSetEmitFlags, nullTransformationContext, /*nodesVisitor*/ undefined, elideInitializerAndPropertyRenamingAndSetEmitFlags)!;
|
||||
if (isBindingElement(visited)) {
|
||||
if (visited.propertyName && isIdentifier(visited.propertyName) && isIdentifier(visited.name)) {
|
||||
if (visited.propertyName && isIdentifier(visited.propertyName) && isIdentifier(visited.name) && !isStringAKeyword(idText(visited.propertyName))) {
|
||||
visited = factory.updateBindingElement(
|
||||
visited,
|
||||
visited.dotDotDotToken,
|
||||
|
||||
Reference in New Issue
Block a user