This commit is contained in:
2025-10-04 14:26:02 +08:00
parent c8751223db
commit dfa8d970f2
2 changed files with 8 additions and 6 deletions

View File

@@ -154,7 +154,7 @@ export const SOURCES = {
Python2: "", Python2: "",
JavaScript: "", JavaScript: "",
Golang: "", Golang: "",
} } as const
export const LANGUAGE_ID = { export const LANGUAGE_ID = {
C: 50, C: 50,
@@ -164,7 +164,7 @@ export const LANGUAGE_ID = {
Python2: 0, Python2: 0,
JavaScript: 0, JavaScript: 0,
Golang: 0, Golang: 0,
} } as const
export const LANGUAGE_FORMAT_VALUE = { export const LANGUAGE_FORMAT_VALUE = {
C: "c", C: "c",
@@ -174,7 +174,7 @@ export const LANGUAGE_FORMAT_VALUE = {
Python3: "python", Python3: "python",
JavaScript: "javascript", JavaScript: "javascript",
Golang: "go", Golang: "go",
} } as const
export const LANGUAGE_SHOW_VALUE = { export const LANGUAGE_SHOW_VALUE = {
C: "C", C: "C",
@@ -184,7 +184,7 @@ export const LANGUAGE_SHOW_VALUE = {
Python3: "Python", Python3: "Python",
JavaScript: "JS", JavaScript: "JS",
Golang: "Go", Golang: "Go",
} } as const
const cTemplate = `//TEMPLATE BEGIN const cTemplate = `//TEMPLATE BEGIN
#include <stdio.h> #include <stdio.h>
@@ -220,7 +220,7 @@ export const CODE_TEMPLATES = {
Java: blankTemplate, Java: blankTemplate,
JavaScript: blankTemplate, JavaScript: blankTemplate,
Golang: blankTemplate, Golang: blankTemplate,
} } as const
export enum ScreenMode { export enum ScreenMode {
both = "题目 | 自测", both = "题目 | 自测",

View File

@@ -1,4 +1,4 @@
import { ContestStatus, ContestType, USER_TYPE } from "./constants" import { ContestStatus, ContestType, LANGUAGE_SHOW_VALUE } from "./constants"
export interface Profile { export interface Profile {
id: number id: number
@@ -60,6 +60,8 @@ export type LANGUAGE =
| "JavaScript" | "JavaScript"
| "Golang" | "Golang"
export type LANGUAGE_SHOW_LABEL = typeof LANGUAGE_SHOW_VALUE[keyof typeof LANGUAGE_SHOW_VALUE]
export type SUBMISSION_RESULT = -2 | -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 export type SUBMISSION_RESULT = -2 | -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
export type ProblemStatus = "passed" | "failed" | "not_test" export type ProblemStatus = "passed" | "failed" | "not_test"