* 替换目标节点为新节点 * @param targetNodeId * @param newNode
(targetNodeId: string, newNode: t.JSXElement)
| 363 | * @param newNode |
| 364 | */ |
| 365 | replaceNode(targetNodeId: string, newNode: t.JSXElement) { |
| 366 | this.ast = replaceJSXElement(this.ast, targetNodeId, newNode); |
| 367 | return this; |
| 368 | } |
| 369 | |
| 370 | /** |
| 371 | * 替换 jsx 跟结点的子元素 |
nothing calls this directly
no test coverage detected