mirror of
https://litchi.icu/ngc2207/judge.git
synced 2025-05-18 20:46:34 +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_FILES: Record<
|
||||
SupportedEditorLanguage,
|
||||
{
|
||||
path: string;
|
||||
language: SupportedEditorLanguage;
|
||||
value: string;
|
||||
}
|
||||
> = {
|
||||
export interface EditorFile {
|
||||
path: string;
|
||||
language: SupportedEditorLanguage;
|
||||
value: string;
|
||||
}
|
||||
|
||||
export const DEFAULT_FILES: Record<SupportedEditorLanguage, EditorFile> = {
|
||||
c: {
|
||||
path: "playground/main.c",
|
||||
language: "c",
|
||||
|
Loading…
Reference in New Issue
Block a user