refactor: replace a few any-s with proper types (#25681)
This commit is contained in:
parent
603f9242d9
commit
fb11a12d5b
19 changed files with 170 additions and 53 deletions
|
@ -60,7 +60,7 @@ const assertChromeDevTools = function (contents: Electron.WebContents, api: stri
|
|||
}
|
||||
};
|
||||
|
||||
ipcMainInternal.handle('ELECTRON_INSPECTOR_CONTEXT_MENU', function (event: Electron.IpcMainInvokeEvent, items: ContextMenuItem[], isEditMenu: boolean) {
|
||||
ipcMainInternal.handle('ELECTRON_INSPECTOR_CONTEXT_MENU', function (event, items: ContextMenuItem[], isEditMenu: boolean) {
|
||||
return new Promise(resolve => {
|
||||
assertChromeDevTools(event.sender, 'window.InspectorFrontendHost.showContextMenuAtPoint()');
|
||||
|
||||
|
@ -72,7 +72,7 @@ ipcMainInternal.handle('ELECTRON_INSPECTOR_CONTEXT_MENU', function (event: Elect
|
|||
});
|
||||
});
|
||||
|
||||
ipcMainInternal.handle('ELECTRON_INSPECTOR_SELECT_FILE', async function (event: Electron.IpcMainInvokeEvent) {
|
||||
ipcMainInternal.handle('ELECTRON_INSPECTOR_SELECT_FILE', async function (event) {
|
||||
assertChromeDevTools(event.sender, 'window.UI.createFileSelectorElement()');
|
||||
|
||||
const result = await dialog.showOpenDialog({});
|
||||
|
@ -84,7 +84,7 @@ ipcMainInternal.handle('ELECTRON_INSPECTOR_SELECT_FILE', async function (event:
|
|||
return [path, data];
|
||||
});
|
||||
|
||||
ipcMainUtils.handleSync('ELECTRON_INSPECTOR_CONFIRM', async function (event: Electron.IpcMainInvokeEvent, message: string = '', title: string = '') {
|
||||
ipcMainUtils.handleSync('ELECTRON_INSPECTOR_CONFIRM', async function (event, message: string = '', title: string = '') {
|
||||
assertChromeDevTools(event.sender, 'window.confirm()');
|
||||
|
||||
const options = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue