# types/folder.types.ts

> 21 lines of code and 4 definitions.

Tree: Site tree
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/tree#file-types-folder-types-ts
Source text: https://banes-lab.com/assets/sources/source.19e7ee555a281c43a16690fd5bbeb0f64d75ea876126bbb90b12f6a8169e43bd.generated.txt

## Definitions

- `FileNode` (interface_declaration, line 3, exported)
- `FolderNode` (interface_declaration, line 10, exported)
- `TreeNode` (type_alias_declaration, line 19, exported)
- `NodeTarget` (interface_declaration, line 21, exported)

## Source

```typescript
import type { Section, Subsection } from "#types/document.types";

export interface FileNode {
    readonly id: string;
    readonly name: string;
    readonly section: Section;
    readonly sub: Subsection;
}

export interface FolderNode {
    readonly files: FileNode[];
    readonly folders: FolderNode[];
    readonly id: string;
    readonly name: string;
    readonly path: string;
    readonly section: Section;
}

export type TreeNode = FileNode | FolderNode;

export interface NodeTarget {
    readonly id: string;
    readonly line: number | null;
    readonly text: string | null;
}
```
