为何在TSX文件中出现‘Type annotations can only be used in TypeScript files’报错?
[TS8010] Type annotations error persists across all projects, troubleshooting attempts failed
I'm facing the Type annotations can only be used in TypeScript files.ts(8010) error in every project I work on, and none of the fixes I've tried have resolved it:
- Reinstalled project dependencies
- Reinstalled the TypeScript language server
- Tested across different projects (both new and existing ones)
This issue has been bothering me for a month. I've attached relevant screenshots showing the error context. Any help or solutions to fix this would be really appreciated.
内容的提问来源于stack exchange,提问作者Gurvinder Singh
相关产品推荐
相关产品推荐

