From 9dfcb07717fbb7e1f7c699fa1eed68aca754dd0a Mon Sep 17 00:00:00 2001 From: Greg Veres Date: Wed, 15 Apr 2020 11:04:04 -0400 Subject: [PATCH] fixed incorrect definition of locale in typescript the first parameter of locale is optional so that locale() can be called with no arguments to return the current locale. I would have added a test case to prove this works, but everything is in javascript and I expect you would not appreciate adding typescript to the unit tests. --- types/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/index.d.ts b/types/index.d.ts index f971394dd..1f58a9ccb 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -100,7 +100,7 @@ declare namespace dayjs { export function extend(plugin: PluginFunc, option?: T): Dayjs - export function locale(preset: string | ILocale, object?: Partial, isLocal?: boolean): string + export function locale(preset?: string | ILocale, object?: Partial, isLocal?: boolean): string export function isDayjs(d: any): d is Dayjs