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

Method addCleanupFn

packages/core/src/defer/registry.ts:82–89  ·  view source on GitHub ↗
(blockId: string, fn: Function)

Source from the content-addressed store, hash-verified

80 // we have to leave the lowest block Id in the registry
81 // unless that block has no children
82 addCleanupFn(blockId: string, fn: Function) {
83 let cleanupFunctions: Function[] = [];
84 if (this.cleanupFns.has(blockId)) {
85 cleanupFunctions = this.cleanupFns.get(blockId)!;
86 }
87 cleanupFunctions.push(fn);
88 this.cleanupFns.set(blockId, cleanupFunctions);
89 }
90
91 invokeTriggerCleanupFns(blockId: string) {
92 const fns = this.cleanupFns.get(blockId) ?? [];

Callers 3

setIdleTriggersFunction · 0.80
setViewportTriggersFunction · 0.80
setTimerTriggersFunction · 0.80

Calls 4

hasMethod · 0.65
getMethod · 0.65
setMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected