Updated iso8601-localizer type definitions to suit server-side usage

This commit is contained in:
unknown
2015-08-15 15:39:26 +03:00
parent 5109e1269d
commit 77a5e5a7c7
2 changed files with 17 additions and 2 deletions

View File

@@ -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:
*/
/// <reference path="iso8601-localizer.d.ts" />
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();

View File

@@ -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 <https://github.com/avielfedida/>
// 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;
}