mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 20:39:17 +08:00
Updated iso8601-localizer type definitions to suit server-side usage
This commit is contained in:
@@ -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();
|
||||
6
iso8601-localizer/iso8601-localizer.d.ts
vendored
6
iso8601-localizer/iso8601-localizer.d.ts
vendored
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user