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

fix: update index.d.ts #102

Merged
merged 1 commit into from
Jan 27, 2022
Merged

fix: update index.d.ts #102

merged 1 commit into from
Jan 27, 2022

Conversation

oskCom
Copy link
Contributor

@oskCom oskCom commented Jan 26, 2022

Fix #85 #101

I referred to #94

@oskCom oskCom changed the title update index.d.ts fix: update index.d.ts Jan 26, 2022
Comment on lines 6 to 7
export var BrowserView: typeof Electron.BrowserView;
export var BrowserWindow: typeof Electron.BrowserWindow;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confused why not update all of these?

Suggested change
export var BrowserView: typeof Electron.BrowserView;
export var BrowserWindow: typeof Electron.BrowserWindow;
export var BrowserView: Main.BrowserView;
export var BrowserWindow: Main.BrowserWindow;

etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your review.

I tried.

export var BrowserWindow: Main.BrowserWindow;

However, an error occurs because the static member of BrowserWindow cannot be referenced.

code&error

import * as _remote from '@electron/remote';
_remote.BrowserWindow.getAllWindows();
                      ~~~~~~~~~~~~~~~
                      ^ Property 'getAllWindows' is a static member of type 'BrowserWindow'.

@nornagon nornagon merged commit 48cc1a3 into electron:main Jan 27, 2022
@oskCom oskCom deleted the modify_type_def branch January 28, 2022 02:04
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

Successfully merging this pull request may close these issues.

TypeScript issues with Electron 15.x and 2.0.1
2 participants