From fdcb470cb6a3d91aa61082c7818feeaa329ea7ba Mon Sep 17 00:00:00 2001 From: Wojciech Maj Date: Wed, 26 Jun 2024 11:08:58 +0200 Subject: [PATCH] Get rid of computed property names on object literals --- packages/react-calendar/src/shared/const.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/react-calendar/src/shared/const.ts b/packages/react-calendar/src/shared/const.ts index fc519b6e..c0c30154 100644 --- a/packages/react-calendar/src/shared/const.ts +++ b/packages/react-calendar/src/shared/const.ts @@ -1,3 +1,5 @@ +import type { CalendarType } from './types.js'; + export const CALENDAR_TYPES = { GREGORY: 'gregory', HEBREW: 'hebrew', @@ -5,8 +7,8 @@ export const CALENDAR_TYPES = { ISO_8601: 'iso8601', } as const; -export const CALENDAR_TYPE_LOCALES = { - [CALENDAR_TYPES.GREGORY]: [ +export const CALENDAR_TYPE_LOCALES: Partial> = { + gregory: [ 'en-CA', 'en-US', 'es-AR', @@ -27,8 +29,8 @@ export const CALENDAR_TYPE_LOCALES = { 'es-VE', 'pt-BR', ], - [CALENDAR_TYPES.HEBREW]: ['he', 'he-IL'], - [CALENDAR_TYPES.ISLAMIC]: [ + hebrew: ['he', 'he-IL'], + islamic: [ // ar-LB, ar-MA intentionally missing 'ar', 'ar-AE',