Skip to content

Commit

Permalink
Add types and interfaces for FileSystem
Browse files Browse the repository at this point in the history
  • Loading branch information
chetbae committed Jun 21, 2023
1 parent e645720 commit de779a0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Dashboard/FileSystem/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { IEntry, IFile, IFolder, EntryType } from './interface';
25 changes: 25 additions & 0 deletions src/Dashboard/FileSystem/interface.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
export enum EntryType {
Folder = 'folder',
Folio = 'folio',
Manuscript = 'manuscript',
Root = 'root',

}

export interface IEntry {
name: string;
type: EntryType;
content: IEntry[] | string;
path: string[];
parent: IEntry;
}

export interface IFolder extends IEntry {
type: EntryType.Folder;
content: IEntry[];
}

export interface IFile extends IEntry {
type: EntryType.Folio | EntryType.Manuscript;
content: string;
}

0 comments on commit de779a0

Please sign in to comment.