Intellisense in VSCode for electron app developmen

2019-05-20 17:20发布

I am developing windows desktop app using Electron and VSCode. I do not see any intellisence when I try to use functions from electron. My query is, how to configure vscode to enable the electron intellisense? In general I want to know what procedures I need to follow so that I can get intellisense feature in JavaScript code.

1条回答
小情绪 Triste *
2楼-- · 2019-05-20 17:56

Running this should do the trick

typings install github-electron --source dt --global

Update

The new method would be to install the @types through npm via:

npm i -D @types/electron

Looking at that repository though, it says that if you have the following included in your dependencies you'll get typings.

https://github.com/electron/electron

Update 2

Sounds like you'll get types from the electron dependency now itself. It took less than a year to have 3 different ways of doing this. Nobody will probably ever see this now as it should not be an issue with modern packages and IDEs.

查看更多
登录 后发表回答