From ba125e707089c45311a4d14cac92f873aef79f19 Mon Sep 17 00:00:00 2001 From: Shiwani Date: Sat, 19 Jan 2019 08:08:58 +0530 Subject: [PATCH] [bugfix] (TypeScript) allow update of a single relativeTime handler --- moment.d.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/moment.d.ts b/moment.d.ts index dfc3d5422b..ec72fbc357 100644 --- a/moment.d.ts +++ b/moment.d.ts @@ -79,20 +79,20 @@ declare namespace moment { type RelativeTimeFuturePastVal = string | ((relTime: string) => string); interface RelativeTimeSpec { - future: RelativeTimeFuturePastVal; - past: RelativeTimeFuturePastVal; - s: RelativeTimeSpecVal; - ss: RelativeTimeSpecVal; - m: RelativeTimeSpecVal; - mm: RelativeTimeSpecVal; - h: RelativeTimeSpecVal; - hh: RelativeTimeSpecVal; - d: RelativeTimeSpecVal; - dd: RelativeTimeSpecVal; - M: RelativeTimeSpecVal; - MM: RelativeTimeSpecVal; - y: RelativeTimeSpecVal; - yy: RelativeTimeSpecVal; + future?: RelativeTimeFuturePastVal; + past?: RelativeTimeFuturePastVal; + s?: RelativeTimeSpecVal; + ss?: RelativeTimeSpecVal; + m?: RelativeTimeSpecVal; + mm?: RelativeTimeSpecVal; + h?: RelativeTimeSpecVal; + hh?: RelativeTimeSpecVal; + d?: RelativeTimeSpecVal; + dd?: RelativeTimeSpecVal; + M?: RelativeTimeSpecVal; + MM?: RelativeTimeSpecVal; + y?: RelativeTimeSpecVal; + yy?: RelativeTimeSpecVal; } interface LongDateFormatSpec {