Debian Codegraph @

packages/babel-types/src/clone/cloneWithoutLoc.ts

raw
1 import cloneNode from "./cloneNode";
2 import type * as t from "..";
3
4 /**
5 * Create a shallow clone of a `node` excluding `_private` and location properties.
6 */
7 export default function cloneWithoutLoc<T extends t.Node>(node: T): T {
8 return cloneNode(node, /* deep */ false, /* withoutLoc */ true);
9 }