Introduce getSynthesizedDeepClone

This commit is contained in:
Andrew Casey 2017-10-05 15:38:02 -07:00
parent a5e1841180
commit 380b8df13f

View file

@ -71,6 +71,15 @@ namespace ts {
return clone;
}
/**
* Creates a deep, memberwise clone of a node with no source map location.
*/
export function getSynthesizedDeepClone<T extends Node>(node: T | undefined): T | undefined {
return node
? getSynthesizedClone(visitEachChild(node, child => getSynthesizedDeepClone(child), nullTransformationContext))
: undefined;
}
// Literals
export function createLiteral(value: string): StringLiteral;