簡體   English   中英

Intellisence 在 Node.js 的 Visual Studio 代碼中不起作用

[英]Intellisence not working in visual studio code for Node.js

我安裝了當前的 Node.js 並創建了一個文件夾。 我用 Visual Studio 代碼打開了文件夾。 我開始輸入以下代碼

 const EventEmitter = require('events');
 const emitter = new EventEmitter();

 emitter.  -- This does not give me the intellisence. 

在此處輸入圖像描述

我怎樣才能獲得智能,以便可以使用此 class 中的方法? 我已經嘗試了一段時間,但沒有運氣。 我需要安裝其他東西嗎?

您需要安裝 nodejs 類型

npm install --save-dev @types/node

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM