简体   繁体   English

使用Visual Studio Code开发Node.js

[英]Develop nodejs with Visual Studio Code

Microsoft has announced the new cross platform IDE Visual Studio Code . Microsoft已发布了新的跨平台IDE Visual Studio Code I don't see how can enable nodejs tools for it. 我没有看到如何为它启用nodejs工具。 As far as I understand there should be something coming out of the box. 据我了解,应该有一些现成的东西。

Node.js tools are automatically enabled. Node.js工具会自动启用。 In order to activate them, you need to: 为了激活它们,您需要:

  1. Hover your mouse over Node specific code (such as a require statement) 将鼠标悬停在特定于Node的代码上(例如require语句)
  2. Click on the lightbulb 点击灯泡
  3. Select the option that contains the Add /// reference to 'node/node.d.ts' construct 选择包含Add /// reference to 'node/node.d.ts'结构的Add /// reference to 'node/node.d.ts'的选项
  4. That's it 而已

It doesn't matter where you put the reference string. reference字符串放在何处都没有关系。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM