rxjs-interop: bidirectional interop #55072
Labels
area: core
Issues related to the framework runtime
core: rxjs interop
cross-cutting: signals
feature
Issue that requests a new feature
Milestone
Which @angular/* package(s) are relevant/related to the feature request?
core
Description
Currently,
toSignal
andtoObservable
functions always return read-only primitives -Signal
andObservable
respectively. It would be really handy if passing a writable primitive to interop functions created a writable counterpart of passed value.Examples:
Proposed solution
Return a
WritableSignal
fromtoSignal
if argument isnext
-able. Whenever a value is written to the signal manually, push it to the target observable.In
toObservable
, return a subject if argument is aWritableSignal
. Whenever a value is pushed to the subject manually, write it to the target signal.Alternatives considered
Leave everything as is.
The text was updated successfully, but these errors were encountered: