search

Home  >  Q&A  >  body text

visual-studio-code - vscode下如何设置node.js语法提示?

就比如这样 process global这些都没有智能语法提示?
请问应该怎么弄,安装了几个插件也没有效果。

高洛峰高洛峰2781 days ago556

reply all(1)I'll reply

  • 迷茫

    迷茫2017-04-17 16:25:17

    Enable grammar prompts manually:

    1. Go to TypeSearch and search for the library you want to prompt (for example, yours is "node");

    2. Locate the location of the type in npm, and then follow the prompts to install the type (of course package.json must be prepared);

    3. Use import in the file to quote, see; or directly extract the d.ts file in the newly installed type and rename it, and then use the triple slash command /// <reference types="./nodejs.d.ts" /> to quote in the file (actually, this is how I usually write js) quoted).

    reply
    0
  • Cancelreply