From df3d65441eb63b10fd20bbf4cd5259a0c471af2a Mon Sep 17 00:00:00 2001 From: Vitaly Turovsky Date: Tue, 26 Jan 2021 08:47:28 +0300 Subject: [PATCH] fix: hotfix for `Duration` types closes #1354 --- types/plugin/duration.d.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/types/plugin/duration.d.ts b/types/plugin/duration.d.ts index a5b197af5..755a219c9 100644 --- a/types/plugin/duration.d.ts +++ b/types/plugin/duration.d.ts @@ -14,6 +14,7 @@ declare namespace plugin { ((units: DurationUnitsObjectType) => Duration) & ((time: number, unit?: DurationUnitType) => Duration) & ((ISO_8601: string) => Duration) + type AddDurationType = CreateDurationType & ((duration: Duration) => Duration) interface Duration { new (input: string | number | object, unit?: string, locale?: string): Duration @@ -50,9 +51,9 @@ declare namespace plugin { get(unit: DurationUnitType): number - add: CreateDurationType; + add: AddDurationType - subtract: CreateDurationType + subtract: AddDurationType toJSON(): string