From 9cee9901e44ede63e645dc2b69082435486d125c Mon Sep 17 00:00:00 2001 From: "m.sakamaki" Date: Sat, 27 Feb 2016 15:18:53 +0900 Subject: [PATCH 1/3] Add type definition for autoUpdater.quitAndInstall() to github-electron --- github-electron/github-electron-main-tests.ts | 4 ++++ github-electron/github-electron.d.ts | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/github-electron/github-electron-main-tests.ts b/github-electron/github-electron-main-tests.ts index 5d3060e4bb..b2343da39e 100644 --- a/github-electron/github-electron-main-tests.ts +++ b/github-electron/github-electron-main-tests.ts @@ -227,6 +227,10 @@ app.commandLine.appendSwitch('vmodule', 'console=0'); autoUpdater.setFeedURL('http://mycompany.com/myapp/latest?version=' + app.getVersion()); +autoUpdater.checkForUpdates(); + +autoUpdater.quitAndInstall(); + // browser-window // https://github.com/atom/electron/blob/master/docs/api/browser-window.md diff --git a/github-electron/github-electron.d.ts b/github-electron/github-electron.d.ts index 418ef71fcc..c589a9d980 100644 --- a/github-electron/github-electron.d.ts +++ b/github-electron/github-electron.d.ts @@ -1186,6 +1186,11 @@ declare module Electron { * before using this API */ checkForUpdates(): any; + /** + * Restarts the app and installs the update after it has been downloaded. + * It should only be called after update-downloaded has been emitted. + */ + quitAndInstall(): any; } module Dialog { From da016154e616cfccdadebaced269b7429c0d6bc4 Mon Sep 17 00:00:00 2001 From: "m.sakamaki" Date: Sat, 27 Feb 2016 15:32:12 +0900 Subject: [PATCH 2/3] indent style equal tab --- github-electron/github-electron.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/github-electron/github-electron.d.ts b/github-electron/github-electron.d.ts index c589a9d980..bfd0e65487 100644 --- a/github-electron/github-electron.d.ts +++ b/github-electron/github-electron.d.ts @@ -1186,11 +1186,11 @@ declare module Electron { * before using this API */ checkForUpdates(): any; - /** - * Restarts the app and installs the update after it has been downloaded. - * It should only be called after update-downloaded has been emitted. - */ - quitAndInstall(): any; + /** + * Restarts the app and installs the update after it has been downloaded. + * It should only be called after update-downloaded has been emitted. + */ + quitAndInstall(): any; } module Dialog { From 88cc695e1f75df3c2da8a0c68e535f35ee806638 Mon Sep 17 00:00:00 2001 From: "m.sakamaki" Date: Mon, 29 Feb 2016 11:24:12 +0900 Subject: [PATCH 3/3] modified of code review --- github-electron/github-electron.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-electron/github-electron.d.ts b/github-electron/github-electron.d.ts index bfd0e65487..f7bab797f8 100644 --- a/github-electron/github-electron.d.ts +++ b/github-electron/github-electron.d.ts @@ -1190,7 +1190,7 @@ declare module Electron { * Restarts the app and installs the update after it has been downloaded. * It should only be called after update-downloaded has been emitted. */ - quitAndInstall(): any; + quitAndInstall(): void; } module Dialog {