# types/page.types.ts

> 55 lines of code and 8 definitions.

Tree: GovLab Patterns
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/patterns#file-patterns-types-page-types-ts
Source text: https://banes-lab.com/source/patterns/types/page.types.ts.txt

Listed in [types](https://banes-lab.com/api/source/patterns/types.md), after [types/package.types.ts](https://banes-lab.com/source/patterns/types/package.types.ts.md) and before [types/pattern.types.ts](https://banes-lab.com/source/patterns/types/pattern.types.ts.md).

## Definitions

- `TreeLeaf` (interface_declaration, line 6, exported)
- `TreeGroup` (interface_declaration, line 14, exported)
- `TreeNode` (type_alias_declaration, line 22, exported)
- `HexPage` (interface_declaration, line 24, exported)
- `RenderContext` (interface_declaration, line 33, exported)
- `Nested` (interface_declaration, line 41, exported)
- `PageParts` (interface_declaration, line 48, exported)
- `PageOutput` (interface_declaration, line 56, exported)

## Contained in

- [types](https://banes-lab.com/anatomy/patterns/folder-patterns-types.md)

## Source

```typescript
import type { CodeFinding, CodeGraph, CodeInsight, SymbolStat } from "#types/code.types";
import type { Crumb, NestedChild, ReportPage } from "#types/report.types";
import type { WalkCell, WalkNode } from "#types/walk.types";
import type { FileEntry } from "#types/package.types";

export interface TreeLeaf {
    kind: "file";
    rel: string;
    name: string;
    count: number;
    entry: FileEntry;
}

export interface TreeGroup {
    kind: "dir";
    rel: string;
    name: string;
    count: number;
    children: TreeNode[];
}

export type TreeNode = TreeGroup | TreeLeaf;

export interface HexPage {
    page: string;
    rel: string;
    label: string;
    crumbs: Crumb[];
    inlined: FileEntry[];
    drilled: TreeNode[];
}

export interface RenderContext {
    fanIn: ReadonlyMap<string, number>;
    graph: CodeGraph;
    insight: CodeInsight;
    findings: readonly CodeFinding[];
    title: string;
}

export interface Nested {
    child: NestedChild;
    node: WalkNode;
    flagged: boolean;
    severity: string;
}

export interface PageParts {
    findings: CodeFinding[];
    label: string;
    nested: Nested[];
    nestedFlags: ReadonlyMap<string, string>;
    symbols: SymbolStat[];
}

export interface PageOutput {
    html: string;
    mainSvg: string;
    mainCells: WalkCell[];
    nestedSvg: string;
    nestedCells: WalkCell[];
    report: ReportPage;
}
```
