mirror of
https://github.com/electron/electron.git
synced 2026-01-11 00:18:02 -05:00
docs: specify string values for DownloadItem
Explicitly list the possible string return values for the updated and done events so that the typescript declaration file can model them more accurately. At present they are represented as a string type. Fixes : https://github.com/electron/electron-typescript-definitions/issues/71
This commit is contained in:
@@ -44,7 +44,7 @@ win.webContents.session.on('will-download', (event, item, webContents) => {
|
||||
Returns:
|
||||
|
||||
* `event` Event
|
||||
* `state` String
|
||||
* `state` String - Can be `progressing` or `interrupted`.
|
||||
|
||||
Emitted when the download has been updated and is not done.
|
||||
|
||||
@@ -58,7 +58,7 @@ The `state` can be one of following:
|
||||
Returns:
|
||||
|
||||
* `event` Event
|
||||
* `state` String
|
||||
* `state` String - Can be `completed`, `cancelled` or `interrupted`.
|
||||
|
||||
Emitted when the download is in a terminal state. This includes a completed
|
||||
download, a cancelled download (via `downloadItem.cancel()`), and interrupted
|
||||
|
||||
Reference in New Issue
Block a user