Skip to content

PluginDataHandlerConstructorOptions

Options for PluginDataHandler.

Import:

import type { PluginDataHandlerConstructorOptions } from '@mnaoumov/obsidian-lib/data-handler';

Signature:

export interface PluginDataHandlerConstructorOptions

Properties

PropertyTypeDescription
maxSizeInBytes?numberThe maximum size of data.json, in UTF-8 bytes as written to disk. Defaults to DEFAULT_PLUGIN_DATA_MAX_SIZE_IN_BYTES. Pass Infinity to disable the guard.
recoveryStore?null | SettingsRecoveryStoreWhere recovery copies of data.json are kept. Defaults to a device-local LocalSettingsRecoveryStore for the plugin. Pass null to keep none: an unparseable file is then still reported and never overwritten, so a settings component built on this handler fails its load rather than run on defaults, and a first save that drops or changes a stored value is written with no copy kept, as before recovery copies existed.