react native 16.13 版本,使用react官方cli创建的初始项目中,文件App.js 有一行代码:
const App: () => React$Node = () => {
会在vscode中,报语法错误:
Type annotations can only be used in TypeScript files
只需要在设置中配置一下,具体路径为:
- Settings - User - Extentsions - TypeScript - JavaScript - Validate: Enable
取消勾选即可。
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。