Skip to content

Home > @jview/utils > getDescentdantKeysByKey

getDescentdantKeysByKey() function

Signature:

typescript
export declare function getDescentdantKeysByKey<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[]): Array<string | number>;
export declare function getDescentdantKeysByKey<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[]): Array<string | number>;

Parameters

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

Returns:

Array<string | number>