# types/leak.types.ts

> 40 lines of code and 9 definitions.

Tree: Bane's Lab Content
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/content#file-content-types-leak-types-ts
Source text: https://banes-lab.com/source/content/types/leak.types.ts.txt

Listed in [types](https://banes-lab.com/api/source/content/types.md), after [types/inventory.types.ts](https://banes-lab.com/source/content/types/inventory.types.ts.md) and before [types/lesson.types.ts](https://banes-lab.com/source/content/types/lesson.types.ts.md).

## Definitions

- `LeakSource` (interface_declaration, line 1, exported)
- `LeakSet` (interface_declaration, line 6, exported)
- `LeakReason` (type_alias_declaration, line 11, exported)
- `LeakMatch` (interface_declaration, line 13, exported)
- `PrivateTerm` (interface_declaration, line 18, exported)
- `PrivateHit` (interface_declaration, line 25, exported)
- `PublishedFile` (interface_declaration, line 30, exported)
- `PayloadTab` (interface_declaration, line 35, exported)
- `PagePayload` (interface_declaration, line 40, exported)

## Contained in

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

## Source

```typescript
export interface LeakSource {
    readonly name: string;
    readonly tokens: number;
}

export interface LeakSet {
    readonly sources: readonly LeakSource[];
    readonly tokens: readonly string[];
}

export type LeakReason = "identifier" | "inline-code" | "path";

export interface LeakMatch {
    readonly reason: LeakReason;
    readonly token: string;
}

export interface PrivateTerm {
    readonly digest: string;
    readonly first: string;
    readonly length: number;
    readonly words: number;
}

export interface PrivateHit {
    readonly digest: string;
    readonly line: number;
}

export interface PublishedFile {
    readonly file: string;
    readonly text: string;
}

export interface PayloadTab {
    readonly id: string;
    readonly label: string;
}

export interface PagePayload {
    readonly file: string;
    readonly label: string;
    readonly page: string;
    readonly sections: readonly string[];
    readonly strings: readonly string[];
    readonly tabs: readonly PayloadTab[];
    readonly title: string;
}
```
