tree-controller / Exports / TreeController / Tree / MethodsFactories
TreeController.Tree.MethodsFactories
| Name | Type |
|---|---|
N |
any |
▸ children(instance, ...args): (node: N) => N[]
Method
children is a factory function that will be called in
the Store constructor passing the Store instance as the
first parameter. It will override that instance's default method
for retrieving a node's children
| Name | Type | Description |
|---|---|---|
instance |
Tree<N> |
of Storage |
...args |
any[] |
extra arguments you can provide as necessary |
fn
▸ (node): N[]
Method
children receives a node and returns its children
| Name | Type |
|---|---|
node |
N |
N[]
▸ node(instance, ...args): (node: N) => N
Method
node is a factory function that will be called in
the Store constructor passing the Store instance as the
first parameter. It will override that instance's default method
for retrieving a node
| Name | Type | Description |
|---|---|---|
instance |
Tree<N> |
of Storage |
...args |
any[] |
extra arguments you can provide as necessary |
fn
▸ (node): N
Method
node simply receives a node and return that node
| Name | Type |
|---|---|
node |
N |
N
▸ parent(instance, ...args): (node: N) => undefined | null | N
Method
parent is a factory function that will be called in
the Store constructor passing the Store instance as the
first parameter. It will override that instance's default method
for retrieving a node's parent
| Name | Type | Description |
|---|---|---|
instance |
Tree<N> |
of Storage |
...args |
any[] |
extra arguments you can provide as necessary |
fn
▸ (node): undefined | null | N
Method
parent receives a node and returns its parent
| Name | Type |
|---|---|
node |
N |
undefined | null | N