# types/package.types.ts

> 45 lines of code and 8 definitions.

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

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

## Definitions

- `Pruned` (type_alias_declaration, line 5, exported)
- `FileEntry` (interface_declaration, line 7, exported)
- `ModuleBuild` (interface_declaration, line 14, exported)
- `BuiltModule` (interface_declaration, line 22, exported)
- `RepoContext` (interface_declaration, line 32, exported)
- `ModuleScope` (interface_declaration, line 38, exported)
- `ModuleReportBuild` (interface_declaration, line 43, exported)
- `DirScan` (interface_declaration, line 49, exported)

## Contained in

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

## Source

```typescript
import type { CodeFinding, CodeSymbol } from "#types/code.types";
import type { WalkCell, WalkNode } from "#types/walk.types";
import type { ModuleReport } from "#types/report.types";

export type Pruned = (folder: string) => boolean;

export interface FileEntry {
    rel: string;
    walk: WalkNode[];
    symbols: CodeSymbol[];
    records: Record<string, unknown>[];
}

export interface ModuleBuild {
    fanIn?: ReadonlyMap<string, number>;
    moduleName: string;
    title: string;
    extraFindings?: readonly CodeFinding[];
    testUses?: ReadonlySet<string>;
}

export interface BuiltModule {
    pages: Map<string, string>;
    svgs: Map<string, string>;
    cells: Map<string, WalkCell[]>;
    analysis: string;
    findings: string;
    findingsData: readonly CodeFinding[];
    report: ModuleReport;
}

export interface RepoContext {
    fanIn: Map<string, number>;
    packageMap: Map<string, string>;
    importCycles: Map<string, CodeFinding[]>;
}

export interface ModuleScope {
    root: string;
    pruned: Pruned;
}

export interface ModuleReportBuild {
    built: BuiltModule;
    entries: FileEntry[];
    title: string;
}

export interface DirScan {
    files: string[];
    dirs: string[];
    tests: string[];
}
```
