(
projectRoot: string,
syncFn: (paths?: string[]) => Promise<{ filesChanged: number; durationMs: number }>,
options: WatchOptions = {},
isFileStateCurrent?: (relativePath: string) => boolean
)
| 390 | private readonly isFileStateCurrent?: (relativePath: string) => boolean; |
| 391 | |
| 392 | constructor( |
| 393 | projectRoot: string, |
| 394 | syncFn: (paths?: string[]) => Promise<{ filesChanged: number; durationMs: number }>, |
| 395 | options: WatchOptions = {}, |
| 396 | isFileStateCurrent?: (relativePath: string) => boolean |
| 397 | ) { |
| 398 | this.projectRoot = projectRoot; |
| 399 | this.syncFn = syncFn; |
| 400 | this.debounceMs = options.debounceMs ?? 2000; |
| 401 | this.onSyncComplete = options.onSyncComplete; |
| 402 | this.onSyncError = options.onSyncError; |
| 403 | this.onDegraded = options.onDegraded; |
| 404 | this.inertForTests = options.inertForTests ?? false; |
| 405 | this.isFileStateCurrent = isFileStateCurrent; |
| 406 | } |
| 407 | |
| 408 | /** |
| 409 | * Start watching for file changes. |
nothing calls this directly
no outgoing calls
no test coverage detected