]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
[bugfix] (TypeScript) allow update of a single relativeTime handler
authorShiwani <shivijais16@gmail.com>
Sat, 19 Jan 2019 02:38:58 +0000 (08:08 +0530)
committerKunal Marwaha <marwahaha@berkeley.edu>
Sat, 19 Jan 2019 02:38:58 +0000 (18:38 -0800)
moment.d.ts

index dfc3d5422baa7549609f718c75966b08050e923f..ec72fbc3573dd6e48108ae6838815ce27b1c60d3 100644 (file)
@@ -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 {