To help you better understand, I have prepared a simplified version for you to follow. Without more details about your specific application, this is the best I can offer...
Make sure you have Electron listed as a development dependency in your project's package.json file:
package.json
{
"name": "example",
"private": true,
"devDependencies": {
"electron": "^1.7.9"
}
}
In the application code, ensure that Electron is imported properly as shown below (with working autocompletion and no errors):
import { app, BrowserWindow } from "electron";
import * as path from "path";
import * as url from "url";
const chr = process.versions.chrome;
The type information for process.versions.chrome
can be found in
node_modules\electron\electron.d.ts
.
interface ProcessVersions {
electron: string;
chrome: string;
}