core: langs: add validAs option

This commit is contained in:
undefined committed 2023-05-10 20:20:12 +08:00
1 parent d20c405da9
commit 1b1faa9ff9
4 files changed
+19 -28

No files matched your search

+4
View File
@@ -15,7 +15,10 @@ export interface LangConfig {
key: string;
hidden: boolean;
analysis?: string;
/** @deprecated */
remote?: string;
validAs?: Record<string, string>;
/** @deprecated */
pretest?: string | false;
comment?: string | [string, string];
compile_time_limit?: number;
@@ -47,6 +50,7 @@ export function parseLang(config: string): Record<string, LangConfig> {
entry.key = key;
entry.hidden ||= false;
entry.disabled ||= false;
entry.validAs ||= {};
}
return file;
}