美文网首页
vscode写nodejs智能提示

vscode写nodejs智能提示

作者: JasonCooper | 来源:发表于2016-12-20 16:12 被阅读0次

-安装typings

npm install -g typings

-安装语法插件(在项目根目录下运行)

typings installdt~node --global

其中”dt~”为使用DefinitelyTyped类型定义的意思,vscode可以识别这种定义。

之后可以看到在项目目录下出来了新的文件夹“typings”

类似地,可以使用以上的方法,实现其他模块的自动补全。

typings install dt~express --global

typings install dt~lodash --global

git有比较全的模块,地址:https://github.com/DefinitelyTyped/DefinitelyTyped

相关文章

网友评论

      本文标题:vscode写nodejs智能提示

      本文链接:https://www.haomeiwen.com/subject/jpxfvttx.html