From d711aa0c23ef25820e6eff2b9739bae733fdd113 Mon Sep 17 00:00:00 2001 From: Pascal Jufer Date: Thu, 16 Mar 2023 14:33:52 +0100 Subject: [PATCH] Correctly assert i18n default messages (#17815) To prevent the following TS warning: > Type instantiation is excessively deep and possibly infinite.ts(2589) --- app/src/lang/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/lang/index.ts b/app/src/lang/index.ts index ef582030a1..730f3d5498 100644 --- a/app/src/lang/index.ts +++ b/app/src/lang/index.ts @@ -1,5 +1,5 @@ import { RequestError } from '@/api'; -import { createI18n } from 'vue-i18n'; +import { createI18n, I18nOptions } from 'vue-i18n'; import availableLanguages from './available-languages.yaml'; import datetimeFormats from './date-formats.yaml'; import numberFormats from './number-formats.yaml'; @@ -11,7 +11,7 @@ export const i18n = createI18n({ fallbackLocale: 'en-US', messages: { 'en-US': enUSBase, - }, + } as I18nOptions['messages'], silentTranslationWarn: true, datetimeFormats, numberFormats,