types: possible malformed type error message for $patch #2395
Unanswered
schalkneethling
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Reproduction
N/A - I think
Steps to reproduce the bug
It is difficult to provide steps to reproduce, so I will describe the problem as clearly as possible. I have the following line of code in a Vue single file component (SFC).
createUserResponse.value
is, in fact, aProxy(Object)
, and so I cannot pass it directly as an argument to$patch
. I was unsure whether that was the case, so I tried it and then got the following error in VSCode when hovering over$patch
:The string "gave the following error" seems to be in the incorrect place within the error or may be redundant. Now, I wonder if this is managed from Pinia's types or whether the TypeScript engine inside VSCode could not construct a better message.
Expected behavior
I would have expected the error to be something like this:
Actual behavior
As mentioned in the steps to reproduce, this is the description of the error as shown in VSCode:
Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions