# types/vocabulary.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-vocabulary-types-ts
Source text: https://banes-lab.com/assets/sources/source.6ab67d37e7117e2945efe2dc27558e82c6629a6913c2e98a12bfecd8e0fb59ec.generated.txt

## Definitions

- `VocabularyEntry` (interface_declaration, line 3, exported)
- `PageContent` (interface_declaration, line 12, exported)
- `PhraseMatch` (interface_declaration, line 17, exported)
- `WordToken` (interface_declaration, line 23, exported)
- `PhraseCandidate` (type_alias_declaration, line 29, exported)
- `PhraseIndex` (interface_declaration, line 31, exported)

## Source

```typescript
import type { Tab } from "#types/document.types";

export interface VocabularyEntry {
    readonly code: string | null;
    readonly kind: string;
    readonly layer: string | null;
    readonly phrase: string;
    readonly prose: boolean;
    readonly ref: string;
}

export interface PageContent {
    readonly page: string;
    readonly tabs: readonly Tab[];
}

export interface PhraseMatch {
    readonly end: number;
    readonly entry: VocabularyEntry;
    readonly start: number;
}

export interface WordToken {
    readonly end: number;
    readonly start: number;
    readonly word: string;
}

export type PhraseCandidate = readonly [readonly string[], VocabularyEntry, readonly boolean[]];

export interface PhraseIndex {
    readonly byFirstWord: ReadonlyMap<string, readonly PhraseCandidate[]>;
}
```
