MCPcopy Index your code
hub / github.com/angular/angular / startTimerForRecompilation

Function startTimerForRecompilation

packages/compiler-cli/src/perform_watch.ts:316–327  ·  view source on GitHub ↗
(changedPath: string)

Source from the content-addressed store, hash-verified

314 // operations (such as saving all modified files in an editor) a chance to complete before we kick
315 // off a new compilation.
316 function startTimerForRecompilation(changedPath: string) {
317 if (timerHandleForRecompilation) {
318 host.clearTimeout(timerHandleForRecompilation.timerHandle);
319 } else {
320 timerHandleForRecompilation = {
321 modifiedResourceFiles: new Set<string>(),
322 timerHandle: undefined,
323 };
324 }
325 timerHandleForRecompilation.timerHandle = host.setTimeout(recompile, 250);
326 timerHandleForRecompilation.modifiedResourceFiles.add(changedPath);
327 }
328
329 function recompile() {
330 host.reportDiagnostics([

Callers 1

watchedFileChangedFunction · 0.85

Calls 3

clearTimeoutMethod · 0.65
setTimeoutMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…