(file: string, seen: Set<string> = new Set())
| 646 | } |
| 647 | const memo = new Map<string, string[]>(); |
| 648 | const prefixOf = (file: string, seen: Set<string> = new Set()): string[] => { |
| 649 | const hit = memo.get(file); |
| 650 | if (hit !== undefined) return hit; |
| 651 | const mount = loadedBy.get(file); |
| 652 | let prefix: string[] = []; |
| 653 | if (mount && !seen.has(file)) { |
| 654 | seen.add(file); |
| 655 | prefix = [...prefixOf(mount.parent, seen), ...resolvedSegments(mount.prefix, mount.parent, context)]; |
| 656 | } |
| 657 | memo.set(file, prefix); |
| 658 | return prefix; |
| 659 | }; |
| 660 | const mounts: AngularMounts = { mountFiles, prefixOf: (file) => prefixOf(file) }; |
| 661 | mountMemo.set(context, { source, mounts }); |
| 662 | return mounts; |
no test coverage detected