Introduce getSynthesizedDeepClone
This commit is contained in:
parent
a5e1841180
commit
380b8df13f
1 changed files with 9 additions and 0 deletions
|
@ -71,6 +71,15 @@ namespace ts {
|
||||||
return clone;
|
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
|
// Literals
|
||||||
|
|
||||||
export function createLiteral(value: string): StringLiteral;
|
export function createLiteral(value: string): StringLiteral;
|
||||||
|
|
Loading…
Reference in a new issue