['type aliases' 只能在 .ts 文件中使用] [英] ['type aliases' can only be used in a .ts file]

查看:62
本文介绍了['type aliases' 只能在 .ts 文件中使用]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用命令 react-native init "name project" 然后打开 vscode 似乎有错误消息代码.(图片)

I use command react-native init "name project" then open vscode appear to have error message code. (image)

推荐答案

这就是VS Code需要做的事情,仔细观察gif

This is what you need to do with VS Code, observe the gif carefully

Steps to resolve error
1. Go to extension
2. Click on more (...) and select Show Built-in extension
3. Search "TypeScript and JavaScript Language Features" - yellow & blue icon
4. Click on Setting icon of extension and select Disable (workspace)
5. Click on Reload / Restart Required

这篇关于['type aliases' 只能在 .ts 文件中使用]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆