# configuration/schemas/lexicon.schema.ts

> 25 lines of code and 2 definitions.

Tree: GovLab Context
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/context#file-context-configuration-schemas-lexicon-schema-ts
Source text: https://banes-lab.com/source/context/configuration/schemas/lexicon.schema.ts.txt

Listed in [configuration/schemas](https://banes-lab.com/api/source/context/configuration/schemas.md), after [configuration/schemas/grammar.schema.ts](https://banes-lab.com/source/context/configuration/schemas/grammar.schema.ts.md) and before [configuration/schemas/ontology.schema.ts](https://banes-lab.com/source/context/configuration/schemas/ontology.schema.ts.md).

## Definitions

- `TERM_KIND` (lexical_declaration, line 13, exported)
- `LEX_SCHEMA` (lexical_declaration, line 15, exported)

## Contained in

- [configuration/schemas](https://banes-lab.com/anatomy/context/folder-context-configuration-schemas.md)

## Source

```typescript
import {
    LABEL,
    OPTIONAL_LABEL,
    OPTIONAL_LABELS,
    OPTIONAL_OBJECT,
    OPTIONAL_RECORDS,
    OPTIONAL_TEXT,
    TEXT,
} from "#configuration/constants/field.constants";
import type { KindSchema } from "#types/field.types";
import { optionalRefs } from "#core/factories/field.factory";

export const TERM_KIND = "term";

export const LEX_SCHEMA: KindSchema = {
    aliases: OPTIONAL_LABELS,
    check: OPTIONAL_OBJECT,
    definition: TEXT,
    distinctFrom: OPTIONAL_RECORDS,
    enforcedBy: OPTIONAL_LABELS,
    example: OPTIONAL_TEXT,
    exemplar: OPTIONAL_OBJECT,
    id: OPTIONAL_LABEL,
    kind: LABEL,
    name: LABEL,
    seeAlso: optionalRefs("lexicon"),
};
```
