Requiring state from parent #4796
Answered
by
rainerhahnekamp
jan-willem-baart
asked this question in
Q&A
-
When trying to replicate the withSelectedEntity example given in the documentation I'm running into type errors, see example. Did I miss anything in the example? |
Beta Was this translation helpful? Give feedback.
Answered by
rainerhahnekamp
May 26, 2025
Replies: 1 comment 1 reply
-
This version seems to work https://stackblitz.com/edit/github-kshzxbk4-g7lcr4jo?file=src%2FwithFirstQuestion.ts In the SignalStore you should avoid providing the type explicitly. LetTypeScript infer the type for you. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jan-willem-baart
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This version seems to work https://stackblitz.com/edit/github-kshzxbk4-g7lcr4jo?file=src%2FwithFirstQuestion.ts
In the SignalStore you should avoid providing the type explicitly. LetTypeScript infer the type for you.