update all the npm after 2 years

This commit is contained in:
fyears
2023-12-17 15:18:23 +08:00
parent 92183e0fb6
commit 44dbec175b
10 changed files with 111 additions and 83 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ import { LANGS } from "./langs";
export type LangType = keyof typeof LANGS;
export type LangTypeAndAuto = LangType | "auto";
export type TransItemType = keyof typeof LANGS["en"];
export type TransItemType = keyof (typeof LANGS)["en"];
export class I18n {
lang: LangTypeAndAuto;
@@ -31,7 +31,7 @@ export class I18n {
}
const res: string =
(LANGS[realLang] as typeof LANGS["en"])[key] || LANGS["en"][key] || key;
(LANGS[realLang] as (typeof LANGS)["en"])[key] || LANGS["en"][key] || key;
return res;
}