1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-05 00:19:59 +00:00

fix: TS error in locales list

This commit is contained in:
三咲智子 2022-12-30 01:52:12 +08:00
parent 7aa3a571bc
commit c8baff3186
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E

View file

@ -2,8 +2,7 @@ import type { NuxtI18nOptions } from '@nuxtjs/i18n'
import type { DateTimeFormats } from '@intlify/core-base' import type { DateTimeFormats } from '@intlify/core-base'
import type { LocaleObject } from '#i18n' import type { LocaleObject } from '#i18n'
// @ts-expect-error dir is there, ts complaining const locales = ([
const locales: LocaleObject[] = [
{ {
code: 'en-US', code: 'en-US',
file: 'en-US.json', file: 'en-US.json',
@ -50,7 +49,7 @@ const locales: LocaleObject[] = [
name: 'العربية', name: 'العربية',
dir: 'rtl', dir: 'rtl',
}, },
].sort((a, b) => a.code.localeCompare(b.code)) ] satisfies LocaleObject[]).sort((a, b) => a.code.localeCompare(b.code))
const datetimeFormats = Object.keys(locales).reduce((acc, key) => { const datetimeFormats = Object.keys(locales).reduce((acc, key) => {
acc[key] = { acc[key] = {