From 8b06c48514d65de402d011757c9d04f96b617cea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90?= Date: Fri, 30 Dec 2022 02:30:28 +0800 Subject: [PATCH] revert: "fix: TS error in locales list" wait issue: https://github.com/unjs/jiti/issues/106 This reverts commit c8baff318666de45bae7e8e41a065fd52c82abe2. --- config/i18n.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/i18n.ts b/config/i18n.ts index d45608cf..63b18f8c 100644 --- a/config/i18n.ts +++ b/config/i18n.ts @@ -2,7 +2,8 @@ import type { NuxtI18nOptions } from '@nuxtjs/i18n' import type { DateTimeFormats } from '@intlify/core-base' import type { LocaleObject } from '#i18n' -const locales = ([ +// @ts-expect-error dir is there, ts complaining +const locales: LocaleObject[] = [ { code: 'en-US', file: 'en-US.json', @@ -49,7 +50,7 @@ const locales = ([ name: 'العربية', dir: 'rtl', }, -] satisfies LocaleObject[]).sort((a, b) => a.code.localeCompare(b.code)) +].sort((a, b) => a.code.localeCompare(b.code)) const datetimeFormats = Object.keys(locales).reduce((acc, key) => { acc[key] = {