-
Notifications
You must be signed in to change notification settings - Fork 11
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
TypeScript language service can't find name #44
Comments
Thanks for trying out av-ts. Your problem is, probably, not fixable in the library. I'm afraid this is out of av-ts' scope. But I appreciate your clear issue reporting. My suggestion is
|
Thanks for the fast response, and I understand what you're saying. I had a feeling it was a fundamental issue with the .vue SFC approach. To answer the question about LS, I'm using it in WebStorm (I'm the WebStorm Developer Advocate) which just shipped support for Vue. |
Sounds cool!
Yes, static lint and semantic completion have been very weak in SFC. However, for IDE development, I think TypeScript has some new project concept to support non TS file. And VSCode uses it to support TypeScript in HTML, which I think should alas applies to Vue. For standalone service, proxy seems useful. microsoft/TypeScript#12231 That said, though, it still requires man power to implement plugins. I don't think one individual developer to do it in spare time... |
This one is kind of weird. I have a Jasmine test:
I don't think
declarations.ts
matters, but just in case:My
App.vue
file has a<script>
block with:Everything works great, my tests pass/fail as expected, I get autocomplete in WebStorm as I'm writing my tests. Except...the TypeScript language service gives me:
...for the line with:
If I omit the type declaration the error goes away. But then it complains for everything on vm, as it thinks is is a Vue instance, not my TypeScript class.
I can, of course, do testing the way you do, with no
$mount
. Or I can do as you suggest in the ticket about component instances, and don't think in terms of typing in tests, and work down at the generated ES6 layer. But it would sure feel nice to get some typing.The text was updated successfully, but these errors were encountered: