Skip to content

StateFieldSpec<Value>

Unofficial

Configuration for defining a state field.

Import:

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

Signature:

export interface StateFieldSpec<Value>

Methods

Method Returns Description
compare(a, b) boolean Compare two values of this field.
create(state) Value Create the initial value for this field.
provide(field) Extension Provide extensions based on this field.
update(value, transaction) Value Compute a new value from the field's previous value and a transaction.