MCPcopy Create free account
hub / github.com/angular/angular / WriteComputed

Class WriteComputed

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

Source from the content-addressed store, hash-verified

821
822 it('should disallow writing to signals within computed', () => {
823 @Component({
824 template: '{{comp()}}',
825 })
826 class WriteComputed {
827 sig = signal(0);
828 comp = computed(() => {
829 this.sig.set(this.sig() + 1);
830 return this.sig();
831 });
832 }
833
834 const fixture = TestBed.createComponent(WriteComputed);
835

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