MCPcopy
hub / github.com/angular/angular / computed

Function computed

packages/core/primitives/signals/src/computed.ts:70–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68 }
69
70 const computed = () => {
71 // Check if the value needs updating before returning it.
72 producerUpdateValueVersion(node);
73
74 // Record that someone looked at this signal.
75 producerAccessed(node);
76
77 if (node.value === ERRORED) {
78 throw node.error;
79 }
80
81 return node.value;
82 };
83
84 (computed as ComputedGetter<T>)[SIGNAL] = node;
85 if (typeof ngDevMode !== 'undefined' && ngDevMode) {

Callers

nothing calls this directly

Calls 2

producerAccessedFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…