refactor axios.
This commit is contained in:
51
src/utils/types.ts
Normal file
51
src/utils/types.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
export type LANGUAGE =
|
||||
| "C"
|
||||
| "C++"
|
||||
| "Python2"
|
||||
| "Python3"
|
||||
| "Java"
|
||||
| "JavaScript"
|
||||
| "Golang"
|
||||
|
||||
export interface Problem {
|
||||
_id: string
|
||||
id: number
|
||||
tags: string[]
|
||||
created_by: {
|
||||
id: number
|
||||
username: string
|
||||
real_name: null
|
||||
}
|
||||
template: { [key in LANGUAGE]?: string }
|
||||
title: string
|
||||
description: string
|
||||
input_description: string
|
||||
output_description: string
|
||||
samples: {
|
||||
input: string
|
||||
output: string
|
||||
}[]
|
||||
hint: string
|
||||
languages: Array<LANGUAGE>
|
||||
create_time: Date
|
||||
last_update_time: null
|
||||
time_limit: number
|
||||
memory_limit: number
|
||||
io_mode: {
|
||||
input: string
|
||||
output: string
|
||||
io_mode: string
|
||||
}
|
||||
spj: boolean
|
||||
spj_language: null
|
||||
rule_type: string
|
||||
difficulty: "Low" | "Mid" | "High"
|
||||
source: string
|
||||
total_score: number
|
||||
submission_number: number
|
||||
accepted_number: number
|
||||
statistic_info: {}
|
||||
share_submission: boolean
|
||||
contest: null
|
||||
my_status: number
|
||||
}
|
||||
Reference in New Issue
Block a user