# types/grammar.types.ts

> 23 lines of code and 6 definitions.

Tree: Code Parse
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/code-parse#file-code-parse-types-grammar-types-ts
Source text: https://banes-lab.com/source/code-parse/types/grammar.types.ts.txt

Listed in [types](https://banes-lab.com/api/source/code-parse/types.md), before [types/shell.types.ts](https://banes-lab.com/source/code-parse/types/shell.types.ts.md).

## Definitions

- `GrammarSource` (interface_declaration, line 1, exported)
- `FileTypeEntry` (interface_declaration, line 9, exported)
- `GrammarMeta` (interface_declaration, line 14, exported)
- `BuildKind` (type_alias_declaration, line 19, exported)
- `BuildResult` (interface_declaration, line 21, exported)
- `FetchOutcome` (type_alias_declaration, line 28, exported)

## Contained in

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

## Source

```typescript
export interface GrammarSource {
    readonly lang: string;
    readonly npm?: string;
    readonly git?: string;
    readonly subdir?: string;
    readonly unsupported?: string;
}

export interface FileTypeEntry {
    readonly name: string;
    readonly fileTypes: string[];
}

export interface GrammarMeta {
    readonly entries: FileTypeEntry[];
    readonly pool: string[];
}

export type BuildKind = "built" | "fetch-failed" | "skipped" | "wasm-failed";

export interface BuildResult {
    readonly kind: BuildKind;
    readonly note: string;
    readonly fileTypes: string[];
    readonly lang: string;
}

export type FetchOutcome = { readonly error: string } | { readonly root: string };
```
