Intellisense in VSCode for electron app development

痞子三分冷 提交于 2019-12-08 03:00:38

问题


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:


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.



来源:https://stackoverflow.com/questions/38372358/intellisense-in-vscode-for-electron-app-development

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!