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

Function signalSetFn

packages/core/primitives/signals/src/signal.ts:86–95  ·  view source on GitHub ↗
(node: SignalNode<T>, newValue: T)

Source from the content-addressed store, hash-verified

84}
85
86export function signalSetFn<T>(node: SignalNode<T>, newValue: T) {
87 if (!producerUpdatesAllowed()) {
88 throwInvalidWriteToSignalError(node);
89 }
90
91 if (!node.equal(node.value, newValue)) {
92 node.value = newValue;
93 signalValueChanged(node);
94 }
95}
96
97export function signalUpdateFn<T>(node: SignalNode<T>, updater: (value: T) => T): void {
98 if (!producerUpdatesAllowed()) {

Callers 5

createModelSignalFunction · 0.90
applyValueToInputSignalFunction · 0.90
linkedSignalSetFnFunction · 0.90
setFunction · 0.85
signalUpdateFnFunction · 0.85

Calls 3

producerUpdatesAllowedFunction · 0.90
signalValueChangedFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…