Skip to main content

Interface: FlattenConfig<T>

Defined in: collection/types.ts:203

Configuration for flatten operation.

Example

const config: FlattenConfig<FileNode> = {
getChildren: (node) => node.children,
maxDepth: 3,
includePath: true
}

Type Parameters

T

T

The type of tree nodes

Properties

getChildren()

readonly getChildren: (node) => readonly T[] | undefined

Defined in: collection/types.ts:204

Parameters

node

T

Returns

readonly T[] | undefined


includePath?

readonly optional includePath: boolean

Defined in: collection/types.ts:206


maxDepth?

readonly optional maxDepth: number

Defined in: collection/types.ts:205