-
Notifications
You must be signed in to change notification settings - Fork 0
/
env.d.ts
48 lines (41 loc) · 1.12 KB
/
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
type Tab = "account" | "chart" | "teleportation";
type EditingMod = "default" | "square" | "circle" | "eraser" | "line" | "vertical-line" | "fill" | "pick" | "selecting-pos";
type Grid = number[][];
type ChartItemDesc = { color: string; x: boolean, hidden?: boolean };
type Chart = ChartItemDesc[];
interface Pos {
x: number;
y: number;
}
interface Teleportation {
color: number;
map: string;
movX: number;
movY: number;
targetY: number;
targetX: number;
}
interface AuthContextValue {
loading: boolean;
user: import("firebase/auth").User | null;
}
// We cannot store multidimensional arrays in Firestore
// Therefore, to represent a grid, which is a 2d array,
// each line will be a string, and the grid an array of H strings,
// where H is the height of the grid
type GridData = string[]; // each line is a string
interface UserData {
projects:ProjectData[];
registrationDate:number;
chart: Chart;
teleportations: Teleportation[];
}
interface ProjectData {
name:string;
lastModifiedDate:number;
creationDate:number;
grid:GridData;
}
interface CompiledProjectData extends ProjectData {
grid:Grid;
}