From 81fe6948fc71aca2e34c693d60e1d617a00271ad Mon Sep 17 00:00:00 2001 From: iamkun Date: Thu, 2 Jul 2020 17:02:57 +0800 Subject: [PATCH 1/2] fix: Update type definition to support strict mode fix #924 --- types/index.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/types/index.d.ts b/types/index.d.ts index 22c919b8f..5b2a44abb 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,7 +1,12 @@ /// export = dayjs; -declare function dayjs (date?: dayjs.ConfigType, option?: dayjs.OptionType, locale?: string): dayjs.Dayjs + +declare function dayjs (date?: dayjs.ConfigType): dayjs.Dayjs + +declare function dayjs (date?: dayjs.ConfigType, format?: dayjs.OptionType, strict?: boolean): dayjs.Dayjs + +declare function dayjs (date?: dayjs.ConfigType, format?: dayjs.OptionType, locale?: string, strict?:boolean): dayjs.Dayjs declare namespace dayjs { export type ConfigType = string | number | Date | Dayjs From 9ef3ab63cd5e0fff113d50b511da2af35c9fd1ef Mon Sep 17 00:00:00 2001 From: iamkun Date: Thu, 2 Jul 2020 17:03:48 +0800 Subject: [PATCH 2/2] chore: --- 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 5b2a44abb..3d318103d 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -6,7 +6,7 @@ declare function dayjs (date?: dayjs.ConfigType): dayjs.Dayjs declare function dayjs (date?: dayjs.ConfigType, format?: dayjs.OptionType, strict?: boolean): dayjs.Dayjs -declare function dayjs (date?: dayjs.ConfigType, format?: dayjs.OptionType, locale?: string, strict?:boolean): dayjs.Dayjs +declare function dayjs (date?: dayjs.ConfigType, format?: dayjs.OptionType, locale?: string, strict?: boolean): dayjs.Dayjs declare namespace dayjs { export type ConfigType = string | number | Date | Dayjs