# types/section.types.ts

> 57 lines of code and 9 definitions.

Tree: Bane's Lab Build Scripts
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/build-scripts#file-build-scripts-types-section-types-ts
Source text: https://banes-lab.com/source/build-scripts/types/section.types.ts.txt

Listed in [types](https://banes-lab.com/api/source/build-scripts/types.md), after [types/search.types.ts](https://banes-lab.com/source/build-scripts/types/search.types.ts.md) and before [types/server.types.ts](https://banes-lab.com/source/build-scripts/types/server.types.ts.md).

## Definitions

- `SectionShape` (interface_declaration, line 6, exported)
- `TabShape` (interface_declaration, line 12, exported)
- `SectionPlan` (interface_declaration, line 19, exported)
- `SectionExporter` (type_alias_declaration, line 26, exported)
- `SectionSources` (interface_declaration, line 28, exported)
- `SectionPartAt` (interface_declaration, line 42, exported)
- `SectionEdges` (interface_declaration, line 47, exported)
- `SectionRoute` (interface_declaration, line 52, exported)
- `SectionData` (interface_declaration, line 60, exported)

## Contained in

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

## Source

```typescript
import type { Identity, Link, Linker, Navigation, Placed, PlacementOf, Relation } from "#types/catalog.types";
import type { ContentGraph } from "@banes-lab/web/types/methodology.types.js";
import type { DiscoveredPage } from "#types/site.types";
import type { FolderRelations } from "#types/source.types";

export interface SectionShape {
    readonly id: string;
    readonly intro?: string;
    readonly title: string;
}

export interface TabShape {
    readonly id: string | null;
    readonly label: string;
    readonly path: string;
    readonly sections: readonly SectionShape[];
}

export interface SectionPlan {
    readonly identity: Identity;
    readonly page: DiscoveredPage;
    readonly section: SectionShape;
    readonly tab: TabShape;
}

export type SectionExporter = (path: string, ids: readonly string[]) => readonly string[];

export interface SectionSources {
    readonly bodies: SectionExporter;
    readonly evidence: (href: string) => readonly Link[];
    readonly folder: (ref: string) => FolderRelations | null;
    readonly graphs: readonly ContentGraph[];
    readonly grounds: (ref: string) => readonly Link[];
    readonly linkedBy: (ref: string) => readonly Link[];
    readonly linker: Linker;
    readonly links: (ref: string) => readonly Link[];
    readonly navigation: (href: string) => Navigation | null;
    readonly numbers: ReadonlyMap<string, string>;
    readonly placement: PlacementOf;
}

export interface SectionPartAt {
    readonly part: number;
    readonly total: number;
}

export interface SectionEdges {
    readonly incoming: ReadonlyMap<string, readonly Link[]>;
    readonly outgoing: ReadonlyMap<string, readonly Link[]>;
}

export interface SectionRoute {
    readonly next: Link | null;
    readonly position: number;
    readonly previous: Link | null;
    readonly requires: readonly Link[];
    readonly total: number;
}

export interface SectionData extends Placed {
    readonly href: string;
    readonly relations: readonly Relation[];
    readonly route: SectionRoute | null;
    readonly summary: string | null;
    readonly title: string;
}
```
