MCPcopy Create free account
hub / github.com/angular/angular / cancelTimer

Function cancelTimer

packages/core/src/resource/debounce.ts:53–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51 let activeTimer: ReturnType<typeof setTimeout> | undefined;
52
53 const cancelTimer = () => {
54 if (activeTimer !== undefined) {
55 clearTimeout(activeTimer);
56 activeTimer = undefined;
57 }
58 };
59
60 injector.get(DestroyRef).onDestroy(() => {
61 cancelTimer();

Callers 1

debouncedFunction · 0.85

Calls 1

clearTimeoutFunction · 0.85

Tested by

no test coverage detected