Skip to content

ElectronAutoUpdater.once method

ElectronAutoUpdater › once

Unofficial

Registers a one-time listener for the given auto updater event.

Signature:

once(event: "before-quit-for-update", listener: (...args: unknown[]) => void): this

Parameters:

ParameterTypeDescription
event"before-quit-for-update"The event name.
listener(...args: unknown[]) => voidThe event handler.

Returns: thisThis AutoUpdater instance.


Unofficial

Registers a one-time listener for the checking-for-update event.

Signature:

once(event: "checking-for-update", listener: (...args: unknown[]) => void): this

Parameters:

ParameterTypeDescription
event"checking-for-update"
listener(...args: unknown[]) => void

Returns: this


Unofficial

Registers a one-time listener for the error event.

Signature:

once(event: "error", listener: (error: Error) => void): this

Parameters:

ParameterTypeDescription
event"error"
listener(error: Error) => void

Returns: this


Unofficial

Registers a one-time listener for the update-available event.

Signature:

once(event: "update-available", listener: (...args: unknown[]) => void): this

Parameters:

ParameterTypeDescription
event"update-available"
listener(...args: unknown[]) => void

Returns: this


Unofficial

Registers a one-time listener for the update-downloaded event.

Signature:

once(event: "update-downloaded", listener: (event: ElectronEvent, releaseNotes: string, releaseName: string, releaseDate: Date, updateURL: string) => void): this

Parameters:

ParameterTypeDescription
event"update-downloaded"
listener(event: ElectronEvent, releaseNotes: string, releaseName: string, releaseDate: Date, updateURL: string) => void

Returns: this


Unofficial

Registers a one-time listener for the update-not-available event.

Signature:

once(event: "update-not-available", listener: (...args: unknown[]) => void): this

Parameters:

ParameterTypeDescription
event"update-not-available"
listener(...args: unknown[]) => void

Returns: this