( obj: t.Node | undefined | null, deep: boolean, withoutLoc: boolean, commentsCache: CommentCache, )
| 7 | |
| 8 | // This function will never be called for comments, only for real nodes. |
| 9 | function cloneIfNode( |
| 10 | obj: t.Node | undefined | null, |
| 11 | deep: boolean, |
| 12 | withoutLoc: boolean, |
| 13 | commentsCache: CommentCache, |
| 14 | ) { |
| 15 | if (obj && typeof obj.type === "string") { |
| 16 | return cloneNodeInternal(obj, deep, withoutLoc, commentsCache); |
| 17 | } |
| 18 | |
| 19 | return obj; |
| 20 | } |
| 21 | |
| 22 | function cloneIfNodeOrArray( |
| 23 | obj: t.Node | undefined | null | (t.Node | undefined | null)[], |
no test coverage detected