# types/grammar.types.ts

> 41 lines of code and 10 definitions.

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

## Definitions

- `Keyword` (interface_declaration, line 1, exported)
- `KeywordBlock` (interface_declaration, line 7, exported)
- `Comparison` (interface_declaration, line 12, exported)
- `CompareBlock` (interface_declaration, line 18, exported)
- `CheckBlock` (interface_declaration, line 23, exported)
- `Signature` (interface_declaration, line 28, exported)
- `TypeBlock` (interface_declaration, line 34, exported)
- `DiagramBlock` (interface_declaration, line 39, exported)
- `GrammarBlock` (type_alias_declaration, line 45, exported)
- `GrammarRule` (interface_declaration, line 47, exported)

## Source

```typescript
export interface Keyword {
    readonly description: string;
    readonly example?: string;
    readonly name: string;
}

export interface KeywordBlock {
    readonly keywords: readonly (Keyword | string)[];
    readonly kind: "keyword";
}

export interface Comparison {
    readonly correct: string;
    readonly issue: string;
    readonly wrong: string;
}

export interface CompareBlock {
    readonly entries: readonly Comparison[];
    readonly kind: "compare";
}

export interface CheckBlock {
    readonly items: readonly string[];
    readonly kind: "check";
}

export interface Signature {
    readonly name: string;
    readonly purpose: string;
    readonly verb: string;
}

export interface TypeBlock {
    readonly kind: "type";
    readonly types: readonly Signature[];
}

export interface DiagramBlock {
    readonly grammar?: boolean;
    readonly kind: "diagram";
    readonly text: string;
}

export type GrammarBlock = CheckBlock | CompareBlock | DiagramBlock | KeywordBlock | TypeBlock;

export interface GrammarRule {
    readonly grammar: string;
    readonly title: string;
}
```
