INNER CODE UNIT · TypeScript
Utils
EutropicAI/Final2x · src/renderer/src/utils/index.ts:3
class Utils {
/**
* @description 返回语言,和语言数量
* @param id 语言id 0-> en, 1-> zh, 2-> ja, 3-> fr
*/
static getLanguage(id: number): { lang: string, numLang: number } {
const langs = LANG_LIST
return {
lang: langs[id],
numLang: langs.length,
}
}
/**
* @description 等待一段时间
* @param timeout 等待时间,单位毫秒
*/
static sleep(timeout: number): Promise<void> {