packages/babel-types/src/clone/cloneDeep.ts
raw| 1 | import cloneNode from "./cloneNode"; |
| 2 | import type * as t from ".."; |
| 3 | |
| 4 | /** |
| 5 | * Create a deep clone of a `node` and all of it's child nodes |
| 6 | * including only properties belonging to the node. |
| 7 | * @deprecated Use t.cloneNode instead. |
| 8 | */ |
| 9 | export default function cloneDeep<T extends t.Node>(node: T): T { |
| 10 | return cloneNode(node); |
| 11 | } |