Skip to content

IVariableSource

Defined in: packages/engine/src/variables/IVariableSource.ts:10

Interface for variable value providers.

Implementations provide named variables to the VariableResolver. Each source has a priority, lower numbers are queried first.

Sources can be backed by document variables, Obsidian frontmatter, plugin data, or any external data store.

name: string;

Defined in: packages/engine/src/variables/IVariableSource.ts:12

Human-readable name for this source (e.g., “Document Variables”, “Frontmatter”).


priority: number;

Defined in: packages/engine/src/variables/IVariableSource.ts:17

Priority for resolution order. Lower numbers = higher priority. Sources with the same priority are queried in registration order.

get(name): Promise<string | number | undefined>;

Defined in: packages/engine/src/variables/IVariableSource.ts:23

Get a variable’s value.

ParameterTypeDescription
namestringThe variable name to look up

Promise<string | number | undefined>

The value, or undefined if not found in this source


set(name, value): Promise<void>;

Defined in: packages/engine/src/variables/IVariableSource.ts:29

Set a variable’s value in this source.

ParameterTypeDescription
namestringThe variable name
valuestring | numberThe value to set

Promise<void>