packages/babel-types/src/modifications/removePropertiesDeep.ts
raw| 1 | import traverseFast from "../traverse/traverseFast"; |
| 2 | import removeProperties from "./removeProperties"; |
| 3 | import type * as t from ".."; |
| 4 | |
| 5 | export default function removePropertiesDeep<T extends t.Node>( |
| 6 | tree: T, |
| 7 | opts?: { preserveComments: boolean } | null, |
| 8 | ): T { |
| 9 | traverseFast(tree, removeProperties, opts); |
| 10 | |
| 11 | return tree; |
| 12 | } |