Skip to main content

Function: getAppState()

function getAppState<
Path extends
| "appIsQuitting"
| "autoUpdater.status"
| "autoUpdater.updateDownloaded"
| "autoUpdaterInitialized"
| "gyazoServer"
| "gyazoServerPort"
| "loadedFitFilePath"
| "mainWindow"
| "permissions.geolocation.allowed",
>(statePath: Path): MainAppStateValueByPath[Path];

Defined in: main/state/appState.ts:83

Returns the current value for a state key from the main process state manager.

Type Parameters​

Path​

Path extends | "appIsQuitting" | "autoUpdater.status" | "autoUpdater.updateDownloaded" | "autoUpdaterInitialized" | "gyazoServer" | "gyazoServerPort" | "loadedFitFilePath" | "mainWindow" | "permissions.geolocation.allowed"

Parameters​

statePath​

Path

Dot-notation state path, for example "fitFile.lastResult".

Returns​

MainAppStateValueByPath[Path]

Stored state value.