From 34f5ad3f8e1fe3b80286d29f2f03fb09517cbae8 Mon Sep 17 00:00:00 2001 From: Robbert van Markus Date: Thu, 10 Mar 2016 17:48:32 +0100 Subject: [PATCH 1/2] Update moment-node.d.ts As of verstion 2.12.0 it is possible to list all locales that have been loaded and are available to use: moment.locales(), added this new method to type definition. check: http://momentjs.com/docs/#/i18n/getting-locale/ --- moment/moment-node.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moment/moment-node.d.ts b/moment/moment-node.d.ts index 21bbaaeb71..c018232807 100644 --- a/moment/moment-node.d.ts +++ b/moment/moment-node.d.ts @@ -325,7 +325,7 @@ declare module moment { locale(language: string): Moment; locale(reset: boolean): Moment; locale(): string; - + locales() : string[]; localeData(language: string): Moment; localeData(reset: boolean): Moment; localeData(): MomentLanguage; From 678b9e1260c1f1073c0b3b0fed95f4e312b18a61 Mon Sep 17 00:00:00 2001 From: Robbert van Markus Date: Fri, 11 Mar 2016 09:58:53 +0100 Subject: [PATCH 2/2] Update moment-node.d.ts added @since 2.12.0 flag --- moment/moment-node.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/moment/moment-node.d.ts b/moment/moment-node.d.ts index c018232807..a1b2614efb 100644 --- a/moment/moment-node.d.ts +++ b/moment/moment-node.d.ts @@ -325,6 +325,10 @@ declare module moment { locale(language: string): Moment; locale(reset: boolean): Moment; locale(): string; + + /** + * @since 2.12.0+ + */ locales() : string[]; localeData(language: string): Moment; localeData(reset: boolean): Moment;