-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
66 lines (58 loc) · 1.25 KB
/
Copy pathtypes.ts
File metadata and controls
66 lines (58 loc) · 1.25 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
export enum AppMode {
HOME = 'HOME',
ACADEMY = 'ACADEMY',
WORKSPACE = 'WORKSPACE'
}
export enum Environment {
STANDARD = 'STANDARD',
NODEJS = 'NODEJS',
PYTHON = 'PYTHON'
}
export interface Subject {
id: string;
title: string;
icon: string;
description: string;
color: string;
}
export interface Lesson {
id: string;
subjectId: string;
level: 1 | 2 | 3;
title: string;
description: string;
initialCode: string;
userCode?: string;
completed: boolean;
validationRegex?: string; // Regex to check if the user's code is correct
successMessage?: string; // Custom message on success
solution?: string; // Hidden solution for the user
}
export interface FileNode {
id: string;
name: string;
type: 'file' | 'folder';
content?: string;
parentId: string | null;
isOpen?: boolean;
}
export interface TerminalLog {
type: 'log' | 'error' | 'info';
content: string;
timestamp: Date;
}
export interface Project {
id: number;
name: string;
files: FileNode[];
createdAt: string;
updatedAt: string;
}
export interface UserState {
isAdmin: boolean;
activeSubjectId: string | null;
activeLessonId: string | null;
completedLessons: string[];
activeFileId: string | null;
openFiles: string[];
}