I am trying to find the correct way to close an Electron app. I make use of React and TypeScript within the app. I found this post and found a way that works:
const remote = require('electron').remote;
let w = remote.getCurrentWindow();
w.close();
But, TSLint tells me now that the require()
style import is forbidden. Is there a cleaner way to close the Electron app?