Spreading Getters seems to break typing #1268
Unanswered
SebastianBoergers
asked this question in
Help and Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey y'all, i've encountered a pretty peculiar problem.
What we're doing:
We're trying to keep things DRY and we want to spread getters/actions/states into stores.
We want to be able to get new stores on the fly that are independant from eachother - that's why we also do not use a fixed ID.
What happens:
Everything seems to be just fine until there's a getter that has state as it's argument.
The question:
Is there a way to spread getters into a store without breaking the typing?
Example:
Example Getter:
Store:
This leads to the state being typed as any:
If we remove the state argument, the getter works as expected:
Is there any way to make this work (pref. without defining the store typing manually)?
Beta Was this translation helpful? Give feedback.
All reactions