vscode 'type aliases' can only be used in a .ts file.

版权声明:本文为博主原创文章,转载请注明出处。 https://blog.csdn.net/lengchu_org/article/details/83243986

vscode 'type aliases' can only be used in a .ts file.

使用react-native cli生成react-native项目,app.js中报该错误

'type aliases' can only be used in a .ts file.

解决方法:

在vscode扩展中搜索
@builtin TypeScript and JavaScript Language Features

禁用该扩展即可

参考:

https://stackoverflow.com/questions/48852007/type-aliases-can-only-be-used-in-a-ts-file
https://github.com/Microsoft/vscode-react-native/issues/631

猜你喜欢

转载自blog.csdn.net/lengchu_org/article/details/83243986