fix: type internal APIs that can return null properly (#29852)
This commit is contained in:
parent
461db8f1ab
commit
a545cd3790
6 changed files with 12 additions and 12 deletions
|
@ -67,7 +67,7 @@ ipcMainInternal.handle(IPC_MESSAGES.INSPECTOR_CONTEXT_MENU, function (event, ite
|
|||
|
||||
const template = isEditMenu ? getEditMenuItems() : convertToMenuTemplate(items, resolve);
|
||||
const menu = Menu.buildFromTemplate(template);
|
||||
const window = event.sender.getOwnerBrowserWindow();
|
||||
const window = event.sender.getOwnerBrowserWindow()!;
|
||||
|
||||
menu.popup({ window, callback: () => resolve() });
|
||||
});
|
||||
|
@ -94,7 +94,7 @@ ipcMainUtils.handleSync(IPC_MESSAGES.INSPECTOR_CONFIRM, async function (event, m
|
|||
buttons: ['OK', 'Cancel'],
|
||||
cancelId: 1
|
||||
};
|
||||
const window = event.sender.getOwnerBrowserWindow();
|
||||
const window = event.sender.getOwnerBrowserWindow()!;
|
||||
const { response } = await dialog.showMessageBox(window, options);
|
||||
return response === 0;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue