# types/detector.types.ts

> 9 lines of code and 5 definitions.

Tree: Secrets
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/secrets#file-secrets-types-detector-types-ts
Source text: https://banes-lab.com/source/secrets/types/detector.types.ts.txt

Listed in [types](https://banes-lab.com/api/source/secrets/types.md), before [types/environment.types.ts](https://banes-lab.com/source/secrets/types/environment.types.ts.md).

## Definitions

- `DetectorKind` (type_alias_declaration, line 3, exported)
- `ExclusionReason` (type_alias_declaration, line 5, exported)
- `TokenShape` (type_alias_declaration, line 7, exported)
- `TokenAlphabet` (type_alias_declaration, line 9, exported)
- `Detector` (interface_declaration, line 11, exported)

## Contained in

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

## Source

```typescript
import type { DETECTOR_KINDS, EXCLUSION_REASONS, TOKEN_SHAPES } from "#configuration/constants/detector.constants";

export type DetectorKind = (typeof DETECTOR_KINDS)[number];

export type ExclusionReason = (typeof EXCLUSION_REASONS)[number];

export type TokenShape = (typeof TOKEN_SHAPES)[number];

export type TokenAlphabet = TokenShape["alphabet"];

export interface Detector {
    readonly detects: (value: string) => boolean;
    readonly kind: DetectorKind;
}
```
