# types/reference.types.ts

> 27 lines of code and 6 definitions.

Tree: Site tree
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/tree#file-types-reference-types-ts
Source text: https://banes-lab.com/assets/sources/source.8d9fb8783808163a4a1f445ea9dae810e31817141bc012ff03564c12ab92072d.generated.txt

## Definitions

- `ReferenceRelation` (interface_declaration, line 3, exported)
- `ReferenceRecord` (interface_declaration, line 8, exported)
- `ReferenceIndex` (type_alias_declaration, line 17, exported)
- `ChapterReference` (interface_declaration, line 19, exported)
- `ReferenceTarget` (interface_declaration, line 26, exported)
- `ReferenceContent` (type_alias_declaration, line 31, exported)

## Source

```typescript
import type { EdgeRef } from "#types/link.types";

export interface ReferenceRelation {
    readonly edges: readonly EdgeRef[];
    readonly relation: string;
}

export interface ReferenceRecord {
    readonly code: string | null;
    readonly kind: string;
    readonly layer: EdgeRef | null;
    readonly name: string;
    readonly relations: readonly ReferenceRelation[];
    readonly summary: string | null;
}

export type ReferenceIndex = Readonly<Record<string, ReferenceRecord>>;

export interface ChapterReference {
    readonly intro: string | null;
    readonly principle: string | null;
    readonly relations: readonly ReferenceRelation[];
    readonly title: string;
}

export interface ReferenceTarget {
    readonly face: string;
    readonly ref: string;
}

export type ReferenceContent =
    | { readonly chapter: ChapterReference; readonly kind: "chapter" }
    | { readonly kind: "record"; readonly record: ReferenceRecord };
```
