VSCode中的Intellisense用于电子应用开发 [英] Intellisense in VSCode for electron app development
问题描述
我正在使用Electron和VSCode开发Windows桌面应用程序。当我尝试使用电子功能时,我看不到任何智慧。我的查询是,
如何配置vscode以启用电子智能?总的来说,我想知道我需要遵循哪些程序才能获得JavaScript代码中的智能感知功能。
应该做到这一点
typings install github-electron --source dt --global
更新
新方法是通过以下方式通过npm安装@types: / p>
npm i -D @ types / electron
不过,在查看该存储库时,它说如果您的依赖项中包含以下内容,则将进行输入。
https://github.com/electron/electron
更新2
听起来像您现在从电子依赖关系中获取类型。不到3年的时间,便有3种不同的方式来做到这一点。现在可能没有人会看到这种情况,因为现代软件包和IDE应该不成问题。
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.
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.
这篇关于VSCode中的Intellisense用于电子应用开发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!