0👍
in vue+vscode ecosystem, now typescript cannot infer type from template declaration. (maybe it will be)
and for $refs[xxx]:
Type ‘Vue | Element | Vue[] | Element[]’ is not assignable to type ‘Vue’.
you can use type assertions instead:
const component = this.$refs["component"] as typeof MyComponent;
- [Vuejs]-How to update vuejs component data with methods?
- [Vuejs]-Websocket failed with 'Invalid frame header'
Source:stackexchange.com