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,40 @@ exposeInMainWorld(apiKey: string, api: mixed): void, }; + declare export var autoUpdater: AutoUpdater; + declare class AutoUpdater { + setFeedURL(options: { + +url: string, + +headers?: { +[string]: string }, + +serverType?: 'json' | 'default', + }): void; + getFeedURL(): string; + checkForUpdates(): void; + quitAndInstall(): void; + + on>( + event: T, + listener: $ElementType, + ): void; + removeListener>( + event: T, + listener: $ElementType, + ): void; + } + + declare type AutoUpdaterEvents = { + 'checking-for-update': () => void, + 'update-available': () => void, + 'update-not-available': () => void, + 'update-downloaded': ( + event: Event, + releaseNotes?: string, + releaseName: string, + releaseDate?: Date, + updateURL?: string, + ) => void, + }; + declare class Dock { setBadge(text: string): void; getBadge(): string; @@ -182,7 +217,7 @@ declare export type IpcMainEvent = { +processId: number, +frameId: number, - +returnValue: mixed, + returnValue: mixed, +sender: WebContents, +reply: (channel: string, ...args: $ReadOnlyArray) => void, }; @@ -198,6 +233,7 @@ listener: (...args: $ReadOnlyArray) => void, ): void, send(channel: string, ...args: $ReadOnlyArray): void, + sendSync(channel: string, ...args: $ReadOnlyArray): any, }; declare export type MenuItemConstructorOptions = { @@ -365,6 +401,7 @@ Menu, ipcMain, systemPreferences, + autoUpdater, } from 'electron'; }