From 77a5e5a7c784fdbade38402cadaab1d73799a219 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 15 Aug 2015 15:39:26 +0300 Subject: [PATCH] Updated iso8601-localizer type definitions to suit server-side usage --- iso8601-localizer/iso8601-localizer-tests.ts | 13 ++++++++++++- iso8601-localizer/iso8601-localizer.d.ts | 6 +++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/iso8601-localizer/iso8601-localizer-tests.ts b/iso8601-localizer/iso8601-localizer-tests.ts index d532d7af0..1368b8d78 100644 --- a/iso8601-localizer/iso8601-localizer-tests.ts +++ b/iso8601-localizer/iso8601-localizer-tests.ts @@ -1,7 +1,18 @@ + +/* +The API is the same for both client-side and server-side users. + +For server-side users include the module as external module: + +import ISO8601Localizer = require('iso8601-localizer'); + +For client-side users include the module as internal module as shown below: +*/ + /// new ISO8601Localizer('2015-06-02T14:13:12').localize(); new ISO8601Localizer('2015-06-02T14:13:12').to(-5).localize(); -new ISO8601Localizer('2015-06-02T14:13:12').to(-5).returnAs('object').localize(); +new ISO8601Localizer('2015-06-02T14:13:12').to(-5).returnAs('object').localize(); \ No newline at end of file diff --git a/iso8601-localizer/iso8601-localizer.d.ts b/iso8601-localizer/iso8601-localizer.d.ts index 7d7c52626..0bd33176e 100644 --- a/iso8601-localizer/iso8601-localizer.d.ts +++ b/iso8601-localizer/iso8601-localizer.d.ts @@ -1,4 +1,4 @@ -// Type definitions for ISO8601-Localizer v1.2.0 +// Type definitions for ISO8601-Localizer v1.2.1 // Project: https://github.com/avielfedida/ISO8601-Localizer // Definitions by: Aviel Fedida // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -15,3 +15,7 @@ declare class ISO8601Localizer implements localizer { returnAs(as: string): localizer; localize(): string; } + +declare module "iso8601-localizer" { + export = ISO8601Localizer; +} \ No newline at end of file