Skip to content

Latest commit

 

History

History
151 lines (90 loc) · 3.23 KB

TreeController.Tree.MethodsFactories.md

File metadata and controls

151 lines (90 loc) · 3.23 KB

tree-controller / Exports / TreeController / Tree / MethodsFactories

Interface: MethodsFactories<N>

TreeController.Tree.MethodsFactories

Type parameters

Name Type
N any

Table of contents

Methods

Methods

children

▸ 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

Parameters

Name Type Description
instance Tree<N> of Storage
...args any[] extra arguments you can provide as necessary

Returns

fn

▸ (node): N[]

Method

children receives a node and returns its children

Parameters
Name Type
node N
Returns

N[]

Defined in

tree/tree-manager.tree.ts:152


node

▸ 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

Parameters

Name Type Description
instance Tree<N> of Storage
...args any[] extra arguments you can provide as necessary

Returns

fn

▸ (node): N

Method

node simply receives a node and return that node

Parameters
Name Type
node N
Returns

N

Defined in

tree/tree-manager.tree.ts:132


parent

▸ 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

Parameters

Name Type Description
instance Tree<N> of Storage
...args any[] extra arguments you can provide as necessary

Returns

fn

▸ (node): undefined | null | N

Method

parent receives a node and returns its parent

Parameters
Name Type
node N
Returns

undefined | null | N

Defined in

tree/tree-manager.tree.ts:142