Files
directus/docs/index.d.ts
2020-10-09 00:42:42 +02:00

39 lines
562 B
TypeScript

export type File = {
type: 'file';
size: number;
path: string;
name: string;
extension: string;
};
export type Directory = {
type: 'directory';
size: number;
path: string;
name: string;
children: (Directory | File)[];
};
export type Link = {
name: string;
to: string;
};
export type Group = {
name: string;
to: string;
children: (Group | Link | Divider)[];
icon?: string;
};
export type Divider = {
divider: true;
};
export const files: Directory;
export const nav: {
app: (Group | Link | Divider)[];
web: (Group | Link | Divider)[];
};