Calls between getters with typescript #1987
Unanswered
alex129
asked this question in
Help and Questions
Replies: 1 comment
-
Typescript and classes written with vue doesn't work great. At least that's is what I experienced when moving from vue 2 to vue 3. I would perhaps look at creating a store with the composition api. |
Beta Was this translation helpful? Give feedback.
0 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.
-
Hello,
In my store I have splitted getters in different files, this is not a problem but I have to make calls between my getters but typescript show me an error and to disable the error I have to put 'as unknown as T'
These are my getters:
And the error is:
any
Property 'forEach' does not exist on type '(state: CoreState) => Material[]'.
The problem es that when I call to other getter inside a getter, the typescript detects that the other getter is a function.
Any idea?
Beta Was this translation helpful? Give feedback.
All reactions