This utility class is used in NodeBuilder as an internal cache data structure for node data.
Constructor
new NodeCache(parent?)| Parameter | Type | Default Value |
|---|---|---|
| parent? | null | NodeCache | null |
Constructs a new node cache.
Properties
| Property | Type | Default Value | |
|---|---|---|---|
| id | number | — | |
| nodesData | WeakMap<Node, Object> | — | |
| parent | null | NodeCache | — | |
| Method | Type | |
|---|---|---|
| getData | (node: Node) => null | Object | |
| setData | (node: Node, data: Object) => void | |