DataHandler
A handler for loading and saving data to the plugin’s data file.
Import:
import type { DataHandler } from '@mnaoumov/obsidian-lib/data-handler';Signature:
export interface DataHandlerProperties
| Property | Type | Description |
|---|---|---|
| loadData | () => Promise<unknown> | A function to load data from the plugin's data file. |
| recoveryStore? | null | SettingsRecoveryStore | Where a copy of the data file is kept before anything could lose what it held, or null (or absent) when the handler keeps none. A settings component keeps a copy here before a first save that would drop or change a stored value, and skips that save when the copy cannot be kept. |
| saveData | (data: unknown) => Promise<void> | A function to save data to the plugin's data file. |
Links to this page: