mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-11 19:27:35 -06:00
Fix bug in reduceEachChild (fixes #27854)
- add reducing of type arguments in tagged template expression
This commit is contained in:
parent
b1fbff8b98
commit
b2cbbbd1d3
@ -1111,6 +1111,7 @@ namespace ts {
|
||||
|
||||
case SyntaxKind.TaggedTemplateExpression:
|
||||
result = reduceNode((<TaggedTemplateExpression>node).tag, cbNode, result);
|
||||
result = reduceNodes((<NewExpression>node).typeArguments, cbNodes, result);
|
||||
result = reduceNode((<TaggedTemplateExpression>node).template, cbNode, result);
|
||||
break;
|
||||
|
||||
|
||||
@ -45,9 +45,8 @@ namespace ts {
|
||||
if (isIdentifier(node) && node.text === "oldName") {
|
||||
return createIdentifier("newName");
|
||||
}
|
||||
|
||||
return visitEachChild(node, visitor, context);
|
||||
}
|
||||
};
|
||||
return (node: SourceFile) => visitNode(node, visitor);
|
||||
}
|
||||
|
||||
@ -99,7 +98,7 @@ namespace ts {
|
||||
},
|
||||
compilerOptions: {
|
||||
newLine: NewLineKind.CarriageReturnLineFeed,
|
||||
target: ts.ScriptTarget.Latest
|
||||
target: ScriptTarget.Latest
|
||||
}
|
||||
}).outputText;
|
||||
});
|
||||
|
||||
@ -1,3 +1 @@
|
||||
newName<{
|
||||
a: string;
|
||||
}> ` ... `;
|
||||
newName ` ... `;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user