Skip to content

@jsvision/ui / TreeNode

Interface: TreeNode<T>

Defined in: ui/src/tree/graph.ts:21

A plain, reactive-friendly tree node. Expand state is owned by the Tree view, not the node — a TreeNode<T> is just { value, children }, and a leaf is children: []. This keeps the node data immutable and shareable; the same node can appear in multiple trees with independent expand state.

Type Parameters

T

T

Properties

children

readonly children: TreeNode<T>[]

Defined in: ui/src/tree/graph.ts:25

Child nodes in display order (empty for a leaf).


value

readonly value: T

Defined in: ui/src/tree/graph.ts:23

The user payload rendered via getText.