Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
toSignal() can not set internal state (state.set() when called from computed(), because of NG0600 ("Writing to signals is not allowed in a computed or an effect by default").
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/angular-hjphb7?devToolsHeight=33&file=src/main.ts
Please provide the exception or error you saw
ERROR
Error: NG0601: `toSignal()` called with `requireSync` but `Observable` did not emit synchronously.
ERROR
Error: NG0600: Writing to signals is not allowed in a `computed` or an `effect` by default. Use `allowSignalWrites` in the `CreateEffectOptions` to enable this inside effects.
Please provide the environment you discovered this bug in (run ng version)
@angular/core 16.0.0-rc.4
Anything else?
It is reproducible without Component's template, so the issue is not caused by the template: https://stackblitz.com/edit/angular-rbp4uq?devToolsHeight=33&file=src/main.ts
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
toSignal()can not set internal state (state.set()when called fromcomputed(), because of NG0600 ("Writing to signals is not allowed in acomputedor aneffectby default").Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/angular-hjphb7?devToolsHeight=33&file=src/main.ts
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version)Anything else?
It is reproducible without Component's template, so the issue is not caused by the template: https://stackblitz.com/edit/angular-rbp4uq?devToolsHeight=33&file=src/main.ts