-
-
Notifications
You must be signed in to change notification settings - Fork 593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Declaring an array property breaks intellisense #1422
Comments
same problem! props: {
type: Array as ()=>Array<any>
} |
For me it's JavaScript as seen in the screenshots. Maybe jsdoc would work but still... |
This is already fixed on TypeScript >= 3.5 and you can let Vetur use workspace TypeScript by setting |
@ktsn yes, but why is plugin using old version by default? Shouldn't this issue stay open so that can be fixed? |
There was ed9a8e5 integrated quite recently to update TS, but I wonder if it upgraded wrong TS (meant to upgrade one in the server?). |
Because we don't have enough resource to update TypeScript version frequently & instantly. That's why we have 'Use workspace dependencies' config. In any cases, updating TypeScript version should be another issue as original problem can be solved by the config. |
@ktsn I don't agree with you on that. This issue happens in the default configuration. I've created it specifically for fixing the outdated typescript dependency issue. More so, this happens in default configuration with standard code. That, to me, qualifies as a bug and changing settings to fix it sounds more like a workaround. And ed9a8e5 was done to fix #1389 and it won't fix it (I'm almost certain) because wrong dependency was updated. So the intention was to update typescript anyway and just by accident it didn't happen yet. |
I see your point. I've reopened #1389. |
@rchl Yeah, I realized, should have updated TS in VLS instead of my dev dependency list 😅 |
Info
Problem
Vetur's intellisense breaks when one of the props is defined as being of Array type.
Prop type is
![type-string](https://user-images.githubusercontent.com/153197/64555762-550f2600-d33e-11e9-91f9-90276efdbe00.png)
String
:Prop type is
![type-array](https://user-images.githubusercontent.com/153197/64555764-550f2600-d33e-11e9-9b7e-656b549534ed.png)
Array
:Reproducible Case
npm install
components/test.vue
fileExpected that you don't see squiggly lines on many methods/properties. Only
notExisting
property in the template should show error as it doesn't exist.BTW
I know this bug is pretty much identical to the old one that is now closed and was set as duplicate of #1242, but the conclusion there was that this is an upstream bug which upstream commented on and said that it's a typescript bug that is already fixed. But it appears that Vetur is forcing old typescript version (3.3) and that seems to be the bug here.
The text was updated successfully, but these errors were encountered: