diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000000..5ebf4a129c
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,9 @@
+root = true
+
+[*]
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[{*.json,*.yml}]
+indent_style = space
+indent_size = 2
diff --git a/.gitignore b/.gitignore
index 71251cf8ad..7bfdb8b535 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,6 +29,9 @@ _infrastructure/tests/build
*.iml
*.js.map
+#decimal.js
+!decimal.js
+
#rx.js
!rx.js
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index b54b7d1df4..6abf7201be 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -22,15 +22,16 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](angularjs/angular-route.d.ts) [Angular JS (ngRoute module)](http://angularjs.org) by [Jonathan Park](https://github.com/park9140)
* [:link:](angularjs/angular-sanitize.d.ts) [Angular JS (ngSanitize module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar)
* [:link:](angular-ui-router/angular-ui-router.d.ts) [Angular JS (ui.router module)](https://github.com/angular-ui/ui-router) by [Michel Salib](https://github.com/michelsalib)
-* [:link:](angular-material/angular-material.d.ts) [Angular Material (ng.material module)](https://github.com/angular/material) by [Matt Traynham](https://github.com/mtraynham)
+* [:link:](angular-material/angular-material.d.ts) [Angular Material (angular.material module)](https://github.com/angular/material) by [Matt Traynham](https://github.com/mtraynham)
* [:link:](angular-protractor/angular-protractor.d.ts) [Angular Protractor](https://github.com/angular/protractor) by [Bill Armstrong](https://github.com/BillArmstrong)
* [:link:](angular-scenario/angular-scenario.d.ts) [Angular Scenario Testing (ngScenario module)](http://angularjs.org) by [RomanoLindano](https://github.com/RomanoLindano)
* [:link:](angular-translate/angular-translate.d.ts) [Angular Translate (pascalprecht.translate module)](https://github.com/PascalPrecht/angular-translate) by [Michel Salib](https://github.com/michelsalib)
* [:link:](angular-ui-bootstrap/angular-ui-bootstrap.d.ts) [Angular UI Bootstrap](https://github.com/angular-ui/bootstrap) by [Brian Surowiec](https://github.com/xt0rted)
+* [:link:](angular-wizard/angular-wizard.d.ts) [Angular Wizard](https://github.com/mgonto/angular-wizard) by [Marko Jurisic](https://github.com/mjurisic)
* [:link:](angular-bootstrap-lightbox/angular-bootstrap-lightbox.d.ts) [angular-bootstrap-lightbox](https://github.com/compact/angular-bootstrap-lightbox) by [Roland Zwaga](https://github.com/rolandzwaga)
* [:link:](angular-hotkeys/angular-hotkeys.d.ts) [angular-hotkeys](https://github.com/chieffancypants/angular-hotkeys) by [Jason Zhao](https://github.com/jlz27), [Stefan Steinhart](https://github.com/reppners)
* [:link:](angular-http-auth/angular-http-auth.d.ts) [angular-http-auth](https://github.com/witoldsz/angular-http-auth) by [vvakame](https://github.com/vvakame)
-* [:link:](angular-local-storage/angular-local-storage.d.ts) [angular-local-storage](https://github.com/grevory/angular-local-storage) by [Ken Fukuyama](https://github.com/kenfdev),[Chris Woolum](https://github.com/cwoolum)
+* [:link:](angular-local-storage/angular-local-storage.d.ts) [angular-local-storage](https://github.com/grevory/angular-local-storage) by [Ken Fukuyama](https://github.com/kenfdev)
* [:link:](angular-notify/angular-notify.d.ts) [angular-notify](https://github.com/cgross/angular-notify) by [Suwato](https://github.com/Suwato/DefinitelyTyped)
* [:link:](angular-scroll/angular-scroll.d.ts) [angular-scroll](https://github.com/oblador/angular-scroll) by [Sam Herrmann](https://github.com/samherrmann)
* [:link:](angular-spinner/angular-spinner.d.ts) [angular-spinner.js](https://github.com/urish/angular-spinner) by [Marcin Biegała](https://github.com/Biegal)
@@ -57,10 +58,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](asyncblock/asyncblock.d.ts) [asyncblock](https://github.com/scriby/asyncblock) by [Hiroki Horiuchi](https://github.com/horiuchi)
* [:link:](atmosphere/atmosphere.d.ts) [Atmosphere](https://github.com/Atmosphere/atmosphere-javascript) by [Kai Toedter](https://github.com/toedter)
* [:link:](atom/atom.d.ts) [Atom](https://atom.io) by [vvakame](https://github.com/vvakame)
+* [:link:](atom/api-docs.d.ts) [Atom API docs](https://github.com/atom/atom/blob/master/build/tasks/docs-task.coffee) by [vvakame](https://github.com/vvakame)
* [:link:](atpl/atpl.d.ts) [atpl](https://github.com/soywiz/atpl.js) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](auth0/auth0.d.ts) [Auth0.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
-* [:link:](auth0.widget/auth0.widget.d.ts) [Auth0Widget.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
* [:link:](auth0.lock/auth0.lock.d.ts) [Auth0Widget.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
+* [:link:](auth0.widget/auth0.widget.d.ts) [Auth0Widget.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
* [:link:](autobahn/autobahn.d.ts) [AutobahnJS](http://autobahn.ws/js) by [Elad Zelingher](https://github.com/darkl)
* [:link:](aws-sdk/aws-sdk.d.ts) [aws-sdk](https://github.com/aws/aws-sdk-js) by [midknight41](https://github.com/midknight41)
* [:link:](axios/axios.d.ts) [axios](https://github.com/mzabriskie/axios) by [Marcel Buesing](https://github.com/marcelbuesing)
@@ -85,11 +87,12 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](bootbox/bootbox.d.ts) [Bootbox](https://github.com/makeusabrew/bootbox) by [Vincent Bortone](https://github.com/vbortone), [Kon Pik](https://github.com/konpikwastaken)
* [:link:](bootstrap/bootstrap.d.ts) [Bootstrap](http://twitter.github.com/bootstrap) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker.d.ts) [Bootstrap datetimepicker v3](http://eonasdan.github.io/bootstrap-datetimepicker) by [Jesica N. Fera](https://github.com/bayitajesi)
+* [:link:](bootstrap-touchspin/bootstrap-touchspin.d.ts) [Bootstrap TouchSpin](http://www.virtuosoft.eu/code/bootstrap-touchspin) by [Albin Sunnanbo](https://github.com/albinsunnanbo)
* [:link:](bootstrap-notify/bootstrap-notify.d.ts) [bootstrap-notify](https://github.com/Nijikokun/bootstrap-notify) by [Blake Niemyjski](https://github.com/niemyjski)
* [:link:](bootstrap.datepicker/bootstrap.datepicker.d.ts) [bootstrap.datepicker](https://github.com/eternicode/bootstrap-datepicker) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](bootstrap.paginator/bootstrap.paginator.d.ts) [bootstrap.paginator](https://github.com/lyonlai/bootstrap-paginator) by [derikwhittaker](https://github.com/derikwhittaker)
-* [:link:](box2d/box2dweb.d.ts) [bootstrap.timepicker](http://code.google.com/p/box2dweb) by [jbaldwin](https://github.com/jbaldwin)
* [:link:](bootstrap.timepicker/bootstrap.timepicker.d.ts) [bootstrap.timepicker](https://github.com/jdewit/bootstrap-timepicker) by [derikwhittaker](https://github.com/derikwhittaker)
+* [:link:](box2d/box2dweb.d.ts) [bootstrap.timepicker](http://code.google.com/p/box2dweb) by [jbaldwin](https://github.com/jbaldwin)
* [:link:](breeze/breeze.d.ts) [Breeze 1.5.x](http://www.breezejs.com) by [Boris Yankov](https://github.com/borisyankov), [IdeaBlade](https://github.com/IdeaBlade/Breeze)
* [:link:](browser-harness/browser-harness.d.ts) [Browser Harness](https://github.com/scriby/browser-harness) by [Chris Scribner](https://github.com/scriby)
* [:link:](browser-sync/browser-sync.d.ts) [browser-sync](http://www.browsersync.io) by [Asana](https://asana.com)
@@ -97,10 +100,12 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](bucks/bucks.d.ts) [bucks.js](https://github.com/CyberAgent/bucks.js) by [Shunsuke Ohtani](https://github.com/zaneli)
* [:link:](buffer-equal/buffer-equal.d.ts) [buffer-equal](https://github.com/substack/node-buffer-equal) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](bl/bl.d.ts) [BufferList](https://github.com/rvagg/bl) by [Bart van der Schoor](https://github.com/Bartvds)
+* [:link:](buffers/buffers.d.ts) [buffers](https://github.com/substack/node-buffers) by [Robert Hencke](https://github.com/rhencke)
* [:link:](bufferstream/bufferstream.d.ts) [bufferstream](https://github.com/dodo/node-bufferstream) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](bunyan-prettystream/bunyan-prettystream.d.ts) [bunyan-prettystream](https://www.npmjs.com/package/bunyan-prettystream) by [Jason Swearingen](https://github.com/jasonswearingen)
* [:link:](business-rules-engine/business-rules-engine.d.ts) [business-rules-engine](https://github.com/rsamec/form) by [Roman Samec](https://github.com/rsamec)
* [:link:](byline/byline.d.ts) [byline](https://github.com/jahewson/node-byline) by [Stefan Steinhart](https://github.com/reppners)
+* [:link:](calq/calq.d.ts) [calq](https://calq.io/docs/client/javascript/reference) by [Eirik Hoem](https://github.com/eirikhm)
* [:link:](camljs/camljs.d.ts) [camljs](http://camljs.codeplex.com) by [Andrey Markeev](http://markeev.com)
* [:link:](canvasjs/canvasjs.d.ts) [CanvasJS](http://canvasjs.com) by [Mark Overholt](https://github.com/mover5)
* [:link:](casperjs/casperjs.d.ts) [CasperJS](http://casperjs.org) by [Jed Mao](https://github.com/jedmao)
@@ -121,6 +126,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](chroma-js/chroma-js.d.ts) [Chroma.js](https://github.com/gka/chroma.js) by [Sebastian Brückner](https://github.com/invliD)
* [:link:](chrome/chrome.d.ts) [Chrome extension development](http://developer.chrome.com/extensions) by [Matthew Kimber](https://github.com/matthewkimber), [otiai10](https://github.com/otiai10)
* [:link:](chrome/chrome-app.d.ts) [Chrome packaged application development](http://developer.chrome.com/apps) by [Adam Lay](https://github.com/AdamLay), [MIZUNE Pine](https://github.com/pine613), [MIZUSHIMA Junki](https://github.com/mzsm)
+* [:link:](circular-json/circular-json.d.ts) [circular-json](https://github.com/WebReflection/circular-json) by [Jonathan Pevarnek](https://github.com/jpevarnek)
* [:link:](ckeditor/ckeditor.d.ts) [CKEditor](http://ckeditor.com) by [Ondrej Sevcik](https://github.com/ondrejsevcik)
* [:link:](cli-color/cli-color.d.ts) [cli-color](https://github.com/medikoo/cli-color) by [Joel Spadin](https://github.com/ChaosinaCan)
* [:link:](clone/clone.d.ts) [clone](https://github.com/pvorb/node-clone) by [Kieran Simpson](https://github.com/kierans/DefinitelyTyped)
@@ -130,6 +136,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](commander/commander.d.ts) [commanderjs](https://github.com/visionmedia/commander.js) by [Marcelo Dezem](http://github.com/mdezem), [vvakame](http://github.com/vvakame)
* [:link:](compression/compression.d.ts) [compression](https://github.com/expressjs/compression) by [Santi Albo](https://github.com/santialbo)
* [:link:](configstore/configstore.d.ts) [configstore](https://github.com/yeoman/configstore) by [Bart van der Schoor](https://github.com/Bartvds)
+* [:link:](connect-flash/connect-flash.d.ts) [connect-flash](https://github.com/jaredhanson/connect-flash) by [Andreas Gassmann](https://github.com/AndreasGassmann)
+* [:link:](connect-slashes/connect-slashes.d.ts) [connect-slashes](https://github.com/avinoamr/connect-slashes) by [Sam Herrmann](https://github.com/samherrmann)
* [:link:](consolidate/consolidate.d.ts) [consolidate](https://github.com/visionmedia/consolidate.js) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](content-type/content-type.d.ts) [content-type](https://github.com/deoxxa/content-type) by [Pine Mizune](https://github.com/pine613)
* [:link:](convert-source-map/convert-source-map.d.ts) [convert-source-map](https://github.com/thlorenz/convert-source-map) by [Andrew Gaspar](https://github.com/AndrewGaspar)
@@ -140,6 +148,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](cordovarduino/cordovarduino.d.ts) [Cordovarduino plugin](https://github.com/stereolux/cordovarduino) by [Hendrik Maus](https://github.com/hendrikmaus)
* [:link:](couchbase/couchbase.d.ts) [Couchbase Couchnode](https://github.com/couchbase/couchnode) by [Basarat Ali Syed](https://github.com/basarat)
* [:link:](createjs/createjs.d.ts) [CreateJS](http://www.createjs.com) by [Pedro Ferreira](https://bitbucket.org/drk4), [Chris Smith](https://github.com/evilangelist), [Satoru Kimura](https://github.com/gyohk)
+* [:link:](cron/cron.d.ts) [cron](https://www.npmjs.com/package/cron) by [Hiroki Horiuchi](https://github.com/horiuchi)
* [:link:](crossfilter/crossfilter.d.ts) [CrossFilter](https://github.com/square/crossfilter) by [Schmulik Raskin](https://github.com/schmuli)
* [:link:](crossroads/crossroads.d.ts) [Crossroads.js](http://millermedeiros.github.io/crossroads.js) by [Diullei Gomes](https://github.com/diullei)
* [:link:](crypto-js/crypto-js.d.ts) [crypto-js](https://github.com/evanvosberg/crypto-js) by [Michael Zabka](https://github.com/misak113)
@@ -147,6 +156,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](googlemaps.infobubble/google.maps.infobubble.d.ts) [CSS3 InfoBubble with tabs for Google Maps API V3](http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobubble/src) by [Johan Nilsson](https://github.com/Dashue)
* [:link:](csurf/csurf.d.ts) [csurf](https://www.npmjs.org/package/csurf) by [Hiroki Horiuchi](https://github.com/horiuchi)
* [:link:](csv-stringify/csv-stringify.d.ts) [csv-stringify](https://github.com/wdavidw/node-csv-stringify) by [Rogier Schouten](https://github.com/rogierschouten)
+* [:link:](custom-error-generator/custom-error-generator.d.ts) [custom-error-generator](https://github.com/jproulx/node-custom-error) by [Thierry Miceli](https://github.com/thmiceli)
* [:link:](md5/md5.d.ts) [CybozuLabs.MD5](http://labs.cybozu.co.jp/blog/mitsunari/2007/07/md5js_1.html) by [MIZUNE Pine](https://github.com/pine613)
* [:link:](d3/d3.d.ts) [d3JS](http://d3js.org) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](d3.cloud.layout/d3.cloud.layout.d.ts) [d3JS cloud layout plugin by Jason Davies](https://github.com/jasondavies/d3-cloud) by [hans windhoff](https://github.com/hansrwindhoff)
@@ -157,6 +167,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](datejs/datejs.d.ts) [DateJS](http://www.datejs.com) by [David Khristepher Santos](http://github.com/rupertavery)
* [:link:](dcjs/dc.d.ts) [DCJS](https://github.com/dc-js/dc.js) by [hans windhoff](https://github.com/hansrwindhoff), [matt traynham](https://github.com/mtraynham)
* [:link:](debug/debug.d.ts) [debug](https://github.com/visionmedia/debug) by [Seon-Wook Park](https://github.com/swook)
+* [:link:](decimal.js/decimal.js.d.ts) [decimal.js](http://mikemcl.github.io/decimal.js) by [Joseph Rossi](http://github.com/musicist288)
* [:link:](deep-diff/deep-diff.d.ts) [deep-diff](https://github.com/flitbit/diff) by [ZauberNerd](https://github.com/ZauberNerd)
* [:link:](deep-freeze/deep-freeze.d.ts) [deep-freeze](https://github.com/substack/deep-freeze) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](del/del.d.ts) [del](https://github.com/sindresorhus/del) by [Asana](https://asana.com)
@@ -171,17 +182,21 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](dock-spawn/dock-spawn.d.ts) [Dock Spawn](http://dockspawn.com) by [Drew Noakes](https://drewnoakes.com)
* [:link:](documentdb/documentdb.d.ts) [DocumentDB](https://github.com/Azure/azure-documentdb-node) by [Noel Abrahams](https://github.com/NoelAbrahams)
* [:link:](dojo/dojo.d.ts) [Dojo](http://dojotoolkit.org) by [Michael Van Sickle](https://github.com/vansimke)
+* [:link:](dompurify/dompurify.d.ts) [DOM Purify](https://github.com/cure53/DOMPurify) by [Dave Taylor](http://davetayls.me)
* [:link:](domo/domo.d.ts) [Domo](http://domo-js.com) by [Steve Fenton](https://github.com/Steve-Fenton)
* [:link:](domready/domready.d.ts) [domready](https://github.com/ded/domready) by [Christian Holm Nielsen](https://github.com/dotnetnerd)
+* [:link:](donna/donna.d.ts) [donna](https://github.com/atom/donna) by [vvakame](https://github.com/vvakame)
* [:link:](dot/dot.d.ts) [doT](https://github.com/olado/doT) by [ZombieHunter](https://github.com/ZombieHunter)
* [:link:](dotdotdot/dotdotdot.d.ts) [dotdotdot](http://dotdotdot.frebsite.nl) by [Milan Jaros](https://github.com/milanjaros)
* [:link:](doublearray/doublearray.d.ts) [doublearray](https://github.com/takuyaa/doublearray) by [MIZUSHIMA Junki](https://github.com/mzsm)
* [:link:](drop/drop.d.ts) [Drop](http://github.hubspot.com/drop) by [Adi Dahiya](https://github.com/adidahiya)
* [:link:](dropboxjs/dropboxjs.d.ts) [dropbox-js](https://github.com/dropbox/dropbox-js) by [Steve Fenton](https://github.com/Steve-Fenton), [Pedro Casaubon](https://github.com/xperiments)
* [:link:](dropzone/dropzone.d.ts) [Dropzone](http://www.dropzonejs.com) by [Natan Vivo](https://github.com/nvivo)
+* [:link:](dsv/dsv.d.ts) [dsv](https://www.npmjs.com/package/dsv) by [Jason Swearingen](https://jasonswearingen.github.io)
* [:link:](dts-bundle/dts-bundle.d.ts) [dts-bundle](https://github.com/TypeStrong/dts-bundle) by [Asana](https://asana.com)
* [:link:](durandal/durandal.d.ts) [Durandal](http://durandaljs.com) by [Blue Spire](https://github.com/BlueSpire)
* [:link:](easeljs/easeljs.d.ts) [EaselJS](http://www.createjs.com/#!/EaselJS) by [Pedro Ferreira](https://bitbucket.org/drk4), [Chris Smith](https://github.com/evilangelist)
+* [:link:](easy-session/easy-session.d.ts) [easy-session](https://github.com/DeadAlready/node-easy-session) by [Karl Düüna](https://github.com/DeadAlready)
* [:link:](easy-table/easy-table.d.ts) [easy-table](https://github.com/eldargab/easy-table) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](easystarjs/easystarjs.d.ts) [EasyStar.js](http://easystarjs.com) by [Magnus Gustafsson](https://github.com/borundin)
* [:link:](ejs-locals/ejs-locals.d.ts) [ejs-locals](https://github.com/randometc/ejs-locals) by [jt000](https://github.com/jt000)
@@ -205,6 +220,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](expect.js/expect.js.d.ts) [expect.js](https://github.com/LearnBoost/expect.js) by [Teppei Sato](https://github.com/teppeis)
* [:link:](expectations/expectations.d.ts) [expectations.js](https://github.com/spmason/expectations) by [vvakame](https://github.com/vvakame)
* [:link:](express/express.d.ts) [Express 4.x](http://expressjs.com) by [Boris Yankov](https://github.com/borisyankov)
+* [:link:](express-debug/express-debug.d.ts) [express-debug](https://github.com/devoidfury/express-debug) by [Federico Bond](https://github.com/federicobond)
* [:link:](express-jwt/express-jwt.d.ts) [express-jwt](https://www.npmjs.org/package/express-jwt) by [Wonshik Kim](https://github.com/wokim)
* [:link:](express-myconnection/express-myconnection.d.ts) [express-myconnection](https://www.npmjs.org/package/express-myconnection) by [Michael Ferris](https://github.com/Cellule)
* [:link:](express-partials/express-partials.d.ts) [express-partials](https://github.com/publicclass/express-partials) by [jt000](https://github.com/jt000)
@@ -265,11 +281,12 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](google.analytics/ga.d.ts) [Google Analytics (Classic and Universal)](https://developers.google.com/analytics/devguides/collection/gajs) by [Ronnie Haakon Hegelund](http://ronniehegelund.blogspot.dk), [Pat Kujawa](http://patkujawa.com)
* [:link:](gapi/gapi.d.ts) [Google API Client](https://code.google.com/p/google-api-javascript-client) by [Frank M](https://github.com/sgtfrankieboy)
* [:link:](google.feeds/google.feed.api.d.ts) [Google Feed Apis](https://developers.google.com/feed) by [RodneyJT](https://github.com/RodneyJT)
-* [:link:](google.geolocation/google.geolocation.d.ts) [Google Geolocation](https://code.google.com/p/geo-location-javascript) by [Vincent Bortone](https://github.com/vbortone)
* [:link:](googlemaps/google.maps.d.ts) [Google Geolocation](https://developers.google.com/maps) by [Folia A/S](http://www.folia.dk)
+* [:link:](google.geolocation/google.geolocation.d.ts) [Google Geolocation](https://code.google.com/p/geo-location-javascript) by [Vincent Bortone](https://github.com/vbortone)
* [:link:](gapi.pagespeedonline/gapi.pagespeedonline.d.ts) [Google Page Speed Online Api](https://developers.google.com/speed/pagespeed) by [Frank M](https://github.com/sgtfrankieboy)
* [:link:](google.picker/google.picker.d.ts) [Google Picker API](https://developers.google.com/picker) by [grapswiz](https://github.com/grapswiz)
* [:link:](recaptcha/recaptcha.d.ts) [Google Recaptcha](https://www.google.com/recaptcha) by [Brent Jenkins](https://github.com/brentj73)
+* [:link:](grecaptcha/grecaptcha.d.ts) [Google Recaptcha v2](https://www.google.com/recaptcha) by [Kristof Mattei](http://kristofmattei.be)
* [:link:](gapi.translate/gapi.translate.d.ts) [Google Translate API](https://developers.google.com/translate) by [Frank M](https://github.com/sgtfrankieboy)
* [:link:](gapi.urlshortener/gapi.urlshortener.d.ts) [Google Url Shortener API](https://developers.google.com/url-shortener) by [Frank M](https://github.com/sgtfrankieboy)
* [:link:](google.visualization/google.visualization.d.ts) [Google Visualisation Apis](https://developers.google.com/chart) by [Dan Ludwig](https://github.com/danludwig)
@@ -279,9 +296,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](greensock/greensock.d.ts) [GreenSock Animation Platform](http://www.greensock.com/get-started-js) by [Robert S](https://github.com/codebelt)
* [:link:](gridfs-stream/gridfs-stream.d.ts) [gridfs-stream](https://github.com/aheckmann/gridfs-stream) by [Lior Mualem](https://github.com/liorm)
* [:link:](gruntjs/gruntjs.d.ts) [Grunt 0.4.x](http://gruntjs.com) by [Jeff May](https://github.com/jeffmay), [Basarat Ali Syed](https://github.com/basarat)
-* [:link:](gsap/TweenLite.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gsap/Ease.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gsap/Core.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
+* [:link:](gsap/TweenLite.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gulp/gulp.d.ts) [Gulp v3.8.x](http://gulpjs.com) by [Drew Noakes](https://drewnoakes.com)
* [:link:](gulp-autoprefixer/gulp-autoprefixer.d.ts) [gulp-autoprefixer](https://github.com/sindresorhus/gulp-autoprefixer) by [Asana](https://asana.com)
* [:link:](gulp-concat/gulp-concat.d.ts) [gulp-concat](http://github.com/wearefractal/gulp-concat) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
@@ -314,6 +331,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](highcharts/highcharts.d.ts) [Highcharts](http://www.highcharts.com) by [Damiano Gambarotto](http://github.com/damianog)
* [:link:](highland/highland.d.ts) [Highland](http://highlandjs.org) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](highlightjs/highlightjs.d.ts) [highlight.js](https://github.com/isagalaev/highlight.js) by [Niklas Mollenhauer](https://github.com/nikeee), [Jeremy Hull](https://github.com/sourrust)
+* [:link:](highcharts/highstock.d.ts) [Highstock](http://www.highcharts.com) by [David Deutsch](http://github.com/DavidKDeutsch)
* [:link:](history/history.d.ts) [History.js](https://github.com/browserstate/history.js) by [Boris Yankov](https://github.com/borisyankov), [Gidon Junge](https://github.com/gjunge)
* [:link:](howlerjs/howler.d.ts) [howler.js](https://github.com/goldfire/howler.js) by [Pedro Casaubon](https://github.com/xperiments)
* [:link:](touch-events/touch-events.d.ts) [HTML Touch Events](http://www.w3.org/TR/touch-events) by [Kevin Barabash](https://github.com/kevinb7)
@@ -322,6 +340,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](http-status/http-status.d.ts) [http-status](https://github.com/wdavidw/node-http-status) by [Michael Zabka](https://github.com/misak113)
* [:link:](http-string-parser/http-string-parser.d.ts) [http-string-parser](https://github.com/apiaryio/http-string-parser) by [MIZUNE Pine](https://github.com/pine613)
* [:link:](humane/humane.d.ts) [Humane](http://wavded.github.com/humane-js) by [jmvrbanac](https://github.com/jmvrbanac)
+* [:link:](hypertext-application-language/hypertext-application-language.d.ts) [Hypertext Application Language Draft 6](https://tools.ietf.org/html/draft-kelly-json-hal-06) by [Maks3w](https://github.com/maks3w)
* [:link:](i18n-node/i18n-node.d.ts) [i18n-node](https://github.com/mashpie/i18n-node) by [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](i18next/i18next.d.ts) [i18next](http://i18next.com) by [Maarten Docter](https://github.com/mdocter)
* [:link:](iban/iban.d.ts) [iban.js](https://github.com/arhs/iban.js) by [Cyril Schumacher](https://github.com/cyrilschumacher)
@@ -335,6 +354,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](insight/insight.d.ts) [insight](https://github.com/yeoman/insight) by [vvakame](http://github.com/vvakame)
* [:link:](interactjs/interact.d.ts) [Interacting for interact.js](https://github.com/taye/interact.js) by [Douglas Eichelberger](https://github.com/dduugg), [Adi Dahiya](https://github.com/adidahiya)
* [:link:](intercomjs/intercom.d.ts) [intercom.js](https://github.com/diy/intercom.js) by [spencerwi](http://github.com/spencerwi)
+* [:link:](inversify/inversify.d.ts) [inversify](https://github.com/inversify/InversifyJS) by [inversify](https://github.com/inversify)
* [:link:](cordova-ionic/cordova-ionic.d.ts) [Ionic Cordova plugins](https://github.com/driftyco) by [Hendrik Maus](https://github.com/hendrikmaus)
* [:link:](is_js/is_js.d.ts) [is.js](http://arasatasaygin.github.io/is.js) by [Rodrigo Cabral](https://github.com/cabralRodrigo)
* [:link:](iscroll/iscroll.d.ts) [iScroll](http://cubiq.org/iscroll-4) by [Boris Yankov](https://github.com/borisyankov), [Christiaan Rakowski](https://github.com/csrakowski)
@@ -351,6 +371,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](jasmine-matchers/jasmine-matchers.d.ts) [jasmine-matchers](https://github.com/uxebu/jasmine-matchers) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](java-applet/java-applet.d.ts) [Java Applet](https://www.java.com) by [Cyril Schumacher](https://github.com/cyrilschumacher)
* [:link:](hooker/hooker.d.ts) [JavaScript Hooker](https://github.com/cowboy/javascript-hooker) by [Michael Zabka](https://github.com/misak113)
+* [:link:](oauth.js/oauth.js.d.ts) [JavaScript software for implementing an OAuth consumer](https://code.google.com/p/oauth) by [NOBUOKA Yu](https://github.com/nobuoka)
* [:link:](jbinary/jbinary.d.ts) [jBinary](https://github.com/jDataView/jBinary) by [Tim Bureck](https://github.com/tbureck)
* [:link:](jdataview/jdataview.d.ts) [jDataView](https://github.com/jDataView/jDataView) by [Ingvar Stepanyan](https://github.com/RReverser)
* [:link:](jest/jest.d.ts) [Jest](http://facebook.github.io/jest) by [Asana](https://asana.com)
@@ -407,6 +428,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](jquery.gridster/gridster.d.ts) [jQuery.gridster](https://github.com/jbaldwin/gridster) by [Josh Baldwin](https://github.com/jbaldwin)
* [:link:](jquery.jnotify/jquery.jnotify.d.ts) [jQuery.jNotify](http://jnotify.codeplex.com) by [James Curran](https://github.com/jamescurran)
* [:link:](jquery.jsignature/jquery.jsignature.d.ts) [jQuery.jsignature v2](https://github.com/willowsystems/jSignature) by [Patrick Magee](https://github.com/pjmagee)
+* [:link:](jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts) [jquery.jsonrpc](https://github.com/Textalk/jquery.jsonrpcclient.js) by [Maksim Karelov](https://github.com/Ty3uK)
* [:link:](jquery.noty/jquery.noty.d.ts) [jQuery.noty](http://needim.github.io/noty) by [Aaron King](https://github.com/kingdango)
* [:link:](jquery.payment/jquery.payment.d.ts) [jQuery.payment](https://github.com/stripe/jquery.payment) by [Eric J. Smith](https://github.com/ejsmith)
* [:link:](jquery.pjax.falsandtru/jquery.pjax.d.ts) [jquery.pjax.ts by falsandtru](https://github.com/falsandtru/jquery.pjax.js) by [新ゝ月 NewNotMoon](http://new.not-moon.net)
@@ -442,8 +464,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](hashset/hashset.d.ts) [jshashset](http://www.timdown.co.uk/jshashtable/jshashset.html) by [Sergey Gerasimov](https://github.com/gerich-home)
* [:link:](hashtable/hashtable.d.ts) [jshashtable](http://www.timdown.co.uk/jshashtable) by [Sergey Gerasimov](https://github.com/gerich-home)
* [:link:](jsnox/jsnox.d.ts) [JSnoX](https://github.com/af/jsnox) by [Steve Baker](https://github.com/stkb)
+* [:link:](json-patch/json-patch.d.ts) [json-patch](https://github.com/bruth/jsonpatch-js) by [vvakame](https://github.com/vvakame)
* [:link:](json-pointer/json-pointer.d.ts) [json-pointer 1.0 l](https://www.npmjs.org/package/json-pointer) by [Bart van der Schoor](https://github.com/Bartvds)
+* [:link:](json5/json5.d.ts) [JSON5](http://json5.org) by [Jason Swearingen](https://jasonswearingen.github.io)
* [:link:](jsoneditoronline/jsoneditoronline.d.ts) [JSONEditorOnline](https://github.com/josdejong/jsoneditoronline) by [Vincent Bortone](https://github.com/vbortone)
+* [:link:](jsonpath/jsonpath.d.ts) [jsonpath](https://www.npmjs.org/package/jsonpath) by [Hiroki Horiuchi](https://github.com/horiuchi)
* [:link:](JSONStream/JSONStream.d.ts) [JSONStream](http://github.com/dominictarr/JSONStream) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](jsonwebtoken/jsonwebtoken.d.ts) [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) by [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](jsplumb/jquery.jsPlumb.d.ts) [jsPlumb 1.3.16 jQuery adapter](http://jsplumb.org) by [Steve Shearn](https://github.com/shearnie)
@@ -488,7 +513,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](leaflet-label/leaflet-label.d.ts) [Leaflet.label](https://github.com/Leaflet/Leaflet.label) by [Wim Looman](https://github.com/Nemo157)
* [:link:](jquery.leanModal/jquery.leanModal.d.ts) [leanModal.js](http://leanmodal.finelysliced.com.au) by [FinelySliced](https://github.com/FinelySliced)
* [:link:](leapmotionTS/LeapMotionTS.d.ts) [Leap Motion TS](https://github.com/logotype/LeapMotionTS) by [Victor Norgren](https://github.com/logotype)
-* [:link:](less/less.d.ts) [LESS](http://lesscss.org) by [AndrewGaspar](https://github.com/AndrewGaspar)
+* [:link:](less/less.d.ts) [LESS](http://lesscss.org) by [Tom Hasner](https://github.com/thasner)
+* [:link:](less-middleware/less-middleware.d.ts) [less-middleware](https://github.com/emberfeather/less.js-middleware) by [Federico Bond](https://github.com/federicobond)
* [:link:](levelup/levelup.d.ts) [LevelUp](https://github.com/rvagg/node-levelup) by [Bret Little](https://github.com/blittle)
* [:link:](libxmljs/libxmljs.d.ts) [Libxmljs](https://github.com/polotek/libxmljs) by [François de Campredon](https://github.com/fdecampredon)
* [:link:](dustjs-linkedin/dustjs-linkedin.d.ts) [linkedin dustjs](https://github.com/linkedin/dustjs) by [Marcelo Dezem](http://github.com/mdezem)
@@ -504,11 +530,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](logrotate-stream/logrotate-stream.d.ts) [logrotate-stream](https://github.com/dstokes/logrotate-stream) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](lolex/lolex.d.ts) [lolex](https://github.com/sinonjs/lolex) by [Wim Looman](https://github.com/Nemo157)
* [:link:](long/long.d.ts) [Long.js](https://github.com/dcodeIO/Long.js) by [Toshihide Hara](https://github.com/kerug)
+* [:link:](lory.js/lory.js.d.ts) [lory](https://github.com/meandmax/lory) by [kubosho](https://github.com/kubosho)
* [:link:](lru-cache/lru-cache.d.ts) [lru-cache](https://github.com/isaacs/node-lru-cache) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](lscache/lscache.d.ts) [lscache](https://github.com/pamelafox/lscache) by [Chris Martinez](https://github.com/Chris-Martinezz)
* [:link:](lunr/lunr.d.ts) [lunr.js](https://github.com/olivernn/lunr.js) by [Sebastian Lenz](https://github.com/sebastian-lenz)
* [:link:](lz-string/lz-string.d.ts) [lz-string](https://github.com/pieroxy/lz-string) by [Roman Nikitin](https://github.com/M0ns1gn0r)
+* [:link:](mailcheck/mailcheck.d.ts) [Mailcheck](https://github.com/mailcheck/mailcheck) by [Paulo Cesar](http://github.com/pocesar)
* [:link:](main-bower-files/main-bower-files.d.ts) [main-bower-files](https://github.com/ck86/main-bower-files) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
+* [:link:](mandrill-api/mandrill-api.d.ts) [Mandrill API 1.x](http://mandrill.com) by [Paulo Cesar](https://github.com/pocesar)
* [:link:](mapbox/mapbox.d.ts) [Mapbox](https://www.mapbox.com/mapbox.js) by [Maxime Fabre](https://github.com/anahkiasen)
* [:link:](mapsjs/mapsjs.d.ts) [Mapsjs](https://github.com/mapsjs) by [Matthew James Davis](https://github.com/davismj)
* [:link:](mariasql/mariasql.d.ts) [mariasql](https://github.com/mscdex/node-mariasql) by [MichaelBennett](https://github.com/bennett000)
@@ -524,7 +553,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](meteor/meteor.d.ts) [Meteor](http://www.meteor.com) by [Dave Allen](https://github.com/fullflavedave)
* [:link:](method-override/method-override.d.ts) [method-override](https://github.com/expressjs/method-override) by [Santi Albo](https://github.com/santialbo)
* [:link:](microsoft-ajax/microsoft.ajax.d.ts) [Microsoft ASP.NET Ajax client side library](http://msdn.microsoft.com/en-us/library/ee341002(v=vs.100).aspx) by [Patrick Magee](https://github.com/pjmagee)
+* [:link:](xrm/xrm.d.ts) [Microsoft Dynamics xRM API](http://www.microsoft.com/en-us/download/details.aspx?id=44567) by [David Berry](https://github.com/6ix4our), [Matt Ngan](https://github.com/mattngan)
+* [:link:](xrm/xrm-6.d.ts) [Microsoft Dynamics xRM API v6](http://msdn.microsoft.com/en-us/library/gg328255.aspx) by [David Berry](https://github.com/6ix4our)
+* [:link:](xrm/clientglobalcontext.d.ts) [Microsoft Dynamics xRM ClientGlobalContext.js.aspx](http://msdn.microsoft.com/en-us/library/gg328255.aspx) by [David Berry](https://github.com/6ix4our)
* [:link:](microsoft-live-connect/microsoft-live-connect.d.ts) [Microsoft Live Connect](http://msdn.microsoft.com/en-us/library/live/hh243643.aspx) by [John Vilk](https://github.com/jvilk)
+* [:link:](xrm/parature.d.ts) [Microsoft Parature extentions to Xrm.Page - available for CRM Online Only](http://msdn.microsoft.com/en-us/library/gg328255.aspx) by [David Berry](https://github.com/6ix4our)
* [:link:](azure-mobile-services-client/AzureMobileServicesClient.d.ts) [Microsoft Windows AzureMobile Service](http://www.windowsazure.com/en-us/develop/mobile) by [Morosinotto Daniele](https://github.com/dmorosinotto)
* [:link:](bingmaps/Microsoft.Maps.d.ts) [Microsoft.Maps](http://msdn.microsoft.com/en-us/library/gg427611.aspx) by [Eric Todd](https://github.com/ericrtodd)
* [:link:](bingmaps/Microsoft.Maps.AdvancedShapes.d.ts) [Microsoft.Maps.AdvancedShapes](http://msdn.microsoft.com/en-us/library/hh921952.aspx) by [Eric Todd](https://github.com/ericrtodd)
@@ -557,7 +590,6 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](mousetrap/mousetrap.d.ts) [Mousetrap](http://craig.is/killing/mice) by [Dániel Tar](https://github.com/qcz)
* [:link:](mousetrap/mousetrap-global-bind.d.ts) [Mousetrap 1.4.6's global-bind extension](http://craig.is/killing/mice#extensions.global) by [Andrew Bradley](https://github.com/cspotcode)
* [:link:](moviedb/moviedb.d.ts) [MovieDB](https://github.com/danzajdband/moviedb) by [Basarat Ali Syed](https://github.com/basarat)
-* [:link:](mozilla-spidermonkey-parser-api/mozilla-spidermonkey-parser-api.d.ts) [Mozilla SpiderMonkey Parser API](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Parser_API) by [vvakame](https://github.com/vvakame)
* [:link:](firefox/firefox.d.ts) [Mozilla Web API](https://developer.mozilla.org/en-US/docs/Web/API) by [vvakame](https://github.com/vvakame)
* [:link:](localForage/localForage.d.ts) [Mozilla's localForage](https://github.com/mozilla/localforage) by [david pichsenmeister](https://github.com/3x14159265)
* [:link:](msgpack/msgpack.d.ts) [msgpack.js - MessagePack JavaScript Implementation](https://github.com/uupaa/msgpack.js) by [Shinya Mochizuki](https://github.com/enrapt-mochizuki)
@@ -598,23 +630,24 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](xml2js/xml2js.d.ts) [node-xml2js](https://github.com/Leonidas-from-XIV/node-xml2js) by [Michel Salib](https://github.com/michelsalib), [Jason McNeil](https://github.com/jasonrm)
* [:link:](node/node.d.ts) [Node.js](http://nodejs.org) by [Microsoft TypeScript](http://typescriptlang.org), [DefinitelyTyped](https://github.com/borisyankov/DefinitelyTyped)
* [:link:](restify/restify.d.ts) [node.js REST framework](https://github.com/mcavage/node-restify) by [Bret Little](https://github.com/blittle)
-* [:link:](acl/acl.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo)
* [:link:](acl/acl-mongodbBackend.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo)
* [:link:](acl/acl-redisBackend.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo)
+* [:link:](acl/acl.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo)
* [:link:](mdns/mdns.d.ts) [node_mdns](https://github.com/agnat/node_mdns) by [Stefan Steinhart](https://github.com/reppners)
* [:link:](node_redis/node_redis.d.ts) [node_redis](https://github.com/mranney/node_redis) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](each/each.d.ts) [NodeEach](http://www.adaltas.com/projects/node-each) by [Michael Zabka](https://github.com/misak113)
+* [:link:](nodemailer/nodemailer-types.d.ts) [Nodemailer](https://github.com/andris9/Nodemailer) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](nodemailer/nodemailer.d.ts) [Nodemailer](https://github.com/andris9/Nodemailer) by [Rogier Schouten](https://github.com/rogierschouten)
-* [:link:](nodemailer-direct-transport/nodemailer-direct-transport.d.ts) [Nodemailer](https://github.com/andris9/nodemailer-direct-transport) by [Rogier Schouten](https://github.com/rogierschouten)
-* [:link:](nodemailer-smtp-transport/nodemailer-smtp-transport.d.ts) [Nodemailer](https://github.com/andris9/nodemailer-smptp-transport) by [Rogier Schouten](https://github.com/rogierschouten)
-* [:link:](nodemailer-smtp-pool/nodemailer-smtp-pool.d.ts) [Nodemailer](https://github.com/andris9/nodemailer-smtp-pool) by [Rogier Schouten](https://github.com/rogierschouten)
+* [:link:](nodemailer-direct-transport/nodemailer-direct-transport.d.ts) [nodemailer-direct-transport](https://github.com/andris9/nodemailer-direct-transport) by [Rogier Schouten](https://github.com/rogierschouten)
+* [:link:](nodemailer-smtp-pool/nodemailer-smtp-pool.d.ts) [nodemailer-smtp-pool](https://github.com/andris9/nodemailer-smtp-pool) by [Rogier Schouten](https://github.com/rogierschouten)
+* [:link:](nodemailer-smtp-transport/nodemailer-smtp-transport.d.ts) [nodemailer-smtp-transport](https://github.com/andris9/nodemailer-smtp-transport) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](nodeunit/nodeunit.d.ts) [nodeunit](https://github.com/caolan/nodeunit) by [Jeff Goddard](https://github.com/jedigo)
* [:link:](nomnom/nomnom.d.ts) [nomnom](https://github.com/harthur/nomnom) by [Paul Vick](https://github.com/panopticoncentral)
* [:link:](nopt/nopt.d.ts) [nopt](https://github.com/npm/nopt) by [jbondc](https://github.com/jbondc)
-* [:link:](notifyjs/notifyjs.d.ts) [notify.js](https://github.com/alexgibson/notify.js) by [soundTricker](https://github.com/soundTricker)
* [:link:](notify/notify.d.ts) [Notify.js](https://github.com/jpillora/notifyjs) by [Xiaohan Zhang](https://github.com/hellochar)
-* [:link:](wnumb/wnumb.d.ts) [nouislider](https://github.com/leongersen/wnumb) by [Corey Jepperson](https://github.com/acoreyj)
+* [:link:](notifyjs/notifyjs.d.ts) [notify.js](https://github.com/alexgibson/notify.js) by [soundTricker](https://github.com/soundTricker)
* [:link:](nouislider/nouislider.d.ts) [nouislider](https://github.com/leongersen/noUiSlider) by [Corey Jepperson](https://github.com/acoreyj)
+* [:link:](wnumb/wnumb.d.ts) [nouislider](https://github.com/leongersen/wnumb) by [Corey Jepperson](https://github.com/acoreyj)
* [:link:](noVNC/noVNC.d.ts) [noVNC](https://github.com/kanaka/noVNC) by [Ken Smith](https://github.com/smithkl42)
* [:link:](npm/npm.d.ts) [npm](https://github.com/npm/npm) by [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](nprogress/NProgress.d.ts) [NProgress](https://github.com/rstacruz/nprogress) by [Judah Gabriel Himango](http://debuggerdotbreak.wordpress.com)
@@ -661,10 +694,10 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](poly2tri/poly2tri.d.ts) [poly2tri](http://github.com/r3mi/poly2tri.js) by [Elemar Junior](https://github.com/elemarjr)
* [:link:](polymer/polymer.d.ts) [polymer](https://github.com/polymer) by [Louis Grignon](https://github.com/lgrignon)
* [:link:](polymer/polymer.paper-dialog.d.ts) [polymer's paper-dialog](https://github.com/Polymer/paper-dialog) by [Louis Grignon](https://github.com/lgrignon)
-* [:link:](polymer/polymer.core-overlay.d.ts) [polymer's paper-toast](https://github.com/Polymer/core-selector) by [Louis Grignon](https://github.com/lgrignon)
-* [:link:](polymer/polymer.paper-toast.d.ts) [polymer's paper-toast](https://github.com/Polymer/paper-toast) by [Louis Grignon](https://github.com/lgrignon)
* [:link:](polymer/polymer.core-drawer-panel.d.ts) [polymer's paper-toast](https://github.com/Polymer/core-drawer-panel) by [Louis Grignon](https://github.com/lgrignon)
+* [:link:](polymer/polymer.core-overlay.d.ts) [polymer's paper-toast](https://github.com/Polymer/core-selector) by [Louis Grignon](https://github.com/lgrignon)
* [:link:](polymer/polymer.core-selector.d.ts) [polymer's paper-toast](https://github.com/Polymer/core-selector) by [Louis Grignon](https://github.com/lgrignon)
+* [:link:](polymer/polymer.paper-toast.d.ts) [polymer's paper-toast](https://github.com/Polymer/paper-toast) by [Louis Grignon](https://github.com/lgrignon)
* [:link:](popcorn/popcorn.d.ts) [Popcorn](https://github.com/mozilla/popcorn-js) by [grapswiz](https://github.com/grapswiz)
* [:link:](pouchDB/pouch.d.ts) [Pouch](http://pouchdb.com) by [Bill Sears](https://github.com/MrBigDog2U)
* [:link:](power-assert/power-assert.d.ts) [power-assert](https://github.com/twada/power-assert) by [vvakame](https://github.com/vvakame)
@@ -731,6 +764,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](sammyjs/sammyjs.d.ts) [Sammy.js](http://sammyjs.org) by [Boris Yankov](https://github.com/borisyankov), [Oisin Grehan](https://github.com/oising)
* [:link:](sanitize-filename/sanitize-filename.d.ts) [sanitize-filename](https://github.com/parshap/node-sanitize-filename) by [Wim Looman](https://github.com/Nemo157)
* [:link:](sanitize-html/sanitize-html.d.ts) [sanitize-html](https://github.com/punkave/sanitize-html) by [Rogier Schouten](https://github.com/rogierschouten)
+* [:link:](sanitizer/sanitizer.d.ts) [Sanitizer](https://github.com/theSmaw/Caja-HTML-Sanitizer) by [Dave Taylor](http://davetayls.me)
* [:link:](sax/sax.d.ts) [sax js](https://github.com/isaacs/sax-js) by [Asana](https://asana.com)
* [:link:](screenfull/screenfull.d.ts) [screenfull.js](https://github.com/sindresorhus/screenfull.js) by [Ilia Choly](http://github.com/icholy)
* [:link:](select2/select2.d.ts) [Select2](http://ivaynberg.github.com/select2) by [Boris Yankov](https://github.com/borisyankov)
@@ -774,6 +808,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](spectrum/spectrum.d.ts) [spectrum](https://github.com/bgrins/spectrum) by [Mordechai Zuber](https://github.com/M-Zuber)
* [:link:](spin/spin.d.ts) [Spin.js](http://fgnass.github.com/spin.js) by [Boris Yankov](https://github.com/borisyankov), [Theodore Brown](https://github.com/theodorejb)
* [:link:](split/split.d.ts) [split](https://github.com/dominictarr/split) by [Marcin Porębski](https://github.com/marcinporebski)
+* [:link:](sprintf-js/sprintf-js.d.ts) [sprintf-js](https://www.npmjs.com/package/sprintf-js) by [Jason Swearingen](https://jasonswearingen.github.io)
* [:link:](sprintf/sprintf.d.ts) [sprintff](https://github.com/maritz/node-sprintff) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](sharepoint/SharePoint.d.ts) [sptypescript](http://sptypescript.codeplex.com) by [Stanislav Vyshchepan](http://gandjustas.blogspot.ru), [Andrey Markeev](http://markeev.com)
* [:link:](sqlite3/sqlite3.d.ts) [sqlite3](https://github.com/mapbox/node-sqlite3) by [Nick Malaguti](https://github.com/nmalaguti)
@@ -786,6 +821,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](stream-series/stream-series.d.ts) [stream-series](https://github.com/rschmukler/stream-series) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](stream-to-array/stream-to-array.d.ts) [stream-to-array](https://github.com/stream-utils/stream-to-array) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](stripe/stripe.d.ts) [stripe](https://stripe.com) by [Eric J. Smith](https://github.com/ejsmith)
+* [:link:](stripe/stripe-node.d.ts) [stripe-node](https://github.com/stripe/stripe-node) by [William Johnston](https://github.com/wjohnsto)
+* [:link:](strophe/strophe.d.ts) [Strophe.js](http://strophe.im/strophejs) by [David Deutsch](https://github.com/DavidKDeutsch)
* [:link:](stylus/stylus.d.ts) [stylus](https://github.com/LearnBoost/stylus) by [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](sugar/sugar.d.ts) [Sugar](http://sugarjs.com) by [Josh Baldwin](https://github.com/jbaldwin)
* [:link:](superagent/superagent.d.ts) [SuperAgent](https://github.com/visionmedia/superagent) by [Alex Varju](https://github.com/varju)
@@ -795,6 +832,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](svg2png/svg2png.d.ts) [svg2png node package](https://github.com/domenic/svg2png) by [hans windhoff](https://github.com/hansrwindhoff)
* [:link:](svgjs.draggable/svgjs.draggable.d.ts) [svgjs.draggable](http://www.svgjs.com) by [Luigi Trabacchin](https://github.com/LiFeleSs)
* [:link:](swag/swag.d.ts) [swag](https://github.com/elving/swag) by [Shogo Iwano](https://github.com/shiwano)
+* [:link:](sweetalert/sweetalert.d.ts) [SweetAlert](https://github.com/t4t5/sweetalert) by [Markus Peloso](https://github.com/ToastHawaii)
* [:link:](swfobject/swfobject.d.ts) [swfobject](https://code.google.com/p/swfobject) by [rou](https://github.com/rou)
* [:link:](swig/swig.d.ts) [swig](http://github.com/paularmstrong/swig) by [Peter Harris](https://github.com/CodeAnimal), [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](swiper/swiper.d.ts) [Swiper](https://github.com/nolimits4web/Swiper) by [Sebastián Galiano](https://github.com/sgaliano)
@@ -842,6 +880,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](twitter/twitter.d.ts) [Twitter for Websites](https://dev.twitter.com/web) by [Chitoku](https://github.com/chitoku-k)
* [:link:](jquery.bootstrap.wizard/jquery.bootstrap.wizard.d.ts) [twitter-bootstrap-wizard](https://github.com/VinceG/twitter-bootstrap-wizard) by [Blake Niemyjski](https://github.com/niemyjski)
* [:link:](type-detect/type-detect.d.ts) [type-detect](https://github.com/chaijs/type-detect) by [Bart van der Schoor](https://github.com/Bartvds)
+* [:link:](type-name/type-name.d.ts) [type-name](https://github.com/twada/type-name) by [OKUNOKENTARO](https://github.com/armorik83)
* [:link:](typeahead/typeahead.d.ts) [typeahead.js](http://twitter.github.io/typeahead.js) by [Ivaylo Gochkov](https://github.com/igochkov), [Gidon Junge](https://github.com/gjunge)
* [:link:](typescript/typescript.d.ts) [TypeScript API](http://www.typescriptlang.org) by [Microsoft TypeScript](http://typescriptlang.org)
* [:link:](typescript-deferred/typescript-deferred.d.ts) [typescript-deferred](https://github.com/DirtyHairy/typescript-deferred) by [Christian Speckner](https://github.com/DirtyHairy)
@@ -850,6 +889,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](underscore/underscore.d.ts) [Underscore](http://underscorejs.org) by [Boris Yankov](https://github.com/borisyankov), [Josh Baldwin](https://github.com/jbaldwin)
* [:link:](underscore-ko/underscore-ko.d.ts) [Underscore-ko 1.2.2 with underscore](https://github.com/kamranayub/UnderscoreKO) by [Maurits Elbers](https://github.com/MagicMau)
* [:link:](underscore.string/underscore.string.d.ts) [underscore.string](https://github.com/epeli/underscore.string) by [Ry Racherbaumer](http://github.com/rygine)
+* [:link:](uniq/uniq.d.ts) [uniq](https://www.npmjs.com/package/uniq) by [Hans Windhoff](https://github.com/hansrwindhoff)
* [:link:](universal-analytics/universal-analytics.d.ts) [universal-analytics](https://github.com/peaksandpies/universal-analytics) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](update-notifier/update-notifier.d.ts) [update-notifier](https://github.com/yeoman/update-notifier) by [vvakame](https://github.com/vvakame)
* [:link:](uri-templates/uri-templates.d.ts) [uri-templates](https://github.com/geraintluff/uri-templates) by [Bart van der Schoor](https://github.com/Bartvds)
@@ -880,6 +920,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](webix/webix.d.ts) [Webix UI](http://webix.com) by [Maksim Kozhukh](http://github.com/mkozhukh)
* [:link:](webrtc/MediaStream.d.ts) [WebRTC](http://dev.w3.org/2011/webrtc) by [Ken Smith](https://github.com/smithkl42)
* [:link:](websocket/websocket.d.ts) [websocket](https://github.com/Worlize/WebSocket-Node) by [Paul Loyd](https://github.com/loyd)
+* [:link:](websql/websql.d.ts) [websql](http://www.w3.org/TR/webdatabase) by [TeamworkGuy2](https://github.com/TeamworkGuy2)
* [:link:](when/when.d.ts) [When](https://github.com/cujojs/when) by [Derek Cicerone](https://github.com/derekcicerone), [Wim Looman](https://github.com/Nemo157)
* [:link:](which/which.d.ts) [which](https://github.com/isaacs/node-which) by [vvakame](https://github.com/vvakame)
* [:link:](jquery.window/jquery.window.d.ts) [Window plugin for jQuery](http://fstoke.me/jquery/window) by [Ryan Graham](https://github.com/ryan-codingintrigue)
@@ -896,6 +937,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](xpath/xpath.d.ts) [xpath](https://github.com/goto100/xpath) by [Andrew Bradley](https://github.com/cspotcode)
* [:link:](xregexp/xregexp.d.ts) [XRegExp](http://xregexp.com) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](xsockets/XSockets.d.ts) [XSockets.NET](http://xsockets.net) by [Jeffery Grajkowski](https://github.com/pushplay)
+* [:link:](xss-filters/xss-filters.d.ts) [Yahoo XSS Filters](https://github.com/yahoo/xss-filters) by [Dave Taylor](http://davetayls.me)
* [:link:](yamljs/yamljs.d.ts) [yamljs](https://github.com/jeremyfa/yaml.js) by [Tim Jonischkat](http://www.tim-jonischkat.de)
* [:link:](yargs/yargs.d.ts) [yargs](https://github.com/chevex/yargs) by [Martin Poelstra](https://github.com/poelstra)
* [:link:](yeoman-generator/yeoman-generator.d.ts) [yeoman-generator](https://github.com/yeoman/generator) by [Kentaro Okuno](http://github.com/armorik83)
diff --git a/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts b/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts
index 608591b581..c9883f86e0 100644
--- a/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts
+++ b/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts
@@ -131,6 +131,7 @@ testApp.controller('TestCtrl', (
var modalInstance = $modal.open({
backdrop: 'static',
controller: 'ModalTestCtrl',
+ controllerAs: 'vm',
keyboard: true,
resolve: {
items: ()=> {
diff --git a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts
index d7e65c77ca..c3675e7a98 100644
--- a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts
+++ b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts
@@ -229,7 +229,7 @@ declare module angular.ui.bootstrap {
* a scope instance to be used for the modal's content (actually the $modal service is going to create a child scope of a provided scope).
* Defaults to `$rootScope`.
*/
- scope?: IModalScope;
+ scope?: angular.IScope|IModalScope;
/**
* a controller for a modal instance - it can initialize scope used by modal.
@@ -237,6 +237,12 @@ declare module angular.ui.bootstrap {
*/
controller?: any;
+ /**
+ * an alternative to the controller-as syntax, matching the API of directive definitions.
+ * Requires the controller option to be provided as well
+ */
+ controllerAs?: string;
+
/**
* members that will be resolved and passed to the controller as locals; it is equivalent of the `resolve` property for AngularJS routes
*/
diff --git a/angular-wizard/angular-wizard-tests.ts b/angular-wizard/angular-wizard-tests.ts
new file mode 100644
index 0000000000..61ad7a4843
--- /dev/null
+++ b/angular-wizard/angular-wizard-tests.ts
@@ -0,0 +1,218 @@
+///
+///
+
+///
+
+// test file taken from https://github.com/mgonto/angular-wizard
+
+
+interface WizardScope extends ng.IScope {
+ referenceCurrentStep:string;
+ stepValidation:()=>void;
+ finishedWizard:()=>void;
+ enterValidation:()=>void;
+}
+
+describe('AngularWizard', function () {
+ var $compile:ng.ICompileService,
+ $rootScope:ng.IRootScopeService, WizardHandler:angular.mgoAngularWizard.WizardHandler, scope:WizardScope;
+
+ /**
+ * Create the view with wizard to test
+ * @param {Scope} scope A scope to bind to
+ * @return {[DOM element]} A DOM element compiled
+ */
+ function createView(scope:WizardScope) {
+ scope.referenceCurrentStep = null;
+ var element = angular.element(''
+ + ' '
+ + '
This is the first step
'
+ + '
Here you can use whatever you want. You can use other directives, binding, etc.
'
+ + ' '
+ + ' '
+ + ' '
+ + '
Continuing
'
+ + '
You have continued here!
'
+ + ' '
+ + ' '
+ + ' '
+ + '
Even more steps!!
'
+ + ' '
+ + ' '
+ + '');
+ var elementCompiled = $compile(element)(scope);
+ $rootScope.$digest();
+ return elementCompiled;
+ }
+
+ it("should correctly create the wizard", function () {
+ var view = createView(scope);
+ expect(WizardHandler).toBeTruthy();
+ expect(view.find('section').length).toEqual(3);
+ // expect the correct step to be desirable one
+ expect(scope.referenceCurrentStep).toEqual('Starting');
+ });
+
+ it("should go to the next step", function () {
+ var view = createView(scope);
+ expect(scope.referenceCurrentStep).toEqual('Starting');
+ WizardHandler.wizard().next();
+ $rootScope.$digest();
+ expect(scope.referenceCurrentStep).toEqual('Continuing');
+ });
+ it("should return to a previous step", function () {
+
+ var view = createView(scope);
+ expect(scope.referenceCurrentStep).toEqual('Starting');
+ WizardHandler.wizard().next();
+ $rootScope.$digest();
+ expect(scope.referenceCurrentStep).toEqual('Continuing');
+ WizardHandler.wizard().previous();
+ $rootScope.$digest();
+ expect(scope.referenceCurrentStep).toEqual('Starting');
+ });
+ it("should go to a step specified by name", function () {
+
+ var view = createView(scope);
+ expect(scope.referenceCurrentStep).toEqual('Starting');
+ WizardHandler.wizard().goTo('More steps');
+ $rootScope.$digest();
+ expect(scope.referenceCurrentStep).toEqual('More steps');
+ });
+ it("should go to a step specified by index", function () {
+
+ var view = createView(scope);
+ expect(scope.referenceCurrentStep).toEqual('Starting');
+ WizardHandler.wizard().goTo(2);
+ $rootScope.$digest();
+ expect(scope.referenceCurrentStep).toEqual('More steps');
+ });
+ it("should go to next step becasue callback is truthy", function () {
+
+ var view = createView(scope);
+ expect(scope.referenceCurrentStep).toEqual('Starting');
+ WizardHandler.wizard().next(function () {
+ return true
+ });
+ $rootScope.$digest();
+ expect(scope.referenceCurrentStep).toEqual('Continuing');
+ });
+ it("should NOT go to next step because callback is falsey", function () {
+
+ var view = createView(scope);
+ expect(scope.referenceCurrentStep).toEqual('Starting');
+ WizardHandler.wizard().next(function () {
+ return false
+ });
+ $rootScope.$digest();
+ expect(scope.referenceCurrentStep).toEqual('Starting');
+ });
+ it("should go to next step because CANEXIT is UNDEFINED", function () {
+
+ var view = createView(scope);
+ expect(scope.referenceCurrentStep).toEqual('Starting');
+ WizardHandler.wizard().next();
+ $rootScope.$digest();
+ expect(scope.referenceCurrentStep).toEqual('Continuing');
+ });
+ it("should go to next step because CANEXIT is TRUE", function () {
+
+ var view = createView(scope);
+ scope.stepValidation = function () {
+ return true;
+ };
+ expect(scope.referenceCurrentStep).toEqual('Starting');
+ WizardHandler.wizard().next();
+ $rootScope.$digest();
+ expect(scope.referenceCurrentStep).toEqual('Continuing');
+ WizardHandler.wizard().next();
+ $rootScope.$digest();
+ expect(scope.referenceCurrentStep).toEqual('More steps');
+ });
+ it("should NOT go to next step because CANEXIT is FALSE", function () {
+
+ var view = createView(scope);
+ scope.stepValidation = function () {
+ return false;
+ };
+ expect(scope.referenceCurrentStep).toEqual('Starting');
+ WizardHandler.wizard().next();
+ $rootScope.$digest();
+ expect(scope.referenceCurrentStep).toEqual('Continuing');
+ WizardHandler.wizard().next();
+ $rootScope.$digest();
+ expect(scope.referenceCurrentStep).toEqual('Continuing');
+ });
+ it("should go to next step because CANENTER is TRUE", function () {
+
+ var view = createView(scope);
+ scope.enterValidation = function () {
+ return true;
+ };
+ expect(scope.referenceCurrentStep).toEqual('Starting');
+ WizardHandler.wizard().next();
+ $rootScope.$digest();
+ expect(scope.referenceCurrentStep).toEqual('Continuing');
+ WizardHandler.wizard().next();
+ $rootScope.$digest();
+ expect(scope.referenceCurrentStep).toEqual('More steps');
+ });
+ it("should NOT go to next step because CANENTER is FALSE", function () {
+
+ var view = createView(scope);
+ scope.enterValidation = function () {
+ return false;
+ };
+ expect(scope.referenceCurrentStep).toEqual('Starting');
+ WizardHandler.wizard().next();
+ $rootScope.$digest();
+ expect(scope.referenceCurrentStep).toEqual('Continuing');
+ WizardHandler.wizard().next();
+ $rootScope.$digest();
+ expect(scope.referenceCurrentStep).toEqual('Continuing');
+ });
+ it("should NOT return to a previous step. Although CANEXIT is false and we are heading to a previous state, the can enter validation is false", function () {
+
+ var view = createView(scope);
+ scope.stepValidation = function () {
+ return false;
+ };
+ scope.enterValidation = function () {
+ return false;
+ };
+ expect(scope.referenceCurrentStep).toEqual('Starting');
+ WizardHandler.wizard().next();
+ $rootScope.$digest();
+ expect(scope.referenceCurrentStep).toEqual('Continuing');
+ WizardHandler.wizard().previous();
+ $rootScope.$digest();
+ expect(scope.referenceCurrentStep).toEqual('Continuing');
+ });
+ it("should return to a previous step even though CANEXIT is false", function () {
+
+ var view = createView(scope);
+ scope.stepValidation = function () {
+ return false;
+ };
+ expect(scope.referenceCurrentStep).toEqual('Starting');
+ WizardHandler.wizard().next();
+ $rootScope.$digest();
+ expect(scope.referenceCurrentStep).toEqual('Continuing');
+ WizardHandler.wizard().previous();
+ $rootScope.$digest();
+ expect(scope.referenceCurrentStep).toEqual('Starting');
+ });
+ it("should finish", function () {
+
+ var flag = false;
+ scope.finishedWizard = function () {
+ flag = true;
+ };
+ var view = createView(scope);
+ expect(scope.referenceCurrentStep).toEqual('Starting');
+ WizardHandler.wizard().finish();
+ expect(flag).toBeTruthy();
+ $rootScope.$digest();
+ });
+});
+
diff --git a/angular-wizard/angular-wizard.d.ts b/angular-wizard/angular-wizard.d.ts
new file mode 100644
index 0000000000..f079a46c24
--- /dev/null
+++ b/angular-wizard/angular-wizard.d.ts
@@ -0,0 +1,21 @@
+// Type definitions for Angular Wizard 0.4.2
+// Project: https://github.com/mgonto/angular-wizard
+// Definitions by: Marko Jurisic
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+declare module angular.mgoAngularWizard {
+ interface WizardHandler {
+ wizard(name?:string): Wizard;
+ addWizard(name:string, wizard:Wizard):void;
+ removeWizard(name:string):void;
+ }
+
+ interface Wizard {
+ next(nextHandler?:Function):void;
+ previous():void;
+ goTo(step:number):void;
+ goTo(step:string):void;
+ finish():void;
+ currentStepNumber():number;
+ }
+}
diff --git a/angularjs/angular-cookies.d.ts b/angularjs/angular-cookies.d.ts
index 89a747f828..cdea69d369 100644
--- a/angularjs/angular-cookies.d.ts
+++ b/angularjs/angular-cookies.d.ts
@@ -1,6 +1,6 @@
-// Type definitions for Angular JS 1.3 (ngCookies module)
+// Type definitions for Angular JS 1.4 (ngCookies module)
// Project: http://angularjs.org
-// Definitions by: Diego Vilar
+// Definitions by: Diego Vilar , Anthony Ciccarello
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -28,10 +28,13 @@ declare module angular.cookies {
// CookieStoreService
// see http://docs.angularjs.org/api/ngCookies.$cookieStore
///////////////////////////////////////////////////////////////////////////
- interface ICookieStoreService {
- get(key: string): any;
- put(key: string, value: any): void;
- remove(key: string): void;
+ interface ICookiesService {
+ get(key: string): string;
+ getObject(key: string): any;
+ getAll(): any;
+ put(key: string, value: string, options?: any): void;
+ putObject(key: string, value: any, options?: any): void;
+ remove(key: string, options?: any): void;
}
}
diff --git a/ansi-styles/ansi-styles-tests.ts b/ansi-styles/ansi-styles-tests.ts
new file mode 100644
index 0000000000..dc3187ef5b
--- /dev/null
+++ b/ansi-styles/ansi-styles-tests.ts
@@ -0,0 +1,54 @@
+///
+
+import ansi = require('ansi-styles');
+
+
+var styles = [
+ ansi.reset,
+
+ ansi.bold,
+ ansi.dim,
+ ansi.italic,
+ ansi.underline,
+ ansi.inverse,
+ ansi.hidden,
+ ansi.strikethrough,
+
+ ansi.black,
+ ansi.red,
+ ansi.green,
+ ansi.yellow,
+ ansi.blue,
+ ansi.magenta,
+ ansi.cyan,
+ ansi.white,
+ ansi.gray,
+
+ ansi.bgBlack,
+ ansi.bgRed,
+ ansi.bgGreen,
+ ansi.bgYellow,
+ ansi.bgBlue,
+ ansi.bgMagenta,
+ ansi.bgCyan,
+ ansi.bgWhite
+]
+
+for (var key in styles) {
+ check(key, styles[key])
+}
+
+function check(key:string, escapeCodes:ansi.EscapeCodePair): void {
+ if (uninitialized(escapeCodes.open)) {
+ throw new Error('key not found ~> ' + key + '.open')
+ }
+ if (uninitialized(escapeCodes.close)) {
+ throw new Error('key not found ~> ' + key + '.close')
+ }
+}
+
+function uninitialized(val:any): boolean {
+ return val === null || val === undefined
+}
+
+
diff --git a/ansi-styles/ansi-styles.d.ts b/ansi-styles/ansi-styles.d.ts
new file mode 100644
index 0000000000..4c79b118f3
--- /dev/null
+++ b/ansi-styles/ansi-styles.d.ts
@@ -0,0 +1,42 @@
+// Type definitions for ansi-styles 2.0.1
+// Project: https://github.com/sindresorhus/ansi-styles
+// Definitions by: bryn austin bellomy
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+
+declare module "ansi-styles"
+{
+ export interface EscapeCodePair {
+ open: string;
+ close: string;
+ }
+
+ export var reset: EscapeCodePair;
+
+ export var bold: EscapeCodePair;
+ export var dim: EscapeCodePair;
+ export var italic: EscapeCodePair;
+ export var underline: EscapeCodePair;
+ export var inverse: EscapeCodePair;
+ export var hidden: EscapeCodePair;
+ export var strikethrough: EscapeCodePair;
+
+ export var black: EscapeCodePair;
+ export var red: EscapeCodePair;
+ export var green: EscapeCodePair;
+ export var yellow: EscapeCodePair;
+ export var blue: EscapeCodePair;
+ export var magenta: EscapeCodePair;
+ export var cyan: EscapeCodePair;
+ export var white: EscapeCodePair;
+ export var gray: EscapeCodePair;
+
+ export var bgBlack: EscapeCodePair;
+ export var bgRed: EscapeCodePair;
+ export var bgGreen: EscapeCodePair;
+ export var bgYellow: EscapeCodePair;
+ export var bgBlue: EscapeCodePair;
+ export var bgMagenta: EscapeCodePair;
+ export var bgCyan: EscapeCodePair;
+ export var bgWhite: EscapeCodePair;
+}
\ No newline at end of file
diff --git a/buffers/buffers-tests.ts b/buffers/buffers-tests.ts
new file mode 100644
index 0000000000..0a51f97ae4
--- /dev/null
+++ b/buffers/buffers-tests.ts
@@ -0,0 +1,49 @@
+///
+import Buffers = require('buffers');
+
+var any: any;
+var num: number;
+var str: string;
+var buf = new Buffer([1, 2, 3]);
+var bufs: Buffers = new Buffers(); // with new, as type
+
+bufs = Buffers(); // no new
+
+// with self
+bufs = Buffers(bufs);
+bufs = new Buffers(bufs);
+
+// with array of buffers.
+bufs = Buffers([buf, buf]);
+bufs = new Buffers([buf, buf]);
+
+num = bufs.push(buf);
+num = bufs.push(buf, buf);
+
+num = bufs.unshift(buf);
+num = bufs.unshift(buf, buf);
+
+buf = bufs.slice();
+buf = bufs.slice(num);
+buf = bufs.slice(num, num);
+
+bufs = bufs.splice(num);
+bufs = bufs.splice(num, num);
+bufs = bufs.splice(num, num, buf);
+bufs = bufs.splice(num, num, buf, buf);
+
+num = bufs.copy(buf);
+num = bufs.copy(buf, num, num, num);
+
+any = bufs.get(num);
+bufs.set(num, any);
+
+num = bufs.indexOf(str);
+num = bufs.indexOf(str, num);
+num = bufs.indexOf(buf);
+num = bufs.indexOf(buf, num);
+
+buf = bufs.toBuffer();
+
+str = buf.toString();
+str = buf.toString(any, num, num);
diff --git a/buffers/buffers.d.ts b/buffers/buffers.d.ts
new file mode 100644
index 0000000000..fad36d3c49
--- /dev/null
+++ b/buffers/buffers.d.ts
@@ -0,0 +1,36 @@
+// Type definitions for buffers 0.1.1
+// Project: https://github.com/substack/node-buffers
+// Definitions by: Robert Hencke
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+///
+
+declare module "buffers" {
+
+ interface BuffersStatics {
+ new (bufs?: Buffer[]|Buffers): Buffers;
+ (bufs?: Buffer[]| Buffers): Buffers;
+ prototype: Buffers;
+ }
+
+ interface Buffers {
+ buffers: Buffer[];
+ length: number;
+
+ push(...items: Buffer[]): number;
+ unshift(...items: Buffer[]): number;
+ slice(i?: number, j?: number): Buffer;
+ splice(i: number, howMany?: number, ...items: Buffer[]): Buffers;
+ copy(dst: Buffer, dstStart?: number, start?: number, end?: number): number;
+ get(i: number): any;
+ set(i: number, b: any): void;
+ indexOf(needle: string|Buffer, offset?: number): number;
+ toBuffer(): Buffer;
+ toString(encoding?: any, start?: number, end?: number): string;
+ }
+
+ var Buffers: BuffersStatics;
+
+ export = Buffers;
+
+}
diff --git a/chai/chai-tests.ts b/chai/chai-tests.ts
index 98d75e8aef..ddaa84ee28 100644
--- a/chai/chai-tests.ts
+++ b/chai/chai-tests.ts
@@ -337,6 +337,11 @@ function deepEqual3(Date) {
expect(a).not.to.deep.equal({});
}
+function deepInclude(val) {
+ expect(['foo', 'bar']).to.deep.include(['bar', 'foo']);
+ expect(['foo', 'bar']).not.to.deep.equal(['foo', 'baz' ]);
+}
+
function empty() {
function FakeArgs() { };
FakeArgs.prototype.length = 0;
diff --git a/chai/chai.d.ts b/chai/chai.d.ts
index 4b9d313dd2..dd0adf9740 100644
--- a/chai/chai.d.ts
+++ b/chai/chai.d.ts
@@ -132,6 +132,7 @@ declare module chai {
interface Deep {
equal: Equal;
+ include: Include;
property: Property;
}
diff --git a/chrome/chrome-app-tests.ts b/chrome/chrome-app-tests.ts
index 01657dc858..de56bbac89 100644
--- a/chrome/chrome-app-tests.ts
+++ b/chrome/chrome-app-tests.ts
@@ -23,8 +23,13 @@ chrome.app.runtime.onLaunched.addListener(function (launchData: runtime.LaunchDa
chrome.app.runtime.onRestarted.addListener(function () { return; });
-// Get Current Window
+// retrieving windows
var currentWindow: cwindow.AppWindow = chrome.app.window.current();
+var otherWindow: cwindow.AppWindow = chrome.app.window.get('some-string');
+var allWindows: cwindow.AppWindow[] = chrome.app.window.getAll();
+
+// check platform capabilities
+var visibleEverywhere: boolean = chrome.app.window.canSetVisibleOnAllWorkspaces();
// FileSystem
// https://developer.chrome.com/apps/fileSystem
diff --git a/chrome/chrome-app.d.ts b/chrome/chrome-app.d.ts
index a2b0d5997e..2f498ed28c 100644
--- a/chrome/chrome-app.d.ts
+++ b/chrome/chrome-app.d.ts
@@ -126,6 +126,9 @@ declare module chrome.app.window {
export function create(url: string, options?: CreateWindowOptions, callback?: (created_window: AppWindow) => void): void;
export function current(): AppWindow;
+ export function get(id: string): AppWindow;
+ export function getAll(): AppWindow[];
+ export function canSetVisibleOnAllWorkspaces(): boolean;
interface WindowEvent {
addListener(callback: () => void): void;
diff --git a/colorbrewer/colorbrewer-tests.ts b/colorbrewer/colorbrewer-tests.ts
new file mode 100644
index 0000000000..7e17551b5a
--- /dev/null
+++ b/colorbrewer/colorbrewer-tests.ts
@@ -0,0 +1,8 @@
+///
+
+var accent3: string[] = colorbrewer.Accent[3];
+var accent4: string[] = colorbrewer.Accent[4];
+var accent5: string[] = colorbrewer.Accent[5];
+var accent6: string[] = colorbrewer.Accent[6];
+var accent7: string[] = colorbrewer.Accent[7];
+var accent8: string[] = colorbrewer.Accent[8];
diff --git a/colorbrewer/colorbrewer.d.ts b/colorbrewer/colorbrewer.d.ts
new file mode 100644
index 0000000000..ecd4bffc7b
--- /dev/null
+++ b/colorbrewer/colorbrewer.d.ts
@@ -0,0 +1,76 @@
+// Type definitions for colorbrewer v1.0.0
+// Project: https://github.com/jeanlauliac/colorbrewer
+// Definitions by: Matt Traynham
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+declare var colorbrewer: ColorBrewer.Base;
+
+declare module ColorBrewer {
+ interface ColorScheme {
+ [n: number]: string[];
+ }
+
+ interface EightColorScheme extends ColorScheme {
+ 3: [string, string, string];
+ 4: [string, string, string, string];
+ 5: [string, string, string, string, string];
+ 6: [string, string, string, string, string, string];
+ 7: [string, string, string, string, string, string, string];
+ 8: [string, string, string, string, string, string, string, string];
+ }
+
+ interface NineColorScheme extends EightColorScheme {
+ 9: [string, string, string, string, string, string, string, string, string];
+ }
+
+ interface ElevenColorScheme extends NineColorScheme {
+ 10: [string, string, string, string, string, string, string, string, string, string];
+ 11: [string, string, string, string, string, string, string, string, string, string, string];
+ }
+
+ interface TwelveColorScheme extends ElevenColorScheme {
+ 12: [string, string, string, string, string, string, string, string, string, string, string, string];
+ }
+
+ interface Base {
+ YlGn: NineColorScheme;
+ YlGnBu: NineColorScheme;
+ GnBu: NineColorScheme;
+ BuGn: NineColorScheme;
+ PuBuGn: NineColorScheme;
+ PuBu: NineColorScheme;
+ BuPu: NineColorScheme;
+ RdPu: NineColorScheme;
+ PuRd: NineColorScheme;
+ OrRd: NineColorScheme;
+ YlOrRd: NineColorScheme;
+ YlOrBr: NineColorScheme;
+ Purples: NineColorScheme;
+ Blues: NineColorScheme;
+ Greens: NineColorScheme;
+ Oranges: NineColorScheme;
+ Reds: NineColorScheme;
+ Greys: NineColorScheme;
+ PuOr: ElevenColorScheme;
+ BrBG: ElevenColorScheme;
+ PRGn: ElevenColorScheme;
+ PiYG: ElevenColorScheme;
+ RdBu: ElevenColorScheme;
+ RdGy: ElevenColorScheme;
+ RdYlBu: ElevenColorScheme;
+ Spectral: ElevenColorScheme;
+ RdYlGn: ElevenColorScheme;
+ Accent: EightColorScheme;
+ Dark2: EightColorScheme;
+ Paired: TwelveColorScheme;
+ Pastel1: NineColorScheme;
+ Pastel2: EightColorScheme;
+ Set1: NineColorScheme;
+ Set2: EightColorScheme;
+ Set3: TwelveColorScheme;
+ }
+}
+
+declare module 'colorbrewer' {
+ export = colorbrewer;
+}
diff --git a/convert-source-map/convert-source-map.d.ts b/convert-source-map/convert-source-map.d.ts
index 6034d13f7e..34a0b2c8ea 100644
--- a/convert-source-map/convert-source-map.d.ts
+++ b/convert-source-map/convert-source-map.d.ts
@@ -6,22 +6,22 @@
declare module "convert-source-map" {
export interface SourceMapConverter {
toObject(): any;
- toJSON(space?): string;
+ toJSON(space?: any): string;
toBase64(): string;
toComment(): string;
- addProperty(key, value): SourceMapConverter;
- setProperty(key, value): SourceMapConverter;
+ addProperty(key: string, value: any): SourceMapConverter;
+ setProperty(key: string, value: any): SourceMapConverter;
- getProperty(key): any;
+ getProperty(key: string): any;
}
- export function removeComments(src): string;
+ export function removeComments(src: string): string;
export var commentRegex: RegExp;
- export function fromObject(obj): SourceMapConverter;
+ export function fromObject(obj: any): SourceMapConverter;
export function fromJSON(json: string): SourceMapConverter;
export function fromBase64(base64: string): SourceMapConverter;
export function fromComment(comment: string): SourceMapConverter;
export function fromSource(source: string): SourceMapConverter;
-}
\ No newline at end of file
+}
diff --git a/custom-error-generator/custom-error-generator-tests.ts b/custom-error-generator/custom-error-generator-tests.ts
new file mode 100644
index 0000000000..09ae86373e
--- /dev/null
+++ b/custom-error-generator/custom-error-generator-tests.ts
@@ -0,0 +1,6 @@
+///
+
+import createCustomError = require('custom-error-generator');
+var HTTPError = createCustomError('HTTPError', { 'code' : 500, 'status' : 'Server Error' });
+var error = new HTTPError('Uh oh');
+console.log(error.code, error.status);
diff --git a/custom-error-generator/custom-error-generator.d.ts b/custom-error-generator/custom-error-generator.d.ts
new file mode 100644
index 0000000000..8ce65f673d
--- /dev/null
+++ b/custom-error-generator/custom-error-generator.d.ts
@@ -0,0 +1,11 @@
+// Type definitions for custom-error-generator 7.0.0
+// Project: https://github.com/jproulx/node-custom-error
+// Definitions by: Thierry Miceli
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+declare module "custom-error-generator" {
+ function createError(name: string, parameters?: Object, Constructor?: any): any;
+ module createError {
+ }
+ export = createError;
+}
diff --git a/d3/d3.d.ts b/d3/d3.d.ts
index b71610f944..f3dbee63d9 100644
--- a/d3/d3.d.ts
+++ b/d3/d3.d.ts
@@ -371,6 +371,12 @@ declare module D3 {
* Request a comma-separated values (CSV) file.
*/
csv: Dsv;
+
+ /**
+ * Request an arbitrary char-separated values file parser, like semicolon or what ever
+ */
+ dsv: Dsv;
+
/**
* Request a tab-separated values (TSV) file
*/
@@ -708,6 +714,17 @@ declare module D3 {
*/
(url: string, callback?: (error: any, response: any[]) => void ): Xhr;
/**
+ * Arbitrary Delimiters:
+ * Constructs a new parser for the given delimiter and mime type. For example, to parse values separated by "|", the vertical bar character, use:
+ * var dsv = d3.dsv("|", "text/plain");
+ *
+ * returns the new parser
+ *
+ * @param separator seperator character
+ * @param contentType
+ */
+ (separator: string, contentType:string): (url: string, callback?: (error: any, response: any[]) => void )=> Xhr;
+ /**
* Parse a delimited string into objects using the header row.
*
* @param string delimited formatted string to parse
diff --git a/decimal.js/decimal.js-tests.ts b/decimal.js/decimal.js-tests.ts
new file mode 100644
index 0000000000..b151380d51
--- /dev/null
+++ b/decimal.js/decimal.js-tests.ts
@@ -0,0 +1,401 @@
+///
+var x = new Decimal(9)
+var y = new Decimal(x)
+
+Decimal(435.345)
+
+new Decimal('5032485723458348569331745.33434346346912144534543')
+new Decimal('4.321e+4')
+new Decimal('-735.0918e-430')
+new Decimal('5.6700000')
+new Decimal(Infinity)
+new Decimal(NaN)
+new Decimal('.5')
+new Decimal('+2')
+new Decimal(-10110100.1, 2)
+new Decimal('123412421.234324', 5)
+new Decimal('ff.8', 16)
+
+Decimal.config({ precision: 5 })
+new Decimal(1.23456789)
+new Decimal(1.23456789, 10)
+
+
+Decimal.config({
+ precision: 20,
+ rounding: 4,
+ toExpNeg: -7,
+ toExpPos: 21,
+ minE: -9e15,
+ maxE: 9e15,
+ errors: true,
+ crypto: false,
+ modulo: 1,
+ format: {
+ decimalSeparator: '.',
+ groupSeparator: ',',
+ groupSize: 3,
+ secondaryGroupSize: 0,
+ fractionGroupSeparator: '\xA0',
+ fractionGroupSize: 0
+ }
+});
+
+Decimal.config({
+ format: {
+
+ decimalSeparator: '.',
+
+ groupSeparator: ',',
+
+ groupSize: 3,
+
+ secondaryGroupSize: 0,
+
+ fractionGroupSeparator: ' ',
+
+ fractionGroupSize: 0
+ }
+});
+Decimal.config({ rounding: Decimal.ROUND_CEIL })
+Decimal.config({ rounding: 2 })
+Decimal.rounding
+
+x = new Decimal(1.3)
+x.ceil()
+y = new Decimal(-1.8)
+y.ceil()
+
+x.comparedTo(y)
+x.comparedTo(x.minus(1))
+y.cmp(NaN)
+y.cmp('110', 2)
+
+x.decimalPlaces()
+y.dp()
+
+x.dividedBy(y)
+x.div(5)
+x.div(47, 16)
+
+x.dividedToIntegerBy(y)
+x.divToInt(0.7)
+x.divToInt('0.f', 16)
+
+x.equals('1e-324')
+new Decimal(-0).eq(x)
+new Decimal(255).eq('ff', 16)
+
+y = new Decimal(NaN)
+y.equals(NaN)
+
+x = new Decimal(1)
+x.exponential()
+y = new Decimal(2)
+y.exp()
+
+x = new Decimal(1.8)
+x.floor()
+y = new Decimal(-1.3)
+y.floor()
+
+x.greaterThan(Decimal(0.3).minus(0.2))
+new Decimal(0).gt(x)
+new Decimal(11, 3).gt(11.1, 2)
+
+
+x = new Decimal(0.3).minus(0.2)
+x.greaterThanOrEqualTo(0.1)
+new Decimal(1).gte(x)
+new Decimal(10, 18).gte('i', 36)
+
+x = new Decimal(1)
+x.isFinite()
+y = new Decimal(Infinity)
+y.isFinite()
+
+x = new Decimal(1)
+x.isInteger()
+y = new Decimal(123.456)
+y.isInt()
+
+x = new Decimal(NaN)
+x.isNaN()
+y = new Decimal('Infinity')
+y.isNaN()
+
+x = new Decimal(-0)
+x.isNegative()
+y = new Decimal(2)
+y.isNeg
+
+x = new Decimal(-0)
+x.isZero() && x.isNeg()
+y = new Decimal(Infinity)
+y.isZero()
+
+x.lessThan(0.1)
+new Decimal(0).lt(x)
+new Decimal(11.1, 2).lt(11, 3)
+
+x.lessThan(0.1)
+new Decimal(0).lt(x)
+new Decimal(11.1, 2).lt(11, 3)
+
+x = new Decimal(0.1)
+x.lessThanOrEqualTo(Decimal(0.3).minus(0.2))
+new Decimal(-1).lte(x)
+new Decimal(10, 18).lte('i', 36)
+
+x = new Decimal(1000)
+x.logarithm()
+y = new Decimal(256)
+y.log(2)
+
+x = new Decimal(0.3)
+x.minus(0.1)
+x.minus(0.6, 20)
+
+x = new Decimal(1)
+x.modulo(0.9)
+
+y = new Decimal(33)
+y.mod('a', 33)
+
+x = new Decimal(8)
+y = new Decimal(-3)
+Decimal.modulo = 1
+x.mod(y)
+Decimal.modulo = 3
+x.mod(y)
+
+x = new Decimal(10)
+x.naturalLogarithm()
+y = new Decimal('1.23e+30')
+y.ln()
+
+x = new Decimal(1.8)
+x.negated()
+y = new Decimal(-1.3)
+y.neg()
+
+x = new Decimal(0.1)
+y = x.plus(0.2)
+new Decimal(0.7).plus(x).plus(y)
+x.plus('0.1', 8)
+
+x = new Decimal(1.234)
+x.precision()
+y = new Decimal(987000)
+y.sd()
+y.sd(true)
+
+Decimal.config({ rounding: 4 })
+x.round()
+
+Decimal.rounding = Decimal.ROUND_DOWN
+x.round()
+x
+
+x = new Decimal(16)
+x.squareRoot()
+y = new Decimal(3)
+y.sqrt()
+y.sqrt().eq(y.pow(0.5))
+
+x = new Decimal(0.6)
+y = x.times(3)
+new Decimal('7e+500').times(y)
+x.times('-a', 16)
+
+x = new Decimal(12.24567)
+x.toDecimalPlaces(0)
+x.toDecimalPlaces(1, 0)
+
+y = new Decimal(9876.54321)
+y.toDP(3)
+y.toDP(1, 0)
+y.toDP(1, Decimal.ROUND_DOWN)
+
+y = new Decimal(x)
+x.toExponential()
+y.toExponential()
+x.toExponential(0)
+y.toExponential(0)
+x.toExponential(1)
+y.toExponential(1)
+y.toExponential(1, 1)
+x.toExponential(3)
+y.toExponential(3)
+
+y = new Decimal(x)
+x.toFixed()
+y.toFixed()
+y.toFixed(0)
+x.toFixed(2)
+y.toFixed(2)
+y.toFixed(2, 1)
+x.toFixed(5)
+y.toFixed(5)
+
+Decimal.config({
+ format: {
+ decimalSeparator: '.',
+ groupSeparator: ',',
+ groupSize: 3,
+ secondaryGroupSize: 0,
+ fractionGroupSeparator: ' ',
+ fractionGroupSize: 0
+ }
+});
+
+x = new Decimal('123456789.123456789')
+x.toFormat()
+x.toFormat(1)
+
+
+Decimal.format.groupSeparator = ' ';
+Decimal.format.fractionGroupSize = 5;
+x.toFormat()
+
+
+Decimal.format = {
+ decimalSeparator: ',',
+ groupSeparator: '.',
+ groupSize: 3,
+ secondaryGroupSize: 2
+}
+
+x.toFormat()
+
+x.toFraction()
+
+var pi = new Decimal('3.14159265358')
+pi.toFraction()
+pi.toFraction(100000)
+pi.toFraction(10000)
+pi.toFraction(100)
+pi.toFraction(10)
+pi.toFraction(1)
+
+
+
+x = new Decimal('177.7e+457')
+y = new Decimal(235.4325)
+var z = new Decimal('0.0098074')
+
+// Serialize an array of three Decimals
+var str = JSON.stringify([x, y, z])
+// "["1.777e+459","235.4325","0.0098074"]"
+
+// Return an array of three Decimals
+JSON.parse(str, function(key, val) {
+ return key === '' ? val : new Decimal(val)
+})
+
+x = new Decimal(1.39)
+x.toNearest(0.25)
+
+y = new Decimal(0.75)
+y.toNearest(0.5, 0)
+y.toNearest(0.5, 1)
+
+x = new Decimal(456.789)
+x.toNumber()
+
+y = new Decimal('45987349857634085409857349856430985')
+y.toNumber()
+
+z = new Decimal(-0)
+1 / +z
+1 / z.toNumber()
+
+Math.pow(0.7, 2)
+x = new Decimal(0.7)
+x.toPower(2)
+new Decimal(3).pow(-2)
+
+new Decimal(1217652.23).pow('98765.489305603941')
+y = new Decimal(x)
+x.toPrecision()
+y.toPrecision()
+x.toPrecision(1)
+y.toPrecision(1)
+y.toPrecision(2, 0)
+y.toPrecision(2, 1)
+x.toPrecision(5)
+y.toPrecision(5)
+
+Decimal.config({ precision: 5, rounding: 4 })
+x = new Decimal(9876.54321)
+
+x.toSignificantDigits()
+x.toSignificantDigits(6)
+x.toSignificantDigits(6, Decimal.ROUND_UP)
+x.toSD(2)
+x.toSD(2, 1)
+
+x = new Decimal(750000)
+x.toString()
+Decimal.config({ toExpPos: 5 })
+x.toString()
+
+y = new Decimal(362.875)
+y.toString(2)
+y.toString(9)
+y.toString(32)
+
+Decimal.config({ precision: 4 });
+z = new Decimal('1.23456789')
+z.toString()
+z.toString(10)
+
+x = new Decimal(123.456)
+x.truncated()
+y = new Decimal(-12.3)
+y.trunc()
+
+x = new Decimal('1.777e+457')
+x.valueOf()
+
+x = Decimal.exp(3)
+y = new Decimal(3).exp()
+x.equals(y)
+
+x = Decimal.ln(4.321)
+y = new Decimal(4.321).ln()
+x.equals(y)
+
+x = Decimal.log(100, 2.5)
+y = new Decimal(100).log(2.5)
+x.equals(y)
+
+x = new Decimal('3257869345.0378653')
+Decimal.max(4e9, x, '123456789.9')
+
+var arr = [12, '13', new Decimal(14)]
+Decimal.max(arr)
+
+x = new Decimal('3257869345.0378653')
+Decimal.min(4e9, x, '123456789.9')
+
+arr = [2, new Decimal(-14), '-15.9999', -12]
+Decimal.min(arr)
+
+x = new Decimal(2)
+var D = Decimal.noConflict()
+Decimal
+y = new D(3)
+
+x = Decimal.pow(3257.4, 17.01)
+y = new Decimal(3257.4).pow(17.01)
+x.equals(y)
+
+Decimal.config({ precision: 10 })
+Decimal.random()
+
+Decimal.random(20)
+
+x = Decimal.sqrt('987654321.123456789')
+y = new Decimal('987654321.123456789').sqrt()
+x.equals(y)
diff --git a/decimal.js/decimal.js.d.ts b/decimal.js/decimal.js.d.ts
new file mode 100644
index 0000000000..da2489a5f7
--- /dev/null
+++ b/decimal.js/decimal.js.d.ts
@@ -0,0 +1,765 @@
+// Type definitions for decimal.js
+// Project: http://mikemcl.github.io/decimal.js
+// Definitions by: Joseph Rossi
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+declare var Decimal: decimal.IDecimalStatic;
+
+// Support AMD require
+declare module 'decimal' {
+ export = Decimal;
+}
+
+declare module decimal {
+
+ enum RoundingMode {
+ /**
+ * Rounds away from zero
+ */
+ ROUND_UP = 0,
+
+ /**
+ * Rounds towards zero
+ */
+ ROUND_DOWN = 1,
+
+ /**
+ * Rounds towards Infinity
+ */
+ ROUND_CEIL = 2,
+
+ /**
+ * Rounds towards -Infinity
+ */
+ ROUND_FLOOR = 3,
+
+ /**
+ * Rounds towards nearest neighbour.
+ * If equidistant, rounds away from zero
+ */
+ ROUND_HALF_UP = 4,
+
+ /**
+ * Rounds towards nearest neighbour.
+ * If equidistant, rounds towards zero
+ */
+ ROUND_HALF_DOWN = 5,
+
+ /**
+ * Rounds towards nearest neighbour.
+ * If equidistant, rounds towards even neighbour
+ */
+ ROUND_HALF_EVEN = 6,
+
+ /**
+ * Rounds towards nearest neighbour.
+ * If equidistant, rounds towards Infinity
+ */
+ ROUND_HALF_CEIL = 7,
+
+ /**
+ * Rounds towards nearest neighbour.
+ * If equidistant, rounds towards -Infinity
+ */
+ ROUND_HALF_FLOOR = 8,
+
+ /**
+ * Not a rounding mode, see modulo
+ */
+ EUCLID = 9,
+ }
+
+ interface IFormatConfig {
+ decimalSeparator?: string;
+ groupSeparator?: string;
+ groupSize?: number;
+ secondaryGroupSize?: number;
+ fractionGroupSeparator?: string;
+ fractionGroupSize?: number;
+ }
+
+ interface IDecimalConfig {
+ /**
+ * number: integer, 1 to 1e+9 inclusive
+ * Default value: 20
+ *
+ * The maximum number of significant digits of the result of a calculation or base conversion.
+ *
+ * All methods which return a Decimal will round the return value to precision significant digits except absoluteValue, ceil, floor, negated, round, toDecimalPlaces, toNearest and truncated.
+ *
+ * A Decimal constructor will also not round to precision unless a base is specified.
+ */
+ precision?: number;
+
+ /**
+ * number: integer, 0 to 8 inclusive
+ * Default value: 4 (ROUND_HALF_UP)
+ *
+ * The default rounding mode used when rounding the result of a calculation or base conversion to precision significant digits, and when rounding the return value of the round, toDecimalPlaces, toExponential, toFixed, toFormat, toNearest, toPrecision and toSignificantDigits methods.
+ *
+ * The rounding modes are available as enumerated properties of the constructor.
+ */
+ rounding?: RoundingMode;
+
+ /**
+ * number: integer, -9e15 to 0 inclusive
+ * Default value: -7
+ *
+ * The negative exponent value at and below which toString returns exponential notation.
+ * @type {[type]}
+ */
+ toExpNeg?: number;
+
+ /**
+ * number: integer, 0 to 9e15 inclusive
+ * Default value: 20
+ *
+ * The positive exponent value at and above which toString returns exponential notation.
+ */
+ toExpPos?: number;
+
+ /**
+ * number: integer, -9e15 to 0 inclusive
+ * Default value: -9e15
+ *
+ * The negative exponent limit, i.e. the exponent value below which underflow to zero occurs.
+ *
+ * If the Decimal to be returned by a calculation would have an exponent lower than minE then its value becomes zero.
+ *
+ * JavaScript numbers underflow to zero for exponents below -324.
+ */
+ minE?: number;
+
+ /**
+ * number: integer, 0 to 9e15 inclusive
+ * Default value: 9e15
+ *
+ * The positive exponent limit, i.e. the exponent value above which overflow to Infinity occurs.
+ *
+ * If the Decimal to be returned by a calculation would have an exponent higher than maxE then its value becomes Infinity.
+ *
+ * JavaScript numbers overflow to Infinity for exponents above 308.
+ */
+ maxE?: number;
+
+ /**
+ * boolean/number: true, false, 1 or 0
+ * Default value: true
+ *
+ * The value that determines whether Decimal Errors are thrown. If errors is false, this library will not throw errors.
+ */
+ errors?: boolean | number;
+
+ /**
+ * boolean/number: true, false, 1 or 0
+ * Default value: false
+ *
+ * The value that determines whether cryptographically-secure pseudo-random number generation is used.
+ *
+ * If crypto is truthy then the random method will generate random digits using crypto.getRandomValues in browsers that support it, or crypto.randomBytes if using a version of Node.js that supports it.
+ *
+ * If neither function is supported by the host environment or if crypto is falsey then the source of randomness will be Math.random. If the crypto property is set directly (i.e. without using config) to true, then at the time the random method is called, if errors is true, an error will be thrown if the crypto methods are unavailable.
+ */
+ crypto?: boolean | number;
+
+ /**
+ * number: integer, 0 to 9 inclusive
+ * Default value: 1 (ROUND_DOWN)
+ *
+ * The modulo mode used when calculating the modulus: a mod n.
+ *
+ * The quotient, q = a / n, is calculated according to the rounding mode that corresponds to the chosen modulo mode.
+ *
+ * The remainder, r, is calculated as: r = a - n * q.
+ *
+ * The modes that are most commonly used for the modulus/remainder operation are ROUND_UP, ROUND_DOWN, ROUND_FLOOR, ROUND_HALF_EVEN, and EUCLID. Although the other rounding modes can be used, they may not give useful results.
+ */
+ modulo?: RoundingMode;
+
+ /**
+ * The format object configures the format of the string returned by the toFormat method.
+ *
+ * The example below shows the properties of the format object that are recognised, and their default values.
+ *
+ * Unlike setting other properties using config, the values of the properties of the format object will not be checked for validity. The existing format object will simply be replaced by the object that is passed in. Only the toFormat method ever references a Decimal constructor's format object property.
+ *
+ * See toFormat for examples of usage, and of setting format properties individually and directly without using config.
+ */
+ format?: IFormatConfig;
+ }
+
+ interface IDecimalStatic extends IDecimalConfig {
+ (value: number | string | Decimal, base?: number): Decimal;
+
+ new(value: number | string | Decimal, base?: number): Decimal;
+
+ /**
+ * Configures the 'global' settings for this particular Decimal constructor.
+ *
+ * Returns this Decimal constructor.
+ */
+ config(object: IDecimalConfig): IDecimalStatic;
+
+ /**
+ * Returns a new independent Decimal constructor with configuration settings as described by object
+ */
+ constructor(object: IDecimalConfig): IDecimalStatic;
+
+ /**
+ * Returns a new Decimal whose value is the base e (Euler's number, the base of the natural logarithm) exponential of the value of this Decimal, rounded to precision significant digits using rounding mode rounding.
+ */
+ exp(n: number | string | Decimal): Decimal;
+
+ /**
+ * Returns a new Decimal whose value is the natural logarithm of the value of this Decimal, rounded to precision significant digits using rounding mode rounding.
+ *
+ * The natual logarithm is the inverse of the exponential function.
+ */
+ ln(n: number | string | Decimal): Decimal;
+
+ /**
+ * Returns a new Decimal whose value is the base n logarithm of the value of this Decimal, rounded to precision significant digits using rounding mode rounding.
+ *
+ * If n is null or undefined, then the base 10 logarithm of the value of this Decimal will be returned.
+ */
+ log(n: number | string | Decimal, base?: number): Decimal;
+
+ /**
+ * Returns a new Decimal whose value is the maximum of arg1, arg2,... .
+ */
+ max(...args: any[]): Decimal;
+
+ /**
+ * Returns a new Decimal whose value is the minimum of arg1, arg2,... .
+ */
+ min(...args: any[]): Decimal;
+
+ /**
+ * Reverts the Decimal variable to the value it had before this library was loaded and returns a reference to the original Decimal constructor so it can be assigned to a variable with a different name.
+ */
+ noConflict(): IDecimalStatic;
+
+ /**
+ * Returns a new Decimal whose value is the value of this Decimal raised to the power n, rounded to precision significant digits using rounding mode rounding.
+ *
+ * The performance of this method degrades exponentially with increasing digits. For non-integer exponents in particular, the performance of this method may not be adequate.
+ */
+ pow(base: number | string | Decimal, exponent: number | string | Decimal): Decimal;
+
+ /**
+ * Returns a new Decimal with a pseudo-random value equal to or greater than 0 and less than 1. The return value will have dp decimal places (or less if trailing zeros are produced). If dp is omitted then the number of decimal places will default to the current precision setting.
+ *
+ * Depending on the value of a Decimal constructor's crypto property and the support for the crypto object in the host environment, the random digits of the return value are generated by either Math.random (fastest), crypto.getRandomValues (Web Cryptography API in recent browsers) or crypto.randomBytes (Node.js).
+ *
+ * If crypto is true, i.e. one of the crypto methods is to be used, the value of a returned Decimal should be cryptographically-secure and statistically indistinguishable from a random value.
+ */
+ random(dp?: number): Decimal;
+
+ /**
+ * The return value will be correctly rounded, i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding.
+ *
+ * This method is much faster than using the toPower method with an exponent of 0.5.
+ */
+ sqrt(arg: number | string | Decimal): Decimal;
+
+ /**
+ * A Decimal instance with value one.
+ */
+ ONE: number;
+
+ /**
+ * Rounds away from zero
+ */
+ ROUND_UP: number;
+
+ /**
+ * Rounds towards zero
+ */
+ ROUND_DOWN: number;
+
+ /**
+ * Rounds towards Infinity
+ */
+ ROUND_CEIL: number;
+
+ /**
+ * Rounds towards -Infinity
+ */
+ ROUND_FLOOR: number;
+
+ /**
+ * Rounds towards nearest neighbour.
+ * If equidistant, rounds away from zero
+ */
+ ROUND_HALF_UP: number;
+
+ /**
+ * Rounds towards nearest neighbour.
+ * If equidistant, rounds towards zero
+ */
+ ROUND_HALF_DOWN: number;
+
+ /**
+ * Rounds towards nearest neighbour.
+ * If equidistant, rounds towards even neighbour
+ */
+ ROUND_HALF_EVEN: number;
+
+ /**
+ * Rounds towards nearest neighbour.
+ * If equidistant, rounds towards Infinity
+ */
+ ROUND_HALF_CEIL: number;
+
+ /**
+ * Rounds towards nearest neighbour.
+ * If equidistant, rounds towards -Infinity
+ */
+ ROUND_HALF_FLOOR: number;
+
+ /**
+ * Not a rounding mode, see modulo
+ */
+ EUCLID: number;
+ }
+
+ interface Decimal {
+
+ /**
+ * Returns a new Decimal whose value is the absolute value, i.e. the magnitude, of the value of this Decimal.
+ *
+ * The return value is not rounded.
+ */
+ absoluteValue(): Decimal;
+
+ /**
+ * Returns a new Decimal whose value is the absolute value, i.e. the magnitude, of the value of this Decimal.
+ *
+ * The return value is not rounded.
+ */
+ abs(): Decimal;
+
+ /**
+ * Returns a new Decimal whose value is the value of this Decimal rounded to a whole number in the direction of positive Infinity.
+ *
+ * The return value is not rounded to precision.
+ */
+ ceil(): Decimal;
+
+ /**
+ * @return 1, -1, 0, or null
+ * 1 If the value of this Decimal is greater than the
+ * value of n
+ * -1 If the value of this Decimal is less than the value
+ * of n
+ * 0 If this Decimal and n have the same value
+ * null If the value of either this Decimal or n is NaN
+ */
+ comparedTo(n: number | string | Decimal, base?: number): number;
+
+ /**
+ * Returns 1, -1, 0, or null
+ * 1 If the value of this Decimal is greater than the value
+ * of n
+ * -1 If the value of this Decimal is less than the value
+ * of n
+ * 0 If this Decimal and n have the same value
+ * null If the value of either this Decimal or n is NaN
+ */
+ cmp(n: number | string | Decimal, base?: number): number;
+
+ /**
+ * Returns the number of decimal places, i.e. the number of digits after the decimal point, of the value of this Decimal.
+ */
+ decimalPlaces(): number;
+
+ /**
+ * Returns the number of decimal places, i.e. the number of digits after the decimal point, of the value of this Decimal.
+ */
+ dp(): number;
+
+ /**
+ * Returns a new Decimal whose value is the value of this Decimal divided by n, rounded to precision significant digits using rounding mode rounding.
+ */
+ dividedBy(n: number | string | Decimal, base?: number): Decimal;
+
+ /**
+ * Returns a new Decimal whose value is the value of this Decimal divided by n, rounded to precision significant digits using rounding mode rounding.
+ */
+ div(n: number | string | Decimal, base?: number): Decimal;
+
+ /**
+ * Return a new Decimal whose value is the integer part of dividing this Decimal by n, rounded to precision significant digits using rounding mode rounding.
+ */
+ dividedToIntegerBy(n: number | string| Decimal, base?: number): Decimal;
+
+ /**
+ * Return a new Decimal whose value is the integer part of dividing this Decimal by n, rounded to precision significant digits using rounding mode rounding.
+ */
+ divToInt(n: number | string| Decimal, base?: number): Decimal;
+
+ /**
+ * Returns true if the value of this Decimal equals the value of n, otherwise returns false.
+ *
+ * As with JavaScript, NaN does not equal NaN.
+ *
+ * Note: This method uses the cmp method internally.
+ */
+ equals(n: number | string | Decimal, base?: number): boolean;
+
+ /**
+ * Returns true if the value of this Decimal equals the value of n, otherwise returns false.
+ *
+ * As with JavaScript, NaN does not equal NaN.
+ *
+ * Note: This method uses the cmp method internally.
+ */
+ eq(n: number | string | Decimal, base?: number): boolean;
+
+ /**
+ * Returns a new Decimal whose value is the base e (Euler's number, the base of the natural logarithm) exponential of the value of this Decimal, rounded to precision significant digits using rounding mode rounding.
+ */
+ exponential(): Decimal;
+
+ /**
+ * Returns a new Decimal whose value is the base e (Euler's number, the base of the natural logarithm) exponential of the value of this Decimal, rounded to precision significant digits using rounding mode rounding.
+ */
+ exp(): Decimal;
+
+ /**
+ * The return value is not rounded to precision.
+ */
+ floor(): Decimal;
+
+
+ /**
+ * Note: This method uses cmp method internally.
+ */
+ greaterThan(n: number | string | Decimal, base?: number): boolean;
+
+ /**
+ * Note: This method uses cmp method internally.
+ */
+ gt(n: number | string | Decimal, base?: number): boolean;
+
+ /**
+ * Note: This method uses cmp method internally.
+ */
+ greaterThanOrEqualTo(n: number | string | Decimal, base?: number): boolean;
+
+ /**
+ * Note: This method uses cmp method internally.
+ */
+ gte(n: number | string | Decimal, base?: number): boolean;
+
+ /**
+ * The only possible non-finite values of a Decimal are NaN, Infinity and -Infinity.
+ */
+ isFinite(): boolean;
+
+ isInteger(): boolean;
+
+ isInt(): boolean;
+
+ isNaN(): boolean;
+
+ isNegative(): boolean;
+
+ isNeg(): boolean;
+
+ isZero(): boolean;
+
+ /**
+ * Note: This method uses cmp method internally.
+ */
+ lessThan(n: number | string | Decimal, base?: number): boolean;
+
+ /**
+ * Note: This method uses cmp method internally.
+ */
+ lt(n: number | string | Decimal, base?: number): boolean;
+
+ /**
+ * Note: This method uses cmp method internally.
+ */
+ lessThanOrEqualTo(n: number | string | Decimal, base?: number): boolean;
+
+ /**
+ * Note: This method uses cmp method internally.
+ */
+ lte(n: number | string | Decimal, base?: number): boolean;
+
+ /**
+ * Returns a new Decimal whose value is the base n logarithm of the value of this Decimal, rounded to precision significant digits using rounding mode rounding.
+ *
+ * If n is null or undefined, then the base 10 logarithm of the value of this Decimal will be returned.
+ */
+ logarithm(n?: number | string | Decimal, base?: number): Decimal;
+
+ /**
+ * Returns a new Decimal whose value is the base n logarithm of the value of this Decimal, rounded to precision significant digits using rounding mode rounding.
+ *
+ * If n is null or undefined, then the base 10 logarithm of the value of this Decimal will be returned.
+ */
+ log(n?: number | string | Decimal, base?: number): Decimal;
+
+ /**
+ * Returns a new Decimal whose value is the value of this Decimal minus n, rounded to precision significant digits using rounding mode rounding.
+ */
+ minus(n: number | string | Decimal, base?: number): Decimal;
+
+ /**
+ * Returns a new Decimal whose value is the value of this Decimal modulo n, rounded to precision significant digits using rounding mode rounding.
+ *
+ * The value returned, and in particular its sign, is dependent on the value of the modulo property of this Decimal's constructor. If it is 1 (default value), the result will have the same sign as this Decimal, and it will match that of Javascript's % operator (within the limits of double precision) and BigDecimal's remainder method.
+ */
+ modulo(n: number | string | Decimal, base?: number): Decimal;
+
+ /**
+ * Returns a new Decimal whose value is the value of this Decimal modulo n, rounded to precision significant digits using rounding mode rounding.
+ *
+ * The value returned, and in particular its sign, is dependent on the value of the modulo property of this Decimal's constructor. If it is 1 (default value), the result will have the same sign as this Decimal, and it will match that of Javascript's % operator (within the limits of double precision) and BigDecimal's remainder method.
+ */
+ mod(n: number | string | Decimal, base?: number): Decimal;
+
+ /**
+ * Returns a new Decimal whose value is the natural logarithm of the value of this Decimal, rounded to precision significant digits using rounding mode rounding.
+ *
+ * The natual logarithm is the inverse of the exponential function.
+ */
+ naturalLogarithm(): Decimal;
+
+ /**
+ * Returns a new Decimal whose value is the natural logarithm of the value of this Decimal, rounded to precision significant digits using rounding mode rounding.
+ *
+ * The natual logarithm is the inverse of the exponential function.
+ */
+ ln(): Decimal;
+
+ /**
+ * The return value is not rounded.
+ */
+ negated(): Decimal;
+
+ /**
+ * The return value is not rounded.
+ */
+ neg(): Decimal;
+
+ /**
+ * Returns a new Decimal whose value is the value of this Decimal plus n, rounded to precision significant digits using rounding mode rounding.
+ */
+ plus(n: number | string | Decimal, base?: number): Decimal;
+
+ /**
+ * If include_zeros is true or 1 then any trailing zeros of the integer part of a number are counted as significant digits, otherwise they are not.
+ */
+ precision(include_leading_zeros?: boolean | number): number;
+
+ /**
+ * If include_zeros is true or 1 then any trailing zeros of the integer part of a number are counted as significant digits, otherwise they are not.
+ */
+ sd(include_leading_zeros?: boolean | number): number;
+
+ round(): Decimal;
+
+ /**
+ * The return value will be correctly rounded, i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding.
+ *
+ * This method is much faster than using the toPower method with an exponent of 0.5.
+ */
+ squareRoot(): Decimal;
+
+ /**
+ * The return value will be correctly rounded, i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding.
+ *
+ * This method is much faster than using the toPower method with an exponent of 0.5.
+ */
+ sqrt(): Decimal;
+
+ /**
+ * Returns a new Decimal whose value is the value of this Decimal times n, rounded to precision significant digits using rounding mode rounding.
+ */
+ times(n: number | string | Decimal, base?: number): Decimal;
+
+ /**
+ * Returns a new Decimal whose value is the value of this Decimal rounded to dp decimal places using rounding mode rm.
+ *
+ * If dp is omitted or is null or undefined, the return value will have the same value as this Decimal.
+ *
+ * If rm is omitted or is null or undefined, rounding mode rounding is used.
+ */
+ toDecimalPlaces(dp?: number, rm?: RoundingMode): Decimal;
+
+ /**
+ * Returns a new Decimal whose value is the value of this Decimal rounded to dp decimal places using rounding mode rm.
+ *
+ * If dp is omitted or is null or undefined, the return value will have the same value as this Decimal.
+ *
+ * If rm is omitted or is null or undefined, rounding mode rounding is used.
+ */
+ toDP(dp?: number, rm?: RoundingMode): Decimal;
+
+ /**
+ * Returns a string representing the value of this Decimal in exponential notation rounded using rounding mode rm to dp decimal places, i.e with one digit before the decimal point and dp digits after it.
+ *
+ * If the value of this Decimal in exponential notation has fewer than dp fraction digits, the return value will be appended with zeros accordingly.
+ *
+ * If dp is omitted, or is null or undefined, the number of digits after the decimal point defaults to the minimum number of digits necessary to represent the value exactly.
+ *
+ * If rm is omitted or is null or undefined, rounding mode rounding is used.
+ */
+ toExponential(dp?: number, rm?: RoundingMode): string;
+
+ /**
+ * Returns a string representing the value of this Decimal in normal (fixed-point) notation rounded to dp decimal places using rounding mode rm.
+ *
+ * If the value of this Decimal in normal notation has fewer than dp fraction digits , the return value will be appended with zeros accordingly.
+ *
+ * Unlike Number.prototype.toFixed, which returns exponential notation if a number is greater or equal to 1021, this method will always return normal notation.
+ *
+ * If dp is omitted or is null or undefined, then the return value will be unrounded and in normal notation. This is unlike Number.prototype.toFixed, which returns the value to zero decimal places, but is useful when because of the current toExpNeg or toExpNeg values, toString returns exponential notation
+ *
+ * if rm is omitted or is null or undefined, rounding mode rounding is used.
+ */
+ toFixed(dp?: number, rm?: RoundingMode): string;
+
+ /**
+ * Returns a string representing the value of this Decimal in fixed-point notation rounded to dp decimal places using rounding mode rm (as toFixed), and formatted according to the properties of this Decimal's constructor's format object property.
+ *
+ * See the examples below for the properties of the format object, their types and their usage.
+ *
+ * If dp is omitted or is null or undefined, then the return value is not rounded to a fixed number of decimal places.
+ *
+ * if rm is omitted or is null or undefined, rounding mode rounding is used.
+ */
+ toFormat(dp?: number, rm?: RoundingMode): string;
+
+ /**
+ * Returns a string array representing the value of this Decimal as a simple fraction with an integer numerator and an integer denominator. The denominator will be a positive non-zero value less than or equal to max_denominator.
+ *
+ * If a maximum denominator is not specified, or is null or undefined, the denominator will be the lowest value necessary to represent the number exactly.
+ */
+ toFraction(max_denominator?: number | string | Decimal): string[];
+
+ toJSON(): string;
+
+ /**
+ * Returns a new Decimal whose value is the nearest multiple of n to the value of this Decimal.
+ *
+ * If the value of this Decimal is equidistant from two multiples of n, the rounding mode rm, or rounding if rm is omitted or is null or undefined, determines the direction of the nearest.
+ *
+ * In this context, rounding mode ROUND_HALF_UP is interpreted the same as rounding mode ROUND_UP, and so on. I.e. the rounding is either up, own, to ceil, to floor or to even.
+ *
+ * The return value will always have the same sign as this Decimal, unless either this Decimal or n is NaN, in which case the return value will be also be NaN.
+ *
+ * The return value is not rounded to precision.
+ */
+ toNearest(n: number | string | Decimal, rm?: RoundingMode): Decimal;
+
+ /**
+ * Returns the value of this Decimal converted to a number primitive.
+ *
+ * Type coercion with, for example, JavaScript's unary plus operator will also work, except that a Decimal with the value minus zero will convert to positive zero.
+ */
+ toNumber(): number;
+
+ /**
+ * Returns a new Decimal whose value is the value of this Decimal raised to the power n, rounded to precision significant digits using rounding mode rounding.
+ *
+ * The performance of this method degrades exponentially with increasing digits. For non-integer exponents in particular, the performance of this method may not be adequate.
+ */
+ toPower(n: number | string | Decimal, base?: number): Decimal;
+
+ /**
+ * Returns a new Decimal whose value is the value of this Decimal raised to the power n, rounded to precision significant digits using rounding mode rounding.
+ *
+ * The performance of this method degrades exponentially with increasing digits. For non-integer exponents in particular, the performance of this method may not be adequate.
+ */
+ pow(n: number | string | Decimal, base?: number): Decimal;
+
+ /**
+ * Returns a string representing the value of this Decimal rounded to sd significant digits using rounding mode rm.
+ *
+ * If sd is less than the number of digits necessary to represent the integer part of the value in normal (fixed-point) notation, then exponential notation is used.
+ *
+ * If sd is omitted or is null or undefined, then the return value is the same as toString.
+ *
+ * if rm is omitted or is null or undefined, rounding mode rounding is used.
+ */
+ toPrecision(sd?: number, rm?: RoundingMode): string;
+
+ /**
+ * Returns a new Decimal whose value is the value of this Decimal rounded to sd significant digits using rounding mode rm.
+ *
+ * If sd is omitted or is null or undefined, the return value will be rounded to precision significant digits.
+ *
+ * if rm is omitted or is null or undefined, rounding mode rounding will be used.
+ */
+ toSignificantDigits(sd?: number, rm?: RoundingMode): Decimal;
+
+ /**
+ * Returns a new Decimal whose value is the value of this Decimal rounded to sd significant digits using rounding mode rm.
+ *
+ * If sd is omitted or is null or undefined, the return value will be rounded to precision significant digits.
+ *
+ * if rm is omitted or is null or undefined, rounding mode rounding will be used.
+ */
+ toSD(sd?: number, rm?: RoundingMode): Decimal;
+
+ /**
+ * base: number: integer, 2 to 64 inclusive
+ *
+ * Returns a string representing the value of this Decimal in the specified base, or base 10 if base is omitted or is null or undefined.
+ *
+ * For bases above 10, values from 10 to 35 are represented by a-z (as with Number.prototype.toString), 36 to 61 by A-Z, and 62 and 63 by $ and _ respectively.
+ *
+ * If a base is specified the value is rounded to precision significant digits using rounding mode rounding.
+ *
+ * If a base is not specified and this Decimal has a positive exponent that is equal to or greater than toExpPos, or a negative exponent equal to or less than toExpNeg, then exponential notation is returned.
+ *
+ * If base is null or undefined it is ignored.
+ */
+ toString(base?: number): string;
+
+ /**
+ * Returns a new Decimal whose value is the value of this Decimal truncated to a whole number.
+ *
+ * The return value is not rounded to precision.
+ */
+ truncated(): Decimal;
+
+ /**
+ * Returns a new Decimal whose value is the value of this Decimal truncated to a whole number.
+ *
+ * The return value is not rounded to precision.
+ */
+ trunc(): Decimal;
+
+ /**
+ * As toString, but does not accept a base argument.
+ */
+ valueOf(): string;
+
+ /**
+ * coefficient
+ *
+ * Array of integers, each 0 - 1e7
+ */
+ c: number[];
+
+ /**
+ * exponent
+ *
+ * Integer, -9e15 to 9e15 inclusive
+ */
+ e: number;
+
+ /**
+ * sign
+ *
+ * -1 or 1
+ */
+ s: number;
+ }
+}
diff --git a/dexie/dexie-tests.ts b/dexie/dexie-tests.ts
new file mode 100644
index 0000000000..25deb115d4
--- /dev/null
+++ b/dexie/dexie-tests.ts
@@ -0,0 +1,256 @@
+///
+
+import Dexie = require("Dexie");
+
+module Utils {
+
+ export class Console {
+ textarea: HTMLTextAreaElement;
+
+ constructor() {
+ this.textarea = document.createElement('textarea');
+ }
+
+ log(txt: string, type?: string) {
+ if (type) this.textarea.value += type + " ";
+ this.textarea.value += txt + "\n";
+ }
+ error = function (txt: string) {
+ this.log(txt, "ERROR!");
+ }
+ }
+
+}
+
+module AppDb {
+
+ export class AppDatabase extends Dexie {
+
+ contacts: Dexie.Table;
+ emails: Dexie.Table;
+ phones: Dexie.Table;
+
+ constructor() {
+
+ super("MyTypeScriptAppDb");
+
+ var db = this;
+
+ //
+ // Define tables and indexes
+ //
+ db.version(1).stores({
+ contacts: '++id, first, last',
+ emails: '++id, contactId, type, email',
+ phones: '++id, contactId, type, phone',
+ });
+
+ // Let's physically map Contact class to contacts table.
+ // This will make it possible to call loadEmailsAndPhones()
+ // directly on retrieved database objects.
+ db.contacts.mapToClass(Contact);
+ }
+ }
+
+ /* Just for code completion and compilation - defines
+ * the interface of objects stored in the emails table.
+ */
+ export interface IEmailAddress {
+ id?: number;
+ contactId: number;
+ type: string;
+ email: string;
+ }
+
+ /* Just for code completion and compilation - defines
+ * the interface of objects stored in the phones table.
+ */
+ export interface IPhoneNumber {
+ id?: number;
+ contactId: number;
+ type: string;
+ phone: string;
+ }
+
+ /* This is a 'physical' class that is mapped to
+ * the contacts table. We can have methods on it that
+ * we could call on retrieved database objects.
+ */
+ export class Contact {
+ id: number;
+ first: string;
+ last: string;
+ emails: IEmailAddress[];
+ phones: IPhoneNumber[];
+
+ constructor(first: string, last: string, id?: number) {
+ this.first = first;
+ this.last = last;
+ if (id) this.id = id;
+ }
+
+ loadEmailsAndPhones() : Dexie.Promise {
+ return Dexie.Promise.all(
+ db.emails
+ .where('contactId').equals(this.id)
+ .toArray(emails => this.emails = emails)
+ ,
+ db.phones
+ .where('contactId').equals(this.id)
+ .toArray(phones => this.phones = phones)
+
+ ).then(() => this);
+ }
+
+ save() {
+ return db.transaction('rw', db.contacts, db.emails, db.phones, () => {
+ Dexie.Promise.all(
+ // Save existing arrays
+ Dexie.Promise.all(this.emails.map(email => db.emails.put(email))),
+ Dexie.Promise.all(this.phones.map(phone => db.phones.put(phone))))
+ .then(results => {
+ // Remove items from DB that is was not saved here:
+ var emailIds = results[0], // array of resulting primary keys
+ phoneIds = results[1]; // array of resulting primary keys
+
+ db.emails.where('contactId').equals(this.id)
+ .and(email => emailIds.indexOf(email.id) === -1)
+ .delete();
+
+ db.phones.where('contactId').equals(this.id)
+ .and(phone => phoneIds.indexOf(phone.id) === -1)
+ .delete();
+
+ // At last, save our own properties.
+ // (Must not do put(this) because we would get
+ // reduntant emails/phones arrays saved into db)
+ db.contacts.put(
+ new Contact(this.first, this.last, this.id))
+ .then(id => this.id = id);
+ });
+ });
+ }
+ }
+
+ export var db = new AppDatabase();
+ db.open();
+}
+
+
+import Console = Utils.Console;
+import db = AppDb.db;
+
+document.addEventListener('DOMContentLoaded', () => {
+
+ // Initialize our Console widget - it will log browser window.
+ var console = new Console();
+ document.getElementById('consoleArea').appendChild(console.textarea);
+
+ // Test it:
+ console.log("Hello world!");
+
+ // Make sure to never miss any unexpected error:
+ Dexie.Promise.on.error.subscribe(e => {
+ // Log any uncatched error:
+ console.error(e);
+ });
+
+ //
+ // Let's clear and re-seed the database:
+ //
+ clearDatabase()
+ .then(seedDatabase)
+ .then(playALittle_add_phone_to_adam)
+ .then(printContacts);
+
+ function clearDatabase() {
+ console.log("Clearing database...");
+ return Dexie.Promise.all(
+ db.contacts.clear(),
+ db.emails.clear(),
+ db.phones.clear());
+ }
+
+ function seedDatabase() {
+ console.log("Seeding database with some contacts...");
+ return db.transaction('rw', db.contacts, db.emails, db.phones, () => {
+ // Populate a contact
+ db.contacts.add(new AppDb.Contact('Arnold', 'Fitzgerald')).then(id => {
+ // Populate some emails and phone numbers for the contact
+ db.emails.add({ contactId: id, type: 'home', email: 'arnold@email.com' });
+ db.emails.add({ contactId: id, type: 'work', email: 'arnold@abc.com' });
+ db.phones.add({ contactId: id, type: 'home', phone: '12345678' });
+ db.phones.add({ contactId: id, type: 'work', phone: '987654321' });
+ });
+
+ // ... and another one...
+ db.contacts.add(new AppDb.Contact('Adam', 'Tensta')).then(id => {
+ // Populate some emails and phone numbers for the contact
+ db.emails.add({ contactId: id, type: 'home', email: 'adam@tensta.se' });
+ db.phones.add({ contactId: id, type: 'work', phone: '88888888' });
+ });
+ });
+ }
+
+ function playALittle_add_phone_to_adam() {
+ // Now, just to examplify how to use the save() method as an alternative
+ // to db.phones.add(), we will add yet another phone number
+ // to an existing contact and then re-save it:
+ console.log("Playing a little: adding another phone entry for Adam Tensta...");
+ return db.contacts
+ .where('last').equals('Tensta').first(c => c.loadEmailsAndPhones())
+ .then(contact => {
+ // Also add another phone number to Adam Tensta:
+ contact.phones.push({
+ contactId: contact.id,
+ type: 'custom',
+ phone: '112'
+ });
+ contact.save();
+ });
+ }
+
+ function printContacts() {
+
+ // Now we're gonna list all contacts starting with letter 'A'
+ // and print them out.
+ // For each contact, also resolve its collection of
+ // phone number entries and email addresses by reverse-quering
+ // the foreign tables.
+
+ // For atomicity and speed, use a single transaction for the
+ // queries to make:
+ db.transaction('r', [db.contacts, db.phones, db.emails], () => {
+
+ // Query some contacts
+ return db.contacts
+ .where('first').startsWithIgnoreCase('a')
+ .sortBy('id')
+ .then(contacts =>
+
+ // Resolve array properties 'emails' and 'phones'
+ // on each and every contact:
+ Dexie.Promise.all(
+ contacts.map(contact =>
+ contact.loadEmailsAndPhones()))
+ );
+
+ }).then(contacts => {
+
+ // Print result
+ console.log("Database contains the following contacts:");
+ contacts.forEach(contact => {
+ console.log(contact.id + ". " + contact.first + " " + contact.last);
+ console.log(" Phone numbers: ");
+ contact.phones.forEach(phone => {
+ console.log(" " + phone.phone + "(" + phone.type + ")");
+ });
+ console.log(" Emails: ");
+ contact.emails.forEach(email => {
+ console.log(" " + email.email + "(" + email.type + ")");
+ });
+ });
+ });
+ }
+});
+
diff --git a/dexie/dexie.d.ts b/dexie/dexie.d.ts
new file mode 100644
index 0000000000..eb6854ce2e
--- /dev/null
+++ b/dexie/dexie.d.ts
@@ -0,0 +1,320 @@
+// Type definitions for Dexie v1.1
+// Project: https://github.com/dfahlander/Dexie.js
+// Definitions by: David Fahlander
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+interface Thenable {
+ then(onFulfilled: (value: R) => Thenable, onRejected: (error: any) => Thenable): Thenable;
+ then(onFulfilled: (value: R) => Thenable, onRejected?: (error: any) => U): Thenable;
+ then(onFulfilled: (value: R) => U, onRejected: (error: any) => Thenable): Thenable;
+ then(onFulfilled?: (value: R) => U, onRejected?: (error: any) => U): Thenable;
+}
+
+declare class Dexie {
+ constructor(databaseName: string);
+
+ constructor(databaseName: string, options: { addons: Array<(db: Dexie) => void> });
+
+ name: string;
+ tables: Dexie.Table[];
+ verno: number;
+
+ static addons: Array<(db: Dexie) => void>;
+ static version: number;
+
+ static getDatabaseNames(): Dexie.Promise>;
+
+ static getDatabaseNames(onFulfilled: (value: Array) => Thenable): Dexie.Promise;
+
+ static getDatabaseNames(onFulfilled: (value: Array) => U): Dexie.Promise;
+
+ static getByKeyPath(obj: Object, keyPath: string): any;
+
+ static setByKeyPath(obj: Object, keyPath: string, value: any): void;
+
+ static delByKeyPath(obj: Object, keyPath: string): void;
+
+ static shallowClone(obj: Object): Object;
+
+ static deepClone(obj: Object): Object;
+
+ version(versionNumber: Number): Dexie.Version
+
+ on: {
+ (eventName: string, subscriber: () => any): void;
+ (eventName: string, subscriber: () => any, bSticky: boolean): void;
+ ready: Dexie.DexieOnReadyEvent;
+ error: Dexie.DexieErrorEvent;
+ populate: Dexie.DexieEvent;
+ blocked: Dexie.DexieEvent;
+ versionchange: Dexie.DexieVersionChangeEvent;
+ }
+
+ open(): Dexie.Promise;
+
+ table(tableName: string): Dexie.Table;
+
+ table(tableName: string): Dexie.Table;
+
+ table(tableName: string): Dexie.Table;
+
+ transaction(mode: string, table: Dexie.Table, scope: () => Thenable): Dexie.Promise;
+
+ transaction(mode: string, table: Dexie.Table, table2: Dexie.Table, scope: () => Thenable): Dexie.Promise;
+
+ transaction(mode: string, table: Dexie.Table, table2: Dexie.Table, table3: Dexie.Table, scope: () => Thenable): Dexie.Promise;
+
+ transaction(mode: string, tables: Dexie.Table[], scope: () => Thenable): Dexie.Promise;
+
+ transaction(mode: string, table: Dexie.Table, scope: () => U): Dexie.Promise;
+
+ transaction(mode: string, table: Dexie.Table, table2: Dexie.Table, scope: () => U): Dexie.Promise;
+
+ transaction(mode: string, table: Dexie.Table, table2: Dexie.Table, table3: Dexie.Table, scope: () => U): Dexie.Promise;
+
+ transaction(mode: string, tables: Dexie.Table[], scope: () => U): Dexie.Promise;
+
+ close(): void;
+
+ delete(): Dexie.Promise;
+
+ isOpen(): boolean;
+
+ hasFailed(): boolean;
+
+ backendDB(): IDBDatabase;
+
+ vip(scopeFunction: () => U): U;
+}
+
+declare module Dexie {
+
+ class Promise implements Thenable {
+ constructor(callback: (resolve: (value?: Thenable) => void, reject: (error?: any) => void) => void);
+
+ constructor(callback: (resolve: (value?: R) => void, reject: (error?: any) => void) => void);
+
+ then(onFulfilled: (value: R) => Thenable, onRejected: (error: any) => Thenable): Promise;
+
+ then(onFulfilled: (value: R) => Thenable, onRejected?: (error: any) => U): Promise;
+
+ then(onFulfilled: (value: R) => U, onRejected: (error: any) => Thenable): Promise;
+
+ then(onFulfilled?: (value: R) => U, onRejected?: (error: any) => U): Promise;
+
+ catch(onRejected: (error: any) => Promise): Promise;
+
+ catch(ExceptionType: Function, onRejected: (error : any) => Promise): Promise;
+
+ catch(errorName: string, onRejected: (error : any) => Promise): Promise;
+
+ finally(onFinally: () => any): Promise;
+
+ onuncatched: () => any;
+ }
+
+ module Promise {
+ function resolve(value?: Thenable): Promise;
+
+ function resolve(value?: R): Promise;
+
+ function reject(error: any): Promise;
+
+ function all(promises: Thenable[]): Promise;
+
+ function all(...promises: Thenable[]): Promise;
+
+ function race(promises: Thenable[]): Promise;
+
+ function newPSD(scope: () => R): R;
+
+ var PSD: any;
+
+ var on: {
+ (eventName: string, subscriber: (...args : any[]) => any): void;
+ error: DexieErrorEvent;
+ }
+ }
+
+
+ interface Version {
+ stores(schema: { [key: string]: string }): Version;
+ upgrade(fn: (trans: Transaction) => void): Version;
+ }
+
+ interface Transaction {
+ active: boolean;
+ db: Dexie;
+ mode: string;
+ idbtrans: IDBTransaction;
+ tables: { [type: string]: Table };
+ storeNames: Array;
+ on: {
+ (eventName: string, subscriber: () => any): void;
+ complete: DexieEvent;
+ abort: DexieEvent;
+ error: DexieEvent;
+ }
+ abort(): void;
+ table(tableName: string): Table;
+ table(tableName: string): Table;
+ table(tableName: string): Table;
+ }
+
+ interface DexieEvent {
+ subscribe(fn: () => any) : void;
+ unsubscribe(fn: () => any) : void;
+ fire() : any;
+ }
+
+ interface DexieErrorEvent {
+ subscribe(fn: (error: any) => any) : void;
+ unsubscribe(fn: (error: any) => any) : void;
+ fire(error: any) : any;
+ }
+
+ interface DexieVersionChangeEvent {
+ subscribe(fn: (event: IDBVersionChangeEvent) => any) : void;
+ unsubscribe(fn: (event: IDBVersionChangeEvent) => any) : void;
+ fire(event: IDBVersionChangeEvent) : any;
+ }
+
+ interface DexieOnReadyEvent
+ {
+ subscribe(fn: () => any, bSticky: boolean) : void;
+ unsubscribe(fn: () => any) : void;
+ fire() : any;
+ }
+
+ interface Table {
+ name: string;
+ schema: TableSchema;
+ hook: {
+ (eventName: string, subscriber: () => any): void;
+ creating: DexieEvent;
+ reading: DexieEvent;
+ updating: DexieEvent;
+ deleting: DexieEvent;
+ }
+
+ get(key: Key): Promise;
+ where(index: string): WhereClause;
+
+ filter(fn: (obj: T) => boolean): Collection;
+
+ count(): Promise;
+ count(onFulfilled: (value: number) => Thenable): Promise;
+ count(onFulfilled: (value: number) => U): Promise;
+
+ offset(n: number): Collection;
+
+ limit(n: number): Collection;
+
+ each(callback: (obj: T, cursor: IDBCursor) => any): Promise;
+
+ toArray(): Promise>;
+ toArray(onFulfilled: (value: Array) => Thenable): Promise;
+ toArray(onFulfilled: (value: Array) => U): Promise;
+
+ toCollection(): Collection;
+ orderBy(index: string): Collection;
+ reverse(): Collection;
+ mapToClass(constructor: Function): Function;
+ add(item: T, key?: Key): Promise;
+ update(key: Key, changes: { [keyPath: string]: any }) : Promise;
+ put(item: T, key?: Key): Promise;
+ delete(key: Key): Promise;
+ clear(): Promise;
+ }
+
+ interface WhereClause {
+ above(key: number): Collection;
+ above(key: string): Collection;
+ above(key: Date): Collection;
+ above(key: Array): Collection;
+ aboveOrEqual(key: number): Collection;
+ aboveOrEqual(key: string): Collection;
+ aboveOrEqual(key: Date): Collection;
+ aboveOrEqual(key: Array): Collection;
+ anyOf(keys: Array): Collection;
+ anyOf(...keys: any[]): Collection;
+ below(key: number): Collection;
+ below(key: string): Collection;
+ below(key: Date): Collection;
+ below(key: Array): Collection;
+ belowOrEqual(key: number): Collection;
+ belowOrEqual(key: string): Collection;
+ belowOrEqual(key: Date): Collection;
+ belowOrEqual(key: Array): Collection;
+ between(lower: number, upper: number, includeLower?: boolean, includeUpper?: boolean): Collection;
+ between(lower: string, upper: string, includeLower?: boolean, includeUpper?: boolean): Collection;
+ between(lower: Date, upper: Date, includeLower?: boolean, includeUpper?: boolean): Collection;
+ between(lower: Array, upper: Array, includeLower?: boolean, includeUpper?: boolean): Collection;
+ equals(key: number): Collection;
+ equals(key: string): Collection;
+ equals(key: Date): Collection;
+ equals(key: Array): Collection;
+ equalsIgnoreCase(key: string): Collection;
+ startsWith(key: string): Collection;
+ startsWithIgnoreCase(key: string): Collection;
+ }
+
+ interface Collection {
+ and(filter: (x: T) => boolean): Collection;
+ count(): Promise;
+ count(onFulfilled: (value: number) => Thenable): Promise;
+ count(onFulfilled: (value: number) => U): Promise;
+ distinct(): Collection;
+ each(callback: (obj: T, cursor: IDBCursor) => any): Promise;
+ eachKey(callback: (key: Key, cursor: IDBCursor) => any): Promise;
+ eachUniqueKey(callback: (key: Key, cursor: IDBCursor) => any): Promise;
+ first(): Promise;
+ first(onFulfilled: (value: T) => Thenable): Promise;
+ first(onFulfilled: (value: T) => U): Promise;
+ keys(): Promise;
+ keys(onFulfilled: (value: Key[]) => Thenable): Promise;
+ keys(onFulfilled: (value: Key[]) => U): Promise;
+ last(): Promise;
+ last(onFulfilled: (value: T) => Thenable): Promise;
+ last(onFulfilled: (value: T) => U): Promise;
+ limit(n: number): Collection;
+ offset(n: number): Collection;
+ or(indexOrPrimayKey: string): WhereClause;
+ reverse(): Collection;
+ sortBy(keyPath: string): Promise;
+ sortBy(keyPath: string, onFulfilled: (value: T[]) => Thenable): Promise;
+ sortBy(keyPath: string, onFulfilled: (value: T[]) => U): Promise;
+ toArray(): Promise>;
+ toArray(onFulfilled: (value: Array) => Thenable): Promise;
+ toArray(onFulfilled: (value: Array) => U): Promise;
+ uniqueKeys(): Promise;
+ uniqueKeys(onFulfilled: (value: Key[]) => Thenable): Promise;
+ uniqueKeys(onFulfilled: (value: Key[]) => U): Promise;
+ until(filter: (value: T) => boolean, includeStopEntry?: boolean): Collection;
+ // WriteableCollection:
+ delete(): Promise;
+ modify(changes: { [keyPath: string]: any }): Promise;
+ modify(changeCallback: (obj: T) => void): Promise;
+ }
+
+ interface TableSchema {
+ name: string;
+ primKey: IndexSpec;
+ indexes: IndexSpec[];
+ mappedClass: Function;
+ }
+
+ interface IndexSpec {
+ name: string;
+ keyPath: any;
+ unique: boolean;
+ multi: boolean;
+ auto: boolean;
+ compound: boolean;
+ src: string;
+ }
+}
+
+declare module 'Dexie' {
+ export = Dexie;
+}
diff --git a/drop/drop-tests.ts b/drop/drop-tests.ts
index b5ae47456c..22f83dc2ef 100644
--- a/drop/drop-tests.ts
+++ b/drop/drop-tests.ts
@@ -10,7 +10,10 @@ var d = new Drop({
constrainToWindow: true,
constrainToScrollParent: true,
classes: "",
- tetherOptions: {}
+ tetherOptions: {},
+ remove: true,
+ target: yellowBox,
+ content: greenBox
});
d.open();
@@ -19,6 +22,8 @@ d.remove();
d.toggle();
d.position();
d.destroy();
+d.element.appendChild(document.createElement("div"));
+d.tether.position();
d.on("open", () => null);
d.on("close", () => null);
@@ -26,3 +31,8 @@ d.once("close", () => null);
d.off("close", () => null);
d.off("open");
+var e = new Drop({
+ target: yellowBox,
+ content: () => greenBox
+});
+
diff --git a/drop/drop.d.ts b/drop/drop.d.ts
index e3615d5105..85cfd0766f 100644
--- a/drop/drop.d.ts
+++ b/drop/drop.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for Drop v0.5
+// Type definitions for Drop v0.5.7
// Project: http://github.hubspot.com/drop/
// Definitions by: Adi Dahiya
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -19,7 +19,7 @@ declare module drop {
interface IDropOptions {
target?: Element;
- content?: Element | string | (() => string);
+ content?: Element | string | ((drop?: Drop) => string) | ((drop?: Drop) => Element);
position?: string;
openOn?: string;
constrainToWindow?: boolean;
@@ -30,6 +30,8 @@ declare module drop {
interface Drop {
content: HTMLElement;
+ element: HTMLElement;
+ tether: tether.Tether;
open(): void;
close(): void;
remove(): void;
diff --git a/dsv/dsv-tests.ts b/dsv/dsv-tests.ts
new file mode 100644
index 0000000000..93ff59f04c
--- /dev/null
+++ b/dsv/dsv-tests.ts
@@ -0,0 +1,8 @@
+///
+
+import dsv = require("dsv");
+
+var csv = dsv(",");
+
+var rows = csv.parse("a,b,c\n1,2,3\n4,5,6");
+
diff --git a/dsv/dsv.d.ts b/dsv/dsv.d.ts
new file mode 100644
index 0000000000..797befb370
--- /dev/null
+++ b/dsv/dsv.d.ts
@@ -0,0 +1,68 @@
+// Type definitions for dsv
+// Project: https://www.npmjs.com/package/dsv
+// Definitions by: Jason Swearingen
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+
+//commonjs loader
+declare module "dsv" {
+
+ /** A parser and formatter for DSV (CSV and TSV) files.
+Extracted from D3. */
+ var loader: (
+ /** the symbol used to seperate cells in the row.*/
+ delimiter: string,
+ /** example: "text/plain" */
+ encoding?: string) => _dsv.Dsv;
+ export = loader;
+}
+
+declare module _dsv {
+ /** A parser and formatter for DSV (CSV and TSV) files.
+Extracted from D3. */
+ export class Dsv {
+ /** Parses the specified string, which is the contents of a CSV file, returning an array of objects representing the parsed rows.
+ The string is assumed to be RFC4180-compliant.
+ Unlike the parseRows method, this method requires that the first line of the CSV file contains a comma-separated list of column names;
+ these column names become the attributes on the returned objects.
+ For example, consider the following CSV file:
+
+Year,Make,Model,Length
+1997,Ford,E350,2.34
+2000,Mercury,Cougar,2.38
+
+The resulting JavaScript array is:
+
+[ {"Year": "1997", "Make": "Ford", "Model": "E350", "Length": "2.34"},
+ {"Year": "2000", "Make": "Mercury", "Model": "Cougar", "Length": "2.38"} ]
+ */
+ public parse