MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / constructor

Method constructor

src/sync/watcher.ts:392–406  ·  view source on GitHub ↗
(
    projectRoot: string,
    syncFn: (paths?: string[]) => Promise<{ filesChanged: number; durationMs: number }>,
    options: WatchOptions = {},
    isFileStateCurrent?: (relativePath: string) => boolean
  )

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected