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
should getFocusedWebContents() have return type 'WebContents | null'? #202
Comments
I think you're right. This should be fixed in the documentation itself over in the main Electron repo. :) |
Thanks! It wasn't quite clear to me where and how |
Feel free to make a documentation PR directly. It should look something like this: In docs/api/web-contents.md - Returns `WebContents` - The web contents that is focused in this application, otherwise
+ Returns `WebContents` | null - The web contents that is focused in this application, otherwise
returns `null`. |
Thank you :-) I'll do that! |
My
electron.d.ts
(from version 17.1.0) has:IIUC, because this function can return
null
, the return value should be declared asWebContents | null
. Or am I misunderstanding something?The text was updated successfully, but these errors were encountered: