forked from rchalamala/caltech.dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreact-app-env.d.ts
56 lines (48 loc) · 1009 Bytes
/
react-app-env.d.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
type Maybe<T> = T | null;
interface CourseStorage {
courseData: CourseData;
sectionId: Maybe<number>;
enabled: boolean;
locked: boolean;
}
interface CourseData {
id: number;
name: string;
number: string;
sections: SectionData[];
units: number[];
description: string;
prerequisites: string;
rating: string;
true_units: string;
link: string;
}
interface DateData {
id: number;
title: string;
start: Date;
end: Date;
courseData: CourseData;
}
interface SectionData {
grades: string;
instructor: string;
locations: string;
number: number;
times: string;
}
interface CourseStorageShort {
courseId: number;
sectionId: Maybe<number>;
enabled: boolean;
locked: boolean;
}
type AvailableTimes = Date[][];
// the overall state of a single workspace
interface Workspace {
courses: CourseStorage[];
arrangements: CourseStorageShort[][];
arrangementIdx: Maybe<number>;
availableTimes: AvailableTimes;
}
type CourseIndex = Record<string, CourseData>;