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

Function invokeTriggerCleanupFns

packages/core/src/defer/cleanup.ts:36–45  ·  view source on GitHub ↗
(type: TriggerType, lDetails: LDeferBlockDetails)

Source from the content-addressed store, hash-verified

34 * Invokes registered cleanup functions either for prefetch or for regular triggers.
35 */
36export function invokeTriggerCleanupFns(type: TriggerType, lDetails: LDeferBlockDetails) {
37 const key = getCleanupFnKeyByType(type);
38 const cleanupFns = lDetails[key] as VoidFunction[];
39 if (cleanupFns !== null) {
40 for (const cleanupFn of cleanupFns) {
41 cleanupFn();
42 }
43 lDetails[key] = null;
44 }
45}
46
47/**
48 * Invokes registered cleanup functions for prefetch, hydrate, and regular triggers.

Callers 2

triggerResourceLoadingFunction · 0.90

Calls 2

getCleanupFnKeyByTypeFunction · 0.85
cleanupFnFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…