Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Syntax error]electron/src/menu/system.ts:79:20 - error TS2339: Property 'webContents' does not exist on type 'BaseWindow'. #8343

Open
iniwap opened this issue Nov 6, 2024 · 0 comments

Comments

@iniwap
Copy link

iniwap commented Nov 6, 2024

yarn start
electron/src/menu/system.ts:79:20 - error TS2339: Property 'webContents' does not exist on type 'BaseWindow'.


const signOutTemplate: MenuItemConstructorOptions = { click: (_menuItem, browserWindow) => browserWindow?.webContents.send(EVENT_TYPE.UI.SYSTEM_MENU, EVENT_TYPE.ACTION.SIGN_OUT), label: locale.getText('menuSignOut'), };
(property) Electron.MenuItemConstructorOptions.click?: ((menuItem: Electron.MenuItem, window: (Electron.BaseWindow) | (undefined), event: Electron.KeyboardEvent) => void) | undefined

BaseWindow has no property 'webContents' , BrowserWindow has! From the parameter name 'browserWindow', it's clear that BrowserWindow should be used instead of BaseWindow.

pls fix this syntax error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant