# types/finding.types.ts

> 43 lines of code and 6 definitions.

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

Listed in [types](https://banes-lab.com/api/source/patterns/types.md), after [types/code.types.ts](https://banes-lab.com/source/patterns/types/code.types.ts.md) and before [types/graph.types.ts](https://banes-lab.com/source/patterns/types/graph.types.ts.md).

## Definitions

- `Narrative` (interface_declaration, line 4, exported)
- `FindingSignificance` (interface_declaration, line 9, exported)
- `Prediction` (interface_declaration, line 13, exported)
- `Finding` (interface_declaration, line 18, exported)
- `FindingInput` (interface_declaration, line 30, exported)
- `ExplanationSpec` (interface_declaration, line 40, exported)

## Contained in

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

## Source

```typescript
import type { Coordinate } from "#types/axis.types";
import type { Significance } from "#types/baseline.types";

export interface Narrative {
    observation: string;
    explanation: string;
}

export interface FindingSignificance extends Significance {
    nullModel: string;
}

export interface Prediction {
    method: string;
    accuracy: number;
}

export interface Finding {
    field: string;
    name: string;
    coordinate: Coordinate;
    observation: Readonly<Record<string, unknown>>;
    narrative: Narrative;
    support: number;
    mathType: string;
    significance?: FindingSignificance;
    prediction?: Prediction;
}

export interface FindingInput {
    field: string;
    name: string;
    coordinate: Coordinate;
    observation: Readonly<Record<string, unknown>>;
    narrative: Narrative;
    significance?: FindingSignificance;
    prediction?: Prediction;
}

export interface ExplanationSpec {
    field: string;
    name: string;
    ontology: string;
    analysis: string;
    representation: string;
    observation: Readonly<Record<string, unknown>>;
    observed: string;
    explained: string;
}
```
