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

Function cancelTimer

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

Source from the content-addressed store, hash-verified

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

Callers 1

debouncedFunction · 0.85

Calls 1

clearTimeoutFunction · 0.85

Tested by

no test coverage detected