From 0ea296b1cb2dbf2e9521dbd501c265cbbfd04ec4 Mon Sep 17 00:00:00 2001 From: TechnicalSoup Date: Thu, 14 Dec 2017 08:16:20 +1100 Subject: [PATCH] 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 --- docs/api/download-item.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api/download-item.md b/docs/api/download-item.md index 9a9cfc6a4a9d..f5265d26a5d2 100644 --- a/docs/api/download-item.md +++ b/docs/api/download-item.md @@ -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