diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 73a873bfaf..7d495dca8f 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -5,6 +5,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](acc-wizard/acc-wizard.d.ts) [acc-wizard](https://github.com/sathomas/acc-wizard) by [Cyril Schumacher](https://github.com/cyrilschumacher)
* [:link:](accounting/accounting.d.ts) [accounting.js](http://josscrowcroft.github.io/accounting.js) by [Sergey Gerasimov](https://github.com/gerich-home)
* [:link:](ace/ace.d.ts) [Ace Ajax.org Cloud9 Editor](http://ace.ajax.org) by [Diullei Gomes](https://github.com/Diullei)
+* [:link:](acorn/acorn.d.ts) [Acorn](https://github.com/marijnh/acorn) by [RReverser](https://github.com/RReverser)
* [:link:](add2home/add2home.d.ts) [add2home](http://cubiq.org/add-to-home-screen) by [James Wilkins](http://www.codeplex.com/site/users/view/jamesnw)
* [:link:](adm-zip/adm-zip.d.ts) [adm-zip](https://github.com/cthackers/adm-zip) by [John Vilk](https://github.com/jvilk)
* [:link:](alertify/alertify.d.ts) [alertify](http://fabien-d.github.io/alertify.js) by [John Jeffery](http://github.com/jjeffery)
@@ -12,6 +13,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](amplifyjs/amplifyjs.d.ts) [AmplifyJs](http://amplifyjs.com) by [Jonas Eriksson](https://github.com/joeriks)
* [:link:](amqp-rpc/amqp-rpc.d.ts) [amqp-rpc](https://github.com/demchenkoe/node-amqp-rpc) by [Wonshik Kim](https://github.com/wokim)
* [:link:](angular-file-upload/angular-file-upload.d.ts) [Angular File Upload](https://github.com/danialfarid/angular-file-upload) by [John Reilly](https://github.com/johnnyreilly)
+* [:link:](angular-growl-v2/angular-growl-v2.d.ts) [Angular Growl 2 v.0.7.3](http://janstevens.github.io/angular-growl-2) by [Tadeusz Hucal](https://github.com/mkp05)
* [:link:](angularjs/angular.d.ts) [Angular JS](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar)
* [:link:](angularjs/angular-animate.d.ts) [Angular JS (ngAnimate module)](http://angularjs.org) by [Michel Salib](https://github.com/michelsalib), [Adi Dahiya](https://github.com/adidahiya), [Raphael Schweizer](https://github.com/rasch)
* [:link:](angularjs/angular-cookies.d.ts) [Angular JS (ngCookies module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar)
@@ -41,6 +43,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](any-db/any-db.d.ts) [any-db](https://github.com/grncdr/node-any-db) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](any-db-transaction/any-db-transaction.d.ts) [any-db-transaction](https://github.com/grncdr/node-any-db-transaction) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](cordova/cordova.d.ts) [Apache Cordova](http://cordova.apache.org) by [Microsoft Open Technologies Inc.](http://msopentech.com)
+* [:link:](cordova-plugin-email-composer/cordova-plugin-email-composer.d.ts) [Apache Cordova Email Composer plugin](https://github.com/katzer/cordova-plugin-email-composer) by [Dave Taylor](http://davetayls.me)
* [:link:](polymer/polymer.app-router.d.ts) [app-router](https://github.com/erikringsmuth/app-router) by [Louis Grignon](https://github.com/lgrignon)
* [:link:](appframework/appframework.d.ts) [AppFramework](http://app-framework-software.intel.com) by [kyo_ago](https://github.com/kyo-ago)
* [:link:](arbiter/Arbiter.d.ts) [Arbiter.js](http://arbiterjs.com) by [Arash Shakery](https://github.com/arash16)
@@ -57,6 +60,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](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)
* [:link:](node-azure/azure.d.ts) [Azure SDK for Node](https://github.com/WindowsAzure/azure-sdk-for-node) by [Andrew Gaspar](https://github.com/AndrewGaspar), [Anti Veeranna](https://github.com/antiveeranna), [Maxime LUCE](https://github.com/SomaticIT)
@@ -83,8 +88,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](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:](bootstrap.timepicker/bootstrap.timepicker.d.ts) [bootstrap.timepicker](https://github.com/jdewit/bootstrap-timepicker) by [derikwhittaker](https://github.com/derikwhittaker)
* [: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)
@@ -191,7 +196,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](errorhandler/errorhandler.d.ts) [errorhandler](https://github.com/expressjs/errorhandler) by [Santi Albo](https://github.com/santialbo)
* [:link:](es6-promise/es6-promise.d.ts) [es6-promise](https://github.com/jakearchibald/ES6-Promise) by [François de Campredon](https://github.com/fdecampredon), [vvakame](https://github.com/vvakame)
* [:link:](escape-latex/escape-latex.d.ts) [escape-latex](https://github.com/dangmai/escape-latex) by [Oliver Schneider](https://github.com/olsio)
-* [:link:](esprima/esprima.d.ts) [Esprima](http://esprima.org) by [teppeis](https://github.com/teppeis)
+* [:link:](esprima/esprima.d.ts) [Esprima](http://esprima.org) by [teppeis](https://github.com/teppeis), [RReverser](https://github.com/RReverser)
+* [:link:](estree/estree.d.ts) [ESTree AST specification](https://github.com/estree/estree) by [RReverser](https://github.com/RReverser)
* [:link:](event-loop-lag/event-loop-lag.d.ts) [event-loop-lag](https://github.com/pebble/event-loop-lag) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](eventemitter2/eventemitter2.d.ts) [EventEmitter2](https://github.com/asyncly/EventEmitter2) by [ryiwamoto](https://github.com/ryiwamoto)
* [:link:](eventemitter3/eventemitter3.d.ts) [EventEmitter3](https://github.com/primus/eventemitter3) by [Yuichi Murata](https://github.com/mrk21)
@@ -239,6 +245,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](fs-finder/fs-finder.d.ts) [fs-finder](https://github.com/sakren/node-fs-finder) by [Michael Zabka](https://github.com/misak113)
* [:link:](fs-mock/fs-mock.d.ts) [fs-mock](https://github.com/sakren/node-fs-mock) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](ftdomdelegate/ftdomdelegate.d.ts) [ftdomdelegate](https://github.com/ftlabs/ftdomdelegate) by [Christian Holm Nielsen](https://github.com/dotnetnerd)
+* [:link:](ftp/ftp.d.ts) [ftp](https://github.com/mscdex/node-ftp) by [Rogier Schouten](https://github.com/rogierschouten)
+* [:link:](ftpd/ftpd.d.ts) [ftpd](https://github.com/sstur/nodeftpd) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](fullCalendar/fullCalendar.d.ts) [FullCalendar](http://arshaw.com/fullcalendar) by [Neil Stalker](https://github.com/nestalk)
* [:link:](fuse/fuse.d.ts) [Fuse.js](https://github.com/krisk/Fuse) by [Greg Smith](https://github.com/smrq)
* [:link:](jquery-galleria/jquery-galleria.d.ts) [galleria.js](https://github.com/aino/galleria) by [Robert Imig](https://github.com/rimig)
@@ -299,6 +307,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](hapi/hapi.d.ts) [hapi](http://github.com/spumko/hapi) by [Jason Swearingen](http://github.com/jasonswearingen)
* [:link:](hasher/hasher.d.ts) [Hasher.js](https://github.com/millermedeiros/hasher) by [flyfishMT](https://github.com/flyfishMT)
* [:link:](hashmap/hashmap.d.ts) [HashMap](https://github.com/flesler/hashmap) by [Rafał Wrzeszcz](http://wrzasq.pl)
+* [:link:](he/he.d.ts) [he](https://github.com/mathiasbynens/he) by [Simon Edwards](https://github.com/sedwards2009)
* [:link:](Headroom/headroom.d.ts) [headroom.js](http://wicky.nillia.ms/headroom.js) by [Jakub Olek](https://github.com/hakubo)
* [:link:](heatmap.js/heatmap.d.ts) [heatmap.js](https://github.com/pa7/heatmap.js) by [Yang Guan](https://github.com/lookuptable)
* [:link:](hellojs/hellojs.d.ts) [hello.js](http://adodson.com/hello.js) by [Pavel Zika](https://github.com/PavelPZ)
@@ -319,6 +328,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](icheck/icheck.d.ts) [iCheck](http://damirfoy.com/iCheck) by [Dániel Tar](https://github.com/qcz)
* [:link:](imagemagick/imagemagick.d.ts) [imagemagick](http://github.com/rsms/node-imagemagick) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](imap/imap.d.ts) [imap](https://www.npmjs.com/package/imap) by [Peter Snider](https://github.com/psnider)
+* [:link:](imgur-rest-api/imgur-rest-api.d.ts) [Imgur REST API v3](https://api.imgur.com) by [Luke William Westby](http://github.com/lukewestby)
* [:link:](impress/impress.d.ts) [Impress.js](https://github.com/bartaz/impress.js) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](inflection/inflection.d.ts) [inflection](https://github.com/dreamerslab/node.inflection) by [Shogo Iwano](https://github.com/shiwano)
* [:link:](ini/ini.d.ts) [ini](https://github.com/isaacs/ini) by [Marcin Porębski](https://github.com/marcinporebski)
@@ -357,7 +367,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](jquery.contextMenu/jquery.contextMenu.d.ts) [jQuery contextMenu](http://medialize.github.com/jQuery-contextMenu) by [Natan Vivo](https://github.com/nvivo)
* [:link:](jquery.cookie/jquery.cookie.d.ts) [jQuery Cookie Plugin](https://github.com/carhartl/jquery-cookie) by [Roy Goode](https://github.com/RoyGoode)
* [:link:](jquery.cycle2/jquery.cycle2.d.ts) [jQuery Cycle2 version (build 20140216)](http://jquery.malsup.com/cycle2) by [Donny Nadolny](https://github.com/dnadolny)
-* [:link:](jquery.dataTables/jquery.dataTables.d.ts) [JQuery DataTables](http://www.datatables.net) by [Armin Sander](https://github.com/pragmatrix)
+* [:link:](jquery.dataTables/jquery.dataTables.d.ts) [JQuery DataTables](http://www.datatables.net) by [Kiarash Ghiaseddin](https://github.com/Silver-Connection/DefinitelyTyped), [Omid Rad](https://github.com/omidkrad), [Armin Sander](https://github.com/pragmatrix)
* [:link:](jquery.fileupload/jquery.fileupload.d.ts) [jQuery File Upload Plugin](https://github.com/blueimp/jQuery-File-Upload) by [Rob Alarcon](https://github.com/rob-alarcon)
* [:link:](jquery.joyride/jquery.joyride.d.ts) [jQuery JoyRide Plugin](https://github.com/zurb/joyride) by [Vincent Bortone](https://github.com/vbortone)
* [:link:](jqgrid/jqgrid.d.ts) [jQuery jqgrid Plugin](https://github.com/tonytomov/jqGrid) by [Lokesh Peta](https://github.com/lokeshpeta)
@@ -376,6 +386,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](jquery.ui.datetimepicker/jquery.ui.datetimepicker.d.ts) [jQuery UI DateTimePicker](http://trentrichardson.com/examples/timepicker) by [dougajmcdonald](https://github.com/dougajmcdonald)
* [:link:](jquery.ui.layout/jquery.ui.layout.d.ts) [jQuery UI Layout Plug-in](http://layout.jquery-dev.net) by [Steve Fenton](https://github.com/Steve-Fenton)
* [:link:](jquery.timepicker/jquery.timepicker.d.ts) [jQuery UI Timepicker](http://fgelinas.com/code/timepicker) by [Anwar Javed](https://github.com/anwarjaved)
+* [:link:](jquery-fullscreen/jquery-fullscreen.d.ts) [jquery-fullscreen](https://github.com/kayahr/jquery-fullscreen-plugin) by [Bruno Grieder](https://github.com/bgrieder)
* [:link:](jquery-handsontable/jquery-handsontable.d.ts) [jquery-handsontable](http://handsontable.com) by [Ted John](https://github.com/intelorca)
* [:link:](jquery.menuaim/jquery.menuaim.d.ts) [jQuery-menu-aim](https://github.com/kamens/jQuery-menu-aim) by [Robert Fonseca-Ensor](http://www.robfe.com)
* [:link:](jquery.pjax/jquery.pjax.d.ts) [jquery-pjax](https://github.com/defunkt/jquery-pjax) by [Junle Li](https://github.com/lijunle)
@@ -449,6 +460,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](keymaster/keymaster.d.ts) [keymaster](https://github.com/madrobby/keymaster) by [Martin W. Kirst](https://github.com/nitram509)
* [:link:](keypress/keypress.d.ts) [Keypress](https://github.com/dmauro/Keypress) by [Roger Chen](https://github.com/rcchen)
* [:link:](kineticjs/kineticjs.d.ts) [KineticJS](http://kineticjs.com) by [Basarat Ali Syed](http://www.github.com/basarat), [Ralph de Ruijter](http://www.superdopey.nl/techblog)
+* [:link:](knex/knex.d.ts) [Knex.js](https://github.com/tgriesser/knex) by [Qubo](https://github.com/tkQubo)
* [:link:](knockback/knockback.d.ts) [Knockback.js](http://kmalakoff.github.io/knockback) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](knockout/knockout.d.ts) [Knockout](http://knockoutjs.com) by [Boris Yankov](https://github.com/borisyankov), [Igor Oleinikov](https://github.com/Igorbek), [Clément Bourgeois](https://github.com/moonpyk)
* [:link:](knockout.deferred.updates/knockout.deferred.updates.d.ts) [Knockout Deferred Updates](https://github.com/mbest/knockout-deferred-updates) by [Sebastián Galiano](https://github.com/sgaliano)
@@ -488,6 +500,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](log4javascript/log4javascript.d.ts) [log4javascript](http://log4javascript.org) by [Markus Wagner](https://github.com/Ritzlgrmft)
* [:link:](log4js/log4js.d.ts) [log4js](https://github.com/nomiddlename/log4js-node) by [Kentaro Okuno](http://github.com/armorik83)
* [:link:](logg/logg.d.ts) [logg](https://github.com/dpup/node-logg) by [Bret Little](https://github.com/blittle)
+* [:link:](loggly/loggly.d.ts) [loggly](https://github.com/nodejitsu/node-loggly) by [Ray Martone](https://github.com/rmartone)
* [: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)
@@ -585,8 +598,8 @@ 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-mongodbBackend.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:](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:](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)
@@ -597,16 +610,18 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](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:](nouislider/nouislider.d.ts) [nouislider](https://github.com/leongersen/noUiSlider) 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)
* [:link:](numeraljs/numeraljs.d.ts) [Numeral.js](https://github.com/adamwdraper/Numeral-js) by [Vincent Bortone](https://github.com/vbortone)
* [:link:](object-hash/object-hash.d.ts) [object-hash](https://github.com/puleos/object-hash) by [Michael Zabka](https://github.com/misak113)
-* [:link:](object-path/object-path.d.ts) [objectPath](https://github.com/mariocasciaro/object-path) by [Paulo Cesar](https://github.com/pocesar)
+* [:link:](object-path/object-path.d.ts) [objectPath v0.9.x](https://github.com/mariocasciaro/object-path) by [Paulo Cesar](https://github.com/pocesar)
* [:link:](oboe/oboe.d.ts) [oboe](https://github.com/jimhigson/oboe.js) by [Jared Klopper](https://github.com/optical)
* [:link:](oclazyload/oclazyload.d.ts) [oc.LazyLoad](https://github.com/ocombe/ocLazyLoad) by [Roland Zwaga](https://github.com/rolandzwaga)
+* [:link:](on-finished/on-finished.d.ts) [on-finished](https://github.com/jshttp/on-finished) by [Honza Dvorsky](http://github.com/czechboy0)
+* [:link:](onsenui/onsenui.d.ts) [Onsen UI](http://onsen.io) by [Fran Dios](https://github.com/frankdiox)
* [:link:](open/open.d.ts) [open](https://github.com/jjrdn/node-open) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](openlayers/openlayers.d.ts) [OpenLayers.js](https://github.com/openlayers/openlayers) by [Ilya Bolkhovsky](https://github.com/bolhovsky)
* [:link:](opn/opn.d.ts) [opn](https://github.com/sindresorhus/opn) by [Shinnosuke Watanabe](https://github.com/shinnn)
@@ -631,6 +646,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](phantom/phantom.d.ts) [PhantomJS bridge for NodeJS](https://github.com/sgentle/phantomjs-node) by [horiuchi](https://github.com/horiuchi)
* [:link:](phantomjs/phantomjs.d.ts) [PhantomJS v1.9.0 API](https://github.com/ariya/phantomjs/wiki/API-Reference) by [Jed Hunsaker](https://github.com/jedhunsaker), [Mike Keesey](https://github.com/keesey)
* [:link:](phonegap/phonegap.d.ts) [PhoneGap](http://phonegap.com) by [Boris Yankov](https://github.com/borisyankov), [Dick van den Brink](https://github.com/DickvdBrink)
+* [:link:](photoswipe/photoswipe.d.ts) [PhotoSwipe](http://photoswipe.com) by [Xiaohan Zhang](https://github.com/hellochar)
* [:link:](physijs/physijs.d.ts) [Physijs](http://chandlerprall.github.io/Physijs) by [Satoru Kimura](https://github.com/gyohk)
* [:link:](pickadate/pickadate.d.ts) [pickadate.js](https://github.com/amsul/pickadate.js) by [Adi Dahiya](https://github.com/adidahiya)
* [:link:](pixi/pixi.d.ts) [PIXI](https://github.com/GoodBoyDigital/pixi.js) by [xperiments](http://github.com/xperiments)
@@ -641,8 +657,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](podcast/podcast.d.ts) [podcast](http://github.com/maxnowack/node-podcast) by [Niklas Mollenhauer](https://github.com/nikeee)
* [: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-selector.d.ts) [polymer's paper-toast](https://github.com/Polymer/core-selector) 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)
@@ -717,6 +736,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](semver/semver.d.ts) [semver](https://github.com/isaacs/node-semver) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](sendgrid/sendgrid.d.ts) [sendgrid](https://github.com/sendgrid/sendgrid-nodejs) by [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](sequelize/sequelize.d.ts) [Sequelize 2.0.0 dev13](http://sequelizejs.com) by [samuelneff](https://github.com/samuelneff), [Peter Harris](https://github.com/codeanimal)
+* [:link:](on-headers/on-headers.d.ts) [serve-favicon](https://github.com/jshttp/on-headers) by [John Jeffery](https://github.com/jjeffery)
* [:link:](serve-favicon/serve-favicon.d.ts) [serve-favicon](https://github.com/expressjs/serve-favicon) by [Uros Smolnik](https://github.com/urossmolnik)
* [:link:](serve-static/serve-static.d.ts) [serve-static](https://github.com/expressjs/serve-static) by [Uros Smolnik](https://github.com/urossmolnik)
* [:link:](sharedworker/SharedWorker.d.ts) [SharedWorker](http://www.w3.org/TR/workers) by [Toshiya Nakakura](https://github.com/nakakura)
@@ -735,6 +755,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](sipml/sipml.d.ts) [SIPml5](http://sipml5.org) by [A. Groenenboom](https://github.com/chookies)
* [:link:](sjcl/sjcl.d.ts) [sjcl](http://crypto.stanford.edu/sjcl) by [Eugene Chernyshov](https://github.com/Evgenus)
* [:link:](slickgrid/SlickGrid.d.ts) [SlickGrid](https://github.com/mleibman/SlickGrid) by [Josh Baldwin](https://github.com/jbaldwin)
+* [:link:](slickgrid/slick.autotooltips.d.ts) [SlickGrid AutoToolTips Plugin](https://github.com/mleibman/SlickGrid) by [Ryo Iwamoto](https://github.com/ryiwamoto)
* [:link:](slickgrid/slick.headerbuttons.d.ts) [SlickGrid HeaderButtons Plugin](https://github.com/mleibman/SlickGrid) by [Derek Cicerone](https://github.com/derekcicerone)
* [:link:](slickgrid/slick.rowselectionmodel.d.ts) [SlickGrid RowSelectionModel Plugin](https://github.com/mleibman/SlickGrid) by [Derek Cicerone](https://github.com/derekcicerone)
* [:link:](smoothie/smoothie.d.ts) [Smoothie Charts](https://github.com/joewalnes/smoothie) by [Drew Noakes](https://drewnoakes.com), [Mike H. Hawley](https://github.com/mikehhawley)
@@ -753,6 +774,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
+* [:link:](squirejs/squirejs.d.ts) [Squire](https://github.com/iammerrick/Squire.js) by [Bradley Ayers](https://github.com/bradleyayers)
* [:link:](stack-mapper/stack-mapper.d.ts) [stack-mapper](https://github.com/thlorenz/stack-mapper) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](stampit/stampit.d.ts) [stampit](https://github.com/ericelliott/stampit) by [Vasyl Boroviak](https://github.com/koresar)
* [:link:](stats/stats.d.ts) [Stats.js r12](http://github.com/mrdoob/stats.js) by [Gregory Dalton](https://github.com/gregolai)
@@ -774,6 +796,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
* [:link:](swipeview/swipeview.d.ts) [SwipeView](http://cubiq.org/swipeview) by [Boris Yankov](https://github.com/borisyankov)
+* [:link:](switchery/switchery.d.ts) [switchery](https://github.com/abpetkov/switchery) by [Bruno Grieder](https://github.com/bgrieder)
* [:link:](swiz/swiz.d.ts) [swiz](https://github.com/racker/node-swiz) by [Jeff Goddard](https://github.com/jedigo)
* [:link:](tape/tape.d.ts) [tape](https://github.com/substack/tape) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](tar/tar.d.ts) [tar](https://github.com/npm/node-tar) by [Maxime LUCE](https://github.com/SomaticIT)
@@ -803,7 +826,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](timezonecomplete/timezonecomplete.d.ts) [timezonecomplete](https://github.com/SpiritIT/timezonecomplete) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](tv4/tv4.d.ts) [Tiny Validator tv4](https://github.com/geraintluff/tv4) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](tinycolor/tinycolor.d.ts) [tinycolor](https://github.com/bgrins/TinyColor) by [Mordechai Zuber](https://github.com/M-Zuber)
-* [:link:](titanium/titanium.d.ts) [Titanium Movile 3.1.3.GA](http://www.appcelerator.com) by [Airam Rguez](https://github.com/airamrguez)
+* [:link:](titanium/titanium.d.ts) [Titanium Mobile](http://www.appcelerator.com) by [Craig Younkins](https://github.com/cyounkins)
* [:link:](tmp/tmp.d.ts) [tmp](https://www.npmjs.com/package/tmp) by [Jared Klopper](https://github.com/optical)
* [:link:](toastr/toastr.d.ts) [Toastr](https://github.com/CodeSeven/toastr) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](sencha_touch/SenchaTouch.d.ts) [Touch](http://www.sencha.com/products/touch) by [Brian Kotek](https://github.com/brian428)
@@ -818,6 +841,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](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)
* [:link:](typescript-services/typescriptServices.d.ts) [TypeScript-Services](https://www.npmjs.org/package/typescript-services) by [Basarat Ali Syed](http://github.com/basarat)
* [:link:](unity-webapi/unity-webapi.d.ts) [Ubuntu Unity Web API](https://launchpad.net/libunity-webapps) by [John Vrbanac](jhttps://github.com/jmvrbanac)
* [:link:](underscore/underscore.d.ts) [Underscore](http://underscorejs.org) by [Boris Yankov](https://github.com/borisyankov), [Josh Baldwin](https://github.com/jbaldwin)
@@ -834,6 +858,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](validator/validator.d.ts) [validator.js](https://github.com/chriso/validator.js) by [tgfjt](https://github.com/tgfjt)
* [:link:](vega/vega.d.ts) [Vega](http://trifacta.github.io/vega) by [Tom Crockett](http://github.com/pelotom)
* [:link:](velocity-animate/velocity-animate.d.ts) [Velocity](http://velocityjs.org) by [Greg Smith](https://github.com/smrq)
+* [:link:](vex-js/vex-js.d.ts) [Vex](https://github.com/HubSpot/vex) by [Greg Cohan](https://github.com/gdcohan)
* [:link:](videojs/videojs.d.ts) [Video.js](https://github.com/zencoder/video-js) by [Vincent Bortone](https://github.com/vbortone)
* [:link:](vimeo/froogaloop.d.ts) [Vimeo](http://developer.vimeo.com/player/js-api) by [Daz Wilkin](https://github.com/DazWilkin)
* [:link:](vinyl/vinyl.d.ts) [vinyl](https://github.com/wearefractal/vinyl) by [vvakame](https://github.com/vvakame), [jedmao](https://github.com/jedmao)
@@ -847,12 +872,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](webmidi/webmidi.d.ts) [Web MIDI API](http://www.w3.org/TR/webmidi) by [Toshiya Nakakura](https://github.com/nakakura)
* [:link:](webspeechapi/webspeechapi.d.ts) [Web Speech API](https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html) by [SaschaNaz](https://github.com/saschanaz)
* [:link:](webcola/webcola.d.ts) [webcola](https://github.com/tgdwyer/WebCola) by [Qinfeng Chen](https://github.com/qinfchen)
+* [:link:](webcomponents.js/webcomponents.js.d.ts) [webcomponents.js](https://github.com/webcomponents/webcomponentsjs) by [Adi Dahiya](https://github.com/adidahiya)
* [:link:](webcrypto/WebCrypto.d.ts) [WebCrypto](http://www.w3.org/TR/WebCryptoAPI) by [Lucas Dixon](https://github.com/iislucas)
* [: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:](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)
* [:link:](windows-service/windows-service.d.ts) [windows-service](https://bitbucket.org/stephenwvickers/node-windows-service) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](winjs/winjs.d.ts) [WinJS](http://try.buildwinjs.com) by [TypeScript samples](https://www.typescriptlang.org), [Adam Hewitt](https://github.com/adamhewitt627), [Craig Treasure](https://github.com/craigktreasure), [Jeff Fisher](https://github.com/xirzec)
* [:link:](winrt/winrt.d.ts) [WinRT](http://msdn.microsoft.com/en-us/library/windows/apps/br211377.aspx) by [TypeScript samples](https://www.typescriptlang.org)
@@ -866,6 +893,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:](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)
* [:link:](yosay/yosay.d.ts) [yosay](https://github.com/yeoman/yosay) by [Kentaro Okuno](http://github.com/armorik83)
diff --git a/acorn/acorn-tests.ts b/acorn/acorn-tests.ts
new file mode 100644
index 0000000000..1c5cf27bae
--- /dev/null
+++ b/acorn/acorn-tests.ts
@@ -0,0 +1,30 @@
+///
+///
+
+import acorn = require('acorn');
+
+var token: acorn.Token;
+var tokens: acorn.Token[];
+var comment: acorn.Comment;
+var comments: acorn.Comment[];
+var program: ESTree.Program;
+var any: any;
+var string: string;
+
+// acorn
+string = acorn.version;
+program = acorn.parse('code');
+program = acorn.parse('code', {range: true, onToken: tokens, onComment: comments});
+program = acorn.parse('code', {
+ ranges: true,
+ onToken: (token) => tokens.push(token),
+ onComment: (isBlock, text, start, end) => { }
+});
+
+// Token
+token = tokens[0];
+string = token.type.label;
+any = token.value;
+
+// Comment
+string = comment.value;
diff --git a/acorn/acorn.d.ts b/acorn/acorn.d.ts
new file mode 100644
index 0000000000..eaba47e3b6
--- /dev/null
+++ b/acorn/acorn.d.ts
@@ -0,0 +1,67 @@
+// Type definitions for Acorn v1.0.1
+// Project: https://github.com/marijnh/acorn
+// Definitions by: RReverser
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+///
+
+declare module acorn {
+ var version: string;
+ function parse(input: string, options?: Options): ESTree.Program;
+ function parseExpressionAt(input: string, pos: number, options?: Options): ESTree.Expression;
+ var defaultOptions: Options;
+
+ interface TokenType {
+ label: string;
+ keyword: string;
+ beforeExpr: boolean;
+ startsExpr: boolean;
+ isLoop: boolean;
+ isAssign: boolean;
+ prefix: boolean;
+ postfix: boolean;
+ binop: number;
+ updateContext: (prevType: TokenType) => any;
+ }
+
+ interface AbstractToken {
+ start: number;
+ end: number;
+ loc: ESTree.SourceLocation;
+ range: [number, number];
+ }
+
+ interface Token extends AbstractToken {
+ type: TokenType;
+ value: any;
+ }
+
+ interface Comment extends AbstractToken {
+ type: string;
+ value: string;
+ }
+
+ interface Options {
+ ecmaVersion?: number;
+ sourceType?: string;
+ onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: ESTree.Position) => any;
+ onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: ESTree.Position) => any;
+ allowReserved?: boolean;
+ allowReturnOutsideFunction?: boolean;
+ allowImportExportEverywhere?: boolean;
+ allowHashBang?: boolean;
+ locations?: boolean;
+ onToken?: ((token: Token) => any) | Token[];
+ onComment?: ((isBlock: boolean, text: string, start: number, end: number, startLoc?: ESTree.Position, endLoc?: ESTree.Position) => any) | Comment[];
+ ranges?: boolean;
+ program?: ESTree.Program;
+ sourceFile?: string;
+ directSourceFile?: string;
+ preserveParens?: boolean;
+ plugins?: { [name: string]: Function; };
+ }
+}
+
+declare module "acorn" {
+ export = acorn
+}
diff --git a/angular-growl-v2/angular-growl-v2-test.ts b/angular-growl-v2/angular-growl-v2-test.ts
new file mode 100644
index 0000000000..c9297932e5
--- /dev/null
+++ b/angular-growl-v2/angular-growl-v2-test.ts
@@ -0,0 +1,53 @@
+///
+
+var app = angular.module("ag", ["pascalprecht.translate", "$httpProvider"]);
+
+app.config((growlProvider:angular.growl.IGrowlProvider, $httpProvider:angular.IHttpProvider) => {
+ var ttl:angular.growl.IGrowlTTLConfig = {
+ success: 5000,
+ error: 4000
+ };
+
+ growlProvider.globalTimeToLive(ttl);
+ growlProvider.globalTimeToLive(5000);
+ growlProvider.globalDisableCloseButton(true);
+ growlProvider.globalDisableIcons(true);
+ growlProvider.globalReversedOrder(false);
+ growlProvider.globalDisableCountDown(true);
+ growlProvider.messageVariableKey("someKey");
+ growlProvider.globalInlineMessages(false);
+ growlProvider.globalPosition("top-center");
+ growlProvider.messagesKey("someKey");
+ growlProvider.messageTextKey("someKey");
+ growlProvider.messageTitleKey("someKey");
+ growlProvider.messageSeverityKey("someKey");
+ growlProvider.onlyUniqueMessages(false);
+
+ $httpProvider.interceptors.push(growlProvider.serverMessagesInterceptor);
+});
+
+app.controller("Ctrl", ($scope:angular.IScope, growl:angular.growl.IGrowlService) => {
+ var config:angular.growl.IGrowlMessageConfig = {
+ ttl: 5000,
+ disableCountDown: true,
+ disableCloseButton: true
+ };
+
+ var message = "Some message";
+
+ growl.warning(message);
+ growl.warning(message, config);
+ growl.error(message);
+ growl.error(message, config);
+ growl.info(message);
+ growl.info(message, config);
+ growl.success(message);
+ growl.success(message, config);
+ growl.general(message);
+ growl.general(message, config);
+ growl.general(message, config, "error");
+ growl.onlyUnique();
+ growl.reverseOrder();
+ growl.inlineMessages();
+ growl.position();
+});
diff --git a/angular-growl-v2/angular-growl-v2.d.ts b/angular-growl-v2/angular-growl-v2.d.ts
new file mode 100644
index 0000000000..1c324723f6
--- /dev/null
+++ b/angular-growl-v2/angular-growl-v2.d.ts
@@ -0,0 +1,211 @@
+// Type definitions for Angular Growl 2 v.0.7.3
+// Project: http://janstevens.github.io/angular-growl-2
+// Definitions by: Tadeusz Hucal
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+///
+
+declare module angular.growl {
+
+ /**
+ * Global Time-To-Leave configuration.
+ */
+ interface IGrowlTTLConfig {
+ success?: number;
+ error?: number;
+ warning?: number;
+ info?: number;
+ }
+
+ /**
+ * Custom configuration used in single message call.
+ */
+ interface IGrowlMessageConfig {
+ title?: string;
+ ttl?: number;
+ disableCountDown?: boolean;
+ disableIcons?: boolean;
+ disableCloseButton?: boolean;
+ referenceId?: number;
+ onclose?: Function;
+ onopen?: Function;
+ }
+
+ /**
+ * Growl message with configuration.
+ */
+ interface IGrowlMessage extends IGrowlMessageConfig {
+ text: string;
+ }
+
+ /**
+ * Growl service provider.
+ */
+ interface IGrowlProvider extends angular.IServiceProvider {
+ /**
+ * Pre-defined server error interceptor.
+ */
+ serverMessagesInterceptor: (string|Function)[];
+
+ /**
+ * Set default TTL settings.
+ * @param ttl configuration of TTL for different type of message
+ */
+ globalTimeToLive(ttl: IGrowlTTLConfig): void;
+ /**
+ * Set default TTL settings.
+ * @param ttl ttl in milliseconds
+ */
+ globalTimeToLive(ttl: number): void;
+ /**
+ * Set default setting for disabling close button.
+ * @param disableCloseButton
+ */
+ globalDisableCloseButton(disableCloseButton: boolean): void;
+ /**
+ * Set default setting for disabling icons.
+ * @param disableIcons
+ */
+ globalDisableIcons(disableIcons: boolean): void;
+ /**
+ * Set reversing order of displaying new messages.
+ * @param reverseOrder
+ */
+ globalReversedOrder(reverseOrder: boolean): void
+ /**
+ * Set default setting for displaying message disappear countdown.
+ * @param disableCountDown
+ */
+ globalDisableCountDown(disableCountDown: boolean): void;
+ /**
+ * Set default allowance for inline messages.
+ * @param inline
+ */
+ globalInlineMessages(inline: boolean): void;
+ /**
+ * Set default message position.
+ * @param position
+ */
+ globalPosition(position: string): void;
+ /**
+ * Enable/disable displaying only unique messages.
+ * @param onlyUniqueMessages
+ */
+ onlyUniqueMessages(onlyUniqueMessages: boolean): void;
+
+ /**
+ * Set key where messages are stored (for http interceptor).
+ * @param messageVariableKey
+ */
+ messagesKey(messageKey: string): void;
+ /**
+ * Set key where message text is stored (for http interceptor).
+ * @param messageVariableKey
+ */
+ messageTextKey(messageTextKey: string): void;
+ /**
+ * Set key where title of message is stored (for http interceptor).
+ * @param messageVariableKey
+ */
+ messageTitleKey(messageTitleKey: string): void;
+ /**
+ * Set key where severity of message is stored (for http interceptor).
+ * @param messageVariableKey
+ */
+ messageSeverityKey(messageSeverityKey: string): void;
+ /**
+ * Set key where variables for message are stored (for http interceptor).
+ * @param messageVariableKey
+ */
+ messageVariableKey(messageVariableKey: string): void;
+ }
+
+ /**
+ * Growl service.
+ */
+ interface IGrowlService {
+ /**
+ * Show warning message.
+ * @param message text to display (or code for angular-translate)
+ */
+ warning(message: string): IGrowlMessage;
+ /**
+ * Show warning message.
+ * @param message text to display (or code for angular-translate)
+ * @param config additional message configuration
+ */
+ warning(message: string, config: IGrowlMessageConfig): IGrowlMessage;
+
+ /**
+ * Show error message.
+ * @param message text to display (or code for angular-translate)
+ */
+ error(message: string): IGrowlMessage;
+ /**
+ * Show error message.
+ * @param message text to display (or code for angular-translate)
+ * @param config additional message configuration
+ */
+ error(message: string, config: IGrowlMessageConfig): IGrowlMessage;
+
+ /**
+ * Show information message.
+ * @param message text to display (or code for angular-translate)
+ */
+ info(message: string): IGrowlMessage;
+ /**
+ * Show information message.
+ * @param message text to display (or code for angular-translate)
+ * @param config additional message configuration
+ */
+ info(message: string, config: IGrowlMessageConfig): IGrowlMessage;
+
+ /**
+ * Show success message.
+ * @param message text to display (or code for angular-translate)
+ * @param config additional message configuration
+ */
+ success(message: string): IGrowlMessage;
+ /**
+ * Show success message.
+ * @param message text to display (or code for angular-translate)
+ */
+ success(message: string, config: IGrowlMessageConfig): IGrowlMessage;
+
+ /**
+ * Show message (generic).
+ * @param message text to display (or code for angular-translate)
+ */
+ general(message: string): IGrowlMessage;
+ /**
+ * Show message (generic).
+ * @param message text to display (or code for angular-translate)
+ * @param config additional message configuration
+ */
+ general(message: string, config: IGrowlMessageConfig): IGrowlMessage;
+ /**
+ * Show message (generic).
+ * @param message text to display (or code for angular-translate)
+ * @param config additional message configuration
+ * @param severity message severity (error, warning, success, info).
+ */
+ general(message: string, config: IGrowlMessageConfig, severity: string): IGrowlMessage;
+
+ /**
+ * Get current setting for displaying only unique messages.
+ */
+ onlyUnique(): boolean;
+ /**
+ * Get current setting for reversing messages order.
+ */
+ reverseOrder(): boolean;
+ /**
+ * Get current allowance for inline messages.
+ */
+ inlineMessages(): boolean;
+ /**
+ * Get current messages position.
+ */
+ position(): string;
+ }
+}
diff --git a/angular-material/angular-material.d.ts b/angular-material/angular-material.d.ts
index cf7a20d79e..1e3eda18af 100644
--- a/angular-material/angular-material.d.ts
+++ b/angular-material/angular-material.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for Angular Material 0.8.3+ (ng.material module)
+// Type definitions for Angular Material 0.8.3+ (angular.material module)
// Project: https://github.com/angular/material
// Definitions by: Matt Traynham
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -12,14 +12,14 @@ declare module angular.material {
controller?: any;
locals?: {[index: string]: any};
targetEvent?: any;
- resolve?: {[index: string]: ng.IPromise}
+ resolve?: {[index: string]: angular.IPromise}
controllerAs?: string;
parent?: Element;
disableParentScroll?: boolean;
}
interface MDBottomSheetService {
- show(options: MDBottomSheetOptions): ng.IPromise;
+ show(options: MDBottomSheetOptions): angular.IPromise;
hide(response?: any): void;
cancel(response?: any): void;
}
@@ -49,14 +49,14 @@ declare module angular.material {
controller?: any;
locals?: {[index: string]: any};
bindToController?: boolean;
- resolve?: {[index: string]: ng.IPromise}
+ resolve?: {[index: string]: angular.IPromise}
controllerAs?: string;
parent?: Element;
onComplete?: Function;
}
interface MDDialogService {
- show(dialog: MDDialogOptions|MDPresetDialog): ng.IPromise;
+ show(dialog: MDDialogOptions|MDPresetDialog): angular.IPromise;
confirm(): MDConfirmDialog;
alert(): MDAlertDialog;
hide(response?: any): void;
@@ -64,7 +64,7 @@ declare module angular.material {
}
interface MDIcon {
- (path: string): ng.IPromise;
+ (path: string): angular.IPromise;
}
interface MDIconProvider {
@@ -110,14 +110,14 @@ declare module angular.material {
controller?: any;
locals?: {[index: string]: any};
bindToController?: boolean;
- resolve?: {[index: string]: ng.IPromise}
+ resolve?: {[index: string]: angular.IPromise}
controllerAs?: string;
parent?: Element;
}
interface MDToastService {
- show(optionsOrPreset: MDToastOptions|MDToastPreset): ng.IPromise;
- showSimple(): ng.IPromise;
+ show(optionsOrPreset: MDToastOptions|MDToastPreset): angular.IPromise;
+ showSimple(): angular.IPromise;
simple(): MDSimpleToastPreset;
build(): MDToastPreset;
updateContent(): void;
diff --git a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts
index c9bf91c016..d7e65c77ca 100644
--- a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts
+++ b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts
@@ -190,15 +190,15 @@ declare module angular.ui.bootstrap {
/**
* a promise that is resolved when a modal is closed and rejected when a modal is dismissed
*/
- result: ng.IPromise;
+ result: angular.IPromise;
/**
* a promise that is resolved when a modal gets opened after downloading content's template and resolving all variables
*/
- opened: ng.IPromise;
+ opened: angular.IPromise;
}
- interface IModalScope extends ng.IScope {
+ interface IModalScope extends angular.IScope {
/**
* Those methods make it easy to close a modal window without a need to create a dedicated controller
*/
@@ -623,7 +623,7 @@ declare module angular.ui.bootstrap {
*
* @return A promise that is resolved when the transition finishes.
*/
- (element: ng.IAugmentedJQuery, trigger: any, options?: ITransitionServiceOptions): ng.IPromise;
+ (element: angular.IAugmentedJQuery, trigger: any, options?: ITransitionServiceOptions): angular.IPromise;
}
interface ITransitionServiceOptions {
diff --git a/angular-ui-router/angular-ui-router.d.ts b/angular-ui-router/angular-ui-router.d.ts
index 0cf796832f..f5dfbeca51 100644
--- a/angular-ui-router/angular-ui-router.d.ts
+++ b/angular-ui-router/angular-ui-router.d.ts
@@ -62,7 +62,7 @@ declare module angular.ui {
reloadOnSearch?: boolean;
}
- interface IStateProvider extends IServiceProvider {
+ interface IStateProvider extends ng.IServiceProvider {
state(name:string, config:IState): IStateProvider;
state(config:IState): IStateProvider;
decorator(name?: string, decorator?: (state: IState, parent: Function) => any): any;
@@ -81,7 +81,7 @@ declare module angular.ui {
type(name: string, definition: any, definitionFn?: any): any;
}
- interface IUrlRouterProvider extends IServiceProvider {
+ interface IUrlRouterProvider extends ng.IServiceProvider {
when(whenPath: RegExp, handler: Function): IUrlRouterProvider;
when(whenPath: RegExp, handler: any[]): IUrlRouterProvider;
when(whenPath: RegExp, toPath: string): IUrlRouterProvider;
@@ -143,7 +143,7 @@ declare module angular.ui {
*
* @param options Options object.
*/
- go(to: string, params?: {}, options?: IStateOptions): IPromise;
+ go(to: string, params?: {}, options?: IStateOptions): ng.IPromise;
transitionTo(state: string, params?: {}, updateLocation?: boolean): void;
transitionTo(state: string, params?: {}, options?: IStateOptions): void;
includes(state: string, params?: {}): boolean;
diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts
index 9f7efea892..31f59d9fa6 100755
--- a/angularjs/angular.d.ts
+++ b/angularjs/angular.d.ts
@@ -452,9 +452,9 @@ declare module angular {
$invalid: boolean;
$submitted: boolean;
$error: any;
- $addControl(control: ng.INgModelController): void;
- $removeControl(control: ng.INgModelController): void;
- $setValidity(validationErrorKey: string, isValid: boolean, control: ng.INgModelController): void;
+ $addControl(control: INgModelController): void;
+ $removeControl(control: INgModelController): void;
+ $setValidity(validationErrorKey: string, isValid: boolean, control: INgModelController): void;
$setDirty(): void;
$setPristine(): void;
$commitViewValue(): void;
@@ -509,7 +509,7 @@ declare module angular {
}
interface IAsyncModelValidators {
- [index: string]: (...args: any[]) => ng.IPromise;
+ [index: string]: (...args: any[]) => IPromise;
}
interface IModelParser {
@@ -665,6 +665,7 @@ declare module angular {
// TODO undocumented, so we need to get it from the source code
///////////////////////////////////////////////////////////////////////////
interface IBrowserService {
+ defer: ng.ITimeoutService;
[key: string]: any;
}
@@ -931,11 +932,19 @@ declare module angular {
/**
* Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
*
- * Returns a single promise that will be resolved with an array/hash of values, each value corresponding to the promise at the same index/key in the promises array/hash. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
+ * Returns a single promise that will be resolved with an array of values, each value corresponding to the promise at the same index in the promises array. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
*
- * @param promises An array or hash of promises.
+ * @param promises An array of promises.
*/
- all(promises: IPromise[]|{ [id: string]: IPromise; }): IPromise;
+ all(promises: IPromise[]): IPromise;
+ /**
+ * Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
+ *
+ * Returns a single promise that will be resolved with a hash of values, each value corresponding to the promise at the same key in the promises hash. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
+ *
+ * @param promises A hash of promises.
+ */
+ all(promises: { [id: string]: IPromise; }): IPromise<{ [id: string]: any; }>;
/**
* Creates a Deferred object which represents a task which will finish in the future.
*/
@@ -1573,12 +1582,12 @@ declare module angular {
* $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.
*/
decorator(name: string, inlineAnnotatedFunction: any[]): void;
- factory(name: string, serviceFactoryFunction: Function): ng.IServiceProvider;
- factory(name: string, inlineAnnotatedFunction: any[]): ng.IServiceProvider;
- provider(name: string, provider: ng.IServiceProvider): ng.IServiceProvider;
- provider(name: string, serviceProviderConstructor: Function): ng.IServiceProvider;
- service(name: string, constructor: Function): ng.IServiceProvider;
- value(name: string, value: any): ng.IServiceProvider;
+ factory(name: string, serviceFactoryFunction: Function): IServiceProvider;
+ factory(name: string, inlineAnnotatedFunction: any[]): IServiceProvider;
+ provider(name: string, provider: IServiceProvider): IServiceProvider;
+ provider(name: string, serviceProviderConstructor: Function): IServiceProvider;
+ service(name: string, constructor: Function): IServiceProvider;
+ value(name: string, value: any): IServiceProvider;
}
}
diff --git a/auth0.lock/auth0.lock-tests.ts b/auth0.lock/auth0.lock-tests.ts
new file mode 100644
index 0000000000..fd646ee1bb
--- /dev/null
+++ b/auth0.lock/auth0.lock-tests.ts
@@ -0,0 +1,13 @@
+///
+///
+
+var lock: Auth0LockStatic = new Auth0Lock("dsa7d77dsa7d7", "mine.auth0.com");
+
+lock.showSignin({
+ connections: ["facebook", "google-oauth2", "twitter", "Username-Password-Authentication"],
+ icon: "https://contoso.com/logo-32.png",
+ socialBigButtons: true
+ },
+ () => {
+ // The Auth0 Widget is now loaded.
+});
diff --git a/auth0.lock/auth0.lock.d.ts b/auth0.lock/auth0.lock.d.ts
new file mode 100644
index 0000000000..e8ba3cb996
--- /dev/null
+++ b/auth0.lock/auth0.lock.d.ts
@@ -0,0 +1,80 @@
+// Type definitions for Auth0Widget.js
+// Project: http://auth0.com
+// Definitions by: Robert McLaws
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+///
+
+interface Auth0LockPopupOptions {
+ width: number;
+ height: number;
+ left: number;
+ top: number;
+}
+
+interface Auth0LockOptions {
+ authParams?: any;
+ callbackURL?: string;
+ connections?: string[];
+ container?: string;
+ closable?: boolean;
+ dict?: any;
+ defaultUserPasswordConnection?: string;
+ defaultADUsernameFromEmailPrefix?: boolean;
+ disableResetAction?: boolean;
+ disableSignupAction?: boolean;
+ focusInput?: boolean;
+ forceJSONP?: boolean;
+ gravatar?: boolean;
+ integratedWindowsLogin?: boolean;
+ loginAfterSignup?: boolean;
+ popup?: boolean;
+ popupOptions?: Auth0LockPopupOptions;
+ rememberLastLogin?: boolean;
+ resetLink?: string;
+ responseType?: string;
+ signupLink?: string;
+ socialBigButtons?: boolean;
+ sso?: boolean;
+ theme?: string;
+ usernameStyle?: any;
+}
+
+interface Auth0LockConstructorOptions {
+ cdn?: string;
+ assetsUrl?: string;
+ useCordovaSocialPlugins?: boolean;
+}
+
+interface Auth0LockStatic {
+ new (clientId: string, domain: string, options?: Auth0LockConstructorOptions): Auth0LockStatic;
+
+ show(): void;
+ show(options: Auth0LockOptions): void;
+ show(callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void) : void;
+ show(options: Auth0LockOptions, callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void) : void;
+
+ showSignin(): void;
+ showSignin(options: Auth0LockOptions): void;
+ showSignin(callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void) : void;
+ showSignin(options: Auth0LockOptions, callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void) : void;
+
+ showSignup(): void;
+ showSignup(options: Auth0LockOptions): void;
+ showSignup(callback: (error?: Auth0Error) => void) : void;
+ showSignup(options: Auth0LockOptions, callback: (error?: Auth0Error) => void) : void;
+
+ showReset(): void;
+ showReset(options: Auth0LockOptions): void;
+ showReset(callback: (error?: Auth0Error) => void) : void;
+ showReset(options: Auth0LockOptions, callback: (error?: Auth0Error) => void) : void;
+
+ hide(callback: () => void): void;
+ logout(callback: () => void): void;
+}
+
+declare var Auth0Lock: Auth0LockStatic;
+
+declare module "Auth0Lock" {
+ export = Auth0Lock;
+}
diff --git a/autobahn/autobahn-tests.ts b/autobahn/autobahn-tests.ts
new file mode 100644
index 0000000000..ee9c41b3e8
--- /dev/null
+++ b/autobahn/autobahn-tests.ts
@@ -0,0 +1,47 @@
+///
+
+class MyClass {
+ add2Count: number = 0;
+ session: autobahn.Session;
+
+ constructor(session: autobahn.Session) {
+ this.session = session;
+ }
+
+ add2(args: Array): number {
+ this.add2Count++;
+ return args[0] + args[1];
+ }
+
+ onEvent(args: Array): void {
+ console.log("Event:", args[0]);
+ }
+}
+
+function test_client() {
+ var options: autobahn.IConnectionOptions =
+ { url: 'ws://127.0.0.1:8080/ws', realm: 'realm1' };
+
+ var connection = new autobahn.Connection(options);
+
+ connection.onopen = session => {
+ var myInstance = new MyClass(session);
+
+ // 1) subscribe to a topic
+ session.subscribe('com.myapp.hello', myInstance.onEvent);
+
+ // 2) publish an event
+ session.publish('com.myapp.hello', ['Hello, world!']);
+
+ // 3) register a procedure for remoting
+ session.register('com.myapp.add2', myInstance.add2);
+
+ // 4) call a remote procedure
+ session.call('com.myapp.add2', [2, 3]).then(
+ res => {
+ console.log("Result:", res);
+ });
+ };
+
+ connection.open();
+}
\ No newline at end of file
diff --git a/autobahn/autobahn.d.ts b/autobahn/autobahn.d.ts
new file mode 100644
index 0000000000..7191e9c4f9
--- /dev/null
+++ b/autobahn/autobahn.d.ts
@@ -0,0 +1,195 @@
+// Type definitions for AutobahnJS v0.9.6
+// Project: http://autobahn.ws/js/
+// Definitions by: Elad Zelingher
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+///
+declare module autobahn {
+
+ export class Session {
+ id: number;
+ realm: string;
+ isOpen: boolean;
+ features: any;
+ caller_disclose_me: boolean;
+ publisher_disclose_me: boolean;
+ subscriptions: ISubscription[][];
+ registrations: IRegistration[];
+
+ constructor(transport: ITransport, defer: DeferFactory, challenge: OnChallengeHandler);
+
+ join(realm: string, authmethods: string[], authid: string): void;
+
+ leave(reason: string, message: string): void;
+
+ call(procedure: string, args?: any[], kwargs?: any, options?: ICallOptions): When.Promise;
+
+ publish(topic: string, args?: any[], kwargs?: any, options?: IPublishOptions): When.Promise;
+
+ subscribe(topic: string, handler: SubscribeHandler, options?: ISubscribeOptions): When.Promise;
+
+ register(procedure: string, endpoint: RegisterEndpoint, options?: IRegisterOptions): When.Promise;
+
+ unsubscribe(subscription: ISubscription): When.Promise;
+
+ unregister(registration: IRegistration): When.Promise;
+
+ prefix(prefix: string, uri: string): void;
+
+ resolve(curie: string): string;
+
+ onjoin: (roleFeatures: any) => void;
+ onleave: (reason: string, details: any) => void;
+ }
+
+ interface IInvocation {
+ caller?: number;
+ progress?: boolean;
+ procedure: string;
+ }
+
+ interface IEvent {
+ publication: number;
+ publisher?: number;
+ topic: string;
+ }
+
+ interface IResult {
+ args: any[];
+ kwargs: any;
+ }
+
+ interface IError {
+ error: string;
+ args: any[];
+ kwargs: any;
+ }
+
+ type SubscribeHandler = (args?: any[], kwargs?: any, details?: IEvent) => void;
+
+ interface ISubscription {
+ topic: string;
+ handler: SubscribeHandler;
+ options: ISubscribeOptions;
+ session: Session;
+ id: number;
+ active: boolean;
+ unsubscribe(): When.Promise;
+ }
+
+ type RegisterEndpoint = (args?: any[], kwargs?: any, details?: IInvocation) => void;
+
+ interface IRegistration {
+ procedure: string;
+ endpoint: RegisterEndpoint;
+ options: IRegisterOptions;
+ session: Session;
+ id: number;
+ active: boolean;
+ unregister(): When.Promise;
+ }
+
+ interface IPublication {
+ id: number;
+ }
+
+ interface ICallOptions {
+ timeout?: number;
+ receive_progress?: boolean;
+ disclose_me?: boolean;
+ }
+
+ interface IPublishOptions {
+ exclude?: number[];
+ eligible?: number[];
+ disclose_me? : Boolean;
+ }
+
+ interface ISubscribeOptions {
+ match? : string;
+ }
+
+ interface IRegisterOptions {
+ disclose_caller?: boolean;
+ }
+
+ export class Connection {
+ constructor(options?: IConnectionOptions);
+
+ open(): void;
+
+ close(reason: string, message: string): void;
+
+ onopen: (session: Session, details: any) => void;
+ onclose: (reason: string, details: any) => boolean;
+ }
+
+ interface ITransportDefinition {
+ url?: string;
+ protocols?: string[];
+ type: string;
+ }
+
+ type DeferFactory = () => any;
+
+ type OnChallengeHandler = (session: Session, method: string, extra: any) => When.Promise;
+
+ interface IConnectionOptions {
+ use_es6_promises?: boolean;
+ // use explicit deferred factory, e.g. jQuery.Deferred or Q.defer
+ use_deferred?: DeferFactory;
+ transports?: ITransportDefinition[];
+ retry_if_unreachable?: boolean;
+ max_retries?: number;
+ initial_retry_delay?: number;
+ max_retry_delay?: number;
+ retry_delay_growth?: number;
+ retry_delay_jitter?: number;
+ url?: string;
+ protocols?: string[];
+ onchallenge?: (session: Session, method: string, extra: any) => OnChallengeHandler;
+ realm?: string;
+ authmethods?: string[];
+ authid?: string;
+ }
+
+ interface ICloseEventDetails {
+ wasClean: boolean;
+ reason: string;
+ code: number;
+ }
+
+ interface ITransport {
+ onopen: () => void;
+ onmessage: (message: any[]) => void;
+ onclose: (details: ICloseEventDetails) => void;
+
+ send(message: any[]): void;
+ close(errorCode: number, reason?: string): void;
+ }
+
+ interface ITransportFactory {
+ //constructor(options: any);
+ type: string;
+ create(): ITransport;
+ }
+
+ interface ITransports {
+ register(name: string, factory: any): void;
+ isRegistered(name: string): boolean;
+ get(name: string): any;
+ list(): any[];
+ }
+
+ interface ILog {
+ debug(...args: any[]): void;
+ }
+
+ interface IUtil {
+ assert(condition: boolean, message: string): void;
+ }
+
+ var util: IUtil;
+ var log: ILog;
+ var transports: ITransports;
+}
\ No newline at end of file
diff --git a/axios/axios-tests.ts b/axios/axios-tests.ts
index a11421e19e..93787cf3d7 100644
--- a/axios/axios-tests.ts
+++ b/axios/axios-tests.ts
@@ -1,23 +1,18 @@
///
-interface InputBody {
- random: number;
-}
+enum HttpMethod { GET, PUT, POST, DELETE, CONNECT, HEAD, OPTIONS, TRACE, PATCH }
+enum ResponseType { arraybuffer, blob, document, json, text }
interface Repository {
id: number;
name: string;
}
-function convenientGet () {
- axios.get("https://api.github.com/repos/mzabriskie/axios")
- .then(r => console.log(r.config.data.random));
-}
+axios.get("https://api.github.com/repos/mzabriskie/axios")
+ .then(r => console.log(r.config.method));
-function get() {
- axios({
- url: "https://api.github.com/repos/mzabriskie/axios",
- method: Axios.HTTPMethod.GET,
- headers: {},
- }).then(r => console.log("ID:" + r.data.id + " Name: " + r.data.name));
-}
\ No newline at end of file
+axios({
+ url: "https://api.github.com/repos/mzabriskie/axios",
+ method: HttpMethod[HttpMethod.GET],
+ headers: {},
+}).then(r => console.log("ID:" + r.data.id + " Name: " + r.data.name));
diff --git a/axios/axios.d.ts b/axios/axios.d.ts
index 5455ba167d..c2a2873eac 100644
--- a/axios/axios.d.ts
+++ b/axios/axios.d.ts
@@ -6,8 +6,6 @@
///
declare module Axios {
- export enum HTTPMethod { GET, PUT, POST, DELETE, CONNECT, HEAD, OPTIONS, TRACE, PATCH }
- export enum ResponseType { arraybuffer, blob, document, json, text }
/**
* - request body data type
@@ -46,7 +44,7 @@ declare module Axios {
* indicates the type of data that the server will respond with
* options are 'arraybuffer', 'blob', 'document', 'json', 'text'
*/
- responseType?: Axios.ResponseType;
+ responseType?: string;
/**
* name of the cookie to use as a value for xsrf token
@@ -65,14 +63,15 @@ declare module Axios {
*/
interface AxiosXHRConfig extends AxiosXHRConfigBase {
/**
- * server URL that will be used for the request
+ * server URL that will be used for the request, options are:
+ * GET, PUT, POST, DELETE, CONNECT, HEAD, OPTIONS, TRACE, PATCH
*/
url: string;
/**
* request method to be used when making the request
*/
- method?: Axios.HTTPMethod;
+ method?: string;
/**
* data to be sent as the request body
@@ -86,7 +85,7 @@ declare module Axios {
* - expected response type,
* - request body data type
*/
- interface AxiosXHR {
+ interface AxiosXHR {
/**
* Response that was provided by the server
*/
@@ -110,7 +109,7 @@ declare module Axios {
/**
* config that was provided to `axios` for the request
*/
- config: AxiosXHRConfig;
+ config: AxiosXHRConfig;
}
/**
@@ -119,40 +118,40 @@ declare module Axios {
*/
interface AxiosStatic {
- (config: AxiosXHRConfig): Promise>;
+ (config: AxiosXHRConfig): Promise>;
- new (config: AxiosXHRConfig): Promise>;
+ new (config: AxiosXHRConfig): Promise>;
/**
* convenience alias, method = GET
*/
- get(url: string, config?: AxiosXHRConfigBase): Promise>;
+ get(url: string, config?: AxiosXHRConfigBase): Promise>;
/**
* convenience alias, method = DELETE
*/
- delete(url: string, config?: AxiosXHRConfigBase): Promise>;
+ delete(url: string, config?: AxiosXHRConfigBase): Promise>;
/**
* convenience alias, method = HEAD
*/
- head(url: string, config?: AxiosXHRConfigBase): Promise>;
+ head(url: string, config?: AxiosXHRConfigBase): Promise>;
/**
* convenience alias, method = POST
*/
- post(url: string, data?: any, config?: AxiosXHRConfigBase): Promise>;
+ post(url: string, data?: any, config?: AxiosXHRConfigBase): Promise>;
/**
* convenience alias, method = PUT
*/
- put(url: string, data?: any, config?: AxiosXHRConfigBase): Promise>;
+ put(url: string, data?: any, config?: AxiosXHRConfigBase): Promise>;
/**
* convenience alias, method = PATCH
*/
- patch(url: string, data?: any, config?: AxiosXHRConfigBase): Promise>;
+ patch(url: string, data?: any, config?: AxiosXHRConfigBase): Promise>;
}
}
diff --git a/backbone/backbone.d.ts b/backbone/backbone.d.ts
index 834ebc8318..7de8eb8072 100644
--- a/backbone/backbone.d.ts
+++ b/backbone/backbone.d.ts
@@ -238,7 +238,7 @@ declare module Backbone {
initial(n: number): TModel[];
inject(iterator: (memo: any, element: TModel, index: number) => any, initialMemo: any, context?: any): any;
isEmpty(object: any): boolean;
- invoke(methodName: string, arguments?: any[]): any;
+ invoke(methodName: string, args?: any[]): any;
last(): TModel;
last(n: number): TModel[];
lastIndexOf(element: TModel, fromIndex?: number): number;
diff --git a/bootstrap-touchspin/bootstrap-touchspin-tests.ts b/bootstrap-touchspin/bootstrap-touchspin-tests.ts
new file mode 100644
index 0000000000..552c26f52f
--- /dev/null
+++ b/bootstrap-touchspin/bootstrap-touchspin-tests.ts
@@ -0,0 +1,68 @@
+///
+///
+
+$(function () {
+ // Example 1 from http://www.virtuosoft.eu/code/bootstrap-touchspin/
+ $("input[name='demo1']").TouchSpin({
+ min: 0,
+ max: 100,
+ step: 0.1,
+ decimals: 2,
+ boostat: 5,
+ maxboostedstep: 10,
+ postfix: '%'
+ });
+
+ // Example 2 from http://www.virtuosoft.eu/code/bootstrap-touchspin/
+ $("input[name='demo2']").TouchSpin({
+ min: -1000000000,
+ max: 1000000000,
+ stepinterval: 50,
+ maxboostedstep: 10000000,
+ prefix: '$'
+ });
+
+ // Example 3 from http://www.virtuosoft.eu/code/bootstrap-touchspin/
+ $("input[name='demo_vertical']").TouchSpin({
+ verticalbuttons: true
+ });
+
+ // Example 4 from http://www.virtuosoft.eu/code/bootstrap-touchspin/
+ $("input[name='demo_vertical2']").TouchSpin({
+ verticalbuttons: true,
+ verticalupclass: 'glyphicon glyphicon-plus',
+ verticaldownclass: 'glyphicon glyphicon-minus'
+ });
+
+ // Example 5 from http://www.virtuosoft.eu/code/bootstrap-touchspin/
+ $("input[name='demo3']").TouchSpin();
+
+ // Example 6 from http://www.virtuosoft.eu/code/bootstrap-touchspin/
+ $("input[name='demo3_21']").TouchSpin({
+ initval: 40
+ });
+
+ // Example 7 from http://www.virtuosoft.eu/code/bootstrap-touchspin/
+ $("input[name='demo4']").TouchSpin({
+ postfix: "a button",
+ postfix_extraclass: "btn btn-default"
+ });
+
+ // Example 8 from http://www.virtuosoft.eu/code/bootstrap-touchspin/
+ $("input[name='demo4_2']").TouchSpin({
+ postfix: "a button",
+ postfix_extraclass: "btn btn-default"
+ });
+
+ // Example 9 from http://www.virtuosoft.eu/code/bootstrap-touchspin/
+ $("input[name='demo5']").TouchSpin({
+ prefix: "pre",
+ postfix: "post"
+ });
+
+ // Example 10 from http://www.virtuosoft.eu/code/bootstrap-touchspin/
+ $("input[name='demo6']").TouchSpin({
+ buttondown_class: "btn btn-link",
+ buttonup_class: "btn btn-link"
+ });
+});
\ No newline at end of file
diff --git a/bootstrap-touchspin/bootstrap-touchspin.d.ts b/bootstrap-touchspin/bootstrap-touchspin.d.ts
new file mode 100644
index 0000000000..2dcf628842
--- /dev/null
+++ b/bootstrap-touchspin/bootstrap-touchspin.d.ts
@@ -0,0 +1,130 @@
+// Type definitions for Bootstrap TouchSpin
+// Project: http://www.virtuosoft.eu/code/bootstrap-touchspin/
+// Definitions by: Albin Sunnanbo
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+///
+
+/**
+ * TouchSpinOptions. All options are optional
+ */
+interface TouchSpinOptions {
+ /**
+ * Applied when no explicit value is set on the input with the value attribute.
+ * Empty string means that the value remains empty on initialization.
+ */
+ initval?: number | string;
+
+ /**
+ * Minimum value.
+ */
+ min?: number;
+
+ /**
+ * Maximum value.
+ */
+ max?: number;
+
+ /**
+ * Incremental/decremental step on up/down change.
+ */
+ step?: number;
+
+ /**
+ * How to force the value to be divisible by step value: 'none' | 'round' | 'floor' | 'ceil'
+ */
+ forcestepdivisibility?: string;
+
+ /**
+ * Number of decimal points.
+ */
+ decimals?: number;
+
+ /**
+ * Refresh rate of the spinner in milliseconds.
+ */
+ stepinterval?: number;
+
+ /**
+ * Time in milliseconds before the spinner starts to spin.
+ */
+ stepintervaldelay?: number;
+
+ /**
+ * Enables the traditional up/down buttons.
+ */
+ verticalbuttons?: boolean;
+
+ /**
+ * Class of the up button with vertical buttons mode enabled.
+ */
+ verticalupclass?: string;
+
+ /**
+ * Class of the down button with vertical buttons mode enabled.
+ */
+ verticaldownclass?: string;
+
+ /**
+ * Text before the input.
+ */
+ prefix?: string;
+
+ /**
+ * Text after the input.
+ */
+ postfix?: string;
+
+ /**
+ * Extra class(es) for prefix.
+ */
+ prefix_extraclass?: string;
+
+ /**
+ * Extra class(es) for postfix.
+ */
+ postfix_extraclass?: string;
+
+ /**
+ * If enabled, the the spinner is continually becoming faster as holding the button.
+ */
+ booster?: boolean;
+
+ /**
+ * Boost at every nth step.
+ */
+ boostat?: number;
+
+ /**
+ * Maximum step when boosted.
+ */
+ maxboostedstep?: number | boolean;
+
+ /**
+ * Enables the mouse wheel to change the value of the input.
+ */
+ mousewheel?: boolean;
+
+ /**
+ * Class(es) of down button.
+ */
+ buttondown_class?: string;
+
+ /**
+ * Class(es) of up button.
+ */
+ buttonup_class?: string;
+}
+
+interface JQuery {
+ /**
+ * Initialize TouchSpin
+ */
+ TouchSpin(): JQuery;
+
+ /**
+ * Inialize TouchSpin with options
+ * @param options a TouchSpinOptions object with one or more options
+ */
+ TouchSpin(options: TouchSpinOptions): JQuery;
+}
diff --git a/breeze/breeze-tests.ts b/breeze/breeze-tests.ts
index 979bc56835..f309462afa 100644
--- a/breeze/breeze-tests.ts
+++ b/breeze/breeze-tests.ts
@@ -3,7 +3,6 @@
import core = breeze.core;
import config = breeze.config;
-
function test_dataType() {
var typ = breeze.DataType.DateTime;
var nm = typ.getName();
@@ -888,4 +887,4 @@ function test_config() {
config.registerType(f1, "myCtor");
s = config.stringifyPad;
o = config.typeRegistry;
-}
\ No newline at end of file
+}
diff --git a/calq/calq-tests.ts b/calq/calq-tests.ts
new file mode 100644
index 0000000000..6f8019261d
--- /dev/null
+++ b/calq/calq-tests.ts
@@ -0,0 +1,28 @@
+///
+function calq_base()
+{
+ calq.init("bfff14a4e0225789be3d9d22c4bb42a1");
+
+ calq.init("bfff14a4e0225789be3d9d22c4bb42a1", { your: "config" });
+
+ calq.action.track("Product Review", {"Rating": 9.0});
+
+ calq.action.trackSale("Product Sale", { "Product Id": 149, "Product Name": "Dinosaur T-Shirt XL" }, "USD",10);
+
+ calq.action.trackHTMLLink('Link', { 'Target': 'Calq'});
+
+ calq.action.trackPageView();
+
+ calq.action.trackPageView("Custom Action");
+
+ calq.action.setGlobalProperty("Referral Source", "Google Campaign");
+}
+
+function calq_people()
+{
+ calq.user.identify("1001");
+
+ calq.user.clear();
+
+ calq.user.profile( { "Company": "MegaCorp", "$email": "super_customer1@notarealemail.com" });
+}
diff --git a/calq/calq.d.ts b/calq/calq.d.ts
new file mode 100644
index 0000000000..c574df58fe
--- /dev/null
+++ b/calq/calq.d.ts
@@ -0,0 +1,34 @@
+// Type definitions for calq
+// Project: https://calq.io/docs/client/javascript/reference
+// Definitions by: Eirik Hoem
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+interface Calq
+{
+ action:Calq.Action;
+ user:Calq.User;
+
+ init(writeKey:string, options?:{[index:string]:any}):void;
+}
+
+declare module Calq
+{
+ interface Action
+ {
+ track(action:string, params?:{[index:string]:any}):void;
+ trackSale(action:string, params:{[index:string]:any}, currency:string, amount:number):void;
+ trackHTMLLink(action:string, params?:{[index:string]:any}):void;
+ trackPageView(action?:string):void;
+ setGlobalProperty(name:string,value:any):void;
+ }
+
+ interface User
+ {
+ identify(userId:string):void;
+ clear():void;
+ profile(params:{[index:string]:any}):void;
+
+ }
+}
+
+declare var calq:Calq;
\ No newline at end of file
diff --git a/chartjs/chart-tests.ts b/chartjs/chart-tests.ts
index 2374b6228a..4bd8820c6c 100644
--- a/chartjs/chart-tests.ts
+++ b/chartjs/chart-tests.ts
@@ -252,12 +252,12 @@ var myPolarAreaChart = new Chart(ctx).PolarArea(polarAreaData, {
var myPolarAreaChartLegend: string = myPolarAreaChart.generateLegend();
var myPolarAreaChartImage: string = myPolarAreaChart.toBase64Image();
-myPolarAreaChart.addData([{
+myPolarAreaChart.addData({
value: 120,
color: "#4D5360",
highlight: "#616774",
label: "Dark Grey"
-}], 0);
+}, 0);
myPolarAreaChart.clear();
myPolarAreaChart.removeData(0);
myPolarAreaChart.resize();
@@ -301,12 +301,12 @@ var myPieChart = new Chart(ctx).Pie(pieData, {
var myPieChartLegend: string = myPieChart.generateLegend();
var myPieChartImage: string = myPieChart.toBase64Image();
-myPieChart.addData([{
+myPieChart.addData({
value: 120,
color: "#4D5360",
highlight: "#616774",
label: "Dark Grey"
-}], 0);
+}, 0);
myPieChart.clear();
myPieChart.removeData(0);
myPieChart.resize();
@@ -329,12 +329,12 @@ var myDoughnutChart = new Chart(ctx).Doughnut(pieData, {
var myDoughnutChartLegend: string = myDoughnutChart.generateLegend();
var myDoughnutChartImage: string = myDoughnutChart.toBase64Image();
-myPieChart.addData([{
+myPieChart.addData({
value: 120,
color: "#4D5360",
highlight: "#616774",
label: "Dark Grey"
-}], 0);
+}, 0);
myDoughnutChart.clear();
myDoughnutChart.removeData(0);
myDoughnutChart.resize();
diff --git a/chartjs/chart.d.ts b/chartjs/chart.d.ts
index a73ecc94e2..9da7245f61 100644
--- a/chartjs/chart.d.ts
+++ b/chartjs/chart.d.ts
@@ -113,8 +113,9 @@ interface LinearInstance extends ChartInstance {
interface CircularInstance extends ChartInstance {
getSegmentsAtEvent: (event: Event) => {}[];
update: () => void;
- addData: (valuesArray: CircularChartData[], index: number) => void;
+ addData: (valuesArray: CircularChartData, index?: number) => void;
removeData: (index: number) => void;
+ segments: Array;
}
interface LineChartOptions extends ChartOptions {
diff --git a/chosen/chosen.jquery.d.ts b/chosen/chosen.jquery.d.ts
index 890b4221ec..1c95073394 100644
--- a/chosen/chosen.jquery.d.ts
+++ b/chosen/chosen.jquery.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for Chosen.JQuery 0.9
+// Type definitions for Chosen.JQuery 1.4.2
// Project: http://harvesthq.github.com/chosen/
// Definitions by: Boris Yankov
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -8,18 +8,23 @@
interface ChosenOptions {
allow_single_deselect?: boolean;
- disable_search_threshold?: number;
disable_search?: boolean;
+ disable_search_threshold?: number;
+ enable_split_word_search?: boolean;
+ inherit_select_classes?: boolean;
+ max_selected_options?: number;
+ no_results_text?: string;
+ placeholder_text_multiple?: string;
+ placeholder_text_single?: string;
search_contains?: boolean;
single_backstroke_delete?: boolean;
- max_selected_options?: number;
- placeholder_text_multiple?: string;
- placeholder_text?: string;
- placeholder_text_single?: string;
- no_results_text?: string;
+ width?: number;
+ display_disabled_options?: boolean;
+ display_selected_options?: boolean;
+ include_group_label_in_selected?: boolean;
}
interface JQuery {
chosen(): JQuery;
chosen(options: ChosenOptions): JQuery;
-}
\ No newline at end of file
+}
diff --git a/circular-json/circular-json-tests.ts b/circular-json/circular-json-tests.ts
new file mode 100644
index 0000000000..d3f2e0951c
--- /dev/null
+++ b/circular-json/circular-json-tests.ts
@@ -0,0 +1,31 @@
+///
+
+import CircularJSON = require('circular-json');
+
+var replacer = (key: any, val: any) => {
+ return val;
+}
+
+var replacerArray = ['a', 'x'];
+
+// implements JSON interface
+var json_obj: JSON = CircularJSON;
+
+CircularJSON.parse('{"a":"b"}');
+
+CircularJSON.parse('{"a":"b"}', replacer);
+
+// just stringify a value
+CircularJSON.stringify({a: 'b'});
+
+// do replacements for part of the object
+CircularJSON.stringify({a: 'b'}, replacer);
+CircularJSON.stringify({a: 'b'}, replacerArray);
+
+// add whitespace to the output
+CircularJSON.stringify({a: 'b'}, replacer, 5);
+CircularJSON.stringify({a: 'b'}, replacerArray, 5);
+
+// do not actually set up a re-parseable object
+CircularJSON.stringify({a: 'b'}, replacer, 5, true);
+CircularJSON.stringify({a: 'b'}, replacerArray, 5, true);
diff --git a/circular-json/circular-json.d.ts b/circular-json/circular-json.d.ts
new file mode 100644
index 0000000000..2aa27e947a
--- /dev/null
+++ b/circular-json/circular-json.d.ts
@@ -0,0 +1,15 @@
+// Type definitions for circular-json v0.1.6
+// Project: https://github.com/WebReflection/circular-json
+// Definitions by: Jonathan Pevarnek
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+declare module 'circular-json' {
+ interface ICircularJSON extends JSON {
+ parse(text: string, reviver?: (key: any, value: any) => any): any;
+ stringify(value: any, replacer?: ((key: string, value: any) => any) | any[], space?: any, placeholder?: boolean): string;
+ }
+
+ var CircularJSON: ICircularJSON;
+
+ export = CircularJSON;
+}
diff --git a/cordova-ionic/cordova-ionic.d.ts b/cordova-ionic/cordova-ionic.d.ts
index c9b1e635b3..5f0adee3ec 100644
--- a/cordova-ionic/cordova-ionic.d.ts
+++ b/cordova-ionic/cordova-ionic.d.ts
@@ -5,10 +5,6 @@
///
-interface Cordova {
- plugins:Plugins;
-}
-
-interface Plugins {
+interface CordovaPlugins {
Keyboard:Ionic.Keyboard;
}
diff --git a/cordova-plugin-email-composer/cordova-plugin-email-composer-tests.ts b/cordova-plugin-email-composer/cordova-plugin-email-composer-tests.ts
new file mode 100644
index 0000000000..ccd1e725d4
--- /dev/null
+++ b/cordova-plugin-email-composer/cordova-plugin-email-composer-tests.ts
@@ -0,0 +1,19 @@
+///
+///
+
+cordova.plugins.email.isAvailable((isAvailable) => {}, {});
+cordova.plugins.email.open({
+ to: ['foo@bar.com'],
+ body: 'foo bar'
+});
+cordova.plugins.email.open();
+cordova.plugins.email.open({}, () => {});
+cordova.plugins.email.open({}, () => {}, {});
+
+cordova.plugins.email.openDraft({
+ to: ['foo@bar.com'],
+ body: 'foo bar'
+});
+cordova.plugins.email.openDraft();
+cordova.plugins.email.openDraft({}, () => {});
+cordova.plugins.email.openDraft({}, () => {}, {});
diff --git a/cordova-plugin-email-composer/cordova-plugin-email-composer.d.ts b/cordova-plugin-email-composer/cordova-plugin-email-composer.d.ts
new file mode 100644
index 0000000000..9472ccf356
--- /dev/null
+++ b/cordova-plugin-email-composer/cordova-plugin-email-composer.d.ts
@@ -0,0 +1,33 @@
+// Type definitions for Apache Cordova Email Composer plugin
+// Project: https://github.com/katzer/cordova-plugin-email-composer
+// Definitions by: Dave Taylor
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+/**
+ * The plugin provides access to the standard interface that manages the
+ * editing and sending an email message
+ */
+interface CordovaPluginEmailComposer {
+ /** Determine if the device is capable to send emails */
+ isAvailable(callback:(isAvailable:boolean) => void, scope?:any):void;
+ /** Open a pre-filled email draft */
+ open(options?:ICordovaPluginEmailComposerOpenOptions, callback?:() => void, scope?:any):void;
+ openDraft(options?:ICordovaPluginEmailComposerOpenOptions, callback?:() => void, scope?:any):void;
+}
+
+interface ICordovaPluginEmailComposerOpenOptions {
+ /** An configured email account is required to send emails */
+ to?:string[];
+ body?:string;
+ cc?:string[];
+ bcc?:string[];
+ /** Attachments can be either base64 encoded datas, files from the the device storage or assets from within the www folder */
+ attachments?:any[];
+ subject?:string;
+ /** The default value for isHTML is true */
+ isHtml?:boolean;
+}
+
+interface CordovaPlugins {
+ email:CordovaPluginEmailComposer;
+}
diff --git a/cordova/cordova.d.ts b/cordova/cordova.d.ts
index 75b77ebe2c..32ef0a76b6 100644
--- a/cordova/cordova.d.ts
+++ b/cordova/cordova.d.ts
@@ -43,8 +43,12 @@ interface Cordova {
define(moduleName: string, factory: (require: any, exports: any, module: any) => any): void;
/** Access a Cordova module by name. */
require(moduleName: string): any;
+ /** Namespace for Cordova plugin functionality */
+ plugins:CordovaPlugins;
}
+interface CordovaPlugins {}
+
interface Document {
addEventListener(type: "deviceready", listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
diff --git a/d3/d3-tests.ts b/d3/d3-tests.ts
index 51c51f608f..bdc7509b76 100644
--- a/d3/d3-tests.ts
+++ b/d3/d3-tests.ts
@@ -476,7 +476,7 @@ function callenderView() {
.style("text-anchor", "middle")
.text(function (d) { return d; });
- var rect = svg.selectAll(".day")
+ var rect: D3.UpdateSelection = svg.selectAll(".day")
.data(function (d) { return d3.time.days(new Date(d, 0, 1), new Date(d + 1, 0, 1)); })
.enter().append("rect")
.attr("class", "day")
@@ -960,7 +960,7 @@ function forcedBasedLabelPlacemant() {
var anchorLink = vis.selectAll("line.anchorLink").data(labelAnchorLinks)//.enter().append("svg:line").attr("class", "anchorLink").style("stroke", "#999");
- var anchorNode = vis.selectAll("g.anchorNode").data(force2.nodes()).enter().append("svg:g").attr("class", "anchorNode");
+ var anchorNode: D3.Selection = vis.selectAll("g.anchorNode").data(force2.nodes()).enter().append("svg:g").attr("class", "anchorNode");
anchorNode.append("svg:circle").attr("r", 0).style("fill", "#FFF");
anchorNode.append("svg:text").text(function (d, i) {
return i % 2 == 0 ? "" : d.node.label
@@ -1404,7 +1404,7 @@ function quadtree() {
.attr("width", function (d) { return d.width; } )
.attr("height", function (d) { return d.height; } );
- var point = svg.selectAll(".point")
+ var point: D3.Selection = svg.selectAll(".point")
.data(data)
.enter().append("circle")
.attr("class", "point")
@@ -2656,4 +2656,18 @@ function multiTest() {
.attr("class", "x axis")
.attr("transform", "translate(0," + height + ")")
.call(xAxis);
-}
\ No newline at end of file
+}
+
+// Tests miscellaneous keyboard events
+function keyboardEventsTest() {
+ var keyPressed: string;
+ d3.select("body").on("keydown", () => {
+ if (d3.event.metaKey) {
+ keyPressed = "meta";
+ } else if (d3.event.ctrlKey) {
+ keyPressed = "ctrl";
+ } else if (d3.event.altKey) {
+ keyPressed = "alt";
+ }
+ });
+}
diff --git a/d3/d3.d.ts b/d3/d3.d.ts
index 57e817818d..b71610f944 100644
--- a/d3/d3.d.ts
+++ b/d3/d3.d.ts
@@ -12,19 +12,19 @@ declare module D3 {
/**
* Returns the empty selection
*/
- (): Selection;
+ (): _Selection;
/**
* Selects the first element that matches the specified selector string
*
* @param selector Selection String to match
*/
- (selector: string): Selection;
+ (selector: string): _Selection;
/**
* Selects the specified node
*
* @param element Node element to select
*/
- (element: EventTarget): Selection;
+ (element: EventTarget): _Selection;
};
/**
@@ -36,13 +36,13 @@ declare module D3 {
*
* @param selector Selection String to match
*/
- (selector: string): Selection;
+ (selector: string): _Selection;
/**
* Selects the specified array of elements
*
* @param elements Array of node elements to select
*/
- (elements: EventTarget[]): Selection;
+ (elements: EventTarget[]): _Selection;
};
}
@@ -57,7 +57,9 @@ declare module D3 {
x: number;
y: number;
keyCode: number;
- altKey: any;
+ altKey?: boolean;
+ ctrlKey?: boolean;
+ metaKey?: boolean;
type: string;
}
@@ -458,7 +460,7 @@ declare module D3 {
/**
* Returns the root selection
*/
- selection(): Selection;
+ selection(): _Selection;
ns: {
/**
* The map of registered namespace prefixes
@@ -726,56 +728,56 @@ declare module D3 {
format(rows: any[]): string;
}
- export interface Selection extends Selectors, Array {
+ export interface _Selection extends Selectors, Array {
attr: {
(name: string): string;
- (name: string, value: any): Selection;
- (name: string, valueFunction: (data: any, index: number) => any): Selection;
- (attrValueMap : Object): Selection;
+ (name: string, value: any): _Selection;
+ (name: string, valueFunction: (data: T, index: number) => any): _Selection;
+ (attrValueMap: Object): _Selection;
};
classed: {
(name: string): boolean;
- (name: string, value: any): Selection;
- (name: string, valueFunction: (data: any, index: number) => any): Selection;
- (classValueMap: Object): Selection;
+ (name: string, value: any): _Selection;
+ (name: string, valueFunction: (data: T, index: number) => any): _Selection;
+ (classValueMap: Object): _Selection;
};
style: {
(name: string): string;
- (name: string, value: any, priority?: string): Selection;
- (name: string, valueFunction: (data: any, index: number) => any, priority?: string): Selection;
- (styleValueMap : Object): Selection;
+ (name: string, value: any, priority?: string): _Selection;
+ (name: string, valueFunction: (data: T, index: number) => any, priority?: string): _Selection;
+ (styleValueMap: Object): _Selection;
};
property: {
(name: string): void;
- (name: string, value: any): Selection;
- (name: string, valueFunction: (data: any, index: number) => any): Selection;
- (propertyValueMap : Object): Selection;
+ (name: string, value: any): _Selection;
+ (name: string, valueFunction: (data: T, index: number) => any): _Selection;
+ (propertyValueMap: Object): _Selection;
};
text: {
(): string;
- (value: any): Selection;
- (valueFunction: (data: any, index: number) => any): Selection;
+ (value: any): _Selection;
+ (valueFunction: (data: T, index: number) => any): _Selection;
};
html: {
(): string;
- (value: any): Selection;
- (valueFunction: (data: any, index: number) => any): Selection;
+ (value: any): _Selection;
+ (valueFunction: (data: T, index: number) => any): _Selection;
};
- append: (name: string) => Selection;
- insert: (name: string, before: string) => Selection;
- remove: () => Selection;
+ append: (name: string) => _Selection;
+ insert: (name: string, before: string) => _Selection;
+ remove: () => _Selection;
empty: () => boolean;
data: {
- (values: (data: any, index?: number) => any[], key?: (data: any, index?: number) => any): UpdateSelection;
- (values: any[], key?: (data: any, index?: number) => any): UpdateSelection;
- (): any[];
+ (values: (data: T, index?: number) => U[], key?: (data: U, index?: number) => any): _UpdateSelection;
+ (values: U[], key?: (data: U, index?: number) => any): _UpdateSelection;
+ (): T[];
};
datum: {
@@ -789,36 +791,31 @@ declare module D3 {
* element. The function is then used to set each element's data. A null value will
* delete the bound data. This operator has no effect on the index.
*/
- (values: (data: any, index: number) => any): UpdateSelection;
+ (values: (data: U, index: number) => any): _UpdateSelection;
/**
* Sets the element's bound data to the specified value on all selected elements.
* Unlike the D3.Selection.data method, this method does not compute a join (and thus
* does not compute enter and exit selections).
* @param values The same data to be given to all elements.
*/
- (values: any): UpdateSelection;
+ (values: U): _UpdateSelection;
/**
* Returns the bound datum for the first non-null element in the selection.
* This is generally useful only if you know the selection contains exactly one element.
*/
- (): any;
- /**
- * Returns the bound datum for the first non-null element in the selection.
- * This is generally useful only if you know the selection contains exactly one element.
- */
- (): T;
+ (): T;
};
filter: {
- (filter: (data: any, index: number) => boolean, thisArg?: any): UpdateSelection;
- (filter: string): UpdateSelection;
+ (filter: (data: T, index: number) => boolean, thisArg?: any): _UpdateSelection;
+ (filter: string): _UpdateSelection;
};
- call(callback: (selection: Selection, ...args: any[]) => void, ...args: any[]): Selection;
- each(eachFunction: (data: any, index: number) => any): Selection;
+ call(callback: (selection: _Selection, ...args: any[]) => void, ...args: any[]): _Selection;
+ each(eachFunction: (data: T, index: number) => any): _Selection;
on: {
(type: string): (data: any, index: number) => any;
- (type: string, listener: (data: any, index: number) => any, capture?: boolean): Selection;
+ (type: string, listener: (data: any, index: number) => any, capture?: boolean): _Selection;
};
/**
@@ -840,38 +837,44 @@ declare module D3 {
* to compare, and should return either a negative, positive, or zero value to indicate
* their relative order.
*/
- sort(comparator?: (a: T, b: T) => number): Selection;
+ sort(comparator?: (a: T, b: T) => number): _Selection;
/**
* Re-inserts elements into the document such that the document order matches the selection
* order. This is equivalent to calling sort() if the data is already sorted, but much
* faster.
*/
- order: () => Selection;
+ order: () => _Selection;
/**
* Returns the first non-null element in the current selection. If the selection is empty,
* returns null.
*/
- node: () => T;
+ node: () => E;
}
- export interface EnterSelection {
- append: (name: string) => Selection;
- insert: (name: string, before?: string) => Selection;
- select: (selector: string) => Selection;
+ export interface Selection extends _Selection { }
+
+ export interface _EnterSelection {
+ append: (name: string) => _Selection;
+ insert: (name: string, before?: string) => _Selection;
+ select: (selector: string) => _Selection;
empty: () => boolean;
node: () => Element;
- call: (callback: (selection: EnterSelection) => void) => EnterSelection;
+ call: (callback: (selection: _EnterSelection) => void) => _EnterSelection;
size: () => number;
}
- export interface UpdateSelection extends Selection {
- enter: () => EnterSelection;
- update: () => Selection;
- exit: () => Selection;
+ export interface EnterSelection extends _EnterSelection { }
+
+ export interface _UpdateSelection extends _Selection {
+ enter: () => _EnterSelection;
+ update: () => _Selection;
+ exit: () => _Selection;
}
+ export interface UpdateSelection extends _UpdateSelection { }
+
export interface NestKeyValue {
key: string;
values: any;
@@ -1279,6 +1282,13 @@ declare module D3 {
(angle: (d : any) => number): PieLayout
(angle: (d : any, i: number) => number): PieLayout;
};
+ padAngle: {
+ (): number;
+ (angle: number): PieLayout;
+ (angle: () => number): PieLayout;
+ (angle: (d : any) => number): PieLayout
+ (angle: (d : any, i: number) => number): PieLayout;
+ };
}
export interface ArcDescriptor {
@@ -1363,7 +1373,20 @@ declare module D3 {
(number:number): ForceLayout;
(accessor: (d: any, index: number) => number): ForceLayout;
};
-
+ /**
+ * If distance is specified, sets the maximum distance over which
+ * charge forces are applied. If distance is not specified, returns
+ * the current maximum charge distance, which defaults to infinity.
+ * Specifying a finite charge distance improves the performance of
+ * the force layout and produces a more localized layout;
+ * distance-limited charge forces are especially useful in
+ * conjunction with custom gravity.
+ */
+ chargeDistance: {
+ (): number;
+ (distance: number): ForceLayout;
+ (accessor: (d: any, index: number) => number): ForceLayout;
+ };
theta: {
(): number;
(number:number): ForceLayout;
@@ -1727,14 +1750,14 @@ declare module D3 {
export interface Symbol {
type: (symbolType: string | ((datum: any, index: number) => string)) => Symbol;
size: (size: number | ((datum: any, index: number) => number)) => Symbol;
- (datum:any, index:number): string;
+ (datum?: any, index?: number): string;
}
export interface Brush {
/**
* Draws or redraws this brush into the specified selection of elements
*/
- (selection: Selection): void;
+ (selection: _Selection): void;
/**
* Gets or sets the x-scale associated with the brush
*/
@@ -1802,7 +1825,7 @@ declare module D3 {
}
export interface Axis {
- (selection: Selection): void;
+ (selection: _Selection): void;
(transition: Transition.Transition): void;
scale: {
@@ -1944,13 +1967,13 @@ declare module D3 {
/**
* Get the interpolation accessor.
*/
- (): string;
+ (): string | ((points: number[][]) => string);
/**
* Set the interpolation accessor.
*
* @param interpolate The interpolation mode
*/
- (interpolate: string): Line;
+ (interpolate: string | ((points: number[][]) => string)): Line;
};
/**
* Get or set the cardinal spline tension.
@@ -2240,13 +2263,13 @@ declare module D3 {
/**
* Get the interpolation accessor.
*/
- (): string;
+ (): string | ((points: number[][]) => string);
/**
* Set the interpolation accessor.
*
* @param interpolate The interpolation mode
*/
- (interpolate: string): Area;
+ (interpolate: string | ((points: number[][]) => string)): Area;
};
/**
* Get or set the cardinal spline tension.
@@ -2775,7 +2798,7 @@ declare module D3 {
* registering the necessary event listeners to support
* panning and zooming.
*/
- (selection: Selection): void;
+ (selection: _Selection): void;
/**
* Registers a listener to receive events
diff --git a/dompurify/dompurify-tests.ts b/dompurify/dompurify-tests.ts
new file mode 100644
index 0000000000..d9d6e0bd6b
--- /dev/null
+++ b/dompurify/dompurify-tests.ts
@@ -0,0 +1,8 @@
+///
+
+import dompurify = require('dompurify');
+
+dompurify.sanitize('');
+dompurify.addHook('beforeSanitizeElements', (el, data, config) => {
+ return el;
+});
diff --git a/dompurify/dompurify.d.ts b/dompurify/dompurify.d.ts
new file mode 100644
index 0000000000..b1f24b00ed
--- /dev/null
+++ b/dompurify/dompurify.d.ts
@@ -0,0 +1,15 @@
+// Type definitions for DOM Purify
+// Project: https://github.com/cure53/DOMPurify
+// Definitions by: Dave Taylor
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+interface IDOMPurify {
+ sanitize(s:string):string;
+ addHook(hook:string, cb:(currentNode:Element, data:any, config:any) => Element):void;
+}
+
+declare var DOMPurify:IDOMPurify;
+
+declare module 'dompurify' {
+ export = DOMPurify;
+}
diff --git a/drop/drop.d.ts b/drop/drop.d.ts
index 18568afdd6..e3615d5105 100644
--- a/drop/drop.d.ts
+++ b/drop/drop.d.ts
@@ -9,6 +9,12 @@ declare module drop {
interface DropStatic {
new(options: IDropOptions): Drop;
+ createContext(options: IDropContextOptions): DropStatic;
+ }
+
+ interface IDropContextOptions {
+ classPrefix?: string;
+ defaults?: IDropOptions;
}
interface IDropOptions {
diff --git a/ember/ember.d.ts b/ember/ember.d.ts
index 22cbb8ab57..636a7af685 100644
--- a/ember/ember.d.ts
+++ b/ember/ember.d.ts
@@ -444,7 +444,7 @@ declare module Ember {
static metaForProperty(key: string): {};
static isClass: boolean;
static isMethod: boolean;
- static initializer(arguments?: ApplicationInitializerArguments): void;
+ static initializer(args?: ApplicationInitializerArguments): void;
/**
Call advanceReadiness after any asynchronous setup logic has completed.
Each call to deferReadiness must be matched by a call to advanceReadiness
@@ -1318,9 +1318,9 @@ declare module Ember {
Creates an instance of the class.
@param arguments A hash containing values with which to initialize the newly instantiated object.
**/
- static create(arguments?: {}): T;
+ static create(args: {}): T;
detect(obj: any): boolean;
- reopen(arguments?: {}): T;
+ reopen(args?: {}): T;
}
class MutableArray implements Array, MutableEnumberable {
addArrayObserver(target: any, opts?: EnumerableConfigurationOptions): any[];
@@ -1581,17 +1581,17 @@ declare module Ember {
/**
Creates a subclass of the Object class.
**/
- static extend(arguments?: CoreObjectArguments): T;
- static extend(mixins? : Mixin, arguments?: CoreObjectArguments): T;
+ static extend(args?: CoreObjectArguments): T;
+ static extend(mixins? : Mixin, args?: CoreObjectArguments): T;
/**
Creates an instance of the class.
@param arguments A hash containing values with which to initialize the newly instantiated object.
**/
- static create(arguments?: {}): T;
+ static create(args?: {}): T;
/**
Equivalent to doing extend(arguments).create(). If possible use the normal create method instead.
**/
- static createWithMixins(arguments?: {}): T;
+ static createWithMixins(args?: {}): T;
static detect(obj: any): boolean;
static detectInstance(obj: any): boolean;
/**
@@ -1608,13 +1608,13 @@ declare module Ember {
Augments a constructor's prototype with additional properties and functions.
To add functions and properties to the constructor itself, see reopenClass.
**/
- static reopen(arguments?: {}): T;
+ static reopen(args?: {}): T;
/**
Augments a constructor's own properties and functions.
To add functions and properties to instances of a constructor by extending the
constructor's prototype see reopen.
**/
- static reopenClass(arguments?: {}): T;
+ static reopenClass(args?: {}): T;
static isClass: boolean;
static isMethod: boolean;
addObserver: ModifyObserver;
diff --git a/errorhandler/errorhandler.d.ts b/errorhandler/errorhandler.d.ts
index 31bf44ce11..40f845d098 100644
--- a/errorhandler/errorhandler.d.ts
+++ b/errorhandler/errorhandler.d.ts
@@ -7,6 +7,6 @@
declare module "errorhandler" {
import express = require('express');
- function e(): express.ErrorRequestHandler;
+ function e(options?: {log?: any}): express.ErrorRequestHandler;
export = e;
-}
\ No newline at end of file
+}
diff --git a/esprima/esprima-tests.ts b/esprima/esprima-tests.ts
index d2635a4043..f1a0f7ad92 100644
--- a/esprima/esprima-tests.ts
+++ b/esprima/esprima-tests.ts
@@ -1,27 +1,12 @@
+///
///
import esprima = require('esprima');
-import Syntax = esprima.Syntax;
var token: esprima.Token;
-var options: esprima.Options;
-var comment: Syntax.Comment;
-var program: Syntax.Program;
-var statement: Syntax.Statement;
-var expression: Syntax.Expression;
-var property: Syntax.Property;
-var identifier: Syntax.Identifier;
-var literal: Syntax.Literal;
-var switchCase: Syntax.SwitchCase;
-var catchClause: Syntax.CatchClause;
-var variableDeclaratorOrExpression: Syntax.VariableDeclaratorOrExpression;
-var literalOrIdentifier: Syntax.LiteralOrIdentifier;
-var blockStatementOrExpression: Syntax.BlockStatementOrExpression;
-var identifierOrExpression: Syntax.IdentifierOrExpression;
-var any: any;
+var comment: esprima.Comment;
+var program: ESTree.Program;
var string: string;
-var boolean: boolean;
-var number: number;
// esprima
string = esprima.version;
@@ -34,171 +19,5 @@ token = esprima.tokenize('code', {range: true})[0];
string = token.type;
string = token.value;
-// Program
-string = program.type;
-statement = program.body[0];
-comment = program.comments[0]
-
-// Location
-number = program.loc.start.line;
-number = program.loc.start.column;
-number = program.loc.end.line;
-number = program.loc.end.column;
-number = program.range[0];
-
// Comment
string = comment.value;
-
-// Statement
-// BlockStatement
-var blockStatement: Syntax.BlockStatement;
-string = blockStatement.type;
-statement = blockStatement.body[0];
-comment = blockStatement.leadingComments[0];
-comment = blockStatement.trailingComments[0];
-
-// ExpressionStatement
-var expressionStatement: Syntax.ExpressionStatement;
-expression = expressionStatement.expression;
-
-// IfStatement
-var ifStatement: Syntax.IfStatement;
-expression = ifStatement.test;
-statement = ifStatement.consequent;
-statement = ifStatement.alternate;
-
-// LabeledStatement
-var labeledStatement: Syntax.LabeledStatement;
-identifier = labeledStatement.label;
-statement = labeledStatement.body;
-
-// WithStatement
-var withStatement: Syntax.WithStatement;
-expression = withStatement.object;
-
-// SwitchStatement
-var switchStatement: Syntax.SwitchStatement;
-expression = switchStatement.discriminant;
-switchCase = switchStatement.cases[0];
-boolean = switchStatement.lexical;
-
-// ReturnStatement
-var returnStatement: Syntax.ReturnStatement;
-expression = returnStatement.argument;
-
-// TryStatement
-var tryStatement: Syntax.TryStatement;
-blockStatement = tryStatement.block;
-catchClause = tryStatement.handler;
-catchClause = tryStatement.guardedHandlers[0];
-blockStatement = tryStatement.finalizer;
-
-// ForStatement
-var forStatement: Syntax.ForStatement;
-variableDeclaratorOrExpression = forStatement.init;
-expression = forStatement.update;
-
-// ForInStatement
-var forInStatement: Syntax.ForInStatement;
-variableDeclaratorOrExpression = forInStatement.left;
-expression = forInStatement.right;
-boolean = forInStatement.each;
-
-// Expression
-// ArrayExpression
-var arrayExpression: Syntax.ArrayExpression;
-string = arrayExpression.type;
-expression = arrayExpression.elements[0];
-
-// ObjectExpression
-var objectExpression: Syntax.ObjectExpression;
-property = objectExpression.properties[0];
-string = property.type;
-literalOrIdentifier = property.key;
-expression = property.value;
-string = property.kind;
-
-// FunctionExpression
-var functionExpression: Syntax.FunctionExpression;
-identifier = functionExpression.id;
-identifier = functionExpression.params[0];
-expression = functionExpression.defaults[0];
-identifier = functionExpression.rest;
-blockStatementOrExpression = functionExpression.body;
-boolean = functionExpression.generator;
-boolean = functionExpression.expression;
-
-// SequenceExpression
-var sequenceExpression: Syntax.SequenceExpression;
-expression = sequenceExpression.expressions[0]
-
-// UnaryExpression
-var unaryExpression: Syntax.UnaryExpression;
-string = unaryExpression.operator;
-boolean = unaryExpression.prefix;
-
-// BinaryExpression
-var binaryExpression: Syntax.BinaryExpression;
-expression = binaryExpression.left;
-expression = binaryExpression.right;
-
-// ConditionalExpression
-var conditionalExpression: Syntax.ConditionalExpression;
-expression = conditionalExpression.test;
-expression = conditionalExpression.alternate;
-expression = conditionalExpression.consequent;
-
-// NewExpression
-var newExpression: Syntax.NewExpression;
-expression = newExpression.callee;
-expression = newExpression.arguments[0];
-
-// CallExpression
-var callExpression: Syntax.CallExpression;
-expression = callExpression.callee;
-expression = callExpression.arguments[0];
-
-// MemberExpression
-var memberExpression: Syntax.MemberExpression;
-expression = memberExpression.object;
-identifierOrExpression = memberExpression.property;
-boolean = memberExpression.computed;
-
-// Declarations
-var functionDeclaration: Syntax.FunctionDeclaration;
-identifier = functionDeclaration.id;
-var params:Syntax.Identifier[] = functionDeclaration.params;
-var defaults:Syntax.Expression[] = functionDeclaration.defaults;
-identifier = functionDeclaration.rest;
-var body:Syntax.BlockStatementOrExpression = functionDeclaration.body;
-boolean = functionDeclaration.generator;
-boolean = functionDeclaration.expression;
-
-var variableDeclaration: Syntax.VariableDeclaration;
-var declarations:Syntax.VariableDeclarator[] = variableDeclaration.declarations;
-string = variableDeclaration.kind; // "var" | "let" | "const"
-
-var variableDeclarator: Syntax.VariableDeclarator;
-identifier = variableDeclarator.id; // Pattern
-expression = variableDeclarator.init;
-
-// Clauses
-// SwitchCase
-string = switchCase.type;
-expression = switchCase.test;
-statement = switchCase.consequent[0];
-
-// CatchClause
-string = catchClause.type;
-identifier = catchClause.param;
-expression = catchClause.guard;
-blockStatement = catchClause.body;
-
-// Misc
-// Identifier
-string = identifier.type;
-string = identifier.name;
-
-// Literal
-string = literal.type;
-any = literal.value;
diff --git a/esprima/esprima.d.ts b/esprima/esprima.d.ts
index d62bb09bb1..10e37a5309 100644
--- a/esprima/esprima.d.ts
+++ b/esprima/esprima.d.ts
@@ -1,18 +1,24 @@
-// Type definitions for Esprima v1.2.0
+// Type definitions for Esprima v2.1.0
// Project: http://esprima.org
-// Definitions by: teppeis
+// Definitions by: teppeis , RReverser
// Definitions: https://github.com/borisyankov/DefinitelyTyped
+///
+
declare module esprima {
- var version: string;
- function parse(code: string, options?: Options): Syntax.Program;
- function tokenize(code: string, options?: Options): Array;
+ var version: string
+ function parse(code: string, options?: Options): ESTree.Program
+ function tokenize(code: string, options?: Options): Array
interface Token {
type: string
value: string
}
+ interface Comment extends ESTree.Node {
+ value: string
+ }
+
interface Options {
loc?: boolean
range?: boolean
@@ -23,244 +29,6 @@ declare module esprima {
tolerant?: boolean
source?: boolean
}
-
- module Syntax {
- // Node
- interface Node {
- type: string
- loc?: LineLocation
- range?: number[]
- leadingComments?: Comment[]
- trailingComments?: Comment[]
- }
- interface LineLocation {
- start: Position
- end: Position
- }
- interface Position {
- line: number
- column: number
- }
-
- // Comment
- interface Comment extends Node {
- value: string
- }
-
- // Program
- interface Program extends Node {
- body: Statement[]
- comments?: Comment[]
- }
-
- // Function
- interface Function extends Node {
- id: Identifier // | null
- params: Identifier[]
- defaults: Expression[]
- rest: Identifier // | null
- body: BlockStatementOrExpression
- generator: boolean
- expression: boolean
- }
- interface BlockStatementOrExpression extends BlockStatement, Expression {
- }
-
- // Statement
- interface Statement extends Node {
- }
- interface EmptyStatement extends Statement {
- }
- interface BlockStatement extends Statement {
- body: Statement[]
- }
- interface ExpressionStatement extends Statement {
- expression: Expression
- }
- interface IfStatement extends Statement {
- test: Expression
- consequent: Statement
- alternate: Statement
- }
- interface LabeledStatement extends Statement {
- label: Identifier
- body: Statement
- }
- interface BreakStatement extends Statement {
- label: Identifier // | null
- }
- interface ContinueStatement extends Statement {
- label: Identifier // | null
- }
- interface WithStatement extends Statement {
- object: Expression
- body: Statement
- }
- interface SwitchStatement extends Statement {
- discriminant: Expression
- cases: SwitchCase[]
- lexical: boolean
- }
- interface ReturnStatement extends Statement {
- argument: Expression // | null
- }
- interface ThrowStatement extends Statement {
- argument: Expression
- }
- interface TryStatement extends Statement {
- block: BlockStatement
- handler: CatchClause // | null
- guardedHandlers: CatchClause[]
- finalizer: BlockStatement // | null
- }
- interface WhileStatement extends Statement {
- test: Expression
- body: Statement
- }
- interface DoWhileStatement extends Statement {
- body: Statement
- test: Expression
- }
- interface ForStatement extends Statement {
- init: VariableDeclaratorOrExpression // | null
- test: Expression // | null
- update: Expression // | null
- body: Statement
- }
- interface ForInStatement extends Statement {
- left: VariableDeclaratorOrExpression
- right: Expression
- body: Statement
- each: boolean
- }
- interface VariableDeclaratorOrExpression extends VariableDeclarator, Expression {
- }
- interface DebuggerStatement extends Statement {
- }
- interface StatementOrList extends Array, Statement {
- }
-
- // Declaration
- interface Declaration extends Statement {
- }
- interface FunctionDeclaration extends Declaration {
- id: Identifier
- params: Identifier[] // Pattern
- defaults: Expression[]
- rest: Identifier
- body: BlockStatementOrExpression
- generator: boolean
- expression: boolean
- }
- interface VariableDeclaration extends Declaration {
- declarations: VariableDeclarator[]
- kind: string // "var" | "let" | "const"
- }
- interface VariableDeclarator extends Node {
- id: Identifier // Pattern
- init: Expression
- }
-
- // Expression
- interface Expression extends Node { // | Pattern
- }
- //interface Expression extends
- // ThisExpression, ArrayExpression, ObjectExpression, FunctionExpression,
- // ArrowFunctionExpression, SequenceExpression, UnaryExpression, BinaryExpression,
- // AssignmentExpression, UpdateExpression, LogicalExpression, ConditionalExpression,
- // NewExpression, CallExpression, MemberExpression {
- //}
- interface ThisExpression extends Expression {
- }
- interface ArrayExpression extends Expression {
- elements: Expression[] // [ Expression | null ]
- }
- interface ObjectExpression extends Expression {
- properties: Property[]
- }
- interface Property extends Node {
- key: LiteralOrIdentifier // Literal | Identifier
- value: Expression
- kind: string // "init" | "get" | "set"
- }
- interface LiteralOrIdentifier extends Literal, Identifier {
- }
- interface FunctionExpression extends Function, Expression {
- }
- interface ArrowFunctionExpression extends Function, Expression {
- }
- interface SequenceExpression extends Expression {
- expressions: Expression[]
- }
- interface UnaryExpression extends Expression {
- operator: string // UnaryOperator
- prefix: boolean
- argument: Expression
- }
- interface BinaryExpression extends Expression {
- operator: string // BinaryOperator
- left: Expression
- right: Expression
- }
- interface AssignmentExpression extends Expression {
- operator: string // AssignmentOperator
- left: Expression
- right: Expression
- }
- interface UpdateExpression extends Expression {
- operator: string // UpdateOperator
- argument: Expression
- prefix: boolean
- }
- interface LogicalExpression extends Expression {
- operator: string // LogicalOperator
- left: Expression
- right: Expression
- }
- interface ConditionalExpression extends Expression {
- test: Expression
- alternate: Expression
- consequent: Expression
- }
- interface NewExpression extends Expression {
- callee: Expression
- arguments: Expression[]
- }
- interface CallExpression extends Expression {
- callee: Expression
- arguments: Expression[]
- }
- interface MemberExpression extends Expression {
- object: Expression
- property: IdentifierOrExpression // Identifier | Expression
- computed: boolean
- }
- interface IdentifierOrExpression extends Identifier, Expression {
- }
-
- // Pattern
- // interface Pattern extends Node {
- // }
-
- // Clauses
- interface SwitchCase extends Node {
- test: Expression
- consequent: Statement[]
- }
- interface CatchClause extends Node {
- param: Identifier // Pattern
- guard: Expression
- body: BlockStatement
- }
-
- // Misc
- interface Identifier extends Node, Expression { // | Pattern
- name: string
- }
- interface Literal extends Node, Expression {
- value: any // string | boolean | null | number | RegExp
- }
- }
}
declare module "esprima" {
diff --git a/estree/estree-tests.ts b/estree/estree-tests.ts
new file mode 100644
index 0000000000..bbf16586d4
--- /dev/null
+++ b/estree/estree-tests.ts
@@ -0,0 +1,177 @@
+///
+
+var program: ESTree.Program;
+var statement: ESTree.Statement;
+var expression: ESTree.Expression;
+var property: ESTree.Property;
+var identifier: ESTree.Identifier;
+var literal: ESTree.Literal;
+var switchCase: ESTree.SwitchCase;
+var catchClause: ESTree.CatchClause;
+var pattern: ESTree.Pattern;
+var assignmentPattern: ESTree.AssignmentPattern;
+var variableDeclaratorOrExpression: ESTree.VariableDeclaration | ESTree.Expression;
+var literalOrIdentifier: ESTree.Literal | ESTree.Identifier;
+var blockStatementOrExpression: ESTree.BlockStatement | ESTree.Expression;
+var identifierOrExpression: ESTree.Expression;
+var any: any;
+var string: string;
+var boolean: boolean;
+var number: number;
+
+// Program
+string = program.type;
+statement = program.body[0];
+
+// Location
+number = program.loc.start.line;
+number = program.loc.start.column;
+number = program.loc.end.line;
+number = program.loc.end.column;
+number = program.range[0];
+
+// Statement
+// BlockStatement
+var blockStatement: ESTree.BlockStatement;
+string = blockStatement.type;
+statement = blockStatement.body[0];
+
+// ExpressionStatement
+var expressionStatement: ESTree.ExpressionStatement;
+expression = expressionStatement.expression;
+
+// IfStatement
+var ifStatement: ESTree.IfStatement;
+expression = ifStatement.test;
+statement = ifStatement.consequent;
+statement = ifStatement.alternate;
+
+// LabeledStatement
+var labeledStatement: ESTree.LabeledStatement;
+identifier = labeledStatement.label;
+statement = labeledStatement.body;
+
+// WithStatement
+var withStatement: ESTree.WithStatement;
+expression = withStatement.object;
+
+// SwitchStatement
+var switchStatement: ESTree.SwitchStatement;
+expression = switchStatement.discriminant;
+switchCase = switchStatement.cases[0];
+boolean = switchStatement.lexical;
+
+// ReturnStatement
+var returnStatement: ESTree.ReturnStatement;
+expression = returnStatement.argument;
+
+// TryStatement
+var tryStatement: ESTree.TryStatement;
+blockStatement = tryStatement.block;
+catchClause = tryStatement.handler;
+blockStatement = tryStatement.finalizer;
+
+// ForStatement
+var forStatement: ESTree.ForStatement;
+variableDeclaratorOrExpression = forStatement.init;
+expression = forStatement.update;
+
+// ForInStatement
+var forInStatement: ESTree.ForInStatement;
+variableDeclaratorOrExpression = forInStatement.left;
+expression = forInStatement.right;
+
+// Expression
+// ArrayExpression
+var arrayExpression: ESTree.ArrayExpression;
+string = arrayExpression.type;
+expression = arrayExpression.elements[0];
+
+// ObjectExpression
+var objectExpression: ESTree.ObjectExpression;
+property = objectExpression.properties[0];
+string = property.type;
+expression = property.key;
+expression = property.value;
+string = property.kind;
+
+// FunctionExpression
+var functionExpression: ESTree.FunctionExpression;
+identifier = functionExpression.id;
+assignmentPattern = functionExpression.params[0];
+pattern = assignmentPattern.left;
+expression = assignmentPattern.right;
+blockStatementOrExpression = functionExpression.body;
+boolean = functionExpression.generator;
+
+// SequenceExpression
+var sequenceExpression: ESTree.SequenceExpression;
+expression = sequenceExpression.expressions[0]
+
+// UnaryExpression
+var unaryExpression: ESTree.UnaryExpression;
+string = unaryExpression.operator;
+boolean = unaryExpression.prefix;
+
+// BinaryExpression
+var binaryExpression: ESTree.BinaryExpression;
+expression = binaryExpression.left;
+expression = binaryExpression.right;
+
+// ConditionalExpression
+var conditionalExpression: ESTree.ConditionalExpression;
+expression = conditionalExpression.test;
+expression = conditionalExpression.alternate;
+expression = conditionalExpression.consequent;
+
+// NewExpression
+var newExpression: ESTree.NewExpression;
+expression = newExpression.callee;
+expression = newExpression.arguments[0];
+
+// CallExpression
+var callExpression: ESTree.CallExpression;
+expression = callExpression.callee;
+expression = callExpression.arguments[0];
+
+// MemberExpression
+var memberExpression: ESTree.MemberExpression;
+expression = memberExpression.object;
+identifierOrExpression = memberExpression.property;
+boolean = memberExpression.computed;
+
+// Declarations
+var functionDeclaration: ESTree.FunctionDeclaration;
+identifier = functionDeclaration.id;
+var params:ESTree.Pattern[] = functionDeclaration.params;
+var body:ESTree.BlockStatement | ESTree.Expression = functionDeclaration.body;
+boolean = functionDeclaration.generator;
+
+var variableDeclaration: ESTree.VariableDeclaration;
+var declarations:ESTree.VariableDeclarator[] = variableDeclaration.declarations;
+string = variableDeclaration.kind; // "var" | "let" | "const"
+
+var variableDeclarator: ESTree.VariableDeclarator;
+pattern = variableDeclarator.id; // Pattern
+expression = variableDeclarator.init;
+
+// Clauses
+// SwitchCase
+string = switchCase.type;
+expression = switchCase.test;
+statement = switchCase.consequent[0];
+
+// CatchClause
+string = catchClause.type;
+pattern = catchClause.param;
+expression = catchClause.guard;
+blockStatement = catchClause.body;
+
+// Misc
+// Identifier
+string = identifier.type;
+string = identifier.name;
+
+// Literal
+string = literal.type;
+any = literal.value;
diff --git a/estree/estree.d.ts b/estree/estree.d.ts
new file mode 100644
index 0000000000..329396b7c4
--- /dev/null
+++ b/estree/estree.d.ts
@@ -0,0 +1,369 @@
+// Type definitions for ESTree AST specification
+// Project: https://github.com/estree/estree
+// Definitions by: RReverser
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+declare module ESTree {
+ interface Node {
+ type: string;
+ loc?: SourceLocation;
+ range?: [number, number];
+ }
+
+ interface SourceLocation {
+ source?: string;
+ start: Position;
+ end: Position;
+ }
+
+ interface Position {
+ line: number;
+ column: number;
+ }
+
+ interface Program extends Node {
+ body: Array;
+ sourceType: string;
+ }
+
+ interface Function extends Node {
+ id?: Identifier;
+ params: Array;
+ body: BlockStatement | Expression;
+ generator: boolean;
+ }
+
+ interface Statement extends Node {}
+
+ interface EmptyStatement extends Statement {}
+
+ interface BlockStatement extends Statement {
+ body: Array;
+ }
+
+ interface ExpressionStatement extends Statement {
+ expression: Expression;
+ }
+
+ interface IfStatement extends Statement {
+ test: Expression;
+ consequent: Statement;
+ alternate?: Statement;
+ }
+
+ interface LabeledStatement extends Statement {
+ label: Identifier;
+ body: Statement;
+ }
+
+ interface BreakStatement extends Statement {
+ label?: Identifier;
+ }
+
+ interface ContinueStatement extends Statement {
+ label?: Identifier;
+ }
+
+ interface WithStatement extends Statement {
+ object: Expression;
+ body: Statement;
+ }
+
+ interface SwitchStatement extends Statement {
+ discriminant: Expression;
+ cases: Array;
+ lexical: boolean;
+ }
+
+ interface ReturnStatement extends Statement {
+ argument?: Expression;
+ }
+
+ interface ThrowStatement extends Statement {
+ argument: Expression;
+ }
+
+ interface TryStatement extends Statement {
+ block: BlockStatement;
+ handler?: CatchClause;
+ finalizer?: BlockStatement;
+ }
+
+ interface WhileStatement extends Statement {
+ test: Expression;
+ body: Statement;
+ }
+
+ interface DoWhileStatement extends Statement {
+ body: Statement;
+ test: Expression;
+ }
+
+ interface ForStatement extends Statement {
+ init?: VariableDeclaration | Expression;
+ test?: Expression;
+ update?: Expression;
+ body: Statement;
+ }
+
+ interface ForInStatement extends Statement {
+ left: VariableDeclaration | Expression;
+ right: Expression;
+ body: Statement;
+ }
+
+ interface DebuggerStatement extends Statement {}
+
+ interface Declaration extends Statement {}
+
+ interface FunctionDeclaration extends Function, Declaration {
+ id: Identifier;
+ }
+
+ interface VariableDeclaration extends Declaration {
+ declarations: Array;
+ kind: string;
+ }
+
+ interface VariableDeclarator extends Node {
+ id: Pattern;
+ init?: Expression;
+ }
+
+ interface Expression extends Node {}
+
+ interface ThisExpression extends Expression {}
+
+ interface ArrayExpression extends Expression {
+ elements: Array;
+ }
+
+ interface ObjectExpression extends Expression {
+ properties: Array;
+ }
+
+ interface Property extends Node {
+ key: Expression;
+ value: Expression;
+ kind: string;
+ method: boolean;
+ shorthand: boolean;
+ computed: boolean;
+ }
+
+ interface FunctionExpression extends Function, Expression {}
+
+ interface SequenceExpression extends Expression {
+ expressions: Array;
+ }
+
+ interface UnaryExpression extends Expression {
+ operator: UnaryOperator;
+ prefix: boolean;
+ argument: Expression;
+ }
+
+ interface BinaryExpression extends Expression {
+ operator: BinaryOperator;
+ left: Expression;
+ right: Expression;
+ }
+
+ interface AssignmentExpression extends Expression {
+ operator: AssignmentOperator;
+ left: Pattern | MemberExpression;
+ right: Expression;
+ }
+
+ interface UpdateExpression extends Expression {
+ operator: UpdateOperator;
+ argument: Expression;
+ prefix: boolean;
+ }
+
+ interface LogicalExpression extends Expression {
+ operator: LogicalOperator;
+ left: Expression;
+ right: Expression;
+ }
+
+ interface ConditionalExpression extends Expression {
+ test: Expression;
+ alternate: Expression;
+ consequent: Expression;
+ }
+
+ interface CallExpression extends Expression {
+ callee: Expression | Super;
+ arguments: Array;
+ }
+
+ interface NewExpression extends CallExpression {}
+
+ interface MemberExpression extends Expression, Pattern {
+ object: Expression | Super;
+ property: Expression;
+ computed: boolean;
+ }
+
+ interface Pattern extends Node {}
+
+ interface SwitchCase extends Node {
+ test?: Expression;
+ consequent: Array;
+ }
+
+ interface CatchClause extends Node {
+ param: Pattern;
+ guard: any;
+ body: BlockStatement;
+ }
+
+ interface Identifier extends Node, Expression, Pattern {
+ name: string;
+ }
+
+ interface Literal extends Node, Expression {
+ value?: string | boolean | number | RegExp;
+ }
+
+ interface RegexLiteral extends Literal {
+ regex: {
+ pattern: string;
+ flags: string;
+ };
+ }
+
+ type UnaryOperator = string;
+
+ type BinaryOperator = string;
+
+ type LogicalOperator = string;
+
+ type AssignmentOperator = string;
+
+ type UpdateOperator = string;
+
+ interface ForOfStatement extends ForInStatement {}
+
+ interface Super extends Node {}
+
+ interface SpreadElement extends Node {
+ argument: Expression;
+ }
+
+ interface ArrowFunctionExpression extends Function, Expression {
+ expression: boolean;
+ }
+
+ interface YieldExpression extends Expression {
+ argument?: Expression;
+ }
+
+ interface TemplateLiteral extends Expression {
+ quasis: Array;
+ expressions: Array;
+ }
+
+ interface TaggedTemplateExpression extends Expression {
+ tag: Expression;
+ quasi: TemplateLiteral;
+ }
+
+ interface TemplateElement extends Node {
+ tail: boolean;
+ value: {
+ cooked: string;
+ value: string;
+ };
+ }
+
+ interface AssignmentProperty extends Property {
+ value: Pattern;
+ kind: string;
+ method: boolean;
+ }
+
+ interface ObjectPattern extends Pattern {
+ properties: Array;
+ }
+
+ interface ArrayPattern extends Pattern {
+ elements: Array;
+ }
+
+ interface RestElement extends Pattern {
+ argument: Pattern;
+ }
+
+ interface AssignmentPattern extends Pattern {
+ left: Pattern;
+ right: Expression;
+ }
+
+ interface Class extends Node {
+ id?: Identifier;
+ superClass: Expression;
+ body: ClassBody;
+ }
+
+ interface ClassBody extends Node {
+ body: Array;
+ }
+
+ interface MethodDefinition extends Node {
+ key: Identifier;
+ value: FunctionExpression;
+ kind: string;
+ computed: boolean;
+ static: boolean;
+ }
+
+ interface ClassDeclaration extends Class, Declaration {
+ id: Identifier;
+ }
+
+ interface ClassExpression extends Class, Expression {}
+
+ interface MetaProperty extends Expression {
+ meta: Identifier;
+ property: Identifier;
+ }
+
+ interface ImportDeclaration extends Node {
+ specifiers: Array;
+ source: Literal;
+ }
+
+ interface ImportSpecifier {
+ imported: Identifier;
+ local: Identifier;
+ }
+
+ interface ImportDefaultSpecifier {
+ local: Identifier;
+ }
+
+ interface ImportNamespaceSpecifier {
+ local: Identifier;
+ }
+
+ interface ExportNamedDeclaration extends Node {
+ declaration?: Declaration;
+ specifiers: Array;
+ source?: Literal;
+ }
+
+ interface ExportSpecifier {
+ exported: Identifier;
+ local: Identifier;
+ }
+
+ interface ExportDefaultDeclaration extends Node {
+ declaration: Declaration | Expression;
+ }
+
+ interface ExportAllDeclaration extends Node {
+ source: Literal;
+ }
+}
\ No newline at end of file
diff --git a/express-debug/express-debug-tests.ts b/express-debug/express-debug-tests.ts
new file mode 100644
index 0000000000..6f702856ed
--- /dev/null
+++ b/express-debug/express-debug-tests.ts
@@ -0,0 +1,21 @@
+///
+
+import express = require('express');
+import debug = require('express-debug');
+var app = express();
+
+debug(app, {
+ depth: 4,
+ theme: 'public/css/debug.css',
+ extra_panels: [{
+ name: 'mypanel',
+ template: '/absolute/path/to/mypanel.jade',
+ process: function(locals) {
+ return { locals: { mypanel: true, }};
+ }
+ }],
+ panels: ['locals', 'request', 'session'],
+ path: '/express-debug',
+ extra_attrs: '',
+ sort: false,
+});
diff --git a/express-debug/express-debug.d.ts b/express-debug/express-debug.d.ts
new file mode 100644
index 0000000000..d185f5c696
--- /dev/null
+++ b/express-debug/express-debug.d.ts
@@ -0,0 +1,83 @@
+// Type definitions for express-debug 1.1.1
+// Project: https://github.com/devoidfury/express-debug
+// Definitions by: Federico Bond
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+/* =================== USAGE ===================
+
+ import debug = require('express-debug');
+ debug(app, options);
+
+ =============================================== */
+
+///
+
+declare module "express-debug" {
+ import express = require('express');
+
+ interface CustomPanel {
+ name: string;
+
+ template: string;
+
+ process(locals: any): any;
+
+ standalone?: boolean;
+
+ initialize?(req: express.Request): void;
+
+ finalize?(req: express.Request): void;
+
+ pre_render?(req: express.Request): void;
+
+ post_render?(req: express.Request): void;
+
+ options?: any;
+ }
+
+ /**
+ * Node.js middleware for serving a favicon.
+ */
+ function debug(app: express.Application, settings?: {
+ /**
+ * How deep to recurse through printed objects. This is the default unless the
+ * print_obj function is passed an options object with a 'depth' property.
+ */
+ depth?: number;
+
+ /**
+ * Absolute path to a css file to include and override EDT's default css.
+ */
+ theme?: string;
+
+ /**
+ * Additional panels to show.
+ */
+ extra_panels?: CustomPanel[];
+
+ /**
+ * Allows changing the default panel.
+ */
+ panels?: string[];
+
+ /**
+ * Path to render standalone express-debug.
+ */
+ path?: string;
+
+ /**
+ * If you need to add arbitrary attributes to the containing element of EDT,
+ * this allows you to.
+ */
+ extra_attrs?: string;
+
+ /**
+ * Global option to determine sort order of printed object values. false for
+ * default order, true for basic default sort, or a function to use for sort.
+ */
+ sort?: boolean | ((a: number, b: number) => number);
+
+ }): void;
+
+ export = debug;
+}
diff --git a/formidable/formidable.d.ts b/formidable/formidable.d.ts
index ba0ed81228..d1cbb16f6d 100644
--- a/formidable/formidable.d.ts
+++ b/formidable/formidable.d.ts
@@ -25,7 +25,7 @@ declare module "formidable" {
onPart: (part: Part) => void;
handlePart(part: Part): void;
- parse(req: http.ServerRequest, callback?: (err: any, fields: Fields, files: Files) => any): void;
+ parse(req: http.IncomingMessage, callback?: (err: any, fields: Fields, files: Files) => any): void;
}
export interface Fields {
diff --git a/ftp/ftp-tests.ts b/ftp/ftp-tests.ts
new file mode 100644
index 0000000000..2e37e53f99
--- /dev/null
+++ b/ftp/ftp-tests.ts
@@ -0,0 +1,28 @@
+///
+///
+
+import Client = require("ftp");
+import fs = require("fs");
+
+var c = new Client();
+c.on('ready', (): void => {
+ c.get('foo.txt', function(err: Error, stream: NodeJS.ReadableStream): void {
+ if (err) throw err;
+ stream.once('close', function(): void {
+ c.end();
+ });
+ stream.pipe(fs.createWriteStream('foo.local-copy.txt'));
+ });
+});
+// connect to localhost:21 as anonymous
+c.connect();
+
+c.connect({
+ host: "127.0.0.1",
+ port: 21,
+ username: "Boo",
+ password: "secret"
+});
+
+
+
diff --git a/ftp/ftp.d.ts b/ftp/ftp.d.ts
new file mode 100644
index 0000000000..764505037d
--- /dev/null
+++ b/ftp/ftp.d.ts
@@ -0,0 +1,294 @@
+// Type definitions for ftp 0.3.8
+// Project: https://github.com/mscdex/node-ftp
+// Definitions by: Rogier Schouten
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+///
+
+declare module "ftp" {
+
+ import events = require("events");
+ import tls = require("tls");
+
+ module Client {
+
+ /**
+ * Options for Client#connect()
+ */
+ export interface Options {
+ /**
+ * The hostname or IP address of the FTP server. Default: 'localhost'
+ */
+ host?: string;
+ /**
+ * The port of the FTP server. Default: 21
+ */
+ port?: number;
+ /**
+ * Set to true for both control and data connection encryption, 'control' for control connection encryption only, or 'implicit' for
+ * implicitly encrypted control connection (this mode is deprecated in modern times, but usually uses port 990) Default: false
+ */
+ secure?: string|boolean;
+ /**
+ * Additional options to be passed to tls.connect(). Default: (none)
+ */
+ secureOptions?: tls.ConnectionOptions;
+ /**
+ * Username for authentication. Default: 'anonymous'
+ */
+ user?: string;
+ /**
+ * Password for authentication. Default: 'anonymous@'
+ */
+ password?: string;
+ /**
+ * How long (in milliseconds) to wait for the control connection to be established. Default: 10000
+ */
+ connTimeout?: number;
+ /**
+ * How long (in milliseconds) to wait for a PASV data connection to be established. Default: 10000
+ */
+ pasvTimeout?: number;
+ /**
+ * How often (in milliseconds) to send a 'dummy' (NOOP) command to keep the connection alive. Default: 10000
+ */
+ keepalive?: number;
+ }
+
+ /**
+ * Element returned by Client#list()
+ */
+ export interface ListingElement {
+ /**
+ * A single character denoting the entry type: 'd' for directory, '-' for file (or 'l' for symlink on **\*NIX only**).
+ */
+ "type": string;
+ /**
+ * The name of the entry
+ */
+ name: string;
+ /**
+ * The size of the entry in bytes
+ */
+ size: string;
+ /**
+ * The last modified date of the entry
+ */
+ date: Date;
+ /**
+ * The various permissions for this entry **(*NIX only)**
+ */
+ rights?: {
+ /**
+ * An empty string or any combination of 'r', 'w', 'x'.
+ */
+ user: string;
+ /**
+ * An empty string or any combination of 'r', 'w', 'x'.
+ */
+ group: string;
+ /**
+ * An empty string or any combination of 'r', 'w', 'x'.
+ */
+ other: string;
+ };
+ /**
+ * The user name or ID that this entry belongs to **(*NIX only)**.
+ */
+ owner?: string;
+ /**
+ * The group name or ID that this entry belongs to **(*NIX only)**.
+ */
+ group?: string;
+ /**
+ * For symlink entries, this is the symlink's target **(*NIX only)**.
+ */
+ target?: string;
+ /**
+ * True if the sticky bit is set for this entry **(*NIX only)**.
+ */
+ sticky?: boolean;
+ }
+ }
+
+
+ /**
+ * FTP client.
+ *
+ * Events:
+ * @event greeting(< string >msg) - Emitted after connection. msg is the text the server sent upon connection.
+ * @event ready() - Emitted when connection and authentication were sucessful.
+ * @event close(< boolean >hadErr) - Emitted when the connection has fully closed.
+ * @event end() - Emitted when the connection has ended.
+ * @event error(< Error >err) - Emitted when an error occurs. In case of protocol-level errors, err contains
+ * a 'code' property that references the related 3-digit FTP response code.
+ */
+ class Client extends events.EventEmitter {
+
+ /**
+ * Creates and returns a new FTP client instance.
+ */
+ constructor();
+
+ /**
+ * Connects to an FTP server.
+ */
+ connect(config?: Client.Options): void;
+
+ /**
+ * Closes the connection to the server after any/all enqueued commands have been executed.
+ */
+ end(): void;
+
+ /**
+ * Closes the connection to the server immediately.
+ */
+ destroy(): void;
+
+ /**
+ * Retrieves the directory listing of path.
+ * @param path defaults to the current working directory.
+ * @param useCompression defaults to false.
+ */
+ list(path: string, useCompression: boolean, callback: (error: Error, listing: Client.ListingElement[]) => void): void;
+ list(path: string, callback: (error: Error, listing: Client.ListingElement[]) => void): void;
+ list(useCompression: boolean, callback: (error: Error, listing: Client.ListingElement[]) => void): void;
+ list(callback: (error: Error, listing: Client.ListingElement[]) => void): void;
+
+ /**
+ * Retrieves a file at path from the server. useCompression defaults to false
+ */
+ get(path: string, callback: (error: Error, stream: NodeJS.ReadableStream) => void): void;
+ get(path: string, useCompression: boolean, callback: (error: Error, stream: NodeJS.ReadableStream) => void): void;
+
+ /**
+ * Sends data to the server to be stored as destPath.
+ * @param input can be a ReadableStream, a Buffer, or a path to a local file.
+ * @param destPath
+ * @param useCompression defaults to false.
+ */
+ put(input: NodeJS.ReadableStream|Buffer|string, destPath: string, useCompression: boolean, callback: (error: Error) => void): void;
+ put(input: NodeJS.ReadableStream|Buffer|string, destPath: string, callback: (error: Error) => void): void;
+
+ /**
+ * Same as put(), except if destPath already exists, it will be appended to instead of overwritten.
+ * @param input can be a ReadableStream, a Buffer, or a path to a local file.
+ * @param destPath
+ * @param useCompression defaults to false.
+ */
+ append(input: NodeJS.ReadableStream|Buffer|string, destPath: string, useCompression: boolean, callback: (error: Error) => void): void;
+ append(input: NodeJS.ReadableStream|Buffer|string, destPath: string, callback: (error: Error) => void): void;
+
+ /**
+ * Renames oldPath to newPath on the server
+ */
+ rename(oldPath: string, newPath: string, callback: (error: Error) => void): void;
+
+ /**
+ * Logout the user from the server.
+ */
+ logout(callback: (error: Error) => void): void;
+
+ /**
+ * Delete a file on the server
+ */
+ delete(path: string, callback: (error: Error) => void): void;
+
+ /**
+ * Changes the current working directory to path. callback has 2 parameters: < Error >err, < string >currentDir.
+ * Note: currentDir is only given if the server replies with the path in the response text.
+ */
+ cwd(path: string, callback: (error: Error, currentDir?: string) => void): void;
+
+ /**
+ * Aborts the current data transfer (e.g. from get(), put(), or list())
+ */
+ abort(callback: (error: Error) => void): void;
+
+ /**
+ * Sends command (e.g. 'CHMOD 755 foo', 'QUOTA') using SITE. callback has 3 parameters:
+ * < Error >err, < _string >responseText, < integer >responseCode.
+ */
+ site(command: string, callback: (error: Error, responseText: string, responseCode: number) => void): void;
+
+ /**
+ * Retrieves human-readable information about the server's status.
+ */
+ status(callback: (error: Error, status: string) => void): void;
+
+ /**
+ * Sets the transfer data type to ASCII.
+ */
+ ascii(callback: (error: Error) => void): void;
+
+ /**
+ * Sets the transfer data type to binary (default at time of connection).
+ */
+ binary(callback: (error: Error) => void): void;
+
+ /**
+ * Optional "standard" commands (RFC 959)
+ * Creates a new directory, path, on the server. recursive is for enabling a 'mkdir -p' algorithm and defaults to false
+ */
+ mkdir(path: string, recursive: boolean, callback: (error: Error) => void): void;
+ mkdir(path: string, callback: (error: Error) => void): void;
+
+
+ /**
+ * Optional "standard" commands (RFC 959)
+ * Removes a directory, path, on the server. If recursive, this call will delete the contents of the directory if it is not empty
+ */
+ rmdir(path: string, recursive: boolean, callback: (error: Error) => void): void;
+ rmdir(path: string, callback: (error: Error) => void): void;
+
+ /**
+ * Optional "standard" commands (RFC 959)
+ * Changes the working directory to the parent of the current directory
+ */
+ cdup(callback: (error: Error) => void): void;
+
+ /**
+ * Optional "standard" commands (RFC 959)
+ * Retrieves the current working directory
+ */
+ pwd(callback: (error: Error, path: string) => void): void;
+
+ /**
+ * Optional "standard" commands (RFC 959)
+ * Retrieves the server's operating system.
+ */
+ system(callback: (error: Error, OS: string) => void): void;
+
+ /**
+ * Optional "standard" commands (RFC 959)
+ * Similar to list(), except the directory is temporarily changed to path to retrieve the directory listing.
+ * This is useful for servers that do not handle characters like spaces and quotes in directory names well for the LIST command.
+ * This function is "optional" because it relies on pwd() being available.
+ */
+ listSafe(path: string, useCompression: boolean, callback: (error: Error, listing: Client.ListingElement[]) => void): void;
+ listSafe(path: string, callback: (error: Error, listing: Client.ListingElement[]) => void): void;
+ listSafe(useCompression: boolean, callback: (error: Error, listing: Client.ListingElement[]) => void): void;
+ listSafe(callback: (error: Error, listing: Client.ListingElement[]) => void): void;
+
+ /**
+ * Extended commands (RFC 3659)
+ * Retrieves the size of path
+ */
+ size(path: string, callback: (error: Error, size: number) => void): void;
+
+ /**
+ * Extended commands (RFC 3659)
+ * Retrieves the last modified date and time for path
+ */
+ lastMod(path: string, callback: (error: Error, lastMod: Date) => void): void;
+
+ /**
+ * Extended commands (RFC 3659)
+ * Sets the file byte offset for the next file transfer action (get/put) to byteOffset
+ */
+ restart(byteOffset: number, callback: (error: Error) => void): void;
+
+ }
+
+ export = Client;
+}
diff --git a/ftpd/ftpd-tests.ts b/ftpd/ftpd-tests.ts
new file mode 100644
index 0000000000..9d8485a9ef
--- /dev/null
+++ b/ftpd/ftpd-tests.ts
@@ -0,0 +1,32 @@
+///
+
+import ftpd = require("ftpd");
+
+var options: ftpd.FtpServerOptions = {
+ pasvPortRangeStart: 4000,
+ pasvPortRangeEnd: 5000,
+ getInitialCwd: function(connection: ftpd.FtpConnection, callback: (error: Error, path: string) => void): void {
+ callback(null, "boo");
+ },
+ getRoot: function(connection: ftpd.FtpConnection): string {
+ return '/';
+ }
+};
+
+var host: string = '10.0.0.42';
+
+var server = new ftpd.FtpServer(host, options);
+
+server.on('client:connected', function(conn: ftpd.FtpConnection): void {
+ conn.on('command:user', function(user: string, success: () => void, failure: () => void): void {
+ success();
+ });
+ conn.on('command:pass', function(
+ pass: string,
+ success: (username: string, fs?: ftpd.FtpFileSystem) => void,
+ failure: () => void) {
+ success("Rogier");
+ });
+});
+
+server.listen(21);
diff --git a/ftpd/ftpd.d.ts b/ftpd/ftpd.d.ts
new file mode 100644
index 0000000000..ac0123256a
--- /dev/null
+++ b/ftpd/ftpd.d.ts
@@ -0,0 +1,202 @@
+// Type definitions for ftpd 0.2.11
+// Project: https://github.com/sstur/nodeftpd
+// Definitions by: Rogier Schouten
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+///
+
+declare module "ftpd" {
+
+ import events = require("events");
+ import fs = require("fs");
+ import net = require("net");
+ import tls = require("tls");
+
+ /**
+ * Options for FtpServer constructor
+ */
+ export interface FtpServerOptions {
+ /**
+ * Gets the initial working directory for the user. Called after user is authenticated
+ * Typical cases where you would want/need the callback involve retrieving configurations from external datasources and suchlike.
+ */
+ getInitialCwd: (connection: FtpConnection, callback?: (error: Error, path: string) => void) => void|string;
+ /**
+ * Gets the root directory for the user relative to the CWD. Called after getInitialCwd. The user is not able to escape this directory.
+ * Typical cases where you would want/need the callback involve retrieving configurations from external datasources and suchlike.
+ */
+ getRoot: (connection: FtpConnection, callback?: (error: Error, path: string) => void) => void|string;
+ /**
+ * If set to true, then files which the client uploads are buffered in memory and then written to disk using writeFile.
+ * If false, files are written using writeStream.
+ */
+ useWriteFile?: boolean;
+ /**
+ * If set to true, then files which the client uploads are slurped using 'readFile'.
+ * If false, files are read using readStream.
+ */
+ useReadFile?: boolean;
+ /**
+ * Determines the maximum file size (in bytes) for which uploads are buffered in memory before being written to disk.
+ * Has an effect only if useWriteFile is set to true.
+ * If uploadMaxSlurpSize is not set, then there is no limit on buffer size.
+ */
+ uploadMaxSlurpSize?: number;
+ /**
+ * The maximum number of concurrent calls to fs.stat which will be made when processing a LIST request. Default 5.
+ */
+ maxStatsAtOnce?: number;
+ /**
+ * A function which can be used as the argument of an array's sort method. Used to sort filenames for directory listings.
+ * See [https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/sort] for more info.
+ */
+ filenameSortFunc?: (a: string, b: string) => number;
+ /**
+ * A function which is applied to each filename before sorting.
+ * If set to false, filenames are unaltered.
+ */
+ filenameSortMap?: ((a: string) => string) | boolean;
+ /**
+ * If this is set, then filenames are not sorted in responses to the LIST and NLST commands.
+ */
+ dontSortFilenames?: boolean;
+ /**
+ * If set to true, then LIST and NLST treat the characters ? and * as literals instead of as wildcards.
+ */
+ noWildcards?: boolean;
+ /**
+ * If this is set, the server will allow explicit TLS authentication. Value should be a dictionary which is suitable as the options argument of tls.createServer.
+ */
+ tlsOptions?: tls.TlsOptions;
+ /**
+ * If this is set to true, and tlsOptions is also set, then the server will not allow logins over non-secure connections.
+ * Default false
+ */
+ tlsOnly?: boolean;
+ /**
+ * I obviously set this to true when tlsOnly is on -someone needs to update this.
+ */
+ allowUnauthorizedTls?: boolean;
+ /**
+ * Integer, specifies the lower-bound port (min port) for creating PASV connections
+ */
+ pasvPortRangeStart?: number;
+ /**
+ * Integer, specifies the upper-bound port (max port) for creating PASV connections
+ */
+ pasvPortRangeEnd?: number;
+ }
+
+ /**
+ * Represents one Ftp connection. Incomplete type definition.
+ *
+ * @event command:user (username: string, success: () => void, failure: () => void)
+ * @event command:pass (password: string, success: (username: string, fs?: FtpFileSystem) => void, failure: () => void)
+ * The server raises a command:pass event which is given pass, success and failure arguments.
+ * On successful login, success should be called with a username argument. It may also optionally
+ * be given a second argument, which should be an object providing an implementation of the API for Node's fs module.
+ */
+ export class FtpConnection extends events.EventEmitter {
+ server: FtpServer;
+ socket: net.Socket;
+ pasv: net.Server;
+ dataSocket: net.Socket; // the actual data socket
+ mode: string;
+ username: string;
+ cwd: string;
+ root: string;
+ hasQuit: boolean;
+ // State for handling TLS upgrades.
+ secure: boolean;
+ pbszReceived: boolean;
+ }
+
+
+ /**
+ * Optional mock fs implementation to set in the command:pass event of FtpConnection
+ */
+ export interface FtpFileSystem {
+ unlink: (path: string, callback?: (err?: NodeJS.ErrnoException) => void) => void;
+ readdir: (path: string, callback?: (err: NodeJS.ErrnoException, files: string[]) => void) => void;
+ mkdir: ((path: string, callback?: (err?: NodeJS.ErrnoException) => void) => void)
+ | ((path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void) => void)
+ | ((path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void) => void);
+ open: ((path: string, flags: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any) => void)
+ | ((path: string, flags: string, mode: number, callback?: (err: NodeJS.ErrnoException, fd: number) => any) => void)
+ | ((path: string, flags: string, mode: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any) => void);
+ close: (fd: number, callback?: (err?: NodeJS.ErrnoException) => void) => void;
+ rmdir: (path: string, callback?: (err?: NodeJS.ErrnoException) => void) => void;
+ rename: (oldPath: string, newPath: string, callback?: (err?: NodeJS.ErrnoException) => void) => void;
+ /**
+ * specific object properties: { mode, isDirectory(), size, mtime }
+ */
+ stat: (path: string, callback?: (err: NodeJS.ErrnoException, stats: fs.Stats) => any) => void;
+ /**
+ * if useReadFile option is not set or is false
+ */
+ createReadStream?: (path: string, options?: {
+ flags?: string;
+ encoding?: string;
+ fd?: string;
+ mode?: string;
+ bufferSize?: number;
+ }) => fs.ReadStream;
+ /**
+ * if useWriteFile option is not set or is false
+ */
+ createWriteStream?: (path: string, options?: {
+ flags?: string;
+ encoding?: string;
+ string?: string;
+ }) => fs.WriteStream;
+ /**
+ * if useReadFile option is set to 'true'
+ */
+ readFile?:
+ ((filename: string, encoding: string, callback: (err: NodeJS.ErrnoException, data: string) => void) => void)
+ | ((filename: string, options: { encoding: string; flag?: string; }, callback: (err: NodeJS.ErrnoException, data: string) => void) => void)
+ | ((filename: string, options: { flag?: string; }, callback: (err: NodeJS.ErrnoException, data: Buffer) => void) => void)
+ | ((filename: string, callback: (err: NodeJS.ErrnoException, data: Buffer) => void ) => void);
+ /**
+ * if useWriteFile option is set to 'true'
+ */
+ writeFile?:
+ ((filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void) => void)
+ | ((filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void) => void)
+ | ((filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void) => void);
+
+ }
+
+ /**
+ * FTP server
+ *
+ * Events:
+ * @event close net.Server close event
+ * @event error net.Server error event
+ * @event client:connected (connection: FtpConnection)
+ */
+ export class FtpServer extends events.EventEmitter {
+
+ /**
+ * @param host host is a string representation of the IP address clients use to connect to the FTP server.
+ * It's imperative that this actually reflects the remote IP the clients use to access the server,
+ * as this IP will be used in the establishment of PASV data connections. If this IP is not the one clients use to connect,
+ * you will see some strange behavior from the client side (hangs).
+ * @param options See test.js for a simple example.
+ */
+ constructor(host: string, options: FtpServerOptions);
+
+ /**
+ * Start listening, see net.Server.listen()
+ */
+ public listen(port: number, host?: string, backlog?: number, listeningListener?: () => void): void;
+
+ /**
+ * Stop listening
+ */
+ public close(callback?: () => void): void;
+ }
+
+
+
+}
diff --git a/googlemaps/google.maps.d.ts b/googlemaps/google.maps.d.ts
index eb85899c4b..3ba451c8a5 100644
--- a/googlemaps/google.maps.d.ts
+++ b/googlemaps/google.maps.d.ts
@@ -1345,6 +1345,55 @@ declare module google.maps {
}
export module places {
+
+ export class AutocompleteService extends MVCObject {
+ constructor();
+ getPlacePredictions(request: AutocompletionRequest, callback: (result: AutocompletePrediction[], status: PlacesServiceStatus) => void): void;
+ getQueryPredictions(request: QueryAutocompletionRequest, callback: (result: QueryAutocompletePrediction[], status: PlacesServiceStatus) => void): void;
+ }
+
+ export interface AutocompletionRequest {
+ input: string;
+ bounds?: LatLngBounds;
+ componentRestrictions?: ComponentRestrictions;
+ location?: LatLng;
+ offset?: number;
+ radius?: number;
+ types?: string[];
+ }
+
+ export interface QueryAutocompletionRequest {
+ input: string;
+ bounds?: LatLngBounds;
+ location?: LatLng;
+ offset?: number;
+ radius?: number;
+ }
+
+ export interface AutocompletePrediction {
+ description: string;
+ matched_substrings: PredictionSubstring[];
+ place_id: string;
+ terms: PredictionTerm[];
+ types: string[]
+ }
+
+ export interface PredictionTerm {
+ offset: number;
+ value: string;
+ }
+
+ export interface PredictionSubstring {
+ length: number;
+ offset: number;
+ }
+
+ export interface QueryAutocompletePrediction {
+ description: string;
+ matched_substrings: PredictionSubstring[];
+ place_id: string;
+ terms: PredictionTerm[];
+ }
export class Autocomplete extends MVCObject {
constructor (inputField: HTMLInputElement, opts?: AutocompleteOptions);
diff --git a/grecaptcha/grecaptcha-tests.ts b/grecaptcha/grecaptcha-tests.ts
new file mode 100644
index 0000000000..cfc86e71b6
--- /dev/null
+++ b/grecaptcha/grecaptcha-tests.ts
@@ -0,0 +1,21 @@
+///
+
+var params: ReCaptchaV2.Parameters = {
+ "sitekey": "mySuperSecretKey",
+ "theme": "black", // no type-checking here.
+ "type": "image",
+ "tabindex": 5,
+ "callback": (response: string) => { },
+ "expired-callback": () => { },
+}
+
+var id1: number = grecaptcha.render("foo");
+var id2: number = grecaptcha.render("foo", params);
+var id3: number = grecaptcha.render(document.getElementById("foo"));
+var id4: number = grecaptcha.render(document.getElementById("foo"), params);
+
+// response takes a number and returns a string
+var response1: string = grecaptcha.getResponse(id1);
+
+// reset takes a number
+grecaptcha.reset(id1);
diff --git a/grecaptcha/grecaptcha.d.ts b/grecaptcha/grecaptcha.d.ts
new file mode 100644
index 0000000000..e246aaf17b
--- /dev/null
+++ b/grecaptcha/grecaptcha.d.ts
@@ -0,0 +1,67 @@
+// Type definitions for Google Recaptcha v2
+// Project: https://www.google.com/recaptcha
+// Definitions by: Kristof Mattei
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+declare var grecaptcha: ReCaptchaV2.ReCaptcha;
+
+declare module ReCaptchaV2
+{
+ class ReCaptcha
+ {
+ /**
+ * Renders the container as a reCAPTCHA widget and returns the ID of the newly created widget.
+ * @param container The HTML element to render the reCAPTCHA widget. Specify either the ID of the container (string) or the DOM element itself.
+ * @param parameters An object containing parameters as key=value pairs, for example, {"sitekey": "your_site_key", "theme": "light"}. See @see render parameters.
+ * @return the ID of the newly created widget.
+ **/
+ render(container: (string | HTMLElement), parameters?: Parameters): number;
+ /**
+ * Resets the reCAPTCHA widget.
+ * @param opt_widget_id Optional widget ID, defaults to the first widget created if unspecified.
+ **/
+ reset(opt_widget_id?: number): void;
+ /**
+ * Gets the response for the reCAPTCHA widget.
+ * @param opt_widget_id Optional widget ID, defaults to the first widget created if unspecified.
+ * @return the response of the reCAPTCHA widget.
+ **/
+ getResponse(opt_widget_id?: number): string;
+ }
+
+ interface Parameters
+ {
+ /**
+ * Your sitekey.
+ **/
+ sitekey: string;
+ /**
+ * Optional. The color theme of the widget.
+ * Accepted values: "light", "dark"
+ * @default "light"
+ **/
+ theme?: string;
+ /**
+ * Optional. The type of CAPTCHA to serve.
+ * Accepted values: "audio ", "image"
+ * @default "image"
+ **/
+ type?: string;
+ /**
+ * Optional. The tabindex of the widget and challenge.
+ * If other elements in your page use tabindex, it should be set to make user navigation easier.
+ **/
+ tabindex?: number;
+ /**
+ * Optional. Your callback function that's executed when the user submits a successful CAPTCHA response.
+ * The user's response, g-recaptcha-response, will be the input for your callback function.
+ **/
+ callback?: (response: string) => void;
+ /**
+ * Optional. Your callback function that's executed when the recaptcha response expires and the user needs to solve a new CAPTCHA.
+ **/
+ // Notice to the reader
+ // I need to surround this object with quotes, this will however break intellisense in VS 2013.
+ "expired-callback"?: () => void;
+ }
+}
diff --git a/hapi/hapi-tests.ts b/hapi/hapi-tests.ts
index 0589036371..11ad81d2dd 100644
--- a/hapi/hapi-tests.ts
+++ b/hapi/hapi-tests.ts
@@ -21,6 +21,12 @@ plugin.register.attributes = {
version: "1.0.0"
};
+// optional options parameter
+server.register({}, function (err) {});
+
+// optional options.routes.vhost parameter
+server.register({}, { select: 'api', routes: { prefix: '/prefix' } }, function (err) {});
+
//server.pack.register(plugin, (err: Object) => {
// if (err) { throw err; }
//});
@@ -76,5 +82,18 @@ server.route([{
}
}]);
+// config.validate parameters should be optional
+server.route([{
+ method: 'GET',
+ path: '/hello2',
+ handler: function(request: Hapi.Request, reply: Function) {
+ reply('hello world2');
+ },
+ config: {
+ validate: {
+ }
+ }
+}]);
+
// Start the server
server.start();
diff --git a/hapi/hapi.d.ts b/hapi/hapi.d.ts
index 61a2ef2d5a..de8dba6b8b 100644
--- a/hapi/hapi.d.ts
+++ b/hapi/hapi.d.ts
@@ -147,11 +147,11 @@ declare module "hapi" {
};
/** options passed to the mimos module (https://github.com/hapijs/mimos) when generating the mime database used by the server and accessed via server.mime.*/
- mime: any;
+ mime?: any;
/** if true, does not load the inert (file and directory support), h2o2 (proxy support), and vision (views support) plugins automatically. The plugins can be loaded manually after construction. Defaults to false (plugins loaded). */
- minimal: boolean;
+ minimal?: boolean;
/** plugin-specific configuration which can later be accessed via server.settings.plugins. plugins is an object where each key is a plugin name and the value is the configuration. Note the difference between server.settings.plugins which is used to store static configuration values and server.plugins which is meant for storing run-time state. Defaults to {}.*/
- plugins: IDictionary;
+ plugins?: IDictionary;
}
@@ -568,7 +568,7 @@ declare module "hapi" {
optionsthe server validation options.
next(err, value)the callback function called when validation is completed.
*/
- headers: boolean | IJoi | IValidationFunction;
+ headers?: boolean | IJoi | IValidationFunction;
/** validation rules for incoming request path parameters, after matching the path against the route and extracting any parameters then stored in request.params.Values allowed:
@@ -579,7 +579,7 @@ declare module "hapi" {
valuethe object containing the path parameters.
optionsthe server validation options.
next(err, value)the callback function called when validation is completed. */
- params: boolean | IJoi | IValidationFunction;
+ params?: boolean | IJoi | IValidationFunction;
/** validation rules for an incoming request URI query component (the key- value part of the URI between '?' and '#').The query is parsed into its individual key- value pairs (using the qs module) and stored in request.query prior to validation.Values allowed:
trueany query parameters allowed (no validation performed).This is the default.
falseno query parameters allowed.
@@ -588,7 +588,7 @@ declare module "hapi" {
valuethe object containing the query parameters.
optionsthe server validation options.
next(err, value)the callback function called when validation is completed. */
- query: boolean | IJoi | IValidationFunction;
+ query?: boolean | IJoi | IValidationFunction;
/** validation rules for an incoming request payload (request body).Values allowed:
trueany payload allowed (no validation performed).This is the default.
falseno payload allowed.
@@ -597,9 +597,9 @@ declare module "hapi" {
valuethe object containing the payload object.
optionsthe server validation options.
next(err, value)the callback function called when validation is completed. */
- payload: boolean | IJoi | IValidationFunction;
+ payload?: boolean | IJoi | IValidationFunction;
/** an optional object with error fields copied into every validation error response. */
- errorFields: any;
+ errorFields?: any;
/** determines how to handle invalid requests.Allowed values are:
'error'return a Bad Request (400) error response.This is the default value.
'log'log the error but continue processing the request.
@@ -609,9 +609,9 @@ declare module "hapi" {
replythe continuation reply interface.
sourcethe source of the invalid field (e.g. 'path', 'query', 'payload').
errorthe error object prepared for the client response (including the validation function error under error.data). */
- failAction: string | IRouteFailFunction;
+ failAction?: string | IRouteFailFunction;
/** options to pass to Joi.Useful to set global options such as stripUnknown or abortEarly (the complete list is available here: https://github.com/hapijs/joi#validatevalue-schema-options-callback ).Defaults to no options. */
- options: any;
+ options?: any;
};
/** define timeouts for processing durations: */
timeout?: {
@@ -726,7 +726,7 @@ declare module "hapi" {
a relative or absolute file path string (relative paths are resolved based on the route files configuration).
a function with the signature function(request) which returns the relative or absolute file path.
an object with the following options */
- file: string | IRequestHandler |IFileHandlerConfig;
+ file?: string | IRequestHandler |IFileHandlerConfig;
/** directory - generates a directory endpoint for serving static content from a directory. Routes using the directory handler must include a path parameter at the end of the path string (e.g. /path/to/somewhere/{param} where the parameter name does not matter). The path parameter can use any of the parameter options (e.g. {param} for one level files only, {param?} for one level files or the directory root, {param*} for any level, or {param*3} for a specific level). If additional path parameters are present, they are ignored for the purpose of selecting the file system resource. The directory handler is an object with the following options:
path - (required) the directory root path (relative paths are resolved based on the route files configuration). Value can be:
a single path string used as the prefix for any resources requested by appending the request path parameter to the provided string.
@@ -738,7 +738,7 @@ declare module "hapi" {
redirectToSlash - optional boolean, determines if requests for a directory without a trailing slash are redirected to the same path with the missing slash. Useful for ensuring relative links inside the response are resolved correctly. Disabled when the server config router.stripTrailingSlash is true.Defaults to false.
lookupCompressed - optional boolean, instructs the file processor to look for the same filename with the '.gz' suffix for a pre-compressed version of the file to serve if the request supports content encoding. Defaults to false.
defaultExtension - optional string, appended to file requests if the requested file is not found. Defaults to no extension.*/
- directory: {
+ directory?: {
path: string |Array | IRequestHandler | IRequestHandler>;
index?: boolean;
listing?: boolean;
@@ -748,7 +748,7 @@ declare module "hapi" {
defaultExtension?: string;
};
proxy?: IProxyHandlerConfig;
- view: string | {
+ view?: string | {
template: string;
context: {
payload: any;
@@ -757,7 +757,7 @@ declare module "hapi" {
pre: any;
}
};
- config: {
+ config?: {
handler: any;
bind: any;
app: any;
@@ -2051,11 +2051,13 @@ declare module "hapi" {
register(plugins: any|any[], options: {
select: string|string[];
routes: {
- prefix: string; vhost: string|string[]
+ prefix: string; vhost?: string|string[]
};
}
, callback: (err: any) => void):void;
+ register(plugins: any|any[], callback: (err: any) => void):void;
+
/**server.render(template, context, [options], callback)
Utilizes the server views manager to render a template where:
template - the template filename and path, relative to the views manager templates path (path or relativeTo).
diff --git a/he/he-tests.ts b/he/he-tests.ts
new file mode 100644
index 0000000000..395eb94ef0
--- /dev/null
+++ b/he/he-tests.ts
@@ -0,0 +1,52 @@
+///
+
+import he = require('he');
+
+function main() {
+ var result: string;
+
+ result = he.encode('foo \xa9 bar \u2260 baz qux');
+ // 'foo © bar ≠ baz qux'
+
+ he.encode('foo \0 bar');
+ // 'foo \0 bar'
+
+ // Passing an `options` object to `encode`, to explicitly disallow named references:
+ he.encode('foo \xa9 bar \u2260 baz qux', {
+ 'useNamedReferences': false
+ });
+
+ he.encode('foo \xa9 bar \u2260 baz qux', {
+ 'encodeEverything': true
+ });
+
+ he.encode('foo \xa9 bar \u2260 baz qux', {
+ 'encodeEverything': true,
+ 'useNamedReferences': true
+ });
+
+ he.encode('\x01', {
+ 'strict': false
+ });
+ // ''
+
+ he.encode('foo © and & ampersand', {
+ 'allowUnsafeSymbols': true
+ });
+
+ // Override the global default setting:
+ he.encode.options.useNamedReferences = true;
+
+ he.decode('foo © bar ≠ baz 𝌆 qux');
+
+ he.decode('foo&bar', {
+ 'isAttributeValue': false
+ });
+
+ he.decode('foo&bar', {
+ 'strict': false
+ });
+
+ he.decode.options.isAttributeValue = true;
+ he.escape('
');
+}
diff --git a/he/he.d.ts b/he/he.d.ts
new file mode 100644
index 0000000000..6c96840c2c
--- /dev/null
+++ b/he/he.d.ts
@@ -0,0 +1,114 @@
+// Type definitions for he v0.5.0
+// Project: https://github.com/mathiasbynens/he
+// Definitions by: Simon Edwards
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+// he - "HTML Entities" - A high quality pair of HTML encode and decode functions.
+
+declare module "he" {
+
+ var version: string;
+
+ interface EncodeOptions {
+ /**
+ * The default value for the useNamedReferences option is false. This
+ * means that encode() will not use any named character references
+ * (e.g. ©) in the output — hexadecimal escapes (e.g. ©) will
+ * be used instead. Set it to true to enable the use of named references.
+ */
+ useNamedReferences?: boolean;
+
+ /**
+ * The default value for the encodeEverything option is false. This means
+ * that encode() will not use any character references for printable ASCII
+ * symbols that don’t need escaping. Set it to true to encode every symbol
+ * in the input string. When set to true, this option takes precedence over
+ * allowUnsafeSymbols (i.e. setting the latter to true in such a case has
+ * no effect).
+ */
+ encodeEverything?: boolean;
+
+ /**
+ * The default value for the strict option is false. This means that
+ * encode() will encode any HTML text content you feed it, even if it
+ * contains any symbols that cause parse errors. To throw an error when such
+ * invalid HTML is encountered, set the strict option to true. This option
+ * makes it possible to use he as part of HTML parsers and HTML validators.
+ */
+ strict?: boolean;
+
+ /**
+ * The default value for the allowUnsafeSymbols option is false. This means
+ * that characters that are unsafe for use in HTML content (&, <, >, ", ',
+ * and `) will be encoded. When set to true, only non-ASCII characters will
+ * be encoded. If the encodeEverything option is set to true, this option
+ * will be ignored.
+ */
+ allowUnsafeSymbols?: boolean;
+ }
+
+ interface Encode {
+ /**
+ * Encode a string of text
+ *
+ * This function takes a string of text and encodes (by default) any symbols
+ * that aren’t printable ASCII symbols and &, <, >, ", ', and `, replacing
+ * them with character references.
+ *
+ * As long as the input string contains allowed code points only, the return
+ * value of this function is always valid HTML. Any (invalid) code points
+ * that cannot be represented using a character reference in the input are
+ * not encoded.
+ */
+ (text: string, options?: EncodeOptions): string;
+
+ options: EncodeOptions;
+ }
+ var encode: Encode;
+
+ interface DecodeOptions {
+ /**
+ * The default value for the isAttributeValue option is false. This means
+ * that decode() will decode the string as if it were used in a text
+ * context in an HTML document. HTML has different rules for parsing
+ * character references in attribute values — set this option to true to
+ * treat the input string as if it were used as an attribute value.
+ */
+ isAttributeValue?: boolean;
+
+ /**
+ * The default value for the strict option is false. This means that
+ * decode() will decode any HTML text content you feed it, even if it
+ * contains any entities that cause parse errors. To throw an error when
+ * such invalid HTML is encountered, set the strict option to true. This
+ * option makes it possible to use he as part of HTML parsers and HTML
+ * validators.
+ */
+ strict?: boolean;
+ }
+
+ interface Decode {
+ /**
+ * Decode a string of HTML text
+ *
+ * This function takes a string of HTML and decodes any named and numerical
+ * character references in it using the algorithm described in section
+ * 12.2.4.69 of the HTML spec.
+ */
+ (html: string, options?: DecodeOptions): string;
+
+ options: DecodeOptions;
+ }
+ var decode: Decode;
+
+ /**
+ * Escape XML entities
+ *
+ * This function takes a string of text and escapes it for use in text
+ * contexts in XML or HTML documents. Only the following characters are
+ * escaped: &, <, >, ", ', and `.
+ */
+ function escape(text: string): string;
+
+ var unescape: Decode;
+}
diff --git a/imgur-rest-api/imgur-rest-api-tests.ts b/imgur-rest-api/imgur-rest-api-tests.ts
new file mode 100644
index 0000000000..247885557d
--- /dev/null
+++ b/imgur-rest-api/imgur-rest-api-tests.ts
@@ -0,0 +1,103 @@
+///
+
+function testAccount(account: ImgurRestApi.Account) : ImgurRestApi.Account {
+ return account;
+}
+
+function testAccountSettings(accountSettings: ImgurRestApi.AccountSettings) : ImgurRestApi.AccountSettings {
+ return accountSettings;
+}
+
+function testAlbum(album: ImgurRestApi.Album) : ImgurRestApi.Album {
+ return album;
+}
+
+function testAlbumImages(album: ImgurRestApi.Album) : ImgurRestApi.Image {
+ return album.images[0];
+}
+
+function testComment(comment: ImgurRestApi.Comment) : ImgurRestApi.Comment {
+ return comment;
+}
+
+function testConversation(conversation: ImgurRestApi.Conversation) : ImgurRestApi.Conversation {
+ return conversation;
+}
+
+function testCustomGallery(customGallery: ImgurRestApi.CustomGallery) : ImgurRestApi.CustomGallery {
+ return customGallery;
+}
+
+function testGalleryItem(galleryItem: ImgurRestApi.GalleryItem) : ImgurRestApi.GalleryItem {
+ return galleryItem;
+}
+
+function testGalleryAlbum(galleryItem: ImgurRestApi.GalleryItem) : ImgurRestApi.GalleryAlbum {
+ if(galleryItem.is_album) {
+ var galleryAlbum = galleryItem;
+ return galleryAlbum;
+ }
+ return null;
+}
+
+function testGalleryImage(galleryItem: ImgurRestApi.GalleryItem) : ImgurRestApi.GalleryImage {
+ if(!galleryItem.is_album) {
+ var galleryImage = galleryItem;
+ return galleryImage;
+ }
+ return null;
+}
+
+function testGalleryProfile(galleryProfile: ImgurRestApi.GalleryProfile) : ImgurRestApi.GalleryProfile {
+ return galleryProfile;
+}
+
+function testImage(image: ImgurRestApi.Image) : ImgurRestApi.Image {
+ return image;
+}
+
+function testMemeMeta(meta: ImgurRestApi.MemeMetadata) : ImgurRestApi.MemeMetadata {
+ return meta;
+}
+
+function testMessage(message: ImgurRestApi.Message) : ImgurRestApi.Message {
+ return message;
+}
+
+function testAccountNotificationsReply(accountNotif: ImgurRestApi.AccountNotifications) : ImgurRestApi.Notification {
+ return accountNotif.replies[0];
+}
+
+function testAccountNotificationsMessage(accountNotif: ImgurRestApi.AccountNotifications) : ImgurRestApi.Notification {
+ return accountNotif.messages[0];
+}
+
+function testTag(tag: ImgurRestApi.Tag) : ImgurRestApi.Tag {
+ return tag;
+}
+
+function testTagVote(tagVote: ImgurRestApi.TagVote) : ImgurRestApi.TagVote {
+ return tagVote;
+}
+
+function testTopic(topic: ImgurRestApi.Topic) : ImgurRestApi.Topic {
+ return topic;
+}
+
+function testVote(vote: ImgurRestApi.Vote) : ImgurRestApi.Vote {
+ return vote;
+}
+
+function testResponseWithError(response: ImgurRestApi.Response) : ImgurRestApi.Error {
+ if(response.success === false) {
+ return response.data;
+ }
+ return null;
+}
+
+function testResponseWithValue(response: ImgurRestApi.Response) : ImgurRestApi.GalleryProfile {
+ if(response.success === true) {
+ return response.data;
+ }
+ return null;
+}
diff --git a/imgur-rest-api/imgur-rest-api.d.ts b/imgur-rest-api/imgur-rest-api.d.ts
new file mode 100644
index 0000000000..2726006568
--- /dev/null
+++ b/imgur-rest-api/imgur-rest-api.d.ts
@@ -0,0 +1,252 @@
+// Type definitions for Imgur REST API v3
+// Project: https://api.imgur.com/
+// Definitions by: Luke William Westby
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+declare module ImgurRestApi {
+
+ interface Response {
+ data: any; //T|Error;
+ status: number;
+ success: boolean;
+ }
+
+ interface Account {
+ id: number;
+ url: string;
+ bio: string;
+ reputation: number;
+ created: number;
+ pro_expiration: any; //number|boolean;
+ }
+
+ interface AccountSettings {
+ email: string;
+ high_quality: boolean;
+ public_images: boolean;
+ album_privacy: string;
+ pro_expiration: any; //number|boolean;
+ accepted_gallery_terms: boolean;
+ active_emails: Array;
+ messaging_enabled: boolean;
+ blocked_users: Array;
+ }
+
+ interface Album {
+ id: string;
+ title: string;
+ description: string;
+ datetime: number;
+ cover: string;
+ cover_width: number;
+ cover_height: number;
+ account_url?: string;
+ account_id?: number;
+ privacy: string;
+ layout: string;
+ views: number;
+ link: string;
+ favorite: boolean;
+ nsfw?: boolean;
+ section: string;
+ order: number;
+ deletehash?: string;
+ images_count: number;
+ images: Array;
+ }
+
+ interface BlockedUser {
+ blocked_id: number;
+ blocked_url: string;
+ }
+
+ interface Comment {
+ id: number;
+ image_id: string;
+ comment: string;
+ author: string;
+ author_id: number;
+ on_album: boolean;
+ album_cover: string;
+ ups: number;
+ downs: number;
+ points: number;
+ datetime: number;
+ parent_id: number;
+ deleted: boolean;
+ vote?: string;
+ children: Array
+ }
+
+ interface Conversation {
+ id: number;
+ last_message_preview: string;
+ datetime: number;
+ with_account_id: number;
+ with_account: string;
+ message_count: number;
+ messages?: Array;
+ done?: boolean;
+ page?: number;
+ }
+
+ interface CustomGallery {
+ account_url: string;
+ link: string;
+ tags: Array
+ item_count: number;
+ items: Array;
+ }
+
+ interface GalleryItem {
+ id: string;
+ title: string;
+ description: string;
+ datetime: number;
+ account_url?: string;
+ account_id?: number;
+ ups: number;
+ downs: number;
+ score: number;
+ is_album: boolean;
+ views: number;
+ link: string;
+ vote?: string;
+ favorite: boolean;
+ nsfw?: boolean;
+ comment_count: number;
+ topic: string;
+ topic_id: number;
+ }
+
+ interface GalleryAlbum extends GalleryItem {
+ cover: string;
+ cover_width: number;
+ cover_height: number;
+ privacy: string;
+ layout: string;
+ images_count: number;
+ images: Array;
+ }
+
+ interface GalleryImage extends GalleryItem {
+ type: string;
+ animated: boolean;
+ width: number;
+ height: number;
+ size: number;
+ bandwidth: number;
+ deletehash?: string;
+ gifv?: string;
+ mp4?: string;
+ webm?: string;
+ looping?: boolean;
+ section: string;
+ }
+
+ interface GalleryProfile {
+ total_gallery_comments: number;
+ total_gallery_favorites: number;
+ total_gallery_submissions: number;
+ trophies: Array