diff --git a/main/account_switcher.ts b/main/account_switcher.ts index 4c9fdc2..8138c50 100644 --- a/main/account_switcher.ts +++ b/main/account_switcher.ts @@ -19,7 +19,7 @@ export default class AccountSwitcher extends EventEmitter { constructor(accounts: Account[]) { super(); - const submenu = [] as Electron.MenuItemOptions[]; + const submenu = [] as Electron.MenuItemConstructorOptions[]; for (const account of accounts.filter(a => a.name !== '')) { let name = account.name; diff --git a/main/default_menu.ts b/main/default_menu.ts index 6fbcbcd..acde092 100644 --- a/main/default_menu.ts +++ b/main/default_menu.ts @@ -2,7 +2,7 @@ import * as path from 'path'; import {Menu, shell, app} from 'electron'; export default function defaultMenu() { - const template: Electron.MenuItemOptions[] = [ + const template: Electron.MenuItemConstructorOptions[] = [ { label: 'Edit', submenu: [ @@ -138,7 +138,7 @@ export default function defaultMenu() { ] }); - (template[1].submenu as Electron.MenuItemOptions[]).push( + (template[1].submenu as Electron.MenuItemConstructorOptions[]).push( { type: 'separator' }, diff --git a/package.json b/package.json index 8d27f8a..62c0e96 100644 --- a/package.json +++ b/package.json @@ -37,8 +37,7 @@ }, "homepage": "https://github.com/rhysd/Mstdn#readme", "devDependencies": { - "@types/electron": "~1.4.37", - "@types/electron-window-state": "^2.0.28", + "@types/electron-window-state": "^2.0.29", "@types/loglevel": "^1.4.29", "@types/mousetrap": "^1.5.34", "@types/node": "^8.0.0", @@ -49,9 +48,9 @@ "typescript": "^2.3.4" }, "dependencies": { - "electron": "1.6.8", - "electron-window-state": "^4.1.1", + "electron": "^1.7.5", "electron-context-menu": "^0.9.1", + "electron-window-state": "^4.1.1", "loglevel": "^1.4.1", "menubar": "github:rhysd/menubar#mstdn", "mousetrap": "^1.6.1" diff --git a/renderer/ipc.ts b/renderer/ipc.ts index 81d7393..5ec0471 100644 --- a/renderer/ipc.ts +++ b/renderer/ipc.ts @@ -2,7 +2,7 @@ import {ipcRenderer as ipc} from 'electron'; import log from './log'; export function on(channel: IpcChannelFromMain, callback: (...args: any[]) => void) { - ipc.on(channel, (_, ...args: any[]) => { + ipc.on(channel, (_: any, ...args: any[]) => { log.info('IPC: Received from:', channel, args); callback(...args); }); diff --git a/typings/electron-context-menu.d.ts b/typings/electron-context-menu.d.ts index 148eefb..0457c71 100644 --- a/typings/electron-context-menu.d.ts +++ b/typings/electron-context-menu.d.ts @@ -1,6 +1,6 @@ declare namespace ElectronContextMenu { interface Options { - window?: Electron.BrowserWindow | Electron.WebViewElement; + window?: Electron.BrowserWindow | Electron.WebviewTag; showInspectElement?: boolean; labels?: { cut: string; diff --git a/typings/menubar.d.ts b/typings/menubar.d.ts index 0c385a0..2c87404 100644 --- a/typings/menubar.d.ts +++ b/typings/menubar.d.ts @@ -35,17 +35,23 @@ declare namespace Menubar { showWindow(): void; hideWindow(): void; } - interface MenubarOptions extends Electron.BrowserWindowOptions { + interface MenubarOptions extends Electron.BrowserWindowConstructorOptions { dir?: string; index?: string; tooltip?: string; tray?: Electron.Tray; + icon?: string; + width?: number; + height?: number; + show?: boolean; preloadWindow?: boolean; alwaysOnTop?: boolean; showOnAllWorkspaces?: boolean; windowPosition?: Position; showDockIcon?: boolean; showOnRightClick?: boolean; + autoHideMenuBar?: boolean; + webPreferences?: Electron.WebPreferences; } }