Creates a deep copy of the specified AST node. The resulting copy will only contain semantically relevant information, such as the $type property and AST properties.
$type
The AST node to deeply copy.
References are not copied, instead this function is called to rebuild them.
Optional
For the sake of tracking copied nodes and their originals a trace map can be provided (optional).
trace
Creates a deep copy of the specified AST node. The resulting copy will only contain semantically relevant information, such as the
$type
property and AST properties.