(left?: string[], right?: string[])
| 57 | } |
| 58 | |
| 59 | function workspaceRootsEqual(left?: string[], right?: string[]): boolean { |
| 60 | const normalizedLeft = left ?? [] |
| 61 | const normalizedRight = right ?? [] |
| 62 | if (normalizedLeft.length !== normalizedRight.length) { |
| 63 | return false |
| 64 | } |
| 65 | |
| 66 | return normalizedLeft.every((value, index) => value === normalizedRight[index]) |
| 67 | } |
| 68 | |
| 69 | function formatWorkspaceRoots(paths?: string[]): string { |
| 70 | return paths?.length ? paths.join(', ') : '(none)' |