main: add missing return type
This commit is contained in:
1 parent
f3e18fa410
commit
88e4f1f919
1 file changed
+5
-5
@@ -22,18 +22,18 @@ export const createMainWindow = async (mainWindow: BrowserWindow): Promise<Brows
|
|||||||
|
|
||||||
mainWindow.setMenu(null)
|
mainWindow.setMenu(null)
|
||||||
|
|
||||||
mainWindow.on('close', (event: Event) => {
|
mainWindow.on('close', (event: Event): void => {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
exitApp(mainWindow)
|
exitApp(mainWindow)
|
||||||
})
|
})
|
||||||
|
|
||||||
mainWindow.webContents.on('did-frame-finish-load', () => {
|
mainWindow.webContents.on('did-frame-finish-load', (): void => {
|
||||||
if (Constants.IS_DEV_ENV) {
|
if (Constants.IS_DEV_ENV) {
|
||||||
mainWindow.webContents.openDevTools()
|
mainWindow.webContents.openDevTools()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
mainWindow.once('ready-to-show', () => {
|
mainWindow.once('ready-to-show', (): void => {
|
||||||
mainWindow.setAlwaysOnTop(true)
|
mainWindow.setAlwaysOnTop(true)
|
||||||
mainWindow.show()
|
mainWindow.show()
|
||||||
mainWindow.focus()
|
mainWindow.focus()
|
||||||
@@ -75,7 +75,7 @@ export const createErrorWindow = async (
|
|||||||
await errorWindow.loadFile(Constants.APP_INDEX_URL_PROD, { hash: 'error' })
|
await errorWindow.loadFile(Constants.APP_INDEX_URL_PROD, { hash: 'error' })
|
||||||
}
|
}
|
||||||
|
|
||||||
errorWindow.on('ready-to-show', () => {
|
errorWindow.on('ready-to-show', (): void => {
|
||||||
if (!Constants.IS_DEV_ENV && mainWindow && !mainWindow.isDestroyed()) {
|
if (!Constants.IS_DEV_ENV && mainWindow && !mainWindow.isDestroyed()) {
|
||||||
mainWindow.destroy()
|
mainWindow.destroy()
|
||||||
}
|
}
|
||||||
@@ -83,7 +83,7 @@ export const createErrorWindow = async (
|
|||||||
errorWindow.focus()
|
errorWindow.focus()
|
||||||
})
|
})
|
||||||
|
|
||||||
errorWindow.webContents.on('did-frame-finish-load', () => {
|
errorWindow.webContents.on('did-frame-finish-load', (): void => {
|
||||||
if (Constants.IS_DEV_ENV) {
|
if (Constants.IS_DEV_ENV) {
|
||||||
errorWindow.webContents.openDevTools()
|
errorWindow.webContents.openDevTools()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user