Not compatible with TypeScript 4.3+ #393
Comments
Mybe a workaround: microsoft/TypeScript#44449 (comment) |
So the workaround is to add {
"compilerOptions": {
"useDefineForClassFields": false
},
} So the result is, that classes are not working in the new ECMA way, but in the old TypeScript way. |
An alternative {
"compilerOptions": {
"target": "es6"
}
} If you don't need the features of Specifically, things broke when running locally and targeting Chrome v96 did not have an issue, nor did Firefox. |
Adding @Component
export default class MyComponent extends Vue {
@Prop()
declare readonly name?: string;
} |
Chrome v97 broke our app (in dev mode) because of this issue as well. In the readme it recommends to use |
This solved all of the issues & errors we got with our class components when upgrading a vue-cli-based App to Vite and TypeScript 4.9. Thank you!! |
Describe the bug
Not compatible with TypeScript 4.3+
When using TS4.3, there will be a lot of warnings. But 4.2 is correct.
I didn't write any code to modify the properties. Just use
@Prop
.Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: