Skip to content

Conversation

@Salketer
Copy link

Electron has recently WebContentsView which is not included in the types expected by download. Since download only uses the webContents property, I suggest we loosen the type to anything that has that property. This would make it useful for anything that gets added in the futur too.

*/
export function download(
window: BrowserWindow | BrowserView,
window: { webContents: Electron.WebContents },
Copy link
Owner

Choose a reason for hiding this comment

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

This has the downside of not making it clear to the user what they can pass in. Autocomplete is more important than flexibility here I think. So I prefer to just list the supported types.

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.

2 participants