View as Markdown

API reference: @salmonui/data

TreeRowEnvelopeinterface

import type { TreeRowEnvelope } from '@salmonui/data';
interface TreeRowEnvelope<Row> {
    readonly kind: 'tree';
    readonly row: Row;
    readonly depth: number;
    readonly parentId: RowId | null;
    readonly hasChildren: boolean;
    readonly childCount?: number;
    readonly children?: readonly TreeRowEnvelope<Row>[];
}
TreeRowEnvelope members (7)
NameSignatureDescription
kindreadonly kind: 'tree';
rowreadonly row: Row;
depthreadonly depth: number;
parentIdreadonly parentId: RowId | null;
hasChildrenreadonly hasChildren: boolean;
childCountoptionalreadonly childCount?: number;
childrenoptionalreadonly children?: readonly TreeRowEnvelope<Row>[];