Skip to content

StateFieldSpec<Value>

Unofficial

Configuration for defining a state field.

Import:

import type { StateFieldSpec } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface StateFieldSpec<Value>

Methods

MethodReturnsDescription
compare(a, b)booleanCompare two values of this field.
create(state)ValueCreate the initial value for this field.
provide(field)ExtensionProvide extensions based on this field.
update(value, transaction)ValueCompute a new value from the field's previous value and a transaction.