Signal store - How to get the types right for a custom store feature that uses factory-method? - Part 2 #4896
Unanswered
PhilippMDoerner
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Hey @PhilippMDoerner 👋 , Out of convenience, could you also post the stackblitz link which contains the latest version of your side project? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Heyho everybody, this is basically a continuation of the previous chat we had about this here (solution I ended up using here ), as spurred by my chat with Rainer in the Angular discord.
I use the approach that I outlined in the prior discussion in my side project now. It's not pretty, but it does function.
I tried to get this to work with the actual signalStoreFeature function multiple times, but eventually gave up last year when I just couldn't figure out how I'd need to type things.
A few things have changed since the discussion last year, though mostly that is the addition of
withFeature
.However, I still can't really figure out what I'd need to do in order to migrate my current syntax to withFeature in a manner that doesn't let typescript revolt based on the type that signalStoreFeature expects and the one that queryFactory-function expects.
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions