Version
3.0.0
Reproduction link
https://codepen.io/lolmedo/pen/qBZvxpQ
Steps to reproduce
VueJS 3 project created with Vue CLI, edited with Visual Studio Code.
This code:
export default class Home extends Vue {
message: string;
constructor() {
super();
this.message = "";
}
}
Produces these runtime error messages in the browser:
[Vue warn]: Unhandled error during execution of setup function
at <Home onVnodeUnmounted=fn ref=Ref< undefined > >
at
at runtime-core.esm-bundler.js:38
[Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/vue-next
at <Home onVnodeUnmounted=fn ref=Ref< undefined > >
at
at runtime-core.esm-bundler.js:38
Uncaught (in promise) TypeError: can't convert undefined to object
VueImpl vue-class-component.esm-bundler.js:257
_createSuperInternal Babel
Home Home.vue:14
setup vue-class-component.esm-bundler.js:340
callWithErrorHandling runtime-core.esm-bundler.js:154
What is expected?
Being able to use full typescript support with type definitions and variable initialization in the class constructor. This is supported in VueJS v2
What is actually happening?
Getting the following errors on browser:
[Vue warn]: Unhandled error during execution of setup function
at <Home onVnodeUnmounted=fn ref=Ref< undefined > >
at
at runtime-core.esm-bundler.js:38
[Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/vue-next
at <Home onVnodeUnmounted=fn ref=Ref< undefined > >
at
at runtime-core.esm-bundler.js:38
Uncaught (in promise) TypeError: can't convert undefined to object
VueImpl vue-class-component.esm-bundler.js:257
_createSuperInternal Babel
Home Home.vue:14
setup vue-class-component.esm-bundler.js:340
callWithErrorHandling runtime-core.esm-bundler.js:154