export const { app , BrowserWindow } = require ( "electron" ) ; export namespace Window { const defaultProps = { width : 800 , height : 600 , show : false , webPreferences : { nodeIntegration : true , } , } ; export class MainWindow extends BrowserWindow { constructor ( file , { ... windowSettings } ) { super ( { ... defaultProps , ... windowSettings } ) ; this . loadFile ( file ) ; this . once ( "ready-to-show" , ( ) => { this . show ( ) ; } ) ; } } }