I have been searching for the proper method to close an Electron app. My app uses React and TypeScript. After coming across this helpful post, I discovered a working solution:
const remote = require('electron').remote;
let w = remote.getCurrentWindow();
w.close();
However, TSLint is flagging the use of the require()
style import as forbidden. Is there a more efficient way to close the Electron app?