New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use the angle bracket syntax <>
to assert a type
#1706
Comments
我也遇到这个问题了,导致页面所有代码报错 |
我也遇到这个问题了+1 |
+1, 看了一天, 才发现是插件的问题 |
You can temporarily use const datas = reactive({
roles: [] as Array<string>,
entities: [] as Array<any>,
}); related eslint config: consistent-type-assertions with assertionStyle: "as". This error occurs because the latest volar has changed the generation logic of virtual files in order to solve someother problems: So, the current phenomenon is that volar only allow syntax in tsx in |
@xiaoxiangmoe fine as a temporary workaround but not really a solution for large codebases. We shouldn't need a huge refactor to make perfectly valid code compatible with volar. Staying with 0.39.5 for now, is a fix coming? |
@qgates The issue is known and you'll see a related PR here when there's a fix. This project is maintained by a single developer so consider sponsoring them so they can dedicate more time to this project. |
Before version 0.39.5 it works.
When I updated to version 0.40.x it didn't work
The text was updated successfully, but these errors were encountered: