| 141290 | // We use 1 NavNode to represent 'A.B.C', but there are multiple source nodes. |
| 141291 | // Only merge module nodes that have the same chain. Don't merge 'A.B.C' with 'A'! |
| 141292 | function areSameModule(a, b) { |
| 141293 | if (!a.body || !b.body) { |
| 141294 | return a.body === b.body; |
| 141295 | } |
| 141296 | return a.body.kind === b.body.kind && (a.body.kind !== 261 /* SyntaxKind.ModuleDeclaration */ || areSameModule(a.body, b.body)); |
| 141297 | } |
| 141298 | /** Merge source into target. Source should be thrown away after this is called. */ |
| 141299 | function merge(target, source) { |
| 141300 | var _a; |