feat(signals): add SignalStoreFeatureType - #5186
Conversation
e557e41 to
99d3ad8
Compare
|
We have something similar in our project except we have a second generic parameter where we can specify a subset of keys to depend on which helps limit the setup in our feature tests. From memory it went something like this |
|
@martin-the-geek, but why would you want that? I see I just don't know if we are overcomplicating things here. |
|
@rainerhahnekamp Our motivation for having a convenience type to identify a subset of a feature is to narrow the dependencies of another feature to limit the impacts to our feature tests. If feature A depends on only a few signals from feature B but feature B has dozens, when testing feature A we only have to add the few bits to our test store that feature A depends on. Also, if in the future feature B adds some elements that are irrelevant to feature A, we don't have to update feature A's tests to include the new elements. Problem gets worse if feature B depends on feature C, etc. Sure, I guess we just keep the key limiting type custom to our app, but it might be useful for others. |
This allows custom features to reuse another feature's inferred state, props, and methods as input without duplicating the feature result type manually.
Co-authored-by: Marko Stanimirović <markostanimirovic95@gmail.com>
7786469 to
53a41fd
Compare
|
@markostanimirovic, could please re-check? |
This allows custom features to reuse another feature's inferred state, props, and methods as input without duplicating the feature result type manually.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Closes #5185
What is the new behavior?
Does this PR introduce a breaking change?