PluginDataHandler
A handler for loading and saving data to the plugin’s data file.
Import:
import { PluginDataHandler } from '@mnaoumov/obsidian-lib/data-handler';Signature:
export class PluginDataHandler implements DataHandlerImplements: DataHandler
Constructor
new PluginDataHandler(plugin: Plugin)Creates a new plugin data handler.
Properties
| Property | Type | Description |
|---|---|---|
| loadData | () => Promise<unknown> | A function to load data from the plugin's data file. (Inherited from DataHandler) |
| saveData | (data: unknown) => Promise<void> | A function to save data to the plugin's data file. (Inherited from DataHandler) |
Methods
| Method | Returns | Description |
|---|---|---|
| loadData() | Promise<unknown> | Loads data from the plugin's data file. |
| saveData(data) | Promise<void> | Saves data to the plugin's data file. |