cannot correctly infer type in vue2-composition-api

The IDE throws a type error, while in VS Code, It works well

And also I can run my project with webpack and no error is thrown

6 comments
Comment actions Permalink

Please follow https://youtrack.jetbrains.com/issue/WEB-52581 for updates

as a workaround, please try enabling Typescript language service in Settings | Languages & Frameworks | TypeScript

0
Comment actions Permalink

Thank you for your reply!

But the Typescript language service was enabled when the error was thrown :(

And I tried reopen Typescript language service and it still cannot work :(

0
Comment actions Permalink

It works fine for me with the service enabled; what IDE version do you use?

0
Comment actions Permalink

I'm using the same version, and the issue doesn't occur for me with the service enabled...

0
Comment actions Permalink

I created a new project and tried using vue2-composition-api, but no error was thrown...  Maybe there's something wrong with my project configuration

Thank you for your reply again, I will try to figure out the problem myself :(

0

Please sign in to leave a comment.