# types/comment.types.ts

> 24 lines of code and 6 definitions.

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

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

## Definitions

- `CommentGrammar` (interface_declaration, line 1, exported)
- `StripResult` (interface_declaration, line 6, exported)
- `ExtractedComment` (interface_declaration, line 11, exported)
- `ExtractResult` (interface_declaration, line 16, exported)
- `FileComment` (interface_declaration, line 20, exported)
- `CommentSpan` (interface_declaration, line 24, exported)

## Contained in

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

## Source

```typescript
export interface CommentGrammar {
    lang: string;
    directivePrefixes: string[];
}

export interface StripResult {
    content: string;
    changed: boolean;
}

export interface ExtractedComment {
    line: number;
    text: string;
}

export interface ExtractResult extends StripResult {
    comments: ExtractedComment[];
}

export interface FileComment extends ExtractedComment {
    file: string;
}

export interface CommentSpan {
    start: number;
    end: number;
    directive: boolean;
    ownLine: boolean;
}
```
