refactor: replace a few any-s with proper types (#25681)

This commit is contained in:
Milan Burda 2020-10-08 03:01:23 +02:00 committed by GitHub
parent 603f9242d9
commit fb11a12d5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 170 additions and 53 deletions

View file

@ -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 = {