Skip to content

LeafBuilder

Defined in: state/factories.ts:622

Builder passed to createStore to construct typed leaves. Each method returns a Reactive* of the matching shape. Leaves don’t carry an id — the compound owns the save contract for the tree.

counter(opts?): ReactiveCounter

Defined in: state/factories.ts:627

number | (() => number)

ReactiveCounter


list<T>(opts?): ReactiveList<T>

Defined in: state/factories.ts:638

T

Iterable<T, any, any> | (() => Iterable<T>)

(item) => ListKey

ReactiveList<T>


map<K, V>(opts?): ReactiveMap<K, V>

Defined in: state/factories.ts:632

K

V

Iterable<[K, V], any, any> | (() => Iterable<[K, V]>)

ReactiveMap<K, V>


record<T, TEncoded>(opts): ReactiveRecord<T, TEncoded>

Defined in: state/factories.ts:628

T extends object

TEncoded = T

Codec<T, TEncoded>

T | (() => T)

ReactiveRecord<T, TEncoded>


set<K>(opts?): ReactiveSet<K>

Defined in: state/factories.ts:635

K

Iterable<K, any, any> | (() => Iterable<K>)

ReactiveSet<K>


value<T, TEncoded>(opts): ReactiveValue<T, TEncoded>

Defined in: state/factories.ts:623

T

TEncoded = T

Codec<T, TEncoded>

T | (() => T)

ReactiveValue<T, TEncoded>

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/core.md.