Merge source into target. Source should be thrown away after this is called.
(target, source)
| 141297 | } |
| 141298 | /** Merge source into target. Source should be thrown away after this is called. */ |
| 141299 | function merge(target, source) { |
| 141300 | var _a; |
| 141301 | target.additionalNodes = target.additionalNodes || []; |
| 141302 | target.additionalNodes.push(source.node); |
| 141303 | if (source.additionalNodes) { |
| 141304 | (_a = target.additionalNodes).push.apply(_a, source.additionalNodes); |
| 141305 | } |
| 141306 | target.children = ts.concatenate(target.children, source.children); |
| 141307 | if (target.children) { |
| 141308 | mergeChildren(target.children, target); |
| 141309 | sortChildren(target.children); |
| 141310 | } |
| 141311 | } |
| 141312 | /** Recursively ensure that each NavNode's children are in sorted order. */ |
| 141313 | function sortChildren(children) { |
| 141314 | children.sort(compareChildren); |
no test coverage detected