| 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 |