mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
Add additional deep clone tests
This commit is contained in:
@@ -1350,6 +1350,11 @@ namespace ts {
|
||||
if (visited === node) {
|
||||
// This only happens for leaf nodes - internal nodes always see their children change.
|
||||
const clone = getSynthesizedClone(node);
|
||||
if (isStringLiteral(clone)) {
|
||||
clone.textSourceNode = node as any;
|
||||
} else if (isNumericLiteral(clone)) {
|
||||
clone.numericLiteralFlags = (node as any).numericLiteralFlags;
|
||||
}
|
||||
clone.pos = node.pos;
|
||||
clone.end = node.end;
|
||||
return clone;
|
||||
|
||||
Reference in New Issue
Block a user