I work with Vue and Typescript in Visual Studio code and the Vetur extension. Problem: when updating any code, intellisense will not recognize changes when working in a file .vue
. .ts
Intellisense IS works in files !
I use this definition file so that Typescript recognizes the file extension .vue
:
declare module "*.vue" {
import Vue from "vue";
export default Vue;
}
Example
test.ts just changed
export default class Test {
dummyFunction() {}
}
app.vue intellisense not working
In any file, .vue
intellisense continues to offer testFunction and does not recognize dummyFunction:
import Test from "./test"
export default class App extends Vue {
created() {
const t = new Test()
t.testFunction()
t.dummyFunction()
}
}
somefile.ts intellisense works
In regular old .ts files, intellisense works.
import Test from "./test"
const t = new Test()
t.testFunction() // here it works - this is not allowed
t.dummyFunction() // here it works - this is allowed
If I close the VS code and open it again, the new changes are updated. Is this a Vietnam glitch? Do I need to modify tsconfig files or definitions?