From 456ee0c0e98567207d9a65fb272f55b434091ef4 Mon Sep 17 00:00:00 2001 From: Kanitkorn S Date: Tue, 13 Nov 2018 21:35:43 +0700 Subject: [PATCH] Fix wrong type def Every `locale` has `en` as the default value so they're optional. --- types/utils.d.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/types/utils.d.ts b/types/utils.d.ts index 42b903ea3d..33b9f4d4ad 100644 --- a/types/utils.d.ts +++ b/types/utils.d.ts @@ -3,13 +3,13 @@ import { RangeModifier, Modifier } from "./common"; export interface LocaleUtils { - formatDay(day: Date, locale: string): string; - formatMonthTitle(month: Date, locale: string): string; - formatWeekdayLong(weekday: number, locale: string): string; - formatWeekdayShort(weekday: number, locale: string): string; - getFirstDayOfWeek(locale: string): number; + formatDay(day: Date, locale?: string): string; + formatMonthTitle(month: Date, locale?: string): string; + formatWeekdayLong(weekday: number, locale?: string): string; + formatWeekdayShort(weekday: number, locale?: string): string; + getFirstDayOfWeek(locale?: string): number; getMonths( - locale: string + locale?: string ): [ string, string,