forked from LeetCode-OpenSource/vscode-leetcode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshared.ts
72 lines (63 loc) · 1.21 KB
/
shared.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
// Copyright (c) jdneo. All rights reserved.
// Licensed under the MIT license.
import * as vscode from "vscode";
export interface IQuickItemEx<T> extends vscode.QuickPickItem {
value: T;
}
export enum UserStatus {
SignedIn = 1,
SignedOut = 2,
}
export const languages: string[] = [
"bash",
"c",
"cpp",
"csharp",
"golang",
"java",
"javascript",
"kotlin",
"mysql",
"python",
"python3",
"ruby",
"scala",
"swift",
];
export enum ProblemState {
AC = 1,
NotAC = 2,
Unknown = 3,
}
export enum Endpoint {
LeetCode = "leetcode",
LeetCodeCN = "leetcode-cn",
}
export interface IProblem {
isFavorite: boolean;
locked: boolean;
state: ProblemState;
id: string;
name: string;
difficulty: string;
passRate: string;
companies: string[];
tags: string[];
}
export const defaultProblem: IProblem = {
isFavorite: false,
locked: false,
state: ProblemState.Unknown,
id: "",
name: "",
difficulty: "",
passRate: "",
companies: [] as string[],
tags: [] as string[],
};
export enum Category {
Difficulty = "Difficulty",
Tag = "Tag",
Company = "Company",
Favorite = "Favorite",
}