From 38ea609a3e4b485943b2dbb7828c6774a20866aa Mon Sep 17 00:00:00 2001 From: BobZombie Date: Sat, 6 Feb 2021 08:21:51 +0900 Subject: [PATCH 1/2] toISOString function also return null --- moment.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moment.d.ts b/moment.d.ts index 2c5b3cf46b..85bbfe0492 100644 --- a/moment.d.ts +++ b/moment.d.ts @@ -587,7 +587,7 @@ declare namespace moment { toArray(): number[]; toDate(): Date; - toISOString(keepOffset?: boolean): string; + toISOString(keepOffset?: boolean): string | null; inspect(): string; toJSON(): string; unix(): number; From c6d26079326c65e8d9804abb9b12484694972922 Mon Sep 17 00:00:00 2001 From: Iskren Chernev Date: Sun, 24 Dec 2023 13:43:42 +0200 Subject: [PATCH 2/2] Properly allow null for ts1 and ts3 --- moment.d.ts | 4 ++-- ts3.1-typings/moment.d.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/moment.d.ts b/moment.d.ts index 85bbfe0492..03d1682801 100644 --- a/moment.d.ts +++ b/moment.d.ts @@ -194,7 +194,7 @@ declare namespace moment { clone(): Duration; humanize(argWithSuffix?: boolean, argThresholds?: argThresholdOpts): string; - + humanize(argThresholds?: argThresholdOpts): string; abs(): Duration; @@ -587,7 +587,7 @@ declare namespace moment { toArray(): number[]; toDate(): Date; - toISOString(keepOffset?: boolean): string | null; + toISOString(keepOffset?: boolean): string | void; // null inspect(): string; toJSON(): string; unix(): number; diff --git a/ts3.1-typings/moment.d.ts b/ts3.1-typings/moment.d.ts index 51fe8c21e1..4f7478a5a1 100644 --- a/ts3.1-typings/moment.d.ts +++ b/ts3.1-typings/moment.d.ts @@ -184,7 +184,7 @@ declare namespace moment { clone(): Duration; humanize(argWithSuffix?: boolean, argThresholds?: argThresholdOpts): string; - + humanize(argThresholds?: argThresholdOpts): string; abs(): Duration; @@ -575,7 +575,7 @@ declare namespace moment { toArray(): [number, number, number, number, number, number, number]; toDate(): Date; - toISOString(keepOffset?: boolean): string; + toISOString(keepOffset?: boolean): string | null; inspect(): string; toJSON(): string; unix(): number;