Page MenuHomePhabricator

D6321.id21139.diff
No OneTemporary

D6321.id21139.diff

diff --git a/desktop/flow-typed/npm/electron_v22.0.0.js b/desktop/flow-typed/npm/electron_v22.0.0.js
--- a/desktop/flow-typed/npm/electron_v22.0.0.js
+++ b/desktop/flow-typed/npm/electron_v22.0.0.js
@@ -10,6 +10,7 @@
hide(): void,
show(): void,
setName: (name: string) => void,
+ getVersion: () => string,
dock: Dock,
isPackaged: boolean,
name: string,
@@ -161,6 +162,37 @@
exposeInMainWorld(apiKey: string, api: mixed): void,
};
+ declare export var autoUpdater: AutoUpdater;
+ declare type AutoUpdater = {
+ setFeedURL(options: {
+ +url: string,
+ +headers?: { +[string]: string },
+ +serverType?: 'json' | 'default',
+ }): void,
+ getFeedURL(): string,
+ checkForUpdates(): void,
+ quitAndInstall(): void,
+
+ on<T: $Keys<AutoUpdaterEvents>>(
+ event: T,
+ listener: $ElementType<AutoUpdaterEvents, T>,
+ ): void,
+ removeListener<T: $Keys<AutoUpdaterEvents>>(
+ event: T,
+ listener: $ElementType<AutoUpdaterEvents, T>,
+ ): void,
+ };
+
+ declare type AutoUpdaterEvents = {
+ 'update-downloaded': (
+ event: Event,
+ releaseNotes: string,
+ releaseName: string,
+ releaseDate: Date,
+ updateURL: string,
+ ) => void,
+ };
+
declare class Dock {
setBadge(text: string): void;
getBadge(): string;
@@ -182,7 +214,7 @@
declare export type IpcMainEvent = {
+processId: number,
+frameId: number,
- +returnValue: mixed,
+ returnValue: mixed,
+sender: WebContents,
+reply: (channel: string, ...args: $ReadOnlyArray<any>) => void,
};
@@ -198,6 +230,7 @@
listener: (...args: $ReadOnlyArray<any>) => void,
): void,
send(channel: string, ...args: $ReadOnlyArray<mixed>): void,
+ sendSync(channel: string, ...args: $ReadOnlyArray<mixed>): any,
};
declare export type MenuItemConstructorOptions = {
@@ -365,6 +398,7 @@
Menu,
ipcMain,
systemPreferences,
+ autoUpdater,
} from 'electron';
}

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 5:03 AM (17 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2685981
Default Alt Text
D6321.id21139.diff (1 KB)

Event Timeline