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
<script lang="ts">
import Test from './test';
export default class App extends Vue {
created() {
const t = new Test();
}
}
</script>
Add a new method to Test.ts
export default class Test {
foo() { }
}
Try to reference the new function in your .vue file
<script lang="ts">
import Test from './test';
export default class App extends Vue {
created() {
const t = new Test();
t.foo();
}
}
</script>
You will receive an error in VSCode Intellisense saying Property 'foo' does not exist on type 'Test'.
Closing/reopening the file does not seem to fix this. Only restarting VS Code corrects the error. Webpack is still able to compile the code for me, so the error issue seems to be either with VS Code or with Vetur.
The text was updated successfully, but these errors were encountered:
Info
Problem
TypeScript Intellisense not updating in
<script>
section of.vue
files for referencing other.ts
files.See https://stackoverflow.com/questions/46988578/intellisense-not-working-for-vue-files for example.
Reproducible Case
Create a Test.ts file:
.vue
file, import this class.vue
fileYou will receive an error in VSCode Intellisense saying
Property 'foo' does not exist on type 'Test'.
Closing/reopening the file does not seem to fix this. Only restarting VS Code corrects the error. Webpack is still able to compile the code for me, so the error issue seems to be either with VS Code or with Vetur.
The text was updated successfully, but these errors were encountered: