-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.ts
41 lines (33 loc) · 780 Bytes
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
interface NodeBase {
/**
* relative path to parent node. If it is root node, path should be absolute path.
*/
path: string;
}
export interface NotExistNode extends NodeBase {
type: "not_exist";
}
export interface FileNode extends NodeBase {
type: "file";
}
export interface SymbolLinkNode extends NodeBase {
type: "symbol_link";
}
export interface FolderNode extends NodeBase {
type: "folder";
/**
* The children that will be displayed on console
*/
children: Node[];
/**
* The number of all children that will be deleted.
*
* It can be bigger than children.length
*/
childrenCount: number;
}
export type Node = FileNode | FolderNode | NotExistNode | SymbolLinkNode;
export interface Roots {
roots: Node[];
count: number;
}