Open
Description
Which @ngrx/* package(s) are relevant/related to the feature request?
signals
Information
If you create a state containing the following:
object: { value: number };
nullableObject: null | { value: number };
undefinableObject?: { value: number };
You can then do:
store.object.value()
It works just fine as a DeepSignal
.
However, both the nullable and potentially undefined ones don't work.
I'm not entirely sure what would be the best option here, either:
store.nullableObject?.value()
But I'm guessing that it may break the reactivity as it may not be caught by the signal graph
OR
store.nullableObject.value() // returns a type `number | null`
store.undefinableObject.value() // returns a type `number | undefined`
Describe any alternatives/workarounds you're currently using
Reading the top level signal, which isn't ideal ofc as I need another computed
down the chain to get reactivity only on one property.
I would be willing to submit a PR to fix this issue
- Yes
- No