MCPcopy
hub / github.com/angular/angular / WriteComputed

Class WriteComputed

packages/core/test/render3/reactivity_spec.ts:756–766  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

754
755 it('should disallow writing to signals within computed', () => {
756 @Component({
757 selector: 'with-input',
758 template: '{{comp()}}',
759 })
760 class WriteComputed {
761 sig = signal(0);
762 comp = computed(() => {
763 this.sig.set(this.sig() + 1);
764 return this.sig();
765 });
766 }
767
768 const fixture = TestBed.createComponent(WriteComputed);
769

Callers

nothing calls this directly

Calls 4

ComponentInterface · 0.90
signalFunction · 0.90
computedFunction · 0.90
setMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…