Skip to content

Commit

Permalink
Fix TypeScript compile error with Electron v17 (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Feb 13, 2022
1 parent 88cc807 commit 07f1d94
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions index.d.ts
@@ -1,7 +1,6 @@
import {
BrowserWindow,
BrowserView,
WebviewTag,
ContextMenuParams,
MenuItemConstructorOptions,
Event as ElectronEvent,
Expand Down Expand Up @@ -113,7 +112,7 @@ declare namespace contextMenu {
Window or WebView to add the context menu to.
When not specified, the context menu will be added to all existing and new windows.
*/
readonly window?: BrowserWindow | BrowserView | WebviewTag | WebContents;
readonly window?: BrowserWindow | BrowserView | Electron.WebviewTag | WebContents;

/**
Should return an array of [menu items](https://electronjs.org/docs/api/menu-item) to be prepended to the context menu.
Expand All @@ -123,7 +122,7 @@ declare namespace contextMenu {
readonly prepend?: (
defaultActions: Actions,
parameters: ContextMenuParams,
browserWindow: BrowserWindow | BrowserView | WebviewTag | WebContents,
browserWindow: BrowserWindow | BrowserView | Electron.WebviewTag | WebContents,
event: ElectronEvent
) => MenuItemConstructorOptions[];

Expand All @@ -135,7 +134,7 @@ declare namespace contextMenu {
readonly append?: (
defaultActions: Actions,
parameters: ContextMenuParams,
browserWindow: BrowserWindow | BrowserView | WebviewTag | WebContents,
browserWindow: BrowserWindow | BrowserView | Electron.WebviewTag | WebContents,
event: ElectronEvent
) => MenuItemConstructorOptions[];

Expand Down Expand Up @@ -271,7 +270,7 @@ declare namespace contextMenu {
readonly menu?: (
defaultActions: Actions,
parameters: ContextMenuParams,
browserWindow: BrowserWindow | BrowserView | WebviewTag | WebContents,
browserWindow: BrowserWindow | BrowserView | Electron.WebviewTag | WebContents,
dictionarySuggestions: MenuItemConstructorOptions[],
event: ElectronEvent
) => MenuItemConstructorOptions[];
Expand Down

0 comments on commit 07f1d94

Please sign in to comment.