Skip to content

@jsvision/ui / TreeNode

Interface: TreeNode<T> ​

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

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:28

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


value ​

readonly value: T

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

The user payload rendered via getText.