MCPcopy
hub / github.com/angular/angular / runEffect

Function runEffect

packages/core/primitives/signals/src/effect.ts:45–58  ·  view source on GitHub ↗
(node: BaseEffectNode)

Source from the content-addressed store, hash-verified

43 }))();
44
45export function runEffect(node: BaseEffectNode) {
46 node.dirty = false;
47 if (node.version > 0 && !consumerPollProducersForChange(node)) {
48 return;
49 }
50 node.version++;
51 const prevNode = consumerBeforeComputation(node);
52 try {
53 node.cleanup();
54 node.fn();
55 } finally {
56 consumerAfterComputation(node, prevNode);
57 }
58}

Callers 1

runFunction · 0.90

Calls 5

consumerAfterComputationFunction · 0.90
cleanupMethod · 0.65
fnMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…