Skip to content

Home > @jview/utils > getDescentdantsByKey

getDescentdantsByKey() function

Signature:

typescript
export declare function getDescentdantsByKey<K extends string = 'key', C extends string = 'children', T extends TreeNode<K, C> = TreeNode<K, C>>(nodes: T[], key: string | number, mapper: FieldMapper<K, C>, results?: T[]): T[];
export declare function getDescentdantsByKey<K extends string = 'key', C extends string = 'children', T extends TreeNode<K, C> = TreeNode<K, C>>(nodes: T[], key: string | number, mapper: FieldMapper<K, C>, results?: T[]): T[];

Parameters

ParameterTypeDescription
nodesT[]
keystring | number
mapperFieldMapper<K, C>
resultsT[](Optional)

Returns:

T[]