-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathenv.d.ts
92 lines (81 loc) · 1.52 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/// <reference types="vite/client" />
declare module "*.vue" {
import type { DefineComponent } from "vue";
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
const component: DefineComponent<{}, {}, any>;
export default component;
}
declare type Char =
| "a"
| "b"
| "c"
| "d"
| "e"
| "f"
| "g"
| "h"
| "i"
| "j"
| "k"
| "l"
| "m"
| "n"
| "o"
| "p"
| "q"
| "r"
| "s"
| "t"
| "u"
| "v"
| "w"
| "x"
| "y"
| "z"
| ";";
type Pinyin = { lead: string; follow: string; full: string };
interface Progress {
currentIndex: number;
total: number;
correctTry: number;
totalTry: number;
}
interface Combine {
lead: string;
follow: string;
hanzis: string[];
progress: Progress;
}
type Article =
| {
type: RawArticleName;
progress: Progress;
}
| {
type: "CUSTOM";
name: string;
progress: Progress;
};
interface KeyConfig {
main: Char;
leads: string[];
follows: string[];
}
interface Settings {
theme: Theme; // 主题
enableKeyHint: boolean; // 按键提示
enablePinyinHint: boolean; // 拼音提示
enableAutoClear: boolean; // 自动清空
shuangpinMode: ShuangpinType;
}
type Theme = "auto" | "dark" | "light";
interface AppState {
currentLeadIndex: number;
currentFollowIndex: number;
currentArticleIndex: number;
progresses: Record<string, Progress>;
localConfigs: Record<string, RawShuangPinConfig>;
combines: Combine[];
articles: Article[];
settings: Settings;
}