branch()
branch<
T>(data,children): Branch<T>
Creates a branch node with children.
Type Parametersβ
T: Tβ
The data type
Parametersβ
data: Tβ
The branch's data
children: Composite<T>[]β
Child nodes
Returns: Branch<T>β
A Branch node
Sinceβ
2.4.0
Branch<T>β
Branch<
T> =object
A Branch node contains data and children.
Sinceβ
2.4.0
Type Parametersβ
T: Tβ
The data type stored in nodes
Propertiesβ
type: "branch"β
data: Tβ
childrenβ
readonlychildren:ReadonlyArray<Composite<T>>