Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
type BrowserWindow,
type DownloadItem,
type SaveDialogOptions,
type WebContents,
} from 'electron';

export type Progress = {
Expand Down Expand Up @@ -178,7 +179,7 @@
```
*/
export function download(
window: BrowserWindow | BrowserView,
window: { webContents: Electron.WebContents },

Check failure on line 182 in index.d.ts

View workflow job for this annotation

GitHub Actions / Node.js 20

There should be no space after '{'.

Check failure on line 182 in index.d.ts

View workflow job for this annotation

GitHub Actions / Node.js 20

There should be no space before '}'.

Check failure on line 182 in index.d.ts

View workflow job for this annotation

GitHub Actions / Node.js 18

There should be no space after '{'.

Check failure on line 182 in index.d.ts

View workflow job for this annotation

GitHub Actions / Node.js 18

There should be no space before '}'.
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.

url: string,
options?: Options
): Promise<DownloadItem>;
Loading