From 69e650acb0461b80c61e58cba33206660b52374b Mon Sep 17 00:00:00 2001 From: Vitaly Turovsky Date: Wed, 27 Jan 2021 21:47:28 +0300 Subject: [PATCH 1/3] fix: revert removed type definitions --- types/plugin/duration.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/plugin/duration.d.ts b/types/plugin/duration.d.ts index 755a219c9..d4717797b 100644 --- a/types/plugin/duration.d.ts +++ b/types/plugin/duration.d.ts @@ -6,6 +6,9 @@ export as namespace plugin; export = plugin declare namespace plugin { + type DurationInputType = string | number | object + type DurationAddType = number | object | Duration + type DurationUnitsObjectType = Partial<{ [unit in Exclude | "weeks"]: number }>; From 8d364b6581b215a25a6efcc4777cb4f51bce0dbf Mon Sep 17 00:00:00 2001 From: Vitaly Turovsky Date: Sun, 31 Jan 2021 18:22:51 +0300 Subject: [PATCH 2/3] add deprecations --- types/plugin/duration.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/types/plugin/duration.d.ts b/types/plugin/duration.d.ts index d4717797b..87f5c0b4f 100644 --- a/types/plugin/duration.d.ts +++ b/types/plugin/duration.d.ts @@ -6,7 +6,13 @@ export as namespace plugin; export = plugin declare namespace plugin { + /** + * @deprecated Please use more strict types + */ type DurationInputType = string | number | object + /** + * @deprecated Please use more strict types + */ type DurationAddType = number | object | Duration type DurationUnitsObjectType = Partial<{ @@ -80,3 +86,5 @@ declare module 'dayjs' { export const duration: plugin.CreateDurationType; export function isDuration(d: any): d is plugin.Duration } + +type a = FnPa; \ No newline at end of file From 22bb3239d55fa2bc7db0b2be53d112983e5848fe Mon Sep 17 00:00:00 2001 From: Vitaly Turovsky Date: Sun, 31 Jan 2021 18:42:46 +0300 Subject: [PATCH 3/3] remove unused type definition --- types/plugin/duration.d.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/types/plugin/duration.d.ts b/types/plugin/duration.d.ts index 87f5c0b4f..a7e733fe2 100644 --- a/types/plugin/duration.d.ts +++ b/types/plugin/duration.d.ts @@ -85,6 +85,4 @@ declare module 'dayjs' { */ export const duration: plugin.CreateDurationType; export function isDuration(d: any): d is plugin.Duration -} - -type a = FnPa; \ No newline at end of file +} \ No newline at end of file