react native 16.13 版本,使用react官方cli建立的初始项目中,文件App.js 有一行代码:react
const App: () => React$Node = () => {
会在vscode中,报语法错误:code
Type annotations can only be used in TypeScript files
只须要在设置中配置一下,具体路径为:ip
取消勾选便可。io