Add types definition for jstz (jsTimezoneDetect) (#11716)

* Add types definition for jstz (jsTimezoneDetect https://bitbucket.org/pellepim/jstimezonedetect)

* Rename to jstimezonedetect
This commit is contained in:
Olivier Lamothe
2016-10-05 13:44:41 -07:00
committed by Mohamed Hegazy
parent bf103e8654
commit 12649b923f
2 changed files with 21 additions and 0 deletions
@@ -0,0 +1,5 @@
/// <reference path="jstimezonedetect.d.ts" />
import * as jstz from 'jstimezonedetect';
jstz.determine().name() === 'America/Montreal';
+16
View File
@@ -0,0 +1,16 @@
// Type definitions for jsTimezoneDetect
// Project: https://bitbucket.org/pellepim/jstimezonedetect
// Definitions by: Olivier Lamothe <https://github.com/olamothe/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface JsTimezoneDetect {
determine: ()=> {
name: ()=> string;
}
}
declare var jstimezonedetect: JsTimezoneDetect;
declare module "jstimezonedetect" {
export = jstimezonedetect;
}