Skip to content

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 DataHandler

Implements: DataHandler

Constructor

new PluginDataHandler(plugin: Plugin)

Creates a new plugin data handler.

Properties

PropertyTypeDescription
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

MethodReturnsDescription
loadData()Promise<unknown>Loads data from the plugin's data file.
saveData(data)Promise<void>Saves data to the plugin's data file.