# types/learning.types.ts

> 53 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-learning-types-ts
Source text: https://banes-lab.com/source/build-scripts/types/learning.types.ts.txt

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

## Definitions

- `Stop` (interface_declaration, line 1, exported)
- `LearningRouter` (interface_declaration, line 11, exported)
- `SectionRecord` (interface_declaration, line 16, exported)
- `TabRecord` (interface_declaration, line 21, exported)
- `TabsFor` (type_alias_declaration, line 27, exported)
- `Unit` (interface_declaration, line 29, exported)
- `BlockStop` (interface_declaration, line 39, exported)
- `Block` (interface_declaration, line 46, exported)
- `RouteStop` (interface_declaration, line 53, exported)

## Contained in

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

## Source

```typescript
export interface Stop {
    readonly id: string;
    readonly code: string;
    readonly block: string;
    readonly label: string;
    readonly owner: string;
    readonly path: string;
    readonly requires: readonly string[];
}

export interface LearningRouter {
    readonly pagePath: (page: string) => string;
    readonly tabLink: (page: string, tab: string, section?: string) => string;
}

export interface SectionRecord {
    readonly id?: unknown;
    readonly title?: unknown;
}

export interface TabRecord {
    readonly id?: unknown;
    readonly label?: unknown;
    readonly sections?: unknown;
}

export type TabsFor = (page: string) => readonly TabRecord[];

export interface Unit {
    readonly external: readonly string[];
    readonly first: boolean;
    readonly label: string;
    readonly page: string;
    readonly sections: readonly SectionRecord[];
    readonly tab: string;
    readonly teaches: readonly string[];
}

export interface BlockStop {
    readonly id: string;
    readonly label: string;
    readonly path: string;
    readonly requires: readonly string[];
}

export interface Block {
    readonly code: string;
    readonly label: string;
    readonly owner: string;
    readonly stops: readonly BlockStop[];
}

export interface RouteStop {
    readonly block: string;
    readonly code: string;
    readonly id: string;
    readonly label: string;
    readonly path: string;
    readonly position: number;
    readonly requires: readonly string[];
}
```
