You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by Glandos February 15, 2022
I followed #978 using the exact same store.
I am using a Vue 2 project, in an SFC with vue-class-component (yes, this is an already started project…):
However, both Vetur in VSCode and the Typescript checker complain on the messageIfEven saying that:
(property) messageIfEven: string | undefined
Cannot invoke an object which is possibly 'undefined'.Vetur(2722)
This expression is not callable.
Type 'String' has no call signatures.Vetur(2349)
So it seems that the getter is weirdly unwrapped, since it only retains its Result. But executing the code shows me that messageIfEvenis a function.
What did I miss?
I have the same issue with computed returned by store.
Discussed in #1065
Originally posted by Glandos February 15, 2022
I followed #978 using the exact same store.
I am using a Vue 2 project, in an SFC with vue-class-component (yes, this is an already started project…):
However, both Vetur in VSCode and the Typescript checker complain on the
messageIfEven
saying that:So it seems that the getter is weirdly unwrapped, since it only retains its
Result
. But executing the code shows me thatmessageIfEven
is a function.What did I miss?
I have the same issue with computed returned by store.
error TS2721: Cannot invoke an object which is possibly 'null'.
The text was updated successfully, but these errors were encountered: