refactor: fully typed locales (#13033)
* refactor: fully typed locales * refactor: hide parameterized locale strings from type data in ts access * refactor: missing assertions * docs: annotation
This commit is contained in:

committed by
GitHub

parent
c1019a006b
commit
43401210c3
@@ -10,6 +10,7 @@ import { I18n } from '@/scripts/i18n.js';
|
||||
|
||||
export const i18n = markRaw(new I18n<Locale>(locale));
|
||||
|
||||
export function updateI18n(newLocale) {
|
||||
i18n.ts = newLocale;
|
||||
export function updateI18n(newLocale: Locale) {
|
||||
// @ts-expect-error -- private field
|
||||
i18n.locale = newLocale;
|
||||
}
|
||||
|
Reference in New Issue
Block a user