mirror of
https://litchi.icu/ngc2207/judge.git
synced 2025-05-19 05:06:33 +00:00
refactor: define EditorFile interface for improved type safety in DEFAULT_FILES
This commit is contained in:
parent
7ecc17e8a6
commit
79cbc92a87
@ -4,14 +4,13 @@ export const DEFAULT_EDITOR_THEME = "one-dark-pro";
|
|||||||
|
|
||||||
export const DEFAULT_EDITOR_LANGUAGE: SupportedEditorLanguage = "c";
|
export const DEFAULT_EDITOR_LANGUAGE: SupportedEditorLanguage = "c";
|
||||||
|
|
||||||
export const DEFAULT_FILES: Record<
|
export interface EditorFile {
|
||||||
SupportedEditorLanguage,
|
path: string;
|
||||||
{
|
language: SupportedEditorLanguage;
|
||||||
path: string;
|
value: string;
|
||||||
language: SupportedEditorLanguage;
|
}
|
||||||
value: string;
|
|
||||||
}
|
export const DEFAULT_FILES: Record<SupportedEditorLanguage, EditorFile> = {
|
||||||
> = {
|
|
||||||
c: {
|
c: {
|
||||||
path: "playground/main.c",
|
path: "playground/main.c",
|
||||||
language: "c",
|
language: "c",
|
||||||
|
Loading…
Reference in New Issue
Block a user