(paths: string[])
| 106 | } |
| 107 | |
| 108 | export function updateWatchPaths(paths: string[]): void { |
| 109 | if (!initialized) return |
| 110 | const sorted = paths.slice().sort() |
| 111 | if ( |
| 112 | sorted.length === dynamicWatchPathsSorted.length && |
| 113 | sorted.every((p, i) => p === dynamicWatchPathsSorted[i]) |
| 114 | ) { |
| 115 | return |
| 116 | } |
| 117 | dynamicWatchPaths = paths |
| 118 | dynamicWatchPathsSorted = sorted |
| 119 | restartWatching() |
| 120 | } |
| 121 | |
| 122 | function restartWatching(): void { |
| 123 | if (watcher) { |
no test coverage detected