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:

Parameter Type Description
event "before-quit-for-update" The event name.
listener (...args: unknown[]) => void The 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:

Parameter Type Description
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:

Parameter Type Description
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:

Parameter Type Description
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:

Parameter Type Description
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:

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

Returns: this