# types/reference.types.ts

> 81 lines of code and 18 definitions.

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

Listed in [types](https://banes-lab.com/api/source/docs/types.md), after [types/readme.types.ts](https://banes-lab.com/source/docs/types/readme.types.ts.md) and before [types/system.types.ts](https://banes-lab.com/source/docs/types/system.types.ts.md).

## Definitions

- `RefCheck` (type_alias_declaration, line 1, exported)
- `DocVerb` (interface_declaration, line 4, exported)
- `RefConstructCode` (type_alias_declaration, line 9, exported)
- `RefConstruct` (interface_declaration, line 11, exported)
- `RefConstructDefect` (interface_declaration, line 19, exported)
- `RefScan` (interface_declaration, line 26, exported)
- `RefScanOptions` (interface_declaration, line 31, exported)
- `RefMatch` (interface_declaration, line 36, exported)
- `RefFinding` (interface_declaration, line 42, exported)
- `RefResolveCtx` (interface_declaration, line 48, exported)
- `PathRef` (interface_declaration, line 53, exported)
- `SpanDelims` (interface_declaration, line 59, exported)
- `OntologyRef` (interface_declaration, line 64, exported)
- `SlotRef` (interface_declaration, line 70, exported)
- `BracedSpan` (interface_declaration, line 76, exported)
- `PathsCtx` (interface_declaration, line 81, exported)
- `BrokenRef` (interface_declaration, line 89, exported)
- `SymbolRef` (interface_declaration, line 95, exported)

## Contained in

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

## Source

```typescript
export type RefCheck =
    "ident-declared-in-path" | "ident-exported-from-path" | "ident-referenced-in-path" | "path-exists";

export interface DocVerb {
    checks: readonly RefCheck[];
    satisfies: readonly string[];
}

export type RefConstructCode = "unknown-claim" | "unknown-verb" | "unsatisfied-claim";

export interface RefConstruct {
    verb: string;
    identifier: string;
    path: string;
    line: number;
    col: number;
}

export interface RefConstructDefect {
    code: RefConstructCode;
    detail: string;
    line: number;
    col: number;
}

export interface RefScan {
    constructs: RefConstruct[];
    defects: RefConstructDefect[];
}

export interface RefScanOptions {
    verbs: Readonly<Record<string, DocVerb>>;
    claims: readonly string[];
}

export interface RefMatch {
    identifier: string;
    path: string;
    end: number;
}

export interface RefFinding {
    line: number;
    col: number;
    detail: string;
}

export interface RefResolveCtx {
    roots: readonly string[];
    verbs: Readonly<Record<string, DocVerb>>;
}

export interface PathRef {
    path: string;
    line: number;
    col: number;
}

export interface SpanDelims {
    open: string;
    close: string;
}

export interface OntologyRef {
    ref: string;
    line: number;
    col: number;
}

export interface SlotRef {
    slot: string;
    line: number;
    col: number;
}

export interface BracedSpan {
    inner: string;
    col: number;
}

export interface PathsCtx {
    codeExtensions: ReadonlySet<string>;
    fileIndex: ReadonlyMap<string, string[]>;
    root: string;
    runtimeRoots: readonly string[];
    topLevel: ReadonlySet<string>;
}

export interface BrokenRef {
    col: number;
    line: number;
    path: string;
}

export interface SymbolRef {
    file: string;
    symbol: string;
}
```
