Aller au contenu principal

leaf()

leaf<T>(data): Leaf<T>

Creates a leaf node.


Type Parameters​

T: T​

The data type


Parameters​

data: T​

The leaf's data


Returns: Leaf<T>​

A Leaf node


Since​

2.4.0

Leaf<T>​

Type

Leaf<T> = object

A Leaf node contains data but no children.


Since​

2.4.0


Type Parameters​

T: T​

The data type stored in nodes


Properties​

type: "leaf"​

data​

readonly data: T