types/folder.types.ts

types/folder.types.ts is a file in Bane's Lab Site. 21 lines of code and 4 definitions.

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;
}