# RemoteTreeEnvelope (@salmonui/data-grid/engine/tree-remote)

> The RemoteTreeEnvelope interface of @salmonui/data-grid/engine/tree-remote: A tree read item (structural copy of @salmonui/data TreeRowEnvelope; depth is informational).

Canonical: https://salmonui.dev/docs/reference/data-grid/engine-tree-remote/RemoteTreeEnvelope

```ts
import type { RemoteTreeEnvelope } from '@salmonui/data-grid/engine/tree-remote';
```

Entry index: https://salmonui.dev/docs/reference/data-grid/engine-tree-remote (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/data-grid/engine-tree-remote.md).

## Reference

Kind: interface

```ts
interface RemoteTreeEnvelope<Row> {
    readonly kind: 'tree';
    readonly row: Row;
    readonly parentId?: RowId | null;
    readonly depth?: number;
    readonly hasChildren?: boolean;
    readonly childCount?: number;
    readonly children?: readonly RemoteTreeEnvelope<Row>[];
}
```

A tree read item (structural copy of `@salmonui/data` `TreeRowEnvelope`; `depth` is informational).

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `kind` | `readonly kind: 'tree';` |  |  |
| `row` | `readonly row: Row;` |  |  |
| `parentId` | `readonly parentId?: RowId \| null;` | optional | Parent of the row (null: a root). Default: the requested parent, or the envelope holding it in `children`. |
| `depth` | `readonly depth?: number;` | optional |  |
| `hasChildren` | `readonly hasChildren?: boolean;` | optional |  |
| `childCount` | `readonly childCount?: number;` | optional |  |
| `children` | `readonly children?: readonly RemoteTreeEnvelope<Row>[];` | optional | Children loaded with the row (load all, nested remote data); `[]` means a leaf. |
