在vscode 中,虽然有插件可以达到代码提示的效果但是不是很嗨。

所以加上这些:

全局安装typings:

npm install typings -g
  • 1
安装react和react-native的接口说明文件:
typings install dt~react --save

typings install dt~react-native --save

先 cd 到你的项目目录,如 myproject 目录下再执行下面命令

npm install -g typescript

npm install typescript

tsc --init #

未安装 tsd 则先安装再进行项目初始化

npm install -g tsd

tsd init && tsd install react-native --save

相关文章:

  • 2021-08-19
  • 2021-04-07
  • 2021-05-25
  • 2021-10-22
猜你喜欢
  • 2022-12-23
  • 2022-01-05
  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
  • 2021-07-11
相关资源
相似解决方案