Skip to main content

setAppState

FitFileViewer - API Documentation v30.0.1


FitFileViewer - API Documentation / main/state/appState / setAppState

Function: setAppState()

setAppState<Path>(statePath: Path, value: MainAppStateValueByPath[Path], options?: StateUpdateOptions): void

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

Persists a value into main process state.

Type Parameters​

Path​

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

Parameters​

statePath​

Path

Dot-notation path to update.

value​

MainAppStateValueByPath[Path]

Value to persist.

options?​

StateUpdateOptions

Additional metadata forwarded to the state manager.

Returns​

void