]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Add #creationData() to TypeScript interface in moment.d.ts
authorNils Knappmeier <npm@knappi.org>
Fri, 10 Jun 2016 12:33:12 +0000 (14:33 +0200)
committerIskren Chernev <iskren.chernev@gmail.com>
Wed, 7 Sep 2016 08:32:06 +0000 (01:32 -0700)
moment.d.ts

index e0eb68d66af087057a69388ed158e167a60208a7..618d96c9bb593c71ca8a7bf1b57e61041381b52a 100644 (file)
@@ -224,6 +224,18 @@ declare namespace moment {
               "second" | "seconds" | "s" |
               "millisecond" | "milliseconds" | "ms");
 
+  interface MomentCreationData {
+    input?: string;
+    format?: string;
+    locale?: MomentLocale;
+    isUTC: boolean;
+    strict: boolean;
+  }
+
+  interface MomentLocale  {
+    // Details about the locale structure are not in the documentation so they are omitted here.
+  }
+
   interface Moment {
     format(format: string): string;
     format(): string;
@@ -319,6 +331,7 @@ declare namespace moment {
     isValid(): boolean;
     invalidAt(): number;
 
+    creationData(): MomentCreationData;
     parsingFlags(): MomentParsingFlags;
 
     year(y: number): Moment;