(
files: ReadonlyArray<{ path: string; symbols: number; test: boolean }>,
passThrough?: ReadonlySet<string>
)
| 488 | * then the picture worth opening on, when it draws more than one box. |
| 489 | */ |
| 490 | export function pickDefaultView( |
| 491 | files: ReadonlyArray<{ path: string; symbols: number; test: boolean }>, |
| 492 | passThrough?: ReadonlySet<string> |
| 493 | ): { root: string; depth: number } { |
| 494 | const root = pickDefaultRoot(files); |
| 495 | const depth = pickDefaultDepth(files, root, passThrough); |
| 496 | if (root === '' || tallyModules(files, root, depth, passThrough).count > 1) return { root, depth }; |
| 497 | const wholeDepth = pickDefaultDepth(files, '', passThrough); |
| 498 | return tallyModules(files, '', wholeDepth, passThrough).count > 1 ? { root: '', depth: wholeDepth } : { root, depth }; |
| 499 | } |
| 500 | |
| 501 | // ============================================================================= |
| 502 | // Cache |
no test coverage detected