chore(common): implement enforced pre-commit type checks for FE service files (#3472)

This commit is contained in:
James George
2023-11-02 23:37:27 +05:30
committed by GitHub
parent 19294802be
commit b5307e4a89
4 changed files with 957 additions and 744 deletions

View File

@@ -58,7 +58,13 @@ export const FALLBACK_LANG = pipe(
)
// A reference to the i18n instance
let i18nInstance: I18n<any, any, any> | null = null
let i18nInstance: I18n<
Record<string, unknown>,
Record<string, unknown>,
Record<string, unknown>,
string,
true
> | null = null
const resolveCurrentLocale = () =>
pipe(
@@ -119,7 +125,6 @@ export const changeAppLanguage = async (locale: string) => {
* Returns the i18n instance
*/
export function getI18n() {
// @ts-expect-error Something weird with the i18n errors
return i18nInstance!.global.t
}