


In Electron, there are 2 types of processes: the main process, which manages the web pages of your application and handles system events, and the render process, which is related to every individual page of the app and hosts most of the application logic. To get code completion for Node.js APIs, go to Preferences / Settings | Languages and Frameworks | Node.js and click Coding assistance for Node.js. You can also download the file manually from GitHub and link to it.Īfter you restart the IDE, coding assistance for Electron will work, although it will not be listed among the project dependencies: Then specify the path to the electron.d.ts file located in the global node_modules/electron folder: In the New Library dialog that appears, click + and select Attach Files: To do so, go to Preferences / Settings | Languages and Frameworks | JavaScript | Libraries and click Add. To get the proper code completion in this case, you need to add electron.d.ts as a JavaScript library. If Electron is installed as a global dependency, electron.d.ts will not be detected: If you’ve installed Electron as a project dependency (with $npm install –save-dev electron), WebStorm will automatically locate electron.d.ts in the node_modules folder. Starting with Electron v1.6.9, this file is included in the electron node module. The coding assistance for the Electron APIs is provided via the electron.d.ts TypeScript definition file.


