# types/context.types.ts

> 42 lines of code and 3 definitions.

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

Listed in [types](https://banes-lab.com/api/source/context/types.md), after [types/concept.types.ts](https://banes-lab.com/source/context/types/concept.types.ts.md) and before [types/field.types.ts](https://banes-lab.com/source/context/types/field.types.ts.md).

## Definitions

- `GovlabContextOptions` (interface_declaration, line 11, exported)
- `Faces` (interface_declaration, line 17, exported)
- `GovlabContext` (interface_declaration, line 26, exported)

## Contained in

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

## Source

```typescript
import type { AlgoGrammar, ConcernJoinRow } from "#types/algorithm.types";
import type { ArchRelations, KindDefinition } from "#types/architecture.types";
import type { CheckGaps, CheckedRecord, DeclaredCheck } from "#types/check.types";
import type { CrossFaceIssues, ResolutionIssues } from "#types/validation.types";
import type { Layer, LayerEdge, LayerJoin, TensionResolution } from "#types/layer.types";
import type { Lexicon } from "#types/lexicon.types";
import type { Logger } from "#types/ontology.types";
import type { PagGrammar } from "#types/grammar.types";
import type { ReasonOntology } from "#types/reason.types";

export interface GovlabContextOptions {
    checks?: readonly DeclaredCheck[] | undefined;
    logger?: Logger | undefined;
    canonicalizeId?: ((term: string) => string) | undefined;
}

export interface Faces {
    arch: ArchRelations;
    algo: AlgoGrammar;
    lex: Lexicon;
    pag: PagGrammar;
    reason: ReasonOntology;
    layerJoin: LayerJoin;
}

export interface GovlabContext {
    arch: ArchRelations;
    algo: AlgoGrammar;
    pag: PagGrammar;
    lex: Lexicon;
    reason: ReasonOntology;
    slugify: (name: string) => string;
    checkGaps: () => CheckGaps;
    checkedRecords: () => CheckedRecord[];
    kindTaxonomy: () => readonly KindDefinition[];
    joinConcerns: () => ConcernJoinRow[];
    crossValidate: () => CrossFaceIssues;
    validateResolution: () => ResolutionIssues;
    layers: () => Layer[];
    topology: () => LayerEdge[];
    layerOf: (idOrName: string) => string | null;
    resolutions: () => TensionResolution[];
    resolveTension: (a: string, b: string) => TensionResolution | null;
    resolveRef: (ref: string) => boolean;
}
```
