Merged master

This commit is contained in:
matjos
2015-09-02 19:59:14 +02:00
116 changed files with 12499 additions and 1198 deletions

View File

@@ -16,17 +16,18 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](amqplib/amqplib.d.ts) [amqplib 0.3.x](https://github.com/squaremo/amqp.node) by [Michael Nahkies](https://github.com/mnahkies)
* [:link:](angular2/angular2.d.ts) [Angular](http://angular.io) by [angular team](https://github.com/angular)
* [:link:](angular2/router.d.ts) [Angular](http://angular.io) by [angular team](https://github.com/angular)
* [:link:](angular-file-upload/angular-file-upload.d.ts) [Angular File Upload](https://github.com/danialfarid/ng-file-upload) by [John Reilly](https://github.com/johnnyreilly)
* [:link:](ng-file-upload/ng-file-upload.d.ts) [Angular File Upload](https://github.com/danialfarid/ng-file-upload) by [John Reilly](https://github.com/johnnyreilly)
* [:link:](angular-file-upload/angular-file-upload.d.ts) [Angular File Upload](https://github.com/danialfarid/ng-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), [Cody Schaaf](https://github.com/codyschaaf)
* [:link:](angularjs/angular-cookies.d.ts) [Angular JS (ngCookies module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar), [Anthony Ciccarello](http://github.com/aciccarello)
* [:link:](angularjs/angular-mocks.d.ts) [Angular JS (ngMock, ngMockE2E module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar)
* [:link:](angularjs/angular-mocks.d.ts) [Angular JS (ngMock, ngMockE2E module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar), [Tony Curtis](http://github.com/daltin)
* [:link:](angularjs/angular-resource.d.ts) [Angular JS (ngResource module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar), [Michael Jess](http://github.com/miffels)
* [:link:](angularjs/angular-route.d.ts) [Angular JS (ngRoute module)](http://angularjs.org) by [Jonathan Park](https://github.com/park9140)
* [:link:](angularjs/angular-sanitize.d.ts) [Angular JS (ngSanitize module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar)
* [:link:](angular-ui-router/angular-ui-router.d.ts) [Angular JS (ui.router module)](https://github.com/angular-ui/ui-router) by [Michel Salib](https://github.com/michelsalib)
* [:link:](angular-ui-scroll/angular-ui-scroll.d.ts) [Angular JS (ui.scroll module)](https://github.com/angular-ui/ui-scroll) by [Mark Nadig](https://github.com/marknadig)
* [:link:](angular-meteor/angular-meteor.d.ts) [Angular JS Meteor (angular.meteor module)](https://github.com/Urigo/angular-meteor) by [Peter Grman](https://github.com/pgrm)
* [:link:](angular-material/angular-material.d.ts) [Angular Material (angular.material module)](https://github.com/angular/material) by [Matt Traynham](https://github.com/mtraynham)
* [:link:](angular-protractor/angular-protractor.d.ts) [Angular Protractor](https://github.com/angular/protractor) by [Bill Armstrong](https://github.com/BillArmstrong)
@@ -38,6 +39,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](angular-bootstrap-lightbox/angular-bootstrap-lightbox.d.ts) [angular-bootstrap-lightbox](https://github.com/compact/angular-bootstrap-lightbox) by [Roland Zwaga](https://github.com/rolandzwaga)
* [:link:](angular-dynamic-locale/angular-dynamic-locale.d.ts) [angular-dynamic-locale](https://github.com/lgalfaso/angular-dynamic-locale) by [Stephen Lautier](https://github.com/stephenlautier)
* [:link:](angular-formly/angular-formly.d.ts) [angular-formly](https://github.com/formly-js/angular-formly) by [Scott Hatcher](https://github.com/scatcher)
* [:link:](angular-gettext/angular-gettext.d.ts) [angular-gettext](https://angular-gettext.rocketeer.be) by [Ákos Lukács](https://github.com/AkosLukacs)
* [:link:](angular-hotkeys/angular-hotkeys.d.ts) [angular-hotkeys](https://github.com/chieffancypants/angular-hotkeys) by [Jason Zhao](https://github.com/jlz27), [Stefan Steinhart](https://github.com/reppners)
* [:link:](angular-http-auth/angular-http-auth.d.ts) [angular-http-auth](https://github.com/witoldsz/angular-http-auth) by [vvakame](https://github.com/vvakame)
* [:link:](angular-jwt/angular-jwt.d.ts) [angular-jwt](https://github.com/auth0/angular-jwt) by [Reto Rezzonico](https://github.com/rerezz)
@@ -49,6 +51,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](angular-signalr-hub/angular-signalr-hub.d.ts) [angular-signalr-hub](https://github.com/JustMaier/angular-signalr-hub) by [Adam Santaniello](https://github.com/AdamSantaniello)
* [:link:](angular-spinner/angular-spinner.d.ts) [angular-spinner.js](https://github.com/urish/angular-spinner) by [Marcin Biegała](https://github.com/Biegal)
* [:link:](angular-storage/angular-storage.d.ts) [angular-storage](https://github.com/auth0/angular-storage) by [Matthew DeKrey](https://github.com/mdekrey)
* [:link:](angular-ui-tree/angular-ui-tree.d.ts) [angular-ui-tree](https://github.com/angular-ui-tree/angular-ui-tree) by [Calvin Fernandez](https://github.com/CalvinFernandez)
* [:link:](angular.throttle/angular.throttle.d.ts) [angular.throttle](https://github.com/BaggersIO/angular.throttle) by [Stefan Steinhart](https://github.com/reppners)
* [:link:](angular-ui-sortable/angular-ui-sortable.d.ts) [angular.ui.sortable module](https://github.com/angular-ui/ui-sortable) by [Thodoris Greasidis](https://github.com/thgreasi)
* [:link:](angular-agility/angular-agility.d.ts) [AngularAgility](https://github.com/AngularAgility/AngularAgility) by [Roland Zwaga](https://github.com/rolandzwaga)
@@ -84,6 +87,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](auth0/auth0.d.ts) [Auth0.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
* [:link:](auth0.lock/auth0.lock.d.ts) [Auth0Widget.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
* [:link:](auth0.widget/auth0.widget.d.ts) [Auth0Widget.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
* [:link:](auto-launch/auto-launch.d.ts) [auto-launch](https://github.com/Teamwork/node-auto-launch) by [rhysd](https://github.com/rhysd)
* [:link:](autobahn/autobahn.d.ts) [AutobahnJS](http://autobahn.ws/js) by [Elad Zelingher](https://github.com/darkl), [Andy Hawkins](https://github.com/a904guy/,http://a904guy.com/,http://www.bmbsqd.com)
* [:link:](autoprefixer-core/autoprefixer-core.d.ts) [Autoprefixer Core](https://github.com/postcss/autoprefixer-core) by [Asana](https://asana.com)
* [:link:](aws-sdk/aws-sdk.d.ts) [aws-sdk](https://github.com/aws/aws-sdk-js) by [midknight41](https://github.com/midknight41)
@@ -119,8 +123,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](bootstrap-slider/bootstrap-slider.d.ts) [bootstrap-slider.js](https://github.com/seiyria/bootstrap-slider) by [Daniel Beckwith](https://github.com/dbeckwith)
* [:link:](bootstrap.datepicker/bootstrap.datepicker.d.ts) [bootstrap.datepicker](https://github.com/eternicode/bootstrap-datepicker) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](bootstrap.paginator/bootstrap.paginator.d.ts) [bootstrap.paginator](https://github.com/lyonlai/bootstrap-paginator) by [derikwhittaker](https://github.com/derikwhittaker)
* [:link:](box2d/box2dweb.d.ts) [bootstrap.timepicker](http://code.google.com/p/box2dweb) by [jbaldwin](https://github.com/jbaldwin)
* [:link:](bootstrap.timepicker/bootstrap.timepicker.d.ts) [bootstrap.timepicker](https://github.com/jdewit/bootstrap-timepicker) by [derikwhittaker](https://github.com/derikwhittaker)
* [:link:](box2d/box2dweb.d.ts) [bootstrap.timepicker](http://code.google.com/p/box2dweb) by [jbaldwin](https://github.com/jbaldwin)
* [:link:](bowser/bowser.d.ts) [Bowser 1.x](https://github.com/ded/bowser) by [Paulo Cesar](https://github.com/pocesar)
* [: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)
@@ -140,7 +145,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](canvasjs/canvasjs.d.ts) [CanvasJS](http://canvasjs.com) by [Mark Overholt](https://github.com/mover5)
* [:link:](casperjs/casperjs.d.ts) [CasperJS](http://casperjs.org) by [Jed Mao](https://github.com/jedmao)
* [:link:](chai/chai.d.ts) [chai](http://chaijs.com) by [Jed Mao](https://github.com/jedmao), [Bart van der Schoor](https://github.com/Bartvds), [Andrew Brown](https://github.com/AGBrown)
* [:link:](chai-as-promised/chai-as-promised.d.ts) [chai-as-promised](https://github.com/domenic/chai-as-promised) by [jt000](https://github.com/jt000)
* [:link:](chai-as-promised/chai-as-promised.d.ts) [chai-as-promised](https://github.com/domenic/chai-as-promised) by [jt000](https://github.com/jt000), [Yuki Kokubun](https://github.com/Kuniwak)
* [:link:](chai-datetime/chai-datetime.d.ts) [chai-datetime](https://github.com/gaslight/chai-datetime.git) by [Cliff Burger](https://github.com/cliffburger)
* [:link:](chai-fuzzy/chai-fuzzy.d.ts) [chai-fuzzy](http://chaijs.com/plugins/chai-fuzzy) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](chai-http/chai-http.d.ts) [chai-http](https://github.com/chaijs/chai-http) by [Wim Looman](https://github.com/Nemo157)
@@ -165,7 +170,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](classnames/classnames.d.ts) [classnames](https://github.com/JedWatson/classnames) by [Dave Keen](http://www.keendevelopment.ch)
* [:link:](cli-color/cli-color.d.ts) [cli-color](https://github.com/medikoo/cli-color) by [Joel Spadin](https://github.com/ChaosinaCan)
* [:link:](clone/clone.d.ts) [clone](https://github.com/pvorb/node-clone) by [Kieran Simpson](https://github.com/kierans/DefinitelyTyped)
* [:link:](codemirror/showhint.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [jacqt](https://github.com/jacqt)
* [:link:](codemirror/codemirror.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [mihailik](https://github.com/mihailik)
* [:link:](coffeeify/coffeeify.d.ts) [coffeeify](https://github.com/jnordberg/coffeeify) by [Qubo](https://github.com/tkQubo)
* [:link:](colorbrewer/colorbrewer.d.ts) [colorbrewer](https://github.com/jeanlauliac/colorbrewer) by [Matt Traynham](https://github.com/mtraynham)
* [:link:](colors/colors.d.ts) [Colors.js 0.6.0-1](https://github.com/Marak/colors.js) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](cometd/cometd.d.ts) [CometD](http://cometd.org) by [Derek Cicerone](https://github.com/derekcicerone)
@@ -230,7 +237,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](dock-spawn/dock-spawn.d.ts) [Dock Spawn](http://dockspawn.com) by [Drew Noakes](https://drewnoakes.com)
* [:link:](documentdb/documentdb.d.ts) [DocumentDB](https://github.com/Azure/azure-documentdb-node) by [Noel Abrahams](https://github.com/NoelAbrahams), [Brett Gutstein](https://github.com/brettferdosi)
* [:link:](dojo/dojo.d.ts) [Dojo](http://dojotoolkit.org) by [Michael Van Sickle](https://github.com/vansimke)
* [:link:](dompurify/dompurify.d.ts) [DOM Purify](https://github.com/cure53/DOMPurify) by [Dave Taylor](http://davetayls.me)
* [:link:](dompurify/dompurify.d.ts) [DOM Purify](https://github.com/cure53/DOMPurify) by [Dave Taylor](http://davetayls.me), [Samira Bazuzi](https://github.com/bazuzi)
* [:link:](domo/domo.d.ts) [Domo](http://domo-js.com) by [Steve Fenton](https://github.com/Steve-Fenton)
* [:link:](domready/domready.d.ts) [domready](https://github.com/ded/domready) by [Christian Holm Nielsen](https://github.com/dotnetnerd)
* [:link:](donna/donna.d.ts) [donna](https://github.com/atom/donna) by [vvakame](https://github.com/vvakame)
@@ -241,7 +248,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](dragula/dragula.d.ts) [dragula](http://bevacqua.github.io/dragula) by [Paul Welter](https://github.com/pwelter34)
* [:link:](drop/drop.d.ts) [Drop](http://github.hubspot.com/drop) by [Adi Dahiya](https://github.com/adidahiya)
* [:link:](dropboxjs/dropboxjs.d.ts) [dropbox-js](https://github.com/dropbox/dropbox-js) by [Steve Fenton](https://github.com/Steve-Fenton), [Pedro Casaubon](https://github.com/xperiments)
* [:link:](dropzone/dropzone.d.ts) [Dropzone](http://www.dropzonejs.com) by [Natan Vivo](https://github.com/nvivo), [Andy Hawkins](https://github.com/a904guy/,http://a904guy.com/,http://www.bmbsqd.com)
* [:link:](dropzone/dropzone.d.ts) [Dropzone](http://www.dropzonejs.com) by [Natan Vivo](https://github.com/nvivo), [Andy Hawkins](https://github.com/a904guy/,http://a904guy.com/,http://www.bmbsqd.com), [Vasya Aksyonov](https://github.com/outring)
* [:link:](dsv/dsv.d.ts) [dsv](https://www.npmjs.com/package/dsv) by [Jason Swearingen](https://jasonswearingen.github.io)
* [:link:](dts-bundle/dts-bundle.d.ts) [dts-bundle](https://github.com/TypeStrong/dts-bundle) by [Asana](https://asana.com)
* [:link:](durandal/durandal.d.ts) [Durandal](http://durandaljs.com) by [Blue Spire](https://github.com/BlueSpire)
@@ -251,9 +258,10 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](easy-jsend/easy-jsend.d.ts) [easy-jsend](https://github.com/DeadAlready/easy-jsend) by [Karl Düüna](https://github.com/DeadAlready)
* [:link:](easy-session/easy-session.d.ts) [easy-session](https://github.com/DeadAlready/node-easy-session) by [Karl Düüna](https://github.com/DeadAlready)
* [:link:](easy-table/easy-table.d.ts) [easy-table](https://github.com/eldargab/easy-table) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](easy-xapi-supertest/easy-xapi-supertest.d.ts) [easy-x-headers](https://github.com/DeadAlready/easy-x-headers) by [Karl Düüna](https://github.com/DeadAlready)
* [:link:](easy-x-headers/easy-x-headers.d.ts) [easy-x-headers](https://github.com/DeadAlready/easy-x-headers) by [Karl Düüna](https://github.com/DeadAlready)
* [:link:](easy-xapi-supertest/easy-xapi-supertest.d.ts) [easy-x-headers](https://github.com/DeadAlready/easy-x-headers) by [Karl Düüna](https://github.com/DeadAlready)
* [:link:](easy-xapi/easy-xapi.d.ts) [easy-xapi](https://github.com/DeadAlready/easy-xapi) by [Karl Düüna](https://github.com/DeadAlready)
* [:link:](easy-xapi-utils/easy-xapi-utils.d.ts) [easy-xapi-utils](https://github.com/DeadAlready/easy-xapi-utils) by [Karl Düüna](https://github.com/DeadAlready)
* [:link:](easystarjs/easystarjs.d.ts) [EasyStar.js](http://easystarjs.com) by [Magnus Gustafsson](https://github.com/borundin)
* [:link:](egg.js/egg.js.d.ts) [Egg.js](https://github.com/mikeflynn/egg.js) by [Markus Peloso](https://github.com/ToastHawaii)
* [:link:](ejs-locals/ejs-locals.d.ts) [ejs-locals](https://github.com/randometc/ejs-locals) by [jt000](https://github.com/jt000)
@@ -266,6 +274,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](emissary/emissary.d.ts) [emissary](https://github.com/atom/emissary) by [vvakame](https://github.com/vvakame)
* [:link:](empower/empower.d.ts) [empower](https://github.com/twada/empower) by [vvakame](https://github.com/vvakame)
* [:link:](emscripten/emscripten.d.ts) [Emscripten](http://kripken.github.io/emscripten-site/index.html) by [Kensuke Matsuzaki](https://github.com/zakki)
* [:link:](envify/envify.d.ts) [envify](https://github.com/hughsk/envify) by [Qubo](https://github.com/tkQubo)
* [:link:](epiceditor/epiceditor.d.ts) [EpicEditor](http://epiceditor.com) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](eq.js/eq.js.d.ts) [eq.js](https://github.com/Snugug/eq.js) by [Stephen Lautier](https://github.com/stephenlautier)
* [:link:](errorhandler/errorhandler.d.ts) [errorhandler](https://github.com/expressjs/errorhandler) by [Santi Albo](https://github.com/santialbo)
@@ -287,6 +296,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](express/express.d.ts) [Express 4.x](http://expressjs.com) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](express-debug/express-debug.d.ts) [express-debug](https://github.com/devoidfury/express-debug) by [Federico Bond](https://github.com/federicobond)
* [:link:](express-jwt/express-jwt.d.ts) [express-jwt](https://www.npmjs.org/package/express-jwt) by [Wonshik Kim](https://github.com/wokim)
* [:link:](express-less/express-less.d.ts) [express-less](https://www.npmjs.com/package/express-less) by [xyb](https://github.com/xieyubo)
* [:link:](express-myconnection/express-myconnection.d.ts) [express-myconnection](https://www.npmjs.org/package/express-myconnection) by [Michael Ferris](https://github.com/Cellule)
* [:link:](express-partials/express-partials.d.ts) [express-partials](https://github.com/publicclass/express-partials) by [jt000](https://github.com/jt000)
* [:link:](express-session/express-session.d.ts) [express-session](https://www.npmjs.org/package/express-session) by [Hiroki Horiuchi](https://github.com/horiuchi)
@@ -295,13 +305,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](extend/extend.d.ts) [extend](https://www.npmjs.com/package/extend) by [Stefan Steinhart](https://github.com/reppners)
* [:link:](extjs/ExtJS.d.ts) [ExtJS](http://www.sencha.com/products/extjs) by [Brian Kotek](https://github.com/brian428)
* [:link:](eyes/eyes.d.ts) [eyes](https://github.com/cloudhead/eyes.js) by [bryn austin bellomy](https://github.com/brynbellomy)
* [:link:](fabricjs/fabricjs.d.ts) [FabricJS](http://fabricjs.com) by [Oliver Klemencic](https://github.com/oklemencic), [Joseph Livecchi](https://github.com/joewashear007)
* [:link:](fabricjs/fabricjs.d.ts) [FabricJS](http://fabricjs.com) by [Oliver Klemencic](https://github.com/oklemencic), [Joseph Livecchi](https://github.com/joewashear007), [Michael Randolph](https://github.com/mrand01)
* [:link:](fbsdk/fbsdk.d.ts) [Facebook Javascript SDK](https://developers.facebook.com/docs/javascript) by [Joshua Strobl](https://github.com/JoshStrobl)
* [:link:](famous/famous.d.ts) [Famous Engine](http://famous.org) by [Boris Vasilenko](https://github.com/borisvasilenko)
* [:link:](fancybox/fancybox.d.ts) [fancyBox](https://github.com/fancyapps/fancyBox) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](farbtastic/farbtastic.d.ts) [Farbtastic: jQuery Color Wheel](http://mattfarina.github.io/farbtastic) by [Matt Brooks](https://github.com/EnableSoftware)
* [:link:](fast-stats/fast-stats.d.ts) [fast-stats](https://github.com/bluesmoon/node-faststats) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](fastclick/fastclick.d.ts) [FastClick](https://github.com/ftlabs/fastclick) by [Shinnosuke Watanabe](https://github.com/shinnn)
* [:link:](favico.js/favico.js.d.ts) [favico.js](http://lab.ejci.net/favico.js) by [Yu Matsushita](https://github.com/drowse314-dev-ymat)
* [:link:](whatwg-fetch/whatwg-fetch.d.ts) [fetch API](https://github.com/github/fetch) by [Ryan Graham](https://github.com/ryan-codingintrigue)
* [:link:](fhir/fhir.d.ts) [FHIR DSTU2](http://www.hl7.org/fhir/2015May/index.html) by [Artifact Health](www.artifacthealth.com)
* [:link:](fibers/fibers.d.ts) [fibers](https://github.com/laverdet/node-fibers) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
@@ -328,7 +339,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](formidable/formidable.d.ts) [Formidable](https://github.com/felixge/node-formidable) by [Wim Looman](https://github.com/Nemo157)
* [:link:](foundation/foundation.d.ts) [Foundation](http://foundation.zurb.com) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](fpsmeter/FPSMeter.d.ts) [FPSmeter](http://darsa.in/fpsmeter) by [Aaron Lampros](http://github.com/alampros)
* [:link:](freedom/freedom-module-env.d.ts) [freedom](https://github.com/freedomjs/freedom) by [Jonathan Pevarnek](https://github.com/jpevarnek)
* [:link:](freedom/freedom-core-env.d.ts) [freedom](https://github.com/freedomjs/freedom) by [Jonathan Pevarnek](https://github.com/jpevarnek)
* [:link:](freedom/freedom.d.ts) [freedom](https://github.com/freedomjs/freedom) by [Jonathan Pevarnek](https://github.com/jpevarnek)
* [:link:](from/from.d.ts) [from](https://github.com/dominictarr/from) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](fs-ext/fs-ext.d.ts) [fs-ext](https://github.com/baudehlo/node-fs-ext) by [Oguzhan Ergin](https://github.com/OguzhanE)
* [:link:](fs-extra/fs-extra.d.ts) [fs-extra](https://github.com/jprichardson/node-fs-extra) by [midknight41](https://github.com/midknight41)
* [: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)
@@ -372,19 +387,24 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](greensock/greensock.d.ts) [GreenSock Animation Platform](http://www.greensock.com/get-started-js) by [Robert S](https://github.com/codebelt)
* [:link:](gridfs-stream/gridfs-stream.d.ts) [gridfs-stream](https://github.com/aheckmann/gridfs-stream) by [Lior Mualem](https://github.com/liorm)
* [:link:](gruntjs/gruntjs.d.ts) [Grunt 0.4.x](http://gruntjs.com) by [Jeff May](https://github.com/jeffmay), [Basarat Ali Syed](https://github.com/basarat)
* [:link:](gsap/TweenLite.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gsap/Ease.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gsap/Core.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gsap/Ease.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gsap/TweenLite.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gulp/gulp.d.ts) [Gulp v3.8.x](http://gulpjs.com) by [Drew Noakes](https://drewnoakes.com)
* [:link:](gulp-autoprefixer/gulp-autoprefixer.d.ts) [gulp-autoprefixer](https://github.com/sindresorhus/gulp-autoprefixer) by [Asana](https://asana.com)
* [:link:](gulp-cached/gulp-cached.d.ts) [gulp-cached](https://github.com/wearefractal/gulp-cached) by [Thomas Corbière](https://github.com/tomc974)
* [:link:](gulp-changed/gulp-changed.d.ts) [gulp-changed](https://github.com/sindresorhus/gulp-changed) by [Thomas Corbière](https://github.com/tomc974)
* [:link:](gulp-coffeeify/gulp-coffeeify.d.ts) [gulp-coffeeify](https://github.com/nariyu/gulp-coffeeify) by [Qubo](https://github.com/tkQubo)
* [:link:](gulp-concat/gulp-concat.d.ts) [gulp-concat](http://github.com/wearefractal/gulp-concat) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](gulp-rev/gulp-rev.d.ts) [gulp-csso](https://github.com/sindresorhus/gulp-rev) by [Tanguy Krotoff](https://github.com/tkrotoff)
* [:link:](gulp-csso/gulp-csso.d.ts) [gulp-csso](https://github.com/ben-eb/gulp-csso) by [Tanguy Krotoff](https://github.com/tkrotoff)
* [:link:](gulp-debug/gulp-debug.d.ts) [gulp-debug](https://github.com/sindresorhus/gulp-debug) by [Tanguy Krotoff](https://github.com/tkrotoff)
* [:link:](gulp-dtsm/gulp-dtsm.d.ts) [gulp-dtsm](https://github.com/9joneg/gulp-dtsm) by [Aya Morisawa](https://github.com/AyaMorisawa)
* [:link:](gulp-espower/gulp-espower.d.ts) [gulp-espower](https://github.com/power-assert-js/gulp-espower) by [Qubo](https://github.com/tkQubo)
* [:link:](gulp-flatten/gulp-flatten.d.ts) [gulp-flatten](https://github.com/armed/gulp-flatten) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](gulp-gh-pages/gulp-gh-pages.d.ts) [gulp-gh-pages](https://github.com/rowoot/gulp-gh-pages) by [Asana](https://asana.com)
* [:link:](gulp-if/gulp-if.d.ts) [gulp-if](https://github.com/robrich/gulp-if) by [Asana](https://asana.com)
* [:link:](gulp-help/gulp-help.d.ts) [gulp-help](https://github.com/chmontgomery/gulp-help) by [Qubo](https://github.com/tkQubo)
* [:link:](gulp-if/gulp-if.d.ts) [gulp-if](https://github.com/robrich/gulp-if) by [Asana](https://asana.com), [Joe Skeen](http://github.com/joeskeen)
* [:link:](gulp-inject/gulp-inject.d.ts) [gulp-inject](https://github.com/klei/gulp-inject) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](gulp-istanbul/gulp-istanbul.d.ts) [gulp-istanbul](https://github.com/SBoudrias/gulp-istanbul) by [Asana](https://asana.com)
* [:link:](gulp-jasmine-browser/gulp-jasmine-browser.d.ts) [gulp-jasmine-browser](https://github.com/jasmine/gulp-jasmine-browser) by [Tanguy Krotoff](https://github.com/tkrotoff)
@@ -393,6 +413,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](gulp-minify-css/gulp-minify-css.d.ts) [gulp-minify-css](https://github.com/jonathanepollack/gulp-minify-css) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](gulp-minify-html/gulp-minify-html.d.ts) [gulp-minify-html](https://github.com/murphydanger/gulp-minify-html) by [Tanguy Krotoff](https://github.com/tkrotoff)
* [:link:](gulp-mocha/gulp-mocha.d.ts) [gulp-mocha](https://github.com/sindresorhus/gulp-mocha) by [Asana](https://asana.com)
* [:link:](gulp-newer/gulp-newer.d.ts) [gulp-newer](https://github.com/tschaub/gulp-newer) by [Thomas Corbière](https://github.com/tomc974)
* [:link:](gulp-plumber/gulp-plumber.d.ts) [gulp-plumber](https://github.com/floatdrop/gulp-plumber) by [Joe Skeen](http://github.com/joeskeen)
* [:link:](gulp-protractor/gulp-protractor.d.ts) [gulp-protractor](https://github.com/mllrsohn/gulp-protractor) by [Tanguy Krotoff](https://github.com/tkrotoff)
* [:link:](gulp-remember/gulp-remember.d.ts) [gulp-remember](https://github.com/ahaurw01/gulp-remember) by [Thomas Corbière](https://github.com/tomc974)
* [:link:](gulp-rename/gulp-rename.d.ts) [gulp-rename](https://github.com/hparra/gulp-rename) by [Asana](https://asana.com)
@@ -401,6 +423,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](gulp-ruby-sass/gulp-ruby-sass.d.ts) [gulp-ruby-sass](https://github.com/sindresorhus/gulp-ruby-sass) by [Agnislav Onufrijchuk](https://github.com/agnislav)
* [:link:](gulp-sass/gulp-sass.d.ts) [gulp-sass](https://github.com/dlmanning/gulp-sass) by [Asana](https://asana.com)
* [:link:](gulp-size/gulp-size.d.ts) [gulp-size](https://github.com/sindresorhus/gulp-size) by [Tanguy Krotoff](https://github.com/tkrotoff)
* [:link:](gulp-sort/gulp-sort.d.ts) [gulp-sort](https://github.com/pgilad/gulp-sort) by [Joe Skeen](http://github.com/joeskeen)
* [:link:](gulp-sourcemaps/gulp-sourcemaps.d.ts) [gulp-sourcemaps](https://github.com/floridoo/gulp-sourcemaps) by [Asana](https://asana.com)
* [:link:](gulp-tsd/gulp-tsd.d.ts) [gulp-tsd](https://github.com/moznion/gulp-tsd) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](gulp-tslint/gulp-tslint.d.ts) [gulp-tslint](https://github.com/panuhorsmalahti/gulp-tslint) by [Asana](https://asana.com)
@@ -422,6 +445,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
* [:link:](highcharts/highcharts.d.ts) [Highcharts](http://www.highcharts.com) by [Damiano Gambarotto](http://github.com/damianog)
* [:link:](highcharts-ng/highcharts-ng.d.ts) [highcharts-ng](https://github.com/pablojim/highcharts-ng) by [Scott Hatcher](https://github.com/scatcher)
* [:link:](highland/highland.d.ts) [Highland](http://highlandjs.org) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](highlightjs/highlightjs.d.ts) [highlight.js](https://github.com/isagalaev/highlight.js) by [Niklas Mollenhauer](https://github.com/nikeee), [Jeremy Hull](https://github.com/sourrust)
* [:link:](highcharts/highstock.d.ts) [Highstock](http://www.highcharts.com) by [David Deutsch](http://github.com/DavidKDeutsch)
@@ -431,15 +455,16 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](html2canvas/html2canvas.d.ts) [html2canvas.js](https://github.com/niklasvh/html2canvas) by [Richard Hepburn](https://github.com/rwhepburn)
* [:link:](htmlparser2/htmlparser2.d.ts) [htmlparser2 v3.7.x](https://github.com/fb55/htmlparser2) by [James Roland Cabresos](https://github.com/staticfunction)
* [:link:](htmltojsx/htmltojsx.d.ts) [htmltojsx](https://www.npmjs.com/package/htmltojsx) by [Basarat Ali Syed](https://github.com/basarat)
* [:link:](http-errors/http-errors.d.ts) [http-errors](https://github.com/jshttp/http-errors) by [Tanguy Krotoff](https://github.com/tkrotoff)
* [:link:](statuses/statuses.d.ts) [http-errors](https://github.com/jshttp/statuses) by [Tanguy Krotoff](https://github.com/tkrotoff)
* [:link:](http-errors/http-errors.d.ts) [http-errors](https://github.com/jshttp/http-errors) by [Tanguy Krotoff](https://github.com/tkrotoff)
* [:link:](http-status/http-status.d.ts) [http-status](https://github.com/wdavidw/node-http-status) by [Michael Zabka](https://github.com/misak113)
* [:link:](http-string-parser/http-string-parser.d.ts) [http-string-parser](https://github.com/apiaryio/http-string-parser) by [MIZUNE Pine](https://github.com/pine613)
* [:link:](httperr/httperr.d.ts) [httperr](https://github.com/pluma/httperr) by [Troy Gerwien](https://github.com/yortus)
* [:link:](humane/humane.d.ts) [Humane](http://wavded.github.com/humane-js) by [jmvrbanac](https://github.com/jmvrbanac)
* [:link:](hypertext-application-language/hypertext-application-language.d.ts) [Hypertext Application Language Draft 6](https://tools.ietf.org/html/draft-kelly-json-hal-06) by [Maks3w](https://github.com/maks3w)
* [:link:](i18n-node/i18n-node.d.ts) [i18n-node](https://github.com/mashpie/i18n-node) by [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](ng-i18next/ng-i18next.d.ts) [i18next](https://github.com/i18next/ng-i18next) by [Cyril Schumacher](https://github.com/cyrilschumacher)
* [:link:](i18next/i18next.d.ts) [i18next](http://i18next.com) by [Maarten Docter](https://github.com/mdocter)
* [:link:](ng-i18next/ng-i18next.d.ts) [i18next](https://github.com/i18next/ng-i18next) by [Cyril Schumacher](https://github.com/cyrilschumacher)
* [:link:](iban/iban.d.ts) [iban.js](https://github.com/arhs/iban.js) by [Cyril Schumacher](https://github.com/cyrilschumacher)
* [: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)
@@ -522,7 +547,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
* [:link:](jquery-urlparam/jquery-urlparam.d.ts) [jquery-urlparam](https://gist.github.com/stpettersens/e1f4478f299b6f4905c1) by [Sam Saint-Pettersen](https://github.com/stpettersens)
* [:link:](jquery.address/jquery.address.d.ts) [jQuery.Address](https://github.com/asual/jquery-address) by [Martin Duparc](https://github.com/martinduparc), [Tim Klingeleers](https://github.com/mardaneus86)
* [:link:](jquery.ajaxfile/jquery.ajaxFile.d.ts) [jquery.ajaxfile](https://github.com/fpellet/jquery.ajaxFile) by [Florent PELLET](https://github.com/fpellet)
* [:link:](jquery.are-you-sure/jquery.are-you-sure.d.ts) [jquery.are-you-sure.js](https://github.com/codedance/jquery.AreYouSure) by [Jon Egerton](https://github.com/jonegerton)
* [:link:](jquery.autosize/jquery.autosize.d.ts) [jquery.autosize](http://www.jacklmoore.com/autosize) by [Aaron T. King](https://github.com/kingdango)
* [:link:](jquery.bbq/jquery.bbq.d.ts) [jquery.bbq](http://benalman.com/projects/jquery-bbq-plugin) by [Adam R. Smith](https://github.com/sunetos)
@@ -558,8 +585,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](jquery.timer/jquery.timer.d.ts) [jQueryTimer](https://github.com/jchavannes/jquery-timer) by [Joshua Strobl](https://github.com/JoshStrobl)
* [:link:](jquery.total-storage/jquery.total-storage.d.ts) [jQueryTotalStorage](https://github.com/Upstatement/jquery-total-storage) by [Jeremy Brooks](https://github.com/JeremyCBrooks)
* [:link:](jqueryui/jqueryui.d.ts) [jQueryUI](http://jqueryui.com) by [Boris Yankov](https://github.com/borisyankov), [John Reilly](https://github.com/johnnyreilly)
* [:link:](js-cookie/js-cookie.d.ts) [js-cookie](https://github.com/js-cookie/js-cookie) by [Theodore Brown](https://github.com/theodorejb)
* [:link:](ua-parser-js/ua-parser-js.d.ts) [js-cookie](https://github.com/faisalman/ua-parser-js) by [Viktor Miroshnikov](https://github.com/superduper)
* [:link:](js-cookie/js-cookie.d.ts) [js-cookie](https://github.com/js-cookie/js-cookie) by [Theodore Brown](https://github.com/theodorejb)
* [:link:](js-fixtures/fixtures.d.ts) [js-fixtures](https://github.com/badunk/js-fixtures) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid)
* [:link:](js-git/js-git.d.ts) [js-git](https://github.com/creationix/js-git) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](js-signals/js-signals.d.ts) [JS-Signals](http://millermedeiros.github.io/js-signals) by [Diullei Gomes](https://github.com/diullei)
@@ -593,6 +620,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](jstree/jstree.d.ts) [jsTree](http://www.jstree.com) by [Adam Pluciński](https://github.com/adaskothebeast)
* [:link:](jsuri/jsuri.d.ts) [jsUri](https://github.com/derek-watson/jsUri) by [Chris Charabaruk](http://github.com/coldacid)
* [:link:](jszip/jszip.d.ts) [JSZip](http://stuk.github.com/jszip) by [mzeiher](https://github.com/mzeiher)
* [:link:](jug/jug.d.ts) [jug](https://github.com/kaiquewdev/Graph) by [yevt](https://github.com/yevt)
* [:link:](jwplayer/jwplayer.d.ts) [JW Player](http://developer.longtailvideo.com/trac) by [Martin Duparc](https://github.com/martinduparc)
* [:link:](jwt-simple/jwt-simple.d.ts) [jwt-simple](https://github.com/hokaccha/node-jwt-simple) by [Ken Fukuyama](https://github.com/kenfdev)
* [:link:](kafka-node/kafka-node.d.ts) [kafka-node](https://github.com/SOHU-Co/kafka-node) by [Daniel Imrie-Situnayake](https://github.com/dansitu)
@@ -669,6 +697,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](magicsuggest/magicsuggest.d.ts) [MagicSuggest](http://nicolasbize.com/magicsuggest) by [Leonardo Chaia](http://github.com/leonardochaia)
* [:link:](mailcheck/mailcheck.d.ts) [Mailcheck](https://github.com/mailcheck/mailcheck) by [Paulo Cesar](http://github.com/pocesar)
* [:link:](maildev/maildev.d.ts) [maildev](https://github.com/djfarrelly/maildev) by [Cyril Schumacher](https://github.com/cyrilschumacher)
* [:link:](mailparser/mailparser.d.ts) [mailparser](https://www.npmjs.com/package/mailparser) by [Peter Snider](https://github.com/psnider)
* [:link:](main-bower-files/main-bower-files.d.ts) [main-bower-files](https://github.com/ck86/main-bower-files) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](maker.js/makerjs.d.ts) [Maker.js](https://github.com/Microsoft/maker.js) by [Dan Marshall](https://github.com/danmarshall)
* [:link:](mandrill-api/mandrill-api.d.ts) [Mandrill API 1.x](http://mandrill.com) by [Paulo Cesar](https://github.com/pocesar)
@@ -709,15 +738,15 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](mime/mime.d.ts) [mime](https://github.com/broofa/node-mime) by [Jeff Goddard](https://github.com/jedigo)
* [:link:](minilog/minilog.d.ts) [minilog v2](https://github.com/mixu/minilog) by [Guido](http://guido.io)
* [:link:](minimatch/minimatch.d.ts) [Minimatch](https://github.com/isaacs/minimatch) by [vvakame](https://github.com/vvakame)
* [:link:](minimist/minimist.d.ts) [minimist](https://github.com/substack/minimist) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](minimist/minimist.d.ts) [minimist](https://github.com/substack/minimist) by [Bart van der Schoor](https://github.com/Bartvds), [Necroskillz](https://github.com/Necroskillz)
* [:link:](mithril/mithril.d.ts) [Mithril](http://lhorie.github.io/mithril) by [Leo Horie](https://github.com/lhorie), [Chris Bowdon](https://github.com/cbowdon)
* [:link:](mixpanel/mixpanel.d.ts) [Mixpanel](https://mixpanel.com) by [Knut Eirik Leira Hjelle](https://github.com/hjellek)
* [:link:](mixto/mixto.d.ts) [mixto](https://github.com/atom/mixto) by [vvakame](https://github.com/vvakame)
* [:link:](mkdirp/mkdirp.d.ts) [mkdirp](http://github.com/substack/node-mkdirp) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](mkpath/mkpath.d.ts) [mkpath](https://www.npmjs.com/package/mkpath) by [Jared Klopper](https://github.com/optical)
* [:link:](mobile-detect/mobile-detect.d.ts) [mobile-detect](http://hgoebl.github.io/mobile-detect.js) by [Martin McWhorter](https://github.com/martinmcwhorter)
* [:link:](mocha/mocha-node.d.ts) [mocha](http://mochajs.org) by [Vadim Macagon](https://github.com/enlight), [vvakame](https://github.com/vvakame)
* [:link:](mocha/mocha.d.ts) [mocha](http://mochajs.org) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid), [otiai10](https://github.com/otiai10), [jt000](https://github.com/jt000), [Vadim Macagon](https://github.com/enlight)
* [:link:](mocha/mocha-node.d.ts) [mocha](http://mochajs.org) by [Vadim Macagon](https://github.com/enlight), [vvakame](https://github.com/vvakame)
* [:link:](mocha-phantomjs/mocha-phantomjs.d.ts) [mocha-phantomjs](http://metaskills.net/mocha-phantomjs) by [Erik Schierboom](https://github.com/ErikSchierboom)
* [:link:](mock-fs/mock-fs.d.ts) [mock-fs](https://github.com/tschaub/mock-fs) by [Wim Looman](https://github.com/Nemo157)
* [:link:](mockery/mockery.d.ts) [mockery](https://github.com/mfncooper/mockery) by [jt000](https://github.com/jt000)
@@ -753,6 +782,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](ng-command/ng-command.d.ts) [ng-command](https://github.com/stephenlautier/ng-command) by [Stephen Lautier](https://github.com/stephenlautier)
* [:link:](ng-grid/ng-grid.d.ts) [ng-grid](http://angular-ui.github.io/ng-grid) by [Ken Smith](https://github.com/smithkl42), [Roland Zwaga](https://github.com/rolandzwaga), [Kent Cooper](https://github.com/kentcooper)
* [:link:](angular-idle/angular-idle.d.ts) [ng-idle](http://hackedbychinese.github.io/ng-idle) by [mthamil](https://github.com/mthamil)
* [:link:](ng-dialog/ng-dialog.d.ts) [ngDialog](https://github.com/likeastore/ngDialog) by [Stephen Lautier](https://github.com/stephenlautier)
* [:link:](ngkookies/ngkookies.d.ts) [ngKookes](https://github.com/voronianski/ngKookies) by [Martin McWhorter](https://github.com/martinmcwhorter)
* [:link:](ngprogress/ngprogress.d.ts) [ngProgress](http://victorbjelkholm.github.io/ngProgress) by [Martin McWhorter](https://github.com/martinmcwhorter)
* [:link:](ngprogress-lite/ngprogress-lite.d.ts) [ngprogress-lite](https://github.com/voronianski/ngprogress-lite) by [Luke Forder](https://github.com/LukeForder)
@@ -761,6 +791,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](nock/nock.d.ts) [nock](https://github.com/pgte/nock) by [bonnici](https://github.com/bonnici)
* [:link:](node-imap/imap.d.ts) [node imap](https://github.com/mscdex/node-imap) by [Steve Fenton](https://github.com/Steve-Fenton)
* [:link:](node-sass/node-sass.d.ts) [Node Sass](https://github.com/sass/node-sass) by [Asana](https://asana.com)
* [:link:](apn/apn.d.ts) [node-apn](https://github.com/argon/node-apn) by [Zenorbi](https://github.com/zenorbi)
* [:link:](bunyan/bunyan.d.ts) [node-bunyan](https://github.com/trentm/node-bunyan) by [Alex Mikhalev](https://github.com/amikhalev)
* [:link:](bunyan-logentries/bunyan-logentries.d.ts) [node-bunyan-logentries](https://github.com/nemtsov/node-bunyan-logentries) by [Aymeric Beaumet](http://aymericbeaumet.me)
* [:link:](node-calendar/node-calendar.d.ts) [node-calendar](https://www.npmjs.com/package/node-calendar) by [Luzian Zagadinow](https://github.com/luzianz)
@@ -772,14 +803,17 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](node-getopt/node-getopt.d.ts) [node-getopt](https://github.com/jiangmiao/node-getopt) by [Karl.M.Cauchy](https://github.com/kcauchy)
* [:link:](node-git/node-git.d.ts) [node-git](https://github.com/christkv/node-git) by [vvakame](https://github.com/vvakame)
* [:link:](ip/ip.d.ts) [node-ip](https://github.com/indutny/node-ip) by [Peter Harris](https://github.com/codeanimal)
* [:link:](node-jsfl-runner/node-jsfl-runner.d.ts) [node-jsfl-runner](https://www.npmjs.com/package/node-jsfl-runner) by [Michael Randolph](https://github.com/mrand01)
* [:link:](multiparty/multiparty.d.ts) [node-multiparty](https://github.com/andrewrk/node-multiparty) by [Ken Fukuyama](https://github.com/kenfdev)
* [:link:](mysql/mysql.d.ts) [node-mysql](https://github.com/felixge/node-mysql) by [William Johnston](https://github.com/wjohnsto)
* [:link:](node-mysql-wrapper/node-mysql-wrapper.d.ts) [node-mysql-wrapper](https://github.com/kataras/node-mysql-wrapper) by [Makis Maropoulos](https://github.com/kataras)
* [:link:](node-notifier/node-notifier.d.ts) [node-notifier](https://github.com/mikaelbr/node-notifier) by [Qubo](https://github.com/tkQubo)
* [:link:](node-persist/node-persist.d.ts) [node-persist](https://github.com/simonlast/node-persist) by [Spencer Williams](http://spencerwi.com)
* [:link:](node-polyglot/node-polyglot.d.ts) [node-polyglot](https://github.com/airbnb/polyglot.js) by [Tim Jackson-Kiely](https://github.com/timjk)
* [:link:](promptly/promptly.d.ts) [node-promptly](https://github.com/IndigoUnited/node-promptly) by [Dan Spencer](https://github.com/danrspencer)
* [:link:](radius/radius.d.ts) [node-radius](https://github.com/retailnext/node-radius) by [Peter Harris](https://github.com/codeanimal)
* [:link:](node-schedule/node-schedule.d.ts) [node-schedule](https://github.com/tejasmanohar/node-schedule) by [Cyril Schumacher](https://github.com/cyrilschumacher)
* [:link:](node-slack/node-slack.d.ts) [node-slack](https://github.com/xoxco/node-slack) by [Qubo](https://github.com/tkQubo)
* [:link:](stack-trace/stack-trace.d.ts) [node-stack-trace](https://github.com/felixge/node-stack-trace) by [Exceptionless](https://github.com/exceptionless)
* [:link:](node-uuid/node-uuid.d.ts) [node-uuid.js](https://github.com/broofa/node-uuid) by [Jeff May](https://github.com/jeffmay)
* [:link:](node-webkit/node-webkit.d.ts) [node-webkit](https://github.com/rogerwang/node-webkit) by [Pedro Casaubon](https://github.com/xperiments)
@@ -800,10 +834,10 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](nodeunit/nodeunit.d.ts) [nodeunit](https://github.com/caolan/nodeunit) by [Jeff Goddard](https://github.com/jedigo)
* [:link:](nomnom/nomnom.d.ts) [nomnom](https://github.com/harthur/nomnom) by [Paul Vick](https://github.com/panopticoncentral)
* [:link:](nopt/nopt.d.ts) [nopt](https://github.com/npm/nopt) by [jbondc](https://github.com/jbondc)
* [:link:](notifyjs/notifyjs.d.ts) [notify.js](https://github.com/alexgibson/notify.js) by [soundTricker](https://github.com/soundTricker)
* [:link:](notify/notify.d.ts) [Notify.js](https://github.com/jpillora/notifyjs) by [Xiaohan Zhang](https://github.com/hellochar)
* [:link:](nouislider/nouislider.d.ts) [nouislider](https://github.com/leongersen/noUiSlider) by [Patrick Davies](https://github.com/bleuarg)
* [:link:](notifyjs/notifyjs.d.ts) [notify.js](https://github.com/alexgibson/notify.js) by [soundTricker](https://github.com/soundTricker)
* [: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 [Patrick Davies](https://github.com/bleuarg)
* [: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)
@@ -811,15 +845,19 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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 v0.9.x](https://github.com/mariocasciaro/object-path) by [Paulo Cesar](https://github.com/pocesar)
* [:link:](oblo-util/oblo-util.d.ts) [oblo-util](https://github.com/Oblosys/oblo-util) by [Martijn Schrage](https://github.com/Oblosys)
* [: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:](angular-odata-resources/angular-odata-resources.d.ts) [OData Angular Resources](https://github.com/devnixs/ODataAngularResources) by [Raphael ATALLAH](http://raphael.atallah.me)
* [:link:](offline-js/offline-js.d.ts) [Offline](https://github.com/HubSpot/offline) by [Chris Wrench](https://github.com/cgwrench)
* [: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](http://openlayers.org) by [Wouter Goedhart](https://github.com/woutergd)
* [:link:](opn/opn.d.ts) [opn](https://github.com/sindresorhus/opn) by [Shinnosuke Watanabe](https://github.com/shinnn)
* [:link:](optimist/optimist.d.ts) [optimist](https://github.com/substack/node-optimist) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](orchestrator/orchestrator.d.ts) [Orchestrator](https://github.com/orchestrator/orchestrator) by [Qubo](https://github.com/tkQubo)
* [:link:](os-locale/os-locale.d.ts) [os-locale](https://github.com/sindresorhus/os-locale) by [Aya Morisawa](https://github.com/AyaMorisawa)
* [:link:](owlcarousel/owlcarousel.d.ts) [OwlCarousel v.1.3.3](https://github.com/OwlFonk/OwlCarousel) by [Damian Piątkowski](https://github.com/dpiatkowski)
* [:link:](packery/packery.d.ts) [Packery](http://packery.metafizzy.co) by [Piraveen Kamalathas from Kilix](https://github.com/piraveen)
* [:link:](page/page.d.ts) [page](http://visionmedia.github.io/page.js) by [Alan Norbauer](http://alan.norbauer.com)
@@ -879,6 +917,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](preloadjs/preloadjs.d.ts) [PreloadJS](http://www.createjs.com/#!/PreloadJS) by [Pedro Ferreira](https://bitbucket.org/drk4)
* [:link:](prelude-ls/prelude-ls.d.ts) [prelude.ls](http://www.preludels.com) by [Aya Morisawa](https://github.com/AyaMorisawa)
* [:link:](progressjs/progress.d.ts) [ProgressJs](http://usablica.github.io/progress.js) by [Shunsuke Ohtani](https://github.com/zaneli)
* [:link:](project-oxford/project-oxford.d.ts) [project-oxford](https://github.com/felixrieseberg/project-oxford) by [Scott Southwood](https://github.com/scsouthw)
* [:link:](promise-pool/promise-pool.d.ts) [promise-pool](https://github.com/vilic/promise-pool) by [VILIC VANE](https://github.com/vilic)
* [:link:](promises-a-plus/promises-a-plus.d.ts) [promises-a-plus](http://promisesaplus.com) by [Igor Oleinikov](https://github.com/Igorbek)
* [:link:](protobufjs/protobufjs.d.ts) [ProtoBuf.js](https://github.com/dcodeIO/ProtoBuf.js) by [Panu Horsmalahti](https://github.com/panuhorsmalahti)
@@ -917,6 +956,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](ref-struct/ref-struct.d.ts) [ref-struct](https://github.com/TooTallNate/ref-struct) by [Paul Loyd](https://github.com/loyd)
* [:link:](ref-union/ref-union.d.ts) [ref-union](https://github.com/TooTallNate/ref-union) by [Paul Loyd](https://github.com/loyd)
* [:link:](request/request.d.ts) [request](https://github.com/mikeal/request) by [Carlos Ballesteros Velasco](https://github.com/soywiz), [bonnici](https://github.com/bonnici), [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](request-ip/request-ip.d.ts) [request-ip](https://github.com/pbojinov/request-ip) by [Adam Babcock](https://github.com/mrhen)
* [:link:](request-promise/request-promise.d.ts) [request-promise](https://www.npmjs.com/package/request-promise) by [Christopher Glantschnig](https://github.com/cglantschnig)
* [:link:](requirejs/require.d.ts) [RequireJS](http://requirejs.org) by [Josh Baldwin](https://github.com/jbaldwin)
* [:link:](resemblejs/resemblejs.d.ts) [Resemble.js](http://huddle.github.io/Resemble.js) by [Tim Perry](https://github.com/pimterry)
@@ -932,7 +972,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](route-recognizer/route-recognizer.d.ts) [route-recognizer](https://github.com/tildeio/route-recognizer) by [Dave Keen](http://www.keendevelopment.ch)
* [:link:](routie/routie.d.ts) [routie](https://github.com/jgallen23/routie) by [Adilson](https://github.com/Adilson)
* [:link:](rsmq/rsmq.d.ts) [rsmq](http://smrchy.github.io/rsmq) by [Qubo](https://github.com/MugeSo)
* [:link:](rsmq-worker/rsmq-worker.d.ts) [rsmq-worker](http://smrchy.github.io/rsmq/rsmq-worker) by [Qubo](https://github.com/MugeSo)
* [:link:](rsmq-worker/rsmq-worker.d.ts) [rsmq-worker](http://smrchy.github.io/rsmq/rsmq-worker) by [TANAKA Koichi](https://github.com/MugeSo)
* [:link:](rtree/rtree.d.ts) [rtree](https://github.com/leaflet-extras/RTree) by [Omede Firouz](https://github.com/oefirouz)
* [:link:](run-sequence/run-sequence.d.ts) [run-sequence](https://github.com/OverZealous/run-sequence) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](rx/rx.d.ts) [RxJS](http://rx.codeplex.com) by [gsino](http://www.codeplex.com/site/users/view/gsino), [Igor Oleinikov](https://github.com/Igorbek)
@@ -958,16 +998,18 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](screenfull/screenfull.d.ts) [screenfull.js](https://github.com/sindresorhus/screenfull.js) by [Ilia Choly](http://github.com/icholy)
* [:link:](scrolltofixed/scrolltofixed.d.ts) [ScrollToFixed](https://github.com/bigspotteddog/ScrollToFixed) by [Ben Dixon](https://github.com/bmdixon)
* [:link:](seedrandom/seedrandom.d.ts) [seedrandom](https://github.com/davidbau/seedrandom) by [Kern Handa](https://github.com/kernhanda)
* [:link:](segment-analytics/segment-analytics.d.ts) [Segment's analytics.js](https://segment.com/docs/libraries/analytics.js) by [Andrew Fong](https://github.com/fongandrew)
* [:link:](select2/select2.d.ts) [Select2](http://ivaynberg.github.com/select2) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](selectize/selectize.d.ts) [Selectize](https://github.com/brianreavis/selectize.js) by [Adi Dahiya](https://github.com/adidahiya)
* [:link:](selenium-webdriver/selenium-webdriver.d.ts) [Selenium WebDriverJS](https://code.google.com/p/selenium) by [Bill Armstrong](https://github.com/BillArmstrong)
* [:link:](selenium-webdriver/selenium-webdriver.d.ts) [Selenium WebDriverJS](https://code.google.com/p/selenium) by [Bill Armstrong](https://github.com/BillArmstrong), [Yuki Kokubun](https://github.com/Kuniwak)
* [:link:](semaphore/semaphore.d.ts) [semaphore](https://github.com/abrkn/semaphore.js) by [Matt Frantz](https://github.com/mhfrantz)
* [: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:](sentence-case/sentence-case.d.ts) [sentence-case](https://github.com/blakeembrey/sentence-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
* [: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:](sequelize/sequelize.d.ts) [Sequelize](http://sequelizejs.com) by [samuelneff](https://github.com/samuelneff), [Peter Harris](https://github.com/codeanimal), [Ivan Drinchev](https://github.com/drinchev)
* [:link:](sequelize-fixtures/sequelize-fixtures.d.ts) [Sequelize-Fixtures](https://github.com/domasx2/sequelize-fixtures) by [Christian Schwarz](https://github.com/cschwarz)
* [: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:](on-headers/on-headers.d.ts) [serve-favicon](https://github.com/jshttp/on-headers) by [John Jeffery](https://github.com/jjeffery)
* [: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)
* [:link:](sharepoint/SharePoint.d.ts) [SharePoint 2010 and 2013](http://sptypescript.codeplex.com) by [Stanislav Vyshchepan](http://blog.gandjustas.ru), [Andrey Markeev](http://markeev.com)
@@ -987,6 +1029,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](sinon-chrome/sinon-chrome.d.ts) [Sinon-Chrome](https://github.com/vitalets/sinon-chrome) by [Tim Perry](https://github.com/pimterry)
* [: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:](ski/ski.d.ts) [ski](https://github.com/jden/ski) by [Aya Morisawa](https://github.com/AyaMorisawa)
* [:link:](skyway/skyway.d.ts) [SkyWay](http://nttcom.github.io/skyway) by [Toshiya Nakakura](https://github.com/nakakura)
* [: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)
@@ -1010,6 +1053,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:](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:](ssh2/ssh2.d.ts) [ssh2](https://github.com/mscdex/ssh2) by [Qubo](https://github.com/tkQubo)
* [:link:](stack-mapper/stack-mapper.d.ts) [stack-mapper](https://github.com/thlorenz/stack-mapper) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](stacktrace-js/stacktrace-js.d.ts) [stacktrace.js](https://github.com/stacktracejs/stacktrace.js) by [Exceptionless](https://github.com/exceptionless)
* [:link:](stampit/stampit.d.ts) [stampit](https://github.com/stampit-org/stampit) by [Vasyl Boroviak](https://github.com/koresar)
@@ -1021,7 +1065,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](stream-series/stream-series.d.ts) [stream-series](https://github.com/rschmukler/stream-series) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](stream-to-array/stream-to-array.d.ts) [stream-to-array](https://github.com/stream-utils/stream-to-array) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](streamjs/streamjs.d.ts) [streamjs](http://winterbe.github.io/streamjs) by [Bence Eros](https://github.com/erosb)
* [:link:](stripe/stripe.d.ts) [stripe](https://stripe.com) by [Eric J. Smith](https://github.com/ejsmith)
* [:link:](string_score/string_score.d.ts) [string_score](https://github.com/joshaven/string_score) by [Marcin Porębski](https://github.com/marcinporebski)
* [:link:](stripe/stripe.d.ts) [stripe](https://stripe.com) by [Andy Hawkins](https://github.com/a904guy/,http://a904guy.com), [Eric J. Smith](https://github.com/ejsmith)
* [:link:](stripe-checkout/stripe-checkout.d.ts) [Stripe Checkout](https://stripe.com/checkout) by [Chris Wrench](https://github.com/cgwrench)
* [:link:](stripe/stripe-node.d.ts) [stripe-node](https://github.com/stripe/stripe-node) by [William Johnston](https://github.com/wjohnsto)
* [:link:](strophe/strophe.d.ts) [Strophe.js](http://strophe.im/strophejs) by [David Deutsch](https://github.com/DavidKDeutsch)
@@ -1109,6 +1154,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](ui-grid/ui-grid.d.ts) [ui-grid](http://www.ui-grid.info) by [Ben Tesser](https://github.com/btesser)
* [:link:](ui-router-extras/ui-router-extras.d.ts) [UI-Router Extras (ct.ui.router.extras module)](https://github.com/christopherthielen/ui-router-extras) by [Michael Putters](https://github.com/mputters)
* [:link:](umbraco/umbraco-resources.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland)
* [:link:](umbraco/umbraco-services.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland)
* [:link:](umbraco/umbraco.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland)
@@ -1120,9 +1166,12 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](universal-analytics/universal-analytics.d.ts) [universal-analytics](https://github.com/peaksandpies/universal-analytics) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](unorm/unorm.d.ts) [unorm](https://github.com/walling/unorm) by [Christopher Brown](https://github.com/chbrown)
* [:link:](update-notifier/update-notifier.d.ts) [update-notifier](https://github.com/yeoman/update-notifier) by [vvakame](https://github.com/vvakame)
* [:link:](upper-case/upper-case.d.ts) [upper-case](https://github.com/blakeembrey/upper-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
* [:link:](upper-case-first/upper-case-first.d.ts) [upper-case-first](https://github.com/blakeembrey/upper-case-first) by [Sam Saint-Pettersen](https://github.com/stpettersens)
* [:link:](uri-templates/uri-templates.d.ts) [uri-templates](https://github.com/geraintluff/uri-templates) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](urijs/URIjs.d.ts) [URI.js](https://github.com/medialize/URI.js) by [RodneyJT](https://github.com/RodneyJT), [Brian Surowiec](https://github.com/xt0rted)
* [:link:](js-url/js-url.d.ts) [url](https://github.com/websanova/js-url) by [MIZUNE Pine](https://github.com/pine613)
* [:link:](url-template/url-template.d.ts) [url-template](https://github.com/bramstein/url-template) by [Marcin Porębski](https://github.com/marcinporebski)
* [:link:](urlrouter/urlrouter.d.ts) [urlrouter](https://github.com/fengmk2/urlrouter) by [soywiz](https://github.com/soywiz)
* [:link:](urlsafe-base64/urlsafe-base64.d.ts) [urlsafe-base64](https://github.com/RGBboy/urlsafe-base64) by [Tanguy Krotoff](https://github.com/tkrotoff)
* [:link:](usage/usage.d.ts) [usage](https://github.com/arunoda/node-usage) by [Pascal Vomhoff](https://github.com/pvomhoff)
@@ -1137,7 +1186,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
* [:link:](vinyl-buffer/vinyl-buffer.d.ts) [vinyl-buffer](https://github.com/hughsk/vinyl-buffer) by [Qubo](https://github.com/tkQubo)
* [:link:](vinyl-fs/vinyl-fs.d.ts) [vinyl-fs](https://github.com/wearefractal/vinyl-fs) by [vvakame](https://github.com/vvakame)
* [:link:](vinyl-paths/vinyl-paths.d.ts) [vinyl-paths](https://github.com/sindresorhus/vinyl-paths) by [Qubo](https://github.com/tkQubo)
* [:link:](vinyl-source-stream/vinyl-source-stream.d.ts) [vinyl-source-stream](https://github.com/hughsk/vinyl-source-stream) by [Asana](https://asana.com)
* [:link:](virtual-dom/virtual-dom.d.ts) [virtual-dom](https://github.com/Matt-Esch/virtual-dom) by [Christopher Brown](https://github.com/chbrown)
* [:link:](vortex-web-client/vortex-web-client.d.ts) [Vortex Web 1.2.0p1](http://www.prismtech.com/vortex/vortex-web) by [Stefan Profanter](https://github.com/Pro)
@@ -1178,6 +1229,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](xss-filters/xss-filters.d.ts) [Yahoo XSS Filters](https://github.com/yahoo/xss-filters) by [Dave Taylor](http://davetayls.me)
* [:link:](yamljs/yamljs.d.ts) [yamljs](https://github.com/jeremyfa/yaml.js) by [Tim Jonischkat](http://www.tim-jonischkat.de)
* [:link:](yargs/yargs.d.ts) [yargs](https://github.com/chevex/yargs) by [Martin Poelstra](https://github.com/poelstra)
* [:link:](ydn-db/ydn-db.d.ts) [YDN-DB version 1](http://dev.yathit.com/ydn-db/index.html) by [Kyaw Tun](https://github.com/yathit), [Gabriel Monteagudo](https://github.com/gabrielmaldi)
* [: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)
* [:link:](youtube/youtube.d.ts) [YouTube](https://developers.google.com/youtube) by [Daz Wilkin](https://github.com/DazWilkin), [Ian Obermiller](http://ianobermiller.com)

View File

@@ -0,0 +1,61 @@
/// <reference path="angular-gettext.d.ts" />
module angular_gettext_tests {
// Configuring angular-gettext
// https://angular-gettext.rocketeer.be/dev-guide/configure/
//Setting the language
angular.module('myApp').run(function (gettextCatalog: angular.gettext.gettextCatalog) {
gettextCatalog.setCurrentLanguage('nl');
});
//Highlighting untranslated strings
angular.module('myApp').run(function (gettextCatalog: angular.gettext.gettextCatalog) {
gettextCatalog.debug = true;
});
// Marking strings in JavaScript code as translatable.
// https://angular-gettext.rocketeer.be/dev-guide/annotate-js/
angular.module("myApp").controller("helloController", function (gettext: angular.gettext.gettextFunction) {
var myString = gettext("Hello");
});
//Translating directly in JavaScript.
angular.module("myApp").controller("helloController", function (gettextCatalog: angular.gettext.gettextCatalog) {
var translated: string = gettextCatalog.getString("Hello");
});
angular.module("myApp").controller("helloController", function (gettextCatalog: angular.gettext.gettextCatalog) {
var myString2: string = gettextCatalog.getPlural(3, "Bird", "Birds");
});
angular.module("myApp").controller("helloController", function (gettextCatalog: angular.gettext.gettextCatalog) {
var translated: string = gettextCatalog.getString("Hello {{name}}", { name: "Ruben" });
});
// Setting strings manually
// https://angular-gettext.rocketeer.be/dev-guide/manual-setstrings/
angular.module("myApp").run(function (gettextCatalog: angular.gettext.gettextCatalog) {
// Load the strings automatically during initialization.
gettextCatalog.setStrings("nl", {
"Hello": "Hallo",
"One boat": ["Een boot", "{{$count}} boats"]
});
});
interface helloControllerScope extends ng.IScope {
switchLanguage: (lang: string) => void;
}
// Lazy-loading languages
// https://angular-gettext.rocketeer.be/dev-guide/lazy-loading/
angular.module("myApp").controller("helloController", function ($scope: helloControllerScope, gettextCatalog: angular.gettext.gettextCatalog) {
$scope.switchLanguage = function (lang: string) {
gettextCatalog.setCurrentLanguage(lang);
gettextCatalog.loadRemote("/languages/" + lang + ".json");
};
});
}

73
angular-gettext/angular-gettext.d.ts vendored Normal file
View File

@@ -0,0 +1,73 @@
// Type definitions for angular-gettext v2.1.0
// Project: https://angular-gettext.rocketeer.be/
// Definitions by: Ákos Lukács <https://github.com/AkosLukacs>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts" />
declare module angular.gettext {
interface gettextCatalog {
//////////////
/// Fields ///
//////////////
/** (default: false): Whether or not to prefix untranslated strings with [MISSING]: or a custom prefix. */
debug: boolean;
/** (default: [MISSING]:): Custom prefix for untranslated strings. */
debugPrefix: string;
/** (default: false): Whether or not to wrap all processed text with markers.Example output: [Welcome] */
showTranslatedMarkers: boolean;
/** (default: [): Custom prefix to mark strings that have been run through angular-gettext. */
translatedMarkerPrefix: string;
/** (default: ]): Custom suffix to mark strings that have been run through angular-gettext. */
translatedMarkerSuffix: string;
/** An object of loaded translation strings.Shouldn't be used directly. */
strings: {};
/** The default language, in which you're application is written. This defaults to English and it's generally a bad idea to use anything else: if your language has different pluralization rules you'll end up with incorrect translations. Deprecated
* @deprecreated
*/
baseLanguage: string;
///////////////
/// Methods ///
///////////////
/** Sets the current language and makes sure that all translations get updated correctly. */
setCurrentLanguage(lang: string): void;
/** Returns the current language. */
getCurrentLanguage(): string;
/** Processes an object of string definitions. More details https://angular-gettext.rocketeer.be/dev-guide/manual-setstrings/
* @param language A language code.
* @param strings A dictionary of strings. The format of this dictionary is:
* - Keys: Singular English strings (as defined in the source files)
* - Values: Either a single string for signular-only strings or an array of plural forms.
*/
setStrings(language: string, strings: { [key: string]: string|string[] }): void;
/** Get the correct pluralized (but untranslated) string for the value of n. */
getStringForm(string: string, n: number): string;
/** Translate a string with the given context. Uses Angular.JS interpolation, so something like this will do what you expect:
* var hello = gettextCatalog.getString("Hello {{name}}!", { name: "Ruben" });
* // var hello will be "Hallo Ruben!" in Dutch.
* The context parameter is optional: pass null (or don't pass anything) if you're not using it: this skips interpolation and is a lot faster.
*/
getString(string: string, context?: any): string;
/** Translate a plural string with the given context. */
getPlural(n: number, string: string, stringPlural: string, context?: any): string;
/** Load a set of translation strings from a given URL.This should be a JSON catalog generated with grunt-angular-gettext. More details https://angular-gettext.rocketeer.be/dev-guide/lazy-loading/ */
loadRemote(url: string): ng.IHttpPromise<any>;
}
/** If you have text that should be translated in your JavaScript code, wrap it with a call to a function named gettext. This module provides an injectable function to do so */
interface gettextFunction {
(dummyString: string): string;
}
}

View File

@@ -18,7 +18,7 @@ declare module ngSignalr {
connection: SignalR;
proxy: HubProxy;
on(event: string, fn: ((...args: any[]) => void)): void;
on(event: string, fn: (...args: any[]) => void): void;
invoke(method: string, ...args: any[]): JQueryDeferred<any>;
disconnect(): void;
connect(): JQueryPromise<any>;
@@ -70,4 +70,4 @@ declare module ngSignalr {
*/
stateChanged?: (state: SignalRStateChange) => void;
}
}
}

View File

@@ -0,0 +1,13 @@
/// <reference path="angular-ui-tree.d.ts" />
var treeNode: AngularUITree.ITreeNode = {
id: 0,
nodes: [],
title: "test"
};
var treeNode2: AngularUITree.ITreeNode = {
id: "0",
nodes: [treeNode],
title: "test2"
};

15
angular-ui-tree/angular-ui-tree.d.ts vendored Normal file
View File

@@ -0,0 +1,15 @@
// Type definitions for angular-ui-tree v2.8.0
// Project: https://github.com/angular-ui-tree/angular-ui-tree
// Definitions by: Calvin Fernandez <https://github.com/CalvinFernandez>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module AngularUITree {
/**
* Node in list
*/
interface ITreeNode {
id: number | string;
nodes: ITreeNode[];
title: string;
}
}

5920
angular2/angular2-2.0.0-alpha.36.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

317
angular2/angular2.d.ts vendored
View File

@@ -1,4 +1,4 @@
// Type definitions for Angular v2.0.0-alpha.35
// Type definitions for Angular v2.0.0-alpha.36
// Project: http://angular.io/
// Definitions by: angular team <https://github.com/angular/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -1158,9 +1158,9 @@ declare module ng {
descendants: boolean;
isViewQuery: void;
isViewQuery: any;
selector: void;
selector: any;
isVarBindingQuery: boolean;
@@ -1200,7 +1200,7 @@ declare module ng {
attributeName: string;
token: void;
token: any;
toString(): string;
}
@@ -1250,7 +1250,7 @@ declare module ng {
* };
*
* MyComponent.annotations = [
* new ng.Component({...})
* new ng.Component({...}),
* new ng.View({...})
* ]
* MyComponent.parameters = [
@@ -1335,7 +1335,7 @@ declare module ng {
* };
*
* MyComponent.annotations = [
* new ng.Component({...})
* new ng.Component({...}),
* new ng.View({...})
* ]
* ```
@@ -1512,7 +1512,7 @@ declare module ng {
* };
*
* MyComponent.annotations = [
* new ng.Component({...})
* new ng.Component({...}),
* new ng.View({...})
* ]
* ```
@@ -1585,7 +1585,7 @@ declare module ng {
* };
*
* MyComponent.annotations = [
* new ng.Component({...})
* new ng.Component({...}),
* new ng.View({...})
* ]
* MyComponent.parameters = [
@@ -1604,7 +1604,7 @@ declare module ng {
/**
* {@link ViewQueryMetadata} factory function.
* {@link di/ViewQueryMetadata} factory function.
*/
var ViewQuery : QueryFactory ;
@@ -2020,6 +2020,8 @@ declare module ng {
*/
class WrappedValue {
static wrap(value: any): WrappedValue;
wrapped: any;
}
@@ -2075,6 +2077,30 @@ declare module ng {
*/
class IterableDiffers {
static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers;
/**
* Takes an array of {@link IterableDifferFactory} and returns a binding used to extend the
* inherited {@link IterableDiffers} instance with the provided factories and return a new
* {@link IterableDiffers} instance.
*
* The following example shows how to extend an existing list of factories,
* which will only be applied to the injector for this component and its children.
* This step is all that's required to make a new {@link IterableDiffer} available.
*
* # Example
*
* ```
* @Component({
* viewBindings: [
* IterableDiffers.extend([new ImmutableListDiffer()])
* ]
* })
* ```
*/
static extend(factories: IterableDifferFactory[]): Binding;
factories: IterableDifferFactory[];
find(iterable: Object): IterableDifferFactory;
@@ -2104,6 +2130,30 @@ declare module ng {
*/
class KeyValueDiffers {
static create(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers;
/**
* Takes an array of {@link KeyValueDifferFactory} and returns a binding used to extend the
* inherited {@link KeyValueDiffers} instance with the provided factories and return a new
* {@link KeyValueDiffers} instance.
*
* The following example shows how to extend an existing list of factories,
* which will only be applied to the injector for this component and its children.
* This step is all that's required to make a new {@link KeyValueDiffer} available.
*
* # Example
*
* ```
* @Component({
* viewBindings: [
* KeyValueDiffers.extend([new ImmutableMapDiffer()])
* ]
* })
* ```
*/
static extend(factories: KeyValueDifferFactory[]): Binding;
factories: KeyValueDifferFactory[];
find(kv: Object): KeyValueDifferFactory;
@@ -2147,41 +2197,6 @@ declare module ng {
const APP_COMPONENT : OpaqueToken ;
/**
* Represents a Angular's representation of an Application.
*
* `ApplicationRef` represents a running application instance. Use it to retrieve the host
* component, injector,
* or dispose of an application.
*/
interface ApplicationRef {
/**
* Returns the current {@link ComponentMetadata} type.
*/
hostComponentType: Type;
/**
* Returns the current {@link ComponentMetadata} instance.
*/
hostComponent: any;
/**
* Dispose (un-load) the application.
*/
dispose(): void;
/**
* Returns the root application {@link Injector}.
*/
injector: Injector;
}
/**
* Bootstrapping for Angular applications.
*
@@ -2323,6 +2338,41 @@ declare module ng {
}
/**
* Represents a Angular's representation of an Application.
*
* `ApplicationRef` represents a running application instance. Use it to retrieve the host
* component, injector,
* or dispose of an application.
*/
interface ApplicationRef {
/**
* Returns the current {@link ComponentMetadata} type.
*/
hostComponentType: Type;
/**
* Returns the current {@link ComponentMetadata} instance.
*/
hostComponent: any;
/**
* Dispose (un-load) the application.
*/
dispose(): void;
/**
* Returns the root application {@link Injector}.
*/
injector: Injector;
}
/**
* Specifies app root url for the application.
*
@@ -2338,7 +2388,7 @@ declare module ng {
/**
* Returns the base URL of the currently running application.
*/
value: void;
value: any;
}
@@ -3031,9 +3081,10 @@ declare module ng {
* A reference to an Angular ProtoView.
*
* A ProtoView is a reference to a template for easy creation of views.
* (See {@link AppViewManager#createViewInContainer} and {@link AppViewManager#createRootHostView}).
* (See {@link AppViewManager#createViewInContainer `AppViewManager#createViewInContainer`} and
* {@link AppViewManager#createRootHostView `AppViewManager#createRootHostView`}).
*
* A `ProtoView` is a foctary for creating `View`s.
* A `ProtoView` is a factory for creating `View`s.
*
* ## Example
*
@@ -3303,7 +3354,7 @@ declare module ng {
*/
class InjectMetadata {
token: void;
token: any;
toString(): string;
}
@@ -3458,7 +3509,7 @@ declare module ng {
*/
class DependencyMetadata {
token: void;
token: any;
}
@@ -3544,6 +3595,52 @@ declare module ng {
class Injector {
/**
* Turns a list of binding definitions into an internal resolved list of resolved bindings.
*
* A resolution is a process of flattening multiple nested lists and converting individual
* bindings into a list of {@link ResolvedBinding}s. The resolution can be cached by `resolve`
* for the {@link Injector} for performance-sensitive code.
*
* @param `bindings` can be a list of `Type`, {@link Binding}, {@link ResolvedBinding}, or a
* recursive list of more bindings.
*
* The returned list is sparse, indexed by `id` for the {@link Key}. It is generally not useful to
* application code
* other than for passing it to {@link Injector} functions that require resolved binding lists,
* such as
* `fromResolvedBindings` and `createChildFromResolved`.
*/
static resolve(bindings: List<Type | Binding | List<any>>): List<ResolvedBinding>;
/**
* Resolves bindings and creates an injector based on those bindings. This function is slower than
* the corresponding `fromResolvedBindings` because it needs to resolve bindings first. See
* `resolve`
* for the {@link Injector}.
*
* Prefer `fromResolvedBindings` in performance-critical code that creates lots of injectors.
*
* @param `bindings` can be a list of `Type`, {@link Binding}, {@link ResolvedBinding}, or a
* recursive list of more
* bindings.
* @param `depProvider`
*/
static resolveAndCreate(bindings: List<Type | Binding | List<any>>, depProvider?: DependencyProvider): Injector;
/**
* Creates an injector from previously resolved bindings. This bypasses resolution and flattening.
* This API is the recommended way to construct injectors in performance-sensitive parts.
*
* @param `bindings` A sparse list of {@link ResolvedBinding}s. See `resolve` for the
* {@link Injector}.
* @param `depProvider`
*/
static fromResolvedBindings(bindings: List<ResolvedBinding>, depProvider?: DependencyProvider): Injector;
/**
* Returns debug information about the injector.
*
@@ -3699,7 +3796,7 @@ declare module ng {
/**
* Token used when retrieving this binding. Usually the `Type`.
*/
token: void;
token: any;
/**
@@ -3748,7 +3845,7 @@ declare module ng {
* expect(injector.get(String)).toEqual('Hello');
* ```
*/
toValue: void;
toValue: any;
/**
@@ -3784,7 +3881,7 @@ declare module ng {
* expect(injectorClass.get(Vehicle) instanceof Car).toBe(true);
* ```
*/
toAlias: void;
toAlias: any;
/**
@@ -3841,7 +3938,7 @@ declare module ng {
*/
class BindingBuilder {
token: void;
token: any;
/**
@@ -3982,6 +4079,8 @@ declare module ng {
*/
class Dependency {
static fromKey(key: Key): Dependency;
key: Key;
optional: boolean;
@@ -4019,7 +4118,19 @@ declare module ng {
* Keys are used internally by the {@link Injector} because their system-wide unique `id`s allow the
* injector to index in arrays rather than looking up items in maps.
*/
interface Key {
class Key {
/**
* Retrieves a `Key` for a token.
*/
static get(token: Object): Key;
/**
* @returns the number of keys registered in the system.
*/
static numberOfKeys: number;
token: Object;
@@ -4075,7 +4186,7 @@ declare module ng {
addKey(injector: Injector, key: Key): void;
context: void;
context: any;
toString(): string;
}
@@ -4280,7 +4391,7 @@ declare module ng {
* instead of writing:
*
* ```
* import {If, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault} from 'angular2/angular2';
* import {NgClass, NgIf, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault} from 'angular2/angular2';
* import {OtherDirective} from 'myDirectives';
*
* @Component({
@@ -4288,16 +4399,16 @@ declare module ng {
* })
* @View({
* templateUrl: 'myComponent.html',
* directives: [If, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault, OtherDirective]
* directives: [NgClass, NgIf, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault, OtherDirective]
* })
* export class MyComponent {
* ...
* }
* ```
* one could enumerate all the core directives at once:
* one could import all the core directives at once:
*
* ```
* import {coreDirectives} from 'angular2/angular2';
* import {CORE_DIRECTIVES} from 'angular2/angular2';
* import {OtherDirective} from 'myDirectives';
*
* @Component({
@@ -4305,7 +4416,7 @@ declare module ng {
* })
* @View({
* templateUrl: 'myComponent.html',
* directives: [coreDirectives, OtherDirective]
* directives: [CORE_DIRECTIVES, OtherDirective]
* })
* export class MyComponent {
* ...
@@ -4337,9 +4448,9 @@ declare module ng {
*/
class NgClass {
initialClasses: void;
initialClasses: any;
rawClass: void;
rawClass: any;
onCheck(): void;
@@ -4379,6 +4490,10 @@ declare module ng {
*/
class NgFor {
static bulkRemove(tuples: List<RecordViewTuple>, viewContainer: ViewContainerRef): List<RecordViewTuple>;
static bulkInsert(tuples: List<RecordViewTuple>, viewContainer: ViewContainerRef, templateRef: TemplateRef): List<RecordViewTuple>;
viewContainer: ViewContainerRef;
templateRef: TemplateRef;
@@ -4387,7 +4502,7 @@ declare module ng {
cdr: ChangeDetectorRef;
ngForOf: void;
ngForOf: any;
onCheck(): void;
}
@@ -4424,7 +4539,7 @@ declare module ng {
*/
class NgIf {
ngIf: void;
ngIf: any;
}
@@ -4455,20 +4570,20 @@ declare module ng {
* # Example:
*
* ```
* <div ng-style="{'text-align': alignEpr}"></div>
* <div [ng-style]="{'text-align': alignExp}"></div>
* ```
*
* In the above example the `text-align` style will be updated based on the `alignEpr` value
* In the above example the `text-align` style will be updated based on the `alignExp` value
* changes.
*
* # Syntax
*
* - `<div ng-style="{'text-align': alignEpr}"></div>`
* - `<div ng-style="styleExp"></div>`
* - `<div [ng-style]="{'text-align': alignExp}"></div>`
* - `<div [ng-style]="styleExp"></div>`
*/
class NgStyle {
rawStyle: void;
rawStyle: any;
onCheck(): void;
}
@@ -4508,7 +4623,7 @@ declare module ng {
*/
class NgSwitch {
ngSwitch: void;
ngSwitch: any;
}
@@ -4529,7 +4644,7 @@ declare module ng {
*/
class NgSwitchWhen {
ngSwitchWhen: void;
ngSwitchWhen: any;
}
@@ -4782,7 +4897,7 @@ declare module ng {
*/
class NgControlName extends NgControl {
update: void;
update: any;
model: any;
@@ -4855,7 +4970,7 @@ declare module ng {
form: Control;
update: void;
update: any;
model: any;
@@ -4893,7 +5008,7 @@ declare module ng {
*/
class NgModel extends NgControl {
update: void;
update: any;
model: any;
@@ -5055,7 +5170,7 @@ declare module ng {
directives: List<NgControl>;
ngSubmit: void;
ngSubmit: any;
onChange(_: any): void;
@@ -5119,7 +5234,7 @@ declare module ng {
form: ControlGroup;
ngSubmit: void;
ngSubmit: any;
formDirective: Form;
@@ -5175,9 +5290,9 @@ declare module ng {
cd: NgControl;
onChange: void;
onChange: any;
onTouched: void;
onTouched: any;
renderer: Renderer;
@@ -5215,9 +5330,9 @@ declare module ng {
cd: NgControl;
onChange: void;
onChange: any;
onTouched: void;
onTouched: any;
renderer: Renderer;
@@ -5267,9 +5382,9 @@ declare module ng {
value: string;
onChange: void;
onChange: any;
onTouched: void;
onTouched: any;
renderer: Renderer;
@@ -5313,6 +5428,16 @@ declare module ng {
* ```
*/
class Validators {
static required(c:Control): StringMap<string, boolean>;
static nullValidator(c: any): StringMap<string, boolean>;
static compose(validators: List<Function>): Function;
static group(c:ControlGroup): StringMap<string, boolean>;
static array(c:ControlArray): StringMap<string, boolean>;
}
class NgValidator {
@@ -5403,6 +5528,30 @@ declare module ng {
class RenderDirectiveMetadata {
static DIRECTIVE_TYPE: any;
static COMPONENT_TYPE: any;
static create({id, selector, compileChildren, events, host, properties, readAttributes, type,
callOnDestroy, callOnChange, callOnCheck, callOnInit, callOnAllChangesDone,
changeDetection, exportAs}: {
id?: string,
selector?: string,
compileChildren?: boolean,
events?: List<string>,
host?: Map<string, string>,
properties?: List<string>,
readAttributes?: List<string>,
type?: number,
callOnDestroy?: boolean,
callOnChange?: boolean,
callOnCheck?: boolean,
callOnInit?: boolean,
callOnAllChangesDone?: boolean,
changeDetection?: string,
exportAs?: string
}): RenderDirectiveMetadata;
id: any;
selector: string;
@@ -5668,8 +5817,6 @@ declare module ng {
*/
const APP_ID : OpaqueToken ;
const DOM_REFLECT_PROPERTIES_AS_ATTRIBUTES : OpaqueToken ;
/**
* Defines when a compiled template should be stored as a string
@@ -5764,8 +5911,6 @@ declare module ng {
var ComponentRef: InjectableReference;
var Key: InjectableReference;
}
declare module "angular2/angular2" {

689
angular2/router-2.0.0-alpha.36.d.ts vendored Normal file
View File

@@ -0,0 +1,689 @@
// Type definitions for Angular v2.0.0-alpha.36
// Project: http://angular.io/
// Definitions by: angular team <https://github.com/angular/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// ***********************************************************
// This file is generated by the Angular build process.
// Please do not create manual edits or send pull requests
// modifying this file.
// ***********************************************************
// angular2/router depends transitively on these libraries.
// If you don't have them installed you can install them using TSD
// https://github.com/DefinitelyTyped/tsd
///<reference path="./angular2.d.ts"/>
/**
* @module
* @description
* Maps application URLs into application states, to support deep-linking and navigation.
*/
declare module ngRouter {
/**
* # Router
* The router is responsible for mapping URLs to components.
*
* You can see the state of the router by inspecting the read-only field `router.navigating`.
* This may be useful for showing a spinner, for instance.
*
* ## Concepts
* Routers and component instances have a 1:1 correspondence.
*
* The router holds reference to a number of "outlets." An outlet is a placeholder that the
* router dynamically fills in depending on the current URL.
*
* When the router navigates from a URL, it must first recognizes it and serialize it into an
* `Instruction`.
* The router uses the `RouteRegistry` to get an `Instruction`.
*/
class Router {
navigating: boolean;
lastNavigationAttempt: string;
registry: RouteRegistry;
parent: Router;
hostComponent: any;
/**
* Constructs a child router. You probably don't need to use this unless you're writing a reusable
* component.
*/
childRouter(hostComponent: any): Router;
/**
* Register an object to notify of route changes. You probably don't need to use this unless
* you're writing a reusable component.
*/
registerOutlet(outlet: RouterOutlet): Promise<boolean>;
/**
* Dynamically update the routing configuration and trigger a navigation.
*
* # Usage
*
* ```
* router.config([
* { 'path': '/', 'component': IndexComp },
* { 'path': '/user/:id', 'component': UserComp },
* ]);
* ```
*/
config(definitions: List<RouteDefinition>): Promise<any>;
/**
* Navigate to a URL. Returns a promise that resolves when navigation is complete.
*
* If the given URL begins with a `/`, router will navigate absolutely.
* If the given URL does not begin with `/`, the router will navigate relative to this component.
*/
navigate(url: string, _skipLocationChange?: boolean): Promise<any>;
/**
* Navigate via the provided instruction. Returns a promise that resolves when navigation is
* complete.
*/
navigateInstruction(instruction: Instruction, _skipLocationChange?: boolean): Promise<any>;
/**
* Updates this router and all descendant routers according to the given instruction
*/
commit(instruction: Instruction, _skipLocationChange?: boolean): Promise<any>;
/**
* Subscribe to URL updates from the router
*/
subscribe(onNext: (value: any) => void): Object;
/**
* Removes the contents of this router's outlet and all descendant outlets
*/
deactivate(instruction: Instruction): Promise<any>;
/**
* Given a URL, returns an instruction representing the component graph
*/
recognize(url: string): Promise<Instruction>;
/**
* Navigates to either the last URL successfully navigated to, or the last URL requested if the
* router has yet to successfully navigate.
*/
renavigate(): Promise<any>;
/**
* Generate a URL from a component name and optional map of parameters. The URL is relative to the
* app's base href.
*/
generate(linkParams: List<any>): Instruction;
}
class RootRouter extends Router {
commit(instruction: Instruction, _skipLocationChange?: boolean): Promise<any>;
}
/**
* A router outlet is a placeholder that Angular dynamically fills based on the application's route.
*
* ## Use
*
* ```
* <router-outlet></router-outlet>
* ```
*/
class RouterOutlet {
childRouter: Router;
name: string;
/**
* Given an instruction, update the contents of this outlet.
*/
commit(instruction: Instruction): Promise<any>;
/**
* Called by Router during recognition phase
*/
canDeactivate(nextInstruction: Instruction): Promise<boolean>;
/**
* Called by Router during recognition phase
*/
canReuse(nextInstruction: Instruction): Promise<boolean>;
deactivate(nextInstruction: Instruction): Promise<any>;
}
/**
* The RouterLink directive lets you link to specific parts of your app.
*
* Consider the following route configuration:
*
* ```
* @RouteConfig([
* { path: '/user', component: UserCmp, as: 'user' }
* ]);
* class MyComp {}
* ```
*
* When linking to this `user` route, you can write:
*
* ```
* <a [router-link]="['./user']">link to user component</a>
* ```
*
* RouterLink expects the value to be an array of route names, followed by the params
* for that level of routing. For instance `['/team', {teamId: 1}, 'user', {userId: 2}]`
* means that we want to generate a link for the `team` route with params `{teamId: 1}`,
* and with a child route `user` with params `{userId: 2}`.
*
* The first route name should be prepended with `/`, `./`, or `../`.
* If the route begins with `/`, the router will look up the route from the root of the app.
* If the route begins with `./`, the router will instead look in the current component's
* children for the route. And if the route begins with `../`, the router will look at the
* current component's parent.
*/
class RouterLink {
visibleHref: string;
routeParams: any;
onClick(): boolean;
}
class RouteParams {
params: StringMap<string, string>;
get(param: string): string;
}
/**
* The RouteRegistry holds route configurations for each component in an Angular app.
* It is responsible for creating Instructions from URLs, and generating URLs based on route and
* parameters.
*/
class RouteRegistry {
/**
* Given a component and a configuration object, add the route to this registry
*/
config(parentComponent: any, config: RouteDefinition): void;
/**
* Reads the annotations of a component and configures the registry based on them
*/
configFromComponent(component: any): void;
/**
* Given a URL and a parent component, return the most specific instruction for navigating
* the application into the state specified by the url
*/
recognize(url: string, parentComponent: any): Promise<Instruction>;
/**
* Given a normalized list with component names and params like: `['user', {id: 3 }]`
* generates a url with a leading slash relative to the provided `parentComponent`.
*/
generate(linkParams: List<any>, parentComponent: any): Instruction;
}
class LocationStrategy {
path(): string;
pushState(ctx: any, title: string, url: string): void;
forward(): void;
back(): void;
onPopState(fn: (_: any) => any): void;
getBaseHref(): string;
}
class HashLocationStrategy extends LocationStrategy {
onPopState(fn: EventListener): void;
getBaseHref(): string;
path(): string;
pushState(state: any, title: string, url: string): void;
forward(): void;
back(): void;
}
class PathLocationStrategy extends LocationStrategy {
onPopState(fn: EventListener): void;
getBaseHref(): string;
path(): string;
pushState(state: any, title: string, url: string): void;
forward(): void;
back(): void;
}
/**
* This is the service that an application developer will directly interact with.
*
* Responsible for normalizing the URL against the application's base href.
* A normalized URL is absolute from the URL host, includes the application's base href, and has no
* trailing slash:
* - `/my/app/user/123` is normalized
* - `my/app/user/123` **is not** normalized
* - `/my/app/user/123/` **is not** normalized
*/
class Location {
path(): string;
normalize(url: string): string;
normalizeAbsolutely(url: string): string;
go(url: string): void;
forward(): void;
back(): void;
subscribe(onNext: (value: any) => void, onThrow?: (exception: any) => void, onReturn?: () => void): void;
}
const APP_BASE_HREF : OpaqueToken ;
/**
* Responsible for performing each step of navigation.
* "Steps" are conceptually similar to "middleware"
*/
class Pipeline {
steps: List<Function>;
process(instruction: Instruction): Promise<any>;
}
/**
* Defines route lifecycle method [onActivate], which is called by the router at the end of a
* successful route navigation.
*
* For a single component's navigation, only one of either [onActivate] or [onReuse] will be called,
* depending on the result of [canReuse].
*
* If `onActivate` returns a promise, the route change will wait until the promise settles to
* instantiate and activate child components.
*
* ## Example
* ```
* @Directive({
* selector: 'my-cmp'
* })
* class MyCmp implements OnActivate {
* onActivate(next, prev) {
* this.log = 'Finished navigating from ' + prev.urlPath + ' to ' + next.urlPath;
* }
* }
* ```
*/
interface OnActivate {
onActivate(nextInstruction: ComponentInstruction, prevInstruction: ComponentInstruction): any;
}
/**
* Defines route lifecycle method [onDeactivate], which is called by the router before destroying
* a component as part of a route change.
*
* If `onDeactivate` returns a promise, the route change will wait until the promise settles.
*
* ## Example
* ```
* @Directive({
* selector: 'my-cmp'
* })
* class MyCmp implements CanReuse, OnReuse {
* canReuse() {
* return true;
* }
*
* onReuse(next, prev) {
* this.params = next.params;
* }
* }
* ```
*/
interface OnDeactivate {
onDeactivate(nextInstruction: ComponentInstruction, prevInstruction: ComponentInstruction): any;
}
/**
* Defines route lifecycle method [onReuse], which is called by the router at the end of a
* successful route navigation when [canReuse] is implemented and returns or resolves to true.
*
* For a single component's navigation, only one of either [onActivate] or [onReuse] will be called,
* depending on the result of [canReuse].
*
* ## Example
* ```
* @Directive({
* selector: 'my-cmp'
* })
* class MyCmp implements CanReuse, OnReuse {
* canReuse() {
* return true;
* }
*
* onReuse(next, prev) {
* this.params = next.params;
* }
* }
* ```
*/
interface OnReuse {
onReuse(nextInstruction: ComponentInstruction, prevInstruction: ComponentInstruction): any;
}
/**
* Defines route lifecycle method [canDeactivate], which is called by the router to determine
* if a component can be removed as part of a navigation.
*
* If `canDeactivate` returns or resolves to `false`, the navigation is cancelled.
*
* If `canDeactivate` throws or rejects, the navigation is also cancelled.
*
* ## Example
* ```
* @Directive({
* selector: 'my-cmp'
* })
* class MyCmp implements CanDeactivate {
* canDeactivate(next, prev) {
* return askUserIfTheyAreSureTheyWantToQuit();
* }
* }
* ```
*/
interface CanDeactivate {
canDeactivate(nextInstruction: ComponentInstruction, prevInstruction: ComponentInstruction): any;
}
/**
* Defines route lifecycle method [canReuse], which is called by the router to determine whether a
* component should be reused across routes, or whether to destroy and instantiate a new component.
*
* If `canReuse` returns or resolves to `true`, the component instance will be reused.
*
* If `canReuse` throws or rejects, the navigation will be cancelled.
*
* ## Example
* ```
* @Directive({
* selector: 'my-cmp'
* })
* class MyCmp implements CanReuse, OnReuse {
* canReuse(next, prev) {
* return next.params.id == prev.params.id;
* }
*
* onReuse(next, prev) {
* this.id = next.params.id;
* }
* }
* ```
*/
interface CanReuse {
canReuse(nextInstruction: ComponentInstruction, prevInstruction: ComponentInstruction): any;
}
/**
* Defines route lifecycle method [canActivate], which is called by the router to determine
* if a component can be instantiated as part of a navigation.
*
* Note that unlike other lifecycle hooks, this one uses an annotation rather than an interface.
* This is because [canActivate] is called before the component is instantiated.
*
* If `canActivate` returns or resolves to `false`, the navigation is cancelled.
*
* If `canActivate` throws or rejects, the navigation is also cancelled.
*
* ## Example
* ```
* @Directive({
* selector: 'control-panel-cmp'
* })
* @CanActivate(() => checkIfUserIsLoggedIn())
* class ControlPanelCmp {
* // ...
* }
* ```
*/
var CanActivate : (hook: (next: ComponentInstruction, prev: ComponentInstruction) => Promise<boolean>| boolean) =>
ClassDecorator ;
/**
* `Instruction` is a tree of `ComponentInstructions`, with all the information needed
* to transition each component in the app to a given route, including all auxiliary routes.
*
* This is a public API.
*/
class Instruction {
component: ComponentInstruction;
child: Instruction;
auxInstruction: StringMap<string, Instruction>;
replaceChild(child: Instruction): Instruction;
}
/**
* A `ComponentInstruction` represents the route state for a single component. An `Instruction` is
* composed of a tree of these `ComponentInstruction`s.
*
* `ComponentInstructions` is a public API. Instances of `ComponentInstruction` are passed
* to route lifecycle hooks, like {@link CanActivate}.
*/
class ComponentInstruction {
reuse: boolean;
urlPath: string;
urlParams: List<string>;
params: StringMap<string, any>;
componentType: any;
resolveComponentType(): Promise<Type>;
specificity: any;
terminal: any;
routeData(): Object;
}
class Url {
path: string;
child: Url;
auxiliary: List<Url>;
params: StringMap<string, any>;
toString(): string;
segmentToString(): string;
}
class OpaqueToken {
toString(): string;
}
/**
* Runtime representation of a type.
*
* In JavaScript a Type is a constructor function.
*/
interface Type extends Function {
new(args: any): any;
}
const ROUTE_DATA : OpaqueToken ;
const ROUTER_DIRECTIVES : List<any> ;
const ROUTER_BINDINGS : List<any> ;
class Route implements RouteDefinition {
data: any;
path: string;
component: Type;
as: string;
loader: Function;
redirectTo: string;
}
class Redirect implements RouteDefinition {
path: string;
redirectTo: string;
as: string;
loader: Function;
data: any;
}
class AuxRoute implements RouteDefinition {
data: any;
path: string;
component: Type;
as: string;
loader: Function;
redirectTo: string;
}
class AsyncRoute implements RouteDefinition {
data: any;
path: string;
loader: Function;
as: string;
}
interface RouteDefinition {
path: string;
component?: Type | ComponentDefinition;
loader?: Function;
redirectTo?: string;
as?: string;
data?: any;
}
var RouteConfig : (configs: List<RouteDefinition>) => ClassDecorator ;
interface ComponentDefinition {
type: string;
loader?: Function;
component?: Type;
}
}
declare module "angular2/router" {
export = ngRouter;
}

22
angular2/router.d.ts vendored
View File

@@ -1,4 +1,4 @@
// Type definitions for Angular v2.0.0-alpha.35
// Type definitions for Angular v2.0.0-alpha.36
// Project: http://angular.io/
// Definitions by: angular team <https://github.com/angular/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -109,7 +109,7 @@ declare module ngRouter {
/**
* Subscribe to URL updates from the router
*/
subscribe(onNext: (value: any) => void): void;
subscribe(onNext: (value: any) => void): Object;
/**
@@ -214,7 +214,7 @@ declare module ngRouter {
visibleHref: string;
routeParams: void;
routeParams: any;
onClick(): boolean;
}
@@ -291,7 +291,7 @@ declare module ngRouter {
back(): void;
}
class HTML5LocationStrategy extends LocationStrategy {
class PathLocationStrategy extends LocationStrategy {
onPopState(fn: EventListener): void;
@@ -551,13 +551,13 @@ declare module ngRouter {
params: StringMap<string, any>;
componentType: void;
componentType: any;
resolveComponentType(): Promise<Type>;
specificity: void;
specificity: any;
terminal: void;
terminal: any;
routeData(): Object;
}
@@ -594,9 +594,11 @@ declare module ngRouter {
}
const routerDirectives : List<any> ;
const ROUTE_DATA : OpaqueToken ;
var routerInjectables : List<any> ;
const ROUTER_DIRECTIVES : List<any> ;
const ROUTER_BINDINGS : List<any> ;
class Route implements RouteDefinition {
@@ -667,8 +669,6 @@ declare module ngRouter {
data?: any;
}
const ROUTE_DATA : OpaqueToken ;
var RouteConfig : (configs: List<RouteDefinition>) => ClassDecorator ;
interface ComponentDefinition {

View File

@@ -1452,6 +1452,14 @@ declare module angular {
interceptors: any[];
useApplyAsync(): boolean;
useApplyAsync(value: boolean): IHttpProvider;
/**
*
* @param {boolean=} value If true, `$http` will return a normal promise without the `success` and `error` methods.
* @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.
* otherwise, returns the current configured value.
*/
useLegacyPromiseExtensions(value:boolean) : boolean | IHttpProvider;
}
///////////////////////////////////////////////////////////////////////////

View File

@@ -1,4 +1,4 @@
/// <reference path="bluebird.d.ts" />
///<reference path="bluebird.d.ts"/>
// Tests by: Bart van der Schoor <https://github.com/Bartvds>
@@ -369,12 +369,12 @@ fooProm = fooProm.timeout(num, str);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
fooProm.nodeify();
fooProm = fooProm.nodeify((err: any) => {
fooProm = fooProm.nodeify((err: any) => { });
fooProm = fooProm.nodeify((err: any, foo?: Foo) => { });
});
fooProm = fooProm.nodeify((err: any, foo?: Foo) => {
});
fooProm.nodeify({ spread: true });
fooProm = fooProm.nodeify((err: any) => { }, { spread: true });
fooProm = fooProm.nodeify((err: any, foo?: Foo) => { }, { spread: true });
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -508,6 +508,17 @@ barArrProm = fooProm.map<Foo, Bar>((item: Foo) => {
return bar;
});
barArrProm = fooProm.map<Foo, Bar>((item: Foo, index: number, arrayLength: number) => {
return bar;
}, {
concurrency: 1
});
barArrProm = fooProm.map<Foo, Bar>((item: Foo) => {
return bar;
}, {
concurrency: 1
});
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
barProm = fooProm.reduce<Foo, Bar>((memo: Bar, item: Foo, index: number, arrayLength: number) => {
@@ -526,6 +537,17 @@ fooArrProm = fooArrProm.filter<Foo>((item: Foo) => {
return bool;
});
fooArrProm = fooArrProm.filter<Foo>((item: Foo, index: number, arrayLength: number) => {
return bool;
}, {
concurrency: 1
});
fooArrProm = fooArrProm.filter<Foo>((item: Foo) => {
return bool;
}, {
concurrency: 1
});
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -617,13 +639,42 @@ voidProm = Promise.delay(num);
func = Promise.promisify(f);
func = Promise.promisify(f, obj);
;
obj = Promise.promisifyAll(obj);
anyProm = Promise.fromNode(callback => nodeCallbackFunc(callback));
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
declare var util: any;
function defaultFilter(name: string, func: Function) {
return util.isIdentifier(name) &&
name.charAt(0) !== "_" &&
!util.isClass(func);
}
function DOMPromisifier(originalMethod: Function) {
// return a function
return function promisified() {
var args = [].slice.call(arguments);
// Needed so that the original method can be called with the correct receiver
var self = this;
// which returns a promise
return new Promise(function(resolve, reject) {
args.push(resolve, reject);
originalMethod.apply(self, args);
});
};
}
obj = Promise.promisifyAll(obj, {
suffix: "",
filter: defaultFilter,
promisifier: DOMPromisifier
});
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//TODO enable generator
/*
func = Promise.coroutine(f);
@@ -709,6 +760,26 @@ barArrProm = Promise.map(fooThenArrThen, (item: Foo, index: number, arrayLength:
return barThen;
});
barArrProm = Promise.map(fooThenArrThen, (item: Foo) => {
return bar;
}, {
concurrency: 1
});
barArrProm = Promise.map(fooThenArrThen, (item: Foo) => {
return barThen;
}, {
concurrency: 1
});
barArrProm = Promise.map(fooThenArrThen, (item: Foo, index: number, arrayLength: number) => {
return bar;
}, {
concurrency: 1
});
barArrProm = Promise.map(fooThenArrThen, (item: Foo, index: number, arrayLength: number) => {
return barThen;
}, {
concurrency: 1
});
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// fooArrThen
@@ -726,6 +797,27 @@ barArrProm = Promise.map(fooArrThen, (item: Foo, index: number, arrayLength: num
return barThen;
});
barArrProm = Promise.map(fooArrThen, (item: Foo) => {
return bar;
}, {
concurrency: 1
});
barArrProm = Promise.map(fooArrThen, (item: Foo) => {
return barThen;
}, {
concurrency: 1
});
barArrProm = Promise.map(fooArrThen, (item: Foo, index: number, arrayLength: number) => {
return bar;
}, {
concurrency: 1
});
barArrProm = Promise.map(fooArrThen, (item: Foo, index: number, arrayLength: number) => {
return barThen;
}, {
concurrency: 1
});
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// fooThenArr
@@ -743,6 +835,27 @@ barArrProm = Promise.map(fooThenArr, (item: Foo, index: number, arrayLength: num
return barThen;
});
barArrProm = Promise.map(fooThenArr, (item: Foo) => {
return bar;
}, {
concurrency: 1
});
barArrProm = Promise.map(fooThenArr, (item: Foo) => {
return barThen;
}, {
concurrency: 1
});
barArrProm = Promise.map(fooThenArr, (item: Foo, index: number, arrayLength: number) => {
return bar;
}, {
concurrency: 1
});
barArrProm = Promise.map(fooThenArr, (item: Foo, index: number, arrayLength: number) => {
return barThen;
}, {
concurrency: 1
});
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// fooArr
@@ -760,6 +873,27 @@ barArrProm = Promise.map(fooArr, (item: Foo, index: number, arrayLength: number)
return barThen;
});
barArrProm = Promise.map(fooArr, (item: Foo) => {
return bar;
}, {
concurrency: 1
});
barArrProm = Promise.map(fooArr, (item: Foo) => {
return barThen;
}, {
concurrency: 1
});
barArrProm = Promise.map(fooArr, (item: Foo, index: number, arrayLength: number) => {
return bar;
}, {
concurrency: 1
});
barArrProm = Promise.map(fooArr, (item: Foo, index: number, arrayLength: number) => {
return barThen;
}, {
concurrency: 1
});
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// reduce()
@@ -853,6 +987,27 @@ fooArrProm = Promise.filter(fooThenArrThen, (item: Foo, index: number, arrayLeng
return boolThen;
});
fooArrProm = Promise.filter(fooThenArrThen, (item: Foo) => {
return bool;
}, {
concurrency: 1
});
fooArrProm = Promise.filter(fooThenArrThen, (item: Foo) => {
return boolThen;
}, {
concurrency: 1
});
fooArrProm = Promise.filter(fooThenArrThen, (item: Foo, index: number, arrayLength: number) => {
return bool;
}, {
concurrency: 1
});
fooArrProm = Promise.filter(fooThenArrThen, (item: Foo, index: number, arrayLength: number) => {
return boolThen;
}, {
concurrency: 1
});
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// fooArrThen
@@ -870,6 +1025,27 @@ fooArrProm = Promise.filter(fooArrThen, (item: Foo, index: number, arrayLength:
return boolThen;
});
fooArrProm = Promise.filter(fooArrThen, (item: Foo) => {
return bool;
}, {
concurrency: 1
});
fooArrProm = Promise.filter(fooArrThen, (item: Foo) => {
return boolThen;
}, {
concurrency: 1
});
fooArrProm = Promise.filter(fooArrThen, (item: Foo, index: number, arrayLength: number) => {
return bool;
}, {
concurrency: 1
});
fooArrProm = Promise.filter(fooArrThen, (item: Foo, index: number, arrayLength: number) => {
return boolThen;
}, {
concurrency: 1
});
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// fooThenArr
@@ -887,6 +1063,27 @@ fooArrProm = Promise.filter(fooThenArr, (item: Foo, index: number, arrayLength:
return boolThen;
});
fooArrProm = Promise.filter(fooThenArr, (item: Foo) => {
return bool;
}, {
concurrency: 1
});
fooArrProm = Promise.filter(fooThenArr, (item: Foo) => {
return boolThen;
}, {
concurrency: 1
});
fooArrProm = Promise.filter(fooThenArr, (item: Foo, index: number, arrayLength: number) => {
return bool;
}, {
concurrency: 1
});
fooArrProm = Promise.filter(fooThenArr, (item: Foo, index: number, arrayLength: number) => {
return boolThen;
}, {
concurrency: 1
});
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// fooArr
@@ -904,4 +1101,25 @@ fooArrProm = Promise.filter(fooArr, (item: Foo, index: number, arrayLength: numb
return boolThen;
});
fooArrProm = Promise.filter(fooArr, (item: Foo) => {
return bool;
}, {
concurrency: 1
});
fooArrProm = Promise.filter(fooArr, (item: Foo) => {
return boolThen;
}, {
concurrency: 1
});
fooArrProm = Promise.filter(fooArr, (item: Foo, index: number, arrayLength: number) => {
return bool;
}, {
concurrency: 1
});
fooArrProm = Promise.filter(fooArr, (item: Foo, index: number, arrayLength: number) => {
return boolThen;
}, {
concurrency: 1
});
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@@ -115,7 +115,7 @@ declare class Promise<R> implements Promise.Thenable<R>, Promise.Inspection<R> {
* Register a node-style callback on this promise. When this promise is is either fulfilled or rejected, the node callback will be called back with the node.js convention where error reason is the first argument and success value is the second argument. The error argument will be `null` in case of success.
* Returns back this promise instead of creating a new one. If the `callback` argument is not a function, this method does not do anything.
*/
nodeify(callback: (err: any, value?: R) => void): Promise<R>;
nodeify(callback: (err: any, value?: R) => void, options?: Promise.SpreadOption): Promise<R>;
nodeify(...sink: any[]): void;
/**
@@ -311,8 +311,8 @@ declare class Promise<R> implements Promise.Thenable<R>, Promise.Inspection<R> {
* Same as calling `Promise.map(thisPromise, mapper)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
*/
// TODO type inference from array-resolving promise?
map<Q, U>(mapper: (item: Q, index: number, arrayLength: number) => Promise.Thenable<U>): Promise<U[]>;
map<Q, U>(mapper: (item: Q, index: number, arrayLength: number) => U): Promise<U[]>;
map<Q, U>(mapper: (item: Q, index: number, arrayLength: number) => Promise.Thenable<U>, options?: Promise.ConcurrencyOption): Promise<U[]>;
map<Q, U>(mapper: (item: Q, index: number, arrayLength: number) => U, options?: Promise.ConcurrencyOption): Promise<U[]>;
/**
* Same as calling `Promise.reduce(thisPromise, Function reducer, initialValue)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
@@ -325,8 +325,8 @@ declare class Promise<R> implements Promise.Thenable<R>, Promise.Inspection<R> {
* Same as calling ``Promise.filter(thisPromise, filterer)``. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
*/
// TODO type inference from array-resolving promise?
filter<U>(filterer: (item: U, index: number, arrayLength: number) => Promise.Thenable<boolean>): Promise<U[]>;
filter<U>(filterer: (item: U, index: number, arrayLength: number) => boolean): Promise<U[]>;
filter<U>(filterer: (item: U, index: number, arrayLength: number) => Promise.Thenable<boolean>, options?: Promise.ConcurrencyOption): Promise<U[]>;
filter<U>(filterer: (item: U, index: number, arrayLength: number) => boolean, options?: Promise.ConcurrencyOption): Promise<U[]>;
/**
* Start the chain of promises with `Promise.try`. Any synchronous exceptions will be turned into rejections on the returned promise.
@@ -415,7 +415,7 @@ declare class Promise<R> implements Promise.Thenable<R>, Promise.Inspection<R> {
* Note that the original methods on the object are not overwritten but new methods are created with the `Async`-postfix. For example, if you `promisifyAll()` the node.js `fs` object use `fs.statAsync()` to call the promisified `stat` method.
*/
// TODO how to model promisifyAll?
static promisifyAll(target: Object, options?: Object): Object;
static promisifyAll(target: Object, options?: Promise.PromisifyAllOptions): Object;
/**
@@ -547,20 +547,20 @@ declare class Promise<R> implements Promise.Thenable<R>, Promise.Inspection<R> {
* *The original array is not modified.*
*/
// promise of array with promises of value
static map<R, U>(values: Promise.Thenable<Promise.Thenable<R>[]>, mapper: (item: R, index: number, arrayLength: number) => Promise.Thenable<U>): Promise<U[]>;
static map<R, U>(values: Promise.Thenable<Promise.Thenable<R>[]>, mapper: (item: R, index: number, arrayLength: number) => U): Promise<U[]>;
static map<R, U>(values: Promise.Thenable<Promise.Thenable<R>[]>, mapper: (item: R, index: number, arrayLength: number) => Promise.Thenable<U>, options?: Promise.ConcurrencyOption): Promise<U[]>;
static map<R, U>(values: Promise.Thenable<Promise.Thenable<R>[]>, mapper: (item: R, index: number, arrayLength: number) => U, options?: Promise.ConcurrencyOption): Promise<U[]>;
// promise of array with values
static map<R, U>(values: Promise.Thenable<R[]>, mapper: (item: R, index: number, arrayLength: number) => Promise.Thenable<U>): Promise<U[]>;
static map<R, U>(values: Promise.Thenable<R[]>, mapper: (item: R, index: number, arrayLength: number) => U): Promise<U[]>;
static map<R, U>(values: Promise.Thenable<R[]>, mapper: (item: R, index: number, arrayLength: number) => Promise.Thenable<U>, options?: Promise.ConcurrencyOption): Promise<U[]>;
static map<R, U>(values: Promise.Thenable<R[]>, mapper: (item: R, index: number, arrayLength: number) => U, options?: Promise.ConcurrencyOption): Promise<U[]>;
// array with promises of value
static map<R, U>(values: Promise.Thenable<R>[], mapper: (item: R, index: number, arrayLength: number) => Promise.Thenable<U>): Promise<U[]>;
static map<R, U>(values: Promise.Thenable<R>[], mapper: (item: R, index: number, arrayLength: number) => U): Promise<U[]>;
static map<R, U>(values: Promise.Thenable<R>[], mapper: (item: R, index: number, arrayLength: number) => Promise.Thenable<U>, options?: Promise.ConcurrencyOption): Promise<U[]>;
static map<R, U>(values: Promise.Thenable<R>[], mapper: (item: R, index: number, arrayLength: number) => U, options?: Promise.ConcurrencyOption): Promise<U[]>;
// array with values
static map<R, U>(values: R[], mapper: (item: R, index: number, arrayLength: number) => Promise.Thenable<U>): Promise<U[]>;
static map<R, U>(values: R[], mapper: (item: R, index: number, arrayLength: number) => U): Promise<U[]>;
static map<R, U>(values: R[], mapper: (item: R, index: number, arrayLength: number) => Promise.Thenable<U>, options?: Promise.ConcurrencyOption): Promise<U[]>;
static map<R, U>(values: R[], mapper: (item: R, index: number, arrayLength: number) => U, options?: Promise.ConcurrencyOption): Promise<U[]>;
/**
* Reduce an array, or a promise of an array, which contains a promises (or a mix of promises and values) with the given `reducer` function with the signature `(total, current, index, arrayLength)` where `item` is the resolved value of a respective promise in the input array. If any promise in the input array is rejected the returned promise is rejected as well.
@@ -593,20 +593,20 @@ declare class Promise<R> implements Promise.Thenable<R>, Promise.Inspection<R> {
* *The original array is not modified.
*/
// promise of array with promises of value
static filter<R>(values: Promise.Thenable<Promise.Thenable<R>[]>, filterer: (item: R, index: number, arrayLength: number) => Promise.Thenable<boolean>): Promise<R[]>;
static filter<R>(values: Promise.Thenable<Promise.Thenable<R>[]>, filterer: (item: R, index: number, arrayLength: number) => boolean): Promise<R[]>;
static filter<R>(values: Promise.Thenable<Promise.Thenable<R>[]>, filterer: (item: R, index: number, arrayLength: number) => Promise.Thenable<boolean>, option?: Promise.ConcurrencyOption): Promise<R[]>;
static filter<R>(values: Promise.Thenable<Promise.Thenable<R>[]>, filterer: (item: R, index: number, arrayLength: number) => boolean, option?: Promise.ConcurrencyOption): Promise<R[]>;
// promise of array with values
static filter<R>(values: Promise.Thenable<R[]>, filterer: (item: R, index: number, arrayLength: number) => Promise.Thenable<boolean>): Promise<R[]>;
static filter<R>(values: Promise.Thenable<R[]>, filterer: (item: R, index: number, arrayLength: number) => boolean): Promise<R[]>;
static filter<R>(values: Promise.Thenable<R[]>, filterer: (item: R, index: number, arrayLength: number) => Promise.Thenable<boolean>, option?: Promise.ConcurrencyOption): Promise<R[]>;
static filter<R>(values: Promise.Thenable<R[]>, filterer: (item: R, index: number, arrayLength: number) => boolean, option?: Promise.ConcurrencyOption): Promise<R[]>;
// array with promises of value
static filter<R>(values: Promise.Thenable<R>[], filterer: (item: R, index: number, arrayLength: number) => Promise.Thenable<boolean>): Promise<R[]>;
static filter<R>(values: Promise.Thenable<R>[], filterer: (item: R, index: number, arrayLength: number) => boolean): Promise<R[]>;
static filter<R>(values: Promise.Thenable<R>[], filterer: (item: R, index: number, arrayLength: number) => Promise.Thenable<boolean>, option?: Promise.ConcurrencyOption): Promise<R[]>;
static filter<R>(values: Promise.Thenable<R>[], filterer: (item: R, index: number, arrayLength: number) => boolean, option?: Promise.ConcurrencyOption): Promise<R[]>;
// array with values
static filter<R>(values: R[], filterer: (item: R, index: number, arrayLength: number) => Promise.Thenable<boolean>): Promise<R[]>;
static filter<R>(values: R[], filterer: (item: R, index: number, arrayLength: number) => boolean): Promise<R[]>;
static filter<R>(values: R[], filterer: (item: R, index: number, arrayLength: number) => Promise.Thenable<boolean>, option?: Promise.ConcurrencyOption): Promise<R[]>;
static filter<R>(values: R[], filterer: (item: R, index: number, arrayLength: number) => boolean, option?: Promise.ConcurrencyOption): Promise<R[]>;
}
declare module Promise {
@@ -623,6 +623,19 @@ declare module Promise {
export interface OperationalError extends Error {
}
export interface ConcurrencyOption {
concurrency: number;
}
export interface SpreadOption {
spread: boolean;
}
export interface PromisifyAllOptions {
suffix?: string;
filter?: (name: string, func: Function, target?: any, passesDefaultFilter?: boolean) => boolean;
// The promisifier gets a reference to the original method and should return a function which returns a promise
promisifier?: (originalMethod: Function) => () => Thenable<any> ;
}
// Ideally, we'd define e.g. "export class RangeError extends Error {}",
// but as Error is defined as an interface (not a class), TypeScript doesn't
// allow extending Error, only implementing it.

2
bowser/bowser.d.ts vendored
View File

@@ -42,7 +42,7 @@ declare module BowserModule {
/** Grade X browser */
x: boolean;
name: string;
version: string;
version: string|number;
osversion: string|number;
}

View File

@@ -40,7 +40,9 @@ var options:bunyan.LoggerOptions = {
type: 'rotating-file',
path: '/tmp/test2.log',
level: bunyan.INFO,
closeOnExit: false
closeOnExit: false,
period: '1d',
count: 3
}, {
type: 'raw',
stream: process.stderr,

2
bunyan/bunyan.d.ts vendored
View File

@@ -65,6 +65,8 @@ declare module "bunyan" {
path?: string;
stream?: NodeJS.WritableStream | Stream;
closeOnExit?: boolean;
period?: string;
count?: number;
}
export var stdSerializers:Serializers;

View File

@@ -1,65 +1,294 @@
/// <reference path="cheerio.d.ts" />
import cheerio = require("cheerio");
import cheerio from 'cheerio';
var $ = cheerio.load("<html></html>");
var $el = $('selector');
var $multiEl = $('seletor', 'selector', 'selector');
/*
* LOADING
*/
let html =
`<ul id="fruits">
<li class="orange">Apple</li>
<li class="class">Orange</li>
<li class="pear">Pear</li>
<input type="text" />
</ul>`;
$el.addClass("class").addClass("test");
$el.hasClass("test");
$el.removeClass("class").removeClass("test");
// Preferred Method
var $ = cheerio.load(html);
// Directly load element
cheerio(html);
cheerio('ul', html);
cheerio('li', 'ul', html);
$el.attr('class');
$el.attr('class', 'test');
$el.removeAttr("class").removeAttr("test");
$el.find("ul").find("> li");
$el.parent().parent();
$el.next().next();
$el.prev().prev();
$el.siblings().siblings();
$el.children().children();
$el.children("li").children("a");
$el.children().each((index, element) => {
return $(element).find('t');
$ = cheerio.load(html, {
normalizeWhitespace: true,
xmlMode: true
});
$el.children().map((index, element) => {
return $(element).find('t');
$ = cheerio.load(html, {
normalizeWhitespace: true,
xmlMode: true,
decodeEntities: true,
lowercaseTags: true,
lowerCaseAttributeNames: true,
recognizeCDATA: true,
recognizeSelfClosing: true
});
$el.children().filter((index) => {
return $el.children().eq(index).find('t').length >= 0;
});
/**
* Selectors
*/
var $el = $('.class');
var $multiEl = $('selector', 'selector', 'selector');
$el.filter('span').filter('li');
/**
* Attributes
*/
$el.first().last().find('t');
$('div').eq(0).find('b');
$('#id').append("test html", "other html").find('a');
$('#id').prepend("test html", "other html").find('a');
$('#id').after("test html", "other html").find('a');
$('#id').before("test html", "other html").find('a');
$el.remove('div').remove('a');
$('#id').replaceWith('some html').parent();
$('#id').empty().parent();
$el.html();
$el.html("<html></html>").find('div');
$el.text();
$el.text('some text');
$el.toArray();
$el.clone().find('a').parent();
$.root().find('a');
// attr
$el.attr('id');
$el.attr('id', 'favorite').html();
// data
$el.data();
$el.data('apple-color');
$el.data('kind', 'mac');
// val
$('input[type="text"]').val();
$('input[type="text"]').val('test').html();
// removeAttr
$el.removeAttr('class').html();
// hasClass, addClass, removeClass, toggleClass
$el.addClass('class').addClass('test');
$el.hasClass('test');
$el.removeClass('class').removeClass('test');
$el.addClass('red').removeClass().html();
$el.toggleClass('fruit green red').html();
// is
$el.is('#id');
$el.is($el);
$el.is(() => {
return true;
});
/**
* Forms
*/
// serializeArray
$('<form><input name="foo" value="bar" /></form>').serializeArray();
/**
* Traversing
*/
// find
$el.find('li').length;
$el.find($('.apple')).length;
// .parent([selector])
$el.parent().attr('id');
$el.parent('.class').attr('id');
// .parents([selector])
$el.parents().length;
$el.parents('.class').length;
// .parentsUntil([selector][,filter])
$el.parentsUntil().length;
$el.parentsUntil('.class').length;
// .closest(selector)
$el.closest();
$el.closest('.class');
// .next([selector])
$el.next().hasClass('class');
$el.next('.class').hasClass('class');
// .nextAll([selector])
$el.nextAll().length;
$el.nextAll('.class').length;
// .nextUntil([selector], [filter])
$el.nextUntil();
$el.nextUntil('.class');
// .prev([selector])
$el.prev().hasClass('class');
$el.prev('.class').hasClass('class');
// .prevAll([selector])
$el.prevAll().length;
$el.prevAll('.class').length;
// .prevUntil([selector], [filter])
$el.prevUntil();
$el.prevUntil('.class');
// .slice( start, [end] )
$el.slice(1).eq(0).text();
$el.slice(1, 2).length;
// .siblings([selector])
$el.siblings().length;
$el.siblings('.class').length;
// .children([selector])
$el.children().length;
$el.children('.class').text();
// .contents()
$el.contents().length;
// .each( function(index, element) )
$el.each((i, el) => {
$(el).html();
});
// .map( function(index, element) )
$el.map((i, el) => {
return $(el).text();
}).get().join(' ');
// .filter
$ = cheerio.load(html);
$el.filter('.class').attr('class');
$el.filter($('.class')).attr('class');
$el.filter($('.class')[0]).attr('class');
$el.filter((i, el) => {
return $(el).attr('class') === 'class';
}).attr('class');
// .not
$el.not('.class').length;
$el.not($('.class')).length;
$el.not($('.class')[0]).length;
$el.not((i, el) => {
return $(el).attr('class') === 'class';
}).length;
// .has
$el.has('.class').attr('id');
$el.has($el[0]).attr('id');
// .first()
$el.children().first().text();
// .last()
$el.children().last().text();
// .eq( i )
$el.eq(0).text();
$el.eq(-1).text();
// .get( [i] )
$el.get(0).tagName;
$el.get().length;
// .index()
// .index( selector )
// .index( nodeOrSelection )
$el.index();
$el.index('li');
$el.index($('#fruit, li'));
// .end()
$el.eq(0).end().length;
// .add
$el.add('.class').length
// .addBack( [filter] )
$el.eq(0).addBack().length
$el.eq(0).addBack('.class').length
/**
* Manipulation
*/
// .append( content, [content, ...] )
$el.append('<li class="plum">Plum</li>').html();
$el.append('<li class="plum">Plum</li>', '<li class="plum">Plum</li>').html();
// .prepend( content, [content, ...] )
$el.prepend('<li class="plum">Plum</li>').html();
$el.prepend('<li class="plum">Plum</li>', '<li class="plum">Plum</li>').html();
// .after( content, [content, ...] )
$el.after('<li class="plum">Plum</li>').html();
$el.after('<li class="plum">Plum</li>', '<li class="plum">Plum</li>').html();
// .insertAfter( content )
$('<li class="plum">Plum</li>').insertAfter('.class').html();
// .before( content, [content, ...] )
$el.before('<li class="plum">Plum</li>').html();
$el.before('<li class="plum">Plum</li>', '<li class="plum">Plum</li>').html();
// .insertBefore( content )
$('<li class="plum">Plum</li>').insertBefore('.class').html();
// .remove( [selector] )
$el.remove().html();
$el.remove('.class').html();
// .replaceWith( content )
$el.replaceWith($('<li class="plum">Plum</li>')).html();
// .empty()
$el.empty().html();
// .html( [htmlString] )
$el.html();
$el.html('<li class="mango">Mango</li>').html();
// .text( [textString] )
$el.text();
$el.text('text');
// .wrap( content )
// See https://github.com/cheeriojs/cheerio/issues/731
// $el.wrap($('<div class="red-fruit"></div>')).html();
// .css
$el.css('width');
$el.css(['width', 'height']);
$el.css('width', '50px');
/**
* Rendering
*/
$.html();
$.html('.class');
$.xml();
/**
* Miscellaneous
*/
// .clone() ####
$el.clone().html();
/**
* Utilities
*/
// $.root
$.root().append('<ul id="vegetables"></ul>').html();
// $.contains( container, contained )
$.contains($el[0], $el[0]);
// $.parseHTML( data [, context ] [, keepScripts ] )
$.parseHTML(html);
$.parseHTML(html, null, true);
/**
* Not in doc
*/
$el.toArray();

72
cheerio/cheerio.d.ts vendored
View File

@@ -17,12 +17,17 @@ interface Cheerio {
attr(name: string, value: any): Cheerio;
data(): any;
data(name: string): any;
data(name: string, value: any): any;
val(): string;
val(value: string): Cheerio;
removeAttr(name: string): Cheerio;
has(selector: string): Cheerio;
has(element: CheerioElement): Cheerio;
hasClass(className: string): boolean;
addClass(classNames: string): Cheerio;
@@ -41,6 +46,9 @@ interface Cheerio {
is(selection: Cheerio): boolean;
is(func: (index: number, element: CheerioElement) => boolean): boolean;
// Form
serializeArray(): {name: string, value: string}[];
// Traversing
find(selector: string): Cheerio;
@@ -52,10 +60,12 @@ interface Cheerio {
parentsUntil(element: CheerioElement, filter?: string): Cheerio;
parentsUntil(element: Cheerio, filter?: string): Cheerio;
closest(): Cheerio;
closest(selector: string): Cheerio;
next(selector?: string): Cheerio;
nextAll(): Cheerio;
nextAll(selector: string): Cheerio;
nextUntil(selector?: string, filter?: string): Cheerio;
nextUntil(element: CheerioElement, filter?: string): Cheerio;
@@ -63,6 +73,7 @@ interface Cheerio {
prev(selector?: string): Cheerio;
prevAll(): Cheerio;
prevAll(selector: string): Cheerio;
prevUntil(selector?: string, filter?: string): Cheerio;
prevUntil(element: CheerioElement, filter?: string): Cheerio;
@@ -83,15 +94,24 @@ interface Cheerio {
filter(selection: Cheerio): Cheerio;
filter(element: CheerioElement): Cheerio;
filter(elements: CheerioElement[]): Cheerio;
filter(func: (index: number) => boolean): Cheerio;
filter(func: (index: number, element: CheerioElement) => boolean): Cheerio;
not(selector: string): Cheerio;
not(selection: Cheerio): Cheerio;
not(element: CheerioElement): Cheerio;
not(func: (index: number, element: CheerioElement) => boolean): Cheerio;
first(): Cheerio;
last(): Cheerio;
eq(index: number): Cheerio;
get(): Document[];
get(index: number): Document;
get(): CheerioElement[];
get(index: number): CheerioElement;
index(): number;
index(selector: string): number;
index(selection: Cheerio): number;
end(): Cheerio;
@@ -101,6 +121,9 @@ interface Cheerio {
add(elements: CheerioElement[]): Cheerio;
add(selection: Cheerio): Cheerio;
addBack():Cheerio;
addBack(filter: string):Cheerio;
// Manipulation
append(content: string, ...contents: any[]): Cheerio;
@@ -118,11 +141,19 @@ interface Cheerio {
after(content: Document[], ...contents: any[]): Cheerio;
after(content: Cheerio, ...contents: any[]): Cheerio;
insertAfter(content: string): Cheerio;
insertAfter(content: Document): Cheerio;
insertAfter(content: Cheerio): Cheerio;
before(content: string, ...contents: any[]): Cheerio;
before(content: Document, ...contents: any[]): Cheerio;
before(content: Document[], ...contents: any[]): Cheerio;
before(content: Cheerio, ...contents: any[]): Cheerio;
insertBefore(content: string): Cheerio;
insertBefore(content: Document): Cheerio;
insertBefore(content: Cheerio): Cheerio;
remove(selector?: string): Cheerio;
replaceWith(content: string): Cheerio;
@@ -138,6 +169,11 @@ interface Cheerio {
text(): string;
text(text: string): Cheerio;
// See https://github.com/cheeriojs/cheerio/issues/731
/*wrap(content: string): Cheerio;
wrap(content: Document): Cheerio;
wrap(content: Cheerio): Cheerio;*/
css(propertyName: string): string;
css(propertyNames: string[]): string[];
css(propertyName: string, value: string): Cheerio;
@@ -172,11 +208,7 @@ interface CheerioOptionsInterface {
normalizeWhitespace?: boolean;
}
interface CheerioStatic {
// Document References
// Cheerio https://github.com/cheeriojs/cheerio
// JQuery http://api.jquery.com
interface CheerioSelector {
(selector: string): Cheerio;
(selector: string, context: string): Cheerio;
(selector: string, context: CheerioElement): Cheerio;
@@ -187,7 +219,12 @@ interface CheerioStatic {
(selector: string, context: CheerioElement[], root: string): Cheerio;
(selector: string, context: Cheerio, root: string): Cheerio;
(selector: any): Cheerio;
}
interface CheerioStatic extends CheerioSelector {
// Document References
// Cheerio https://github.com/cheeriojs/cheerio
// JQuery http://api.jquery.com
xml(): string;
root(): Cheerio;
contains(container: CheerioElement, contained: CheerioElement): boolean;
@@ -202,17 +239,28 @@ interface CheerioStatic {
interface CheerioElement {
// Document References
// Node Console
tagName: string;
type: string;
name: string;
attribs: Object;
children: CheerioElement[];
childNodes: CheerioElement[];
lastChild: CheerioElement;
next: CheerioElement;
nextSibling: CheerioElement;
prev: CheerioElement;
previousSibling: CheerioElement;
parent: CheerioElement;
root: CheerioElement;
parentNode: CheerioElement;
nodeValue: string;
}
declare module "cheerio" {
export function load(html: string, options?: CheerioOptionsInterface): CheerioStatic;
interface CheerioAPI extends CheerioSelector {
load(html: string, options?: CheerioOptionsInterface): CheerioStatic;
}
declare var cheerio:CheerioAPI;
declare module "cheerio" {
export default cheerio;
}

View File

@@ -1,4 +1,4 @@
// Type definitions for chocolatechip v4.0.3
// Type definitions for chocolatechip v4.0.4
// Project: https://github.com/chocolatechipui/ChocolateChipJS
// Definitions by: Robert Biggs <http://chocolatechip-ui.com>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -456,7 +456,7 @@ interface ChocolateChipStatic {
* @data any You can receive any type: string, number, array, object, etc.
* @return any
*/
subscribe(topic: string, callback: (topic: string, data: any) => boolean): boolean;
subscribe(topic: string, callback: (topic: string, data: any) => any): boolean;
/**
* Unsubscribe from a topic. Pass this the topic you wish to unsubscribe from. The subscription will be terminated immediately.
@@ -1480,3 +1480,5 @@ interface Window {
}
declare var $: ChocolateChipStatic;
declare var fetch: fetch;
declare var chocolatechipjs: ChocolateChipStatic;

View File

@@ -0,0 +1,33 @@
/// <reference path="codemirror.d.ts" />
/// <reference path="showhint.d.ts" />
var doc = new CodeMirror.Doc('text');
var pos = new CodeMirror.Pos(2, 3);
CodeMirror.showHint(doc);
CodeMirror.showHint(doc, function (cm) {
return {
from: pos,
list: ["one", "two"],
to: pos
};
});
CodeMirror.showHint(doc, function (cm) {
return {
from: pos,
list: [
{
text: "disp1",
render: function (el, self, data) {
;
}
},
{
className: "class2",
displayText: "disp2",
from: pos,
to: pos,
text: "sometext"
}
],
to: pos
};
});

62
codemirror/showhint.d.ts vendored Normal file
View File

@@ -0,0 +1,62 @@
// Type definitions for CodeMirror
// Project: https://github.com/marijnh/CodeMirror
// Definitions by: jacqt <https://github.com/jacqt>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module CodeMirror {
var commands : any;
/** Provides a framework for showing autocompletion hints. Defines editor.showHint, which takes an optional
options object, and pops up a widget that allows the user to select a completion. Finding hints is done with
a hinting functions (the hint option), which is a function that take an editor instance and options object,
and return a {list, from, to} object, where list is an array of strings or objects (the completions), and
from and to give the start and end of the token that is being completed as {line, ch} objects. An optional
selectedHint property (an integer) can be added to the completion object to control the initially selected hint. */
function showHint (cm: CodeMirror.Doc, hinter?: (doc : CodeMirror.Doc) => Hints, options?: IShowHintOptions) : void;
interface Hints {
from: Position;
to: Position;
list: Hint[] | string[];
}
/** Interface used by showHint.js Codemirror add-on
When completions aren't simple strings, they should be objects with the following properties: */
interface Hint {
text: string;
className?: string;
displayText?: string;
from?: Position;
render?: (element: any, self: any, data: any) => void;
to?: Position;
}
interface Editor {
/** An extension of the existing CodeMirror typings for the Editor.on("keyup", func) syntax */
on(eventName: string, handler: (doc: CodeMirror.Doc, event : any ) => void ): void;
off(eventName: string, handler: (doc: CodeMirror.Doc, event : any) => void ): void;
}
/** Extend CodeMirror.Doc with a state object, so that the Doc.state.completionActive property is reachable*/
interface Doc {
state: any;
showHint: (options: IShowHintOptions) => void;
}
interface IShowHintOptions {
completeSingle: boolean;
hint: (doc : CodeMirror.Doc) => Hints;
}
/** The Handle used to interact with the autocomplete dialog box.*/
interface Handle {
moveFocus(n: number, avoidWrap: boolean): void;
setFocus(n: number): void;
menuSize(): number;
length: number;
close(): void;
pick(): void;
data: any;
}
}

View File

@@ -0,0 +1,187 @@
/// <reference path="./dropzone.d.ts"/>
import Dropzone = require("dropzone");
const dropzoneFromString = new Dropzone(".test");
const dropzoneFromElement = new Dropzone(document.getElementById("test"));
const dropzoneWithOptions = new Dropzone(".test", {
url: "/some/url",
method: "post",
withCredentials: false,
parallelUploads: 2,
uploadMultiple: true,
maxFilesize: 1024,
paramName: "file",
createImageThumbnails: true,
maxThumbnailFilesize: 1024,
thumbnailWidth: 50,
thumbnailHeight: 50,
filesizeBase: 1000,
maxFiles: 100,
params: {
additional: "param"
},
clickable: true,
ignoreHiddenFiles: true,
acceptedFiles: "image/*",
autoProcessQueue: true,
autoQueue: true,
addRemoveLinks: true,
previewsContainer: "<div></div>",
capture: "camera",
dictDefaultMessage: "",
dictFallbackMessage: "",
dictFallbackText: "",
dictFileTooBig: "",
dictInvalidFileType: "",
dictResponseError: "",
dictCancelUpload: "",
dictCancelUploadConfirmation: "",
dictRemoveFile: "",
dictRemoveFileConfirmation: "",
dictMaxFilesExceeded: "",
accept: (file:DropzoneFile, done:(error?:string|Error) => void) => {
if (file.accepted) {
file.previewElement.classList.add("accepted");
file.previewTemplate.classList.add("accepted");
file.previewsContainer.classList.add("accepted");
done();
}
else {
done(new Error(file.status));
}
},
init: () => console.log("Initialized"),
forceFallback: false,
fallback: () => console.log("Fallback"),
resize: (file:DropzoneFile) => ({
srcX: 0,
srcY: 0,
trgX: 10,
trgY: 10,
srcWidth: 100,
srcHeight: 100,
trgWidth: 50,
trgHeight: 50,
optWidth: 50,
optHeight: 50
}),
drop: (e:DragEvent) => console.log("Drop"),
dragstart: (e:DragEvent) => console.log("Dragstart"),
dragend: (e:DragEvent) => console.log("Dragend"),
dragenter: (e:DragEvent) => console.log("Dragenter"),
dragover: (e:DragEvent) => console.log("Dragover"),
dragleave: (e:DragEvent) => console.log("Dragleave"),
paste: (e:DragEvent) => console.log("Paste"),
reset: () => console.log("Reset"),
addedfile: (file:DropzoneFile) => console.log("Addedfile"),
addedfiles: (files:DropzoneFile[]) => console.log("Addedfiles"),
removedfile: (file:DropzoneFile) => console.log("Removedfile"),
thumbnail: (file:DropzoneFile, dataUrl:string) => console.log("Thumbnail"),
error: (file:DropzoneFile, message:string|Error) => console.log("Error"),
errormultiple: (files:DropzoneFile[], message:string|Error) => console.log("Errormultiple"),
processing: (file:DropzoneFile) => console.log("Processing"),
processingmultiple: (files:DropzoneFile[]) => console.log("Processingmultiple"),
uploadprogress: (file:DropzoneFile, progress:number, bytesSent:number) => console.log("Uploadprogress"),
totaluploadprogress: (totalProgress:number, totalBytes:number, totalBytesSent:number) => console.log("Totaluploadprogress"),
sending: (file:DropzoneFile, xhr:XMLHttpRequest, formData:{}) => console.log("Sending"),
sendingmultiple: (files:DropzoneFile[], xhr:XMLHttpRequest, formData:{}) => console.log("Sendingmultiple"),
success: (file:DropzoneFile) => console.log("Success"),
successmultiple: (files:DropzoneFile[]) => console.log("Successmultiple"),
canceled: (file:DropzoneFile) => console.log("Canceled"),
canceledmultiple: (file:DropzoneFile[]) => console.log("Canceledmultiple"),
complete: (file:DropzoneFile) => console.log("Complete"),
completemultiple: (file:DropzoneFile[]) => console.log("Completemultiple"),
maxfilesexceeded: (file:DropzoneFile) => console.log("Maxfilesexceeded"),
maxfilesreached: (files:DropzoneFile[]) => console.log("Maxfilesreached"),
queuecomplete: () => console.log("Queuecomplete"),
previewTemplate: "<div></div>",
});
var dropzoneWithOptionsVariations:Dropzone;
dropzoneWithOptionsVariations = new Dropzone(".test", {
clickable: ".test"
});
dropzoneWithOptionsVariations = new Dropzone(".test", {
clickable: document.getElementById("test")
});
dropzoneWithOptionsVariations = new Dropzone(".test", {
clickable: [".test", ".test"]
});
dropzoneWithOptionsVariations = new Dropzone(".test", {
clickable: [document.getElementById("test"), document.getElementById("test")]
});
dropzoneWithOptionsVariations = new Dropzone(".test", {
clickable: ["test", document.getElementById("test")]
});
const dropzone = new Dropzone(".test");
dropzone.enable();
dropzone.disable();
dropzone.files.forEach(f => {
if (f.accepted) {
f.previewElement.classList.add("accepted");
f.previewTemplate.classList.add("accepted");
f.previewsContainer.classList.add("accepted");
}
else {
console.log(f.status.toUpperCase());
}
});
const firstFile = dropzone.files[0];
dropzone.removeFile(firstFile);
dropzone.addFile(firstFile);
dropzone.enqueueFile(firstFile);
dropzone.processFile(firstFile);
dropzone.uploadFile(firstFile);
dropzone.cancelUpload(firstFile);
dropzone.createThumbnail(firstFile, () => {
console.log("createThumbnail")
});
dropzone.createThumbnailFromUrl(firstFile, "/some/url", () => {
console.log("createThumbnailFromUrl")
});
dropzone.accept(firstFile, (e:string|Error) => {
console.log(e);
});
const acceptedFiles = dropzone.getAcceptedFiles();
dropzone.processFiles(acceptedFiles);
const rejectedFiles = dropzone.getRejectedFiles();
dropzone.enqueueFiles(rejectedFiles);
const queuedFiles = dropzone.getQueuedFiles();
dropzone.processFiles(queuedFiles);
const uploadingFiles = dropzone.getUploadingFiles();
dropzone.processFiles(uploadingFiles);
const activeFiles = dropzone.getActiveFiles();
dropzone.processFiles(activeFiles);
const addedFiles = dropzone.getFilesWithStatus(Dropzone.ADDED);
dropzone.processFiles(addedFiles);
dropzone.processQueue();
dropzone.removeAllFiles(true);
dropzone.destroy();

188
dropzone/dropzone-tests.ts Normal file
View File

@@ -0,0 +1,188 @@
/// <reference path="./dropzone.d.ts"/>
const dropzoneFromString = new Dropzone(".test");
const dropzoneFromElement = new Dropzone(document.getElementById("test"));
const dropzoneWithOptions = new Dropzone(".test", {
url: "/some/url",
method: "post",
withCredentials: false,
parallelUploads: 2,
uploadMultiple: true,
maxFilesize: 1024,
paramName: "file",
createImageThumbnails: true,
maxThumbnailFilesize: 1024,
thumbnailWidth: 50,
thumbnailHeight: 50,
filesizeBase: 1000,
maxFiles: 100,
params: {
additional: "param"
},
headers: {
"Some-Header": "Value"
},
clickable: true,
ignoreHiddenFiles: true,
acceptedFiles: "image/*",
autoProcessQueue: true,
autoQueue: true,
addRemoveLinks: true,
previewsContainer: "<div></div>",
capture: "camera",
dictDefaultMessage: "",
dictFallbackMessage: "",
dictFallbackText: "",
dictFileTooBig: "",
dictInvalidFileType: "",
dictResponseError: "",
dictCancelUpload: "",
dictCancelUploadConfirmation: "",
dictRemoveFile: "",
dictRemoveFileConfirmation: "",
dictMaxFilesExceeded: "",
accept: (file:DropzoneFile, done:(error?:string|Error) => void) => {
if (file.accepted) {
file.previewElement.classList.add("accepted");
file.previewTemplate.classList.add("accepted");
file.previewsContainer.classList.add("accepted");
done();
}
else {
done(new Error(file.status));
}
},
init: () => console.log("Initialized"),
forceFallback: false,
fallback: () => console.log("Fallback"),
resize: (file:DropzoneFile) => ({
srcX: 0,
srcY: 0,
trgX: 10,
trgY: 10,
srcWidth: 100,
srcHeight: 100,
trgWidth: 50,
trgHeight: 50,
optWidth: 50,
optHeight: 50
}),
drop: (e:DragEvent) => console.log("Drop"),
dragstart: (e:DragEvent) => console.log("Dragstart"),
dragend: (e:DragEvent) => console.log("Dragend"),
dragenter: (e:DragEvent) => console.log("Dragenter"),
dragover: (e:DragEvent) => console.log("Dragover"),
dragleave: (e:DragEvent) => console.log("Dragleave"),
paste: (e:DragEvent) => console.log("Paste"),
reset: () => console.log("Reset"),
addedfile: (file:DropzoneFile) => console.log("Addedfile"),
addedfiles: (files:DropzoneFile[]) => console.log("Addedfiles"),
removedfile: (file:DropzoneFile) => console.log("Removedfile"),
thumbnail: (file:DropzoneFile, dataUrl:string) => console.log("Thumbnail"),
error: (file:DropzoneFile, message:string|Error) => console.log("Error"),
errormultiple: (files:DropzoneFile[], message:string|Error) => console.log("Errormultiple"),
processing: (file:DropzoneFile) => console.log("Processing"),
processingmultiple: (files:DropzoneFile[]) => console.log("Processingmultiple"),
uploadprogress: (file:DropzoneFile, progress:number, bytesSent:number) => console.log("Uploadprogress"),
totaluploadprogress: (totalProgress:number, totalBytes:number, totalBytesSent:number) => console.log("Totaluploadprogress"),
sending: (file:DropzoneFile, xhr:XMLHttpRequest, formData:{}) => console.log("Sending"),
sendingmultiple: (files:DropzoneFile[], xhr:XMLHttpRequest, formData:{}) => console.log("Sendingmultiple"),
success: (file:DropzoneFile) => console.log("Success"),
successmultiple: (files:DropzoneFile[]) => console.log("Successmultiple"),
canceled: (file:DropzoneFile) => console.log("Canceled"),
canceledmultiple: (file:DropzoneFile[]) => console.log("Canceledmultiple"),
complete: (file:DropzoneFile) => console.log("Complete"),
completemultiple: (file:DropzoneFile[]) => console.log("Completemultiple"),
maxfilesexceeded: (file:DropzoneFile) => console.log("Maxfilesexceeded"),
maxfilesreached: (files:DropzoneFile[]) => console.log("Maxfilesreached"),
queuecomplete: () => console.log("Queuecomplete"),
previewTemplate: "<div></div>",
});
var dropzoneWithOptionsVariations:Dropzone;
dropzoneWithOptionsVariations = new Dropzone(".test", {
clickable: ".test"
});
dropzoneWithOptionsVariations = new Dropzone(".test", {
clickable: document.getElementById("test")
});
dropzoneWithOptionsVariations = new Dropzone(".test", {
clickable: [".test", ".test"]
});
dropzoneWithOptionsVariations = new Dropzone(".test", {
clickable: [document.getElementById("test"), document.getElementById("test")]
});
dropzoneWithOptionsVariations = new Dropzone(".test", {
clickable: ["test", document.getElementById("test")]
});
const dropzone = new Dropzone(".test");
dropzone.enable();
dropzone.disable();
dropzone.files.forEach(f => {
if (f.accepted) {
f.previewElement.classList.add("accepted");
f.previewTemplate.classList.add("accepted");
f.previewsContainer.classList.add("accepted");
}
else {
console.log(f.status.toUpperCase());
}
});
const firstFile = dropzone.files[0];
dropzone.removeFile(firstFile);
dropzone.addFile(firstFile);
dropzone.enqueueFile(firstFile);
dropzone.processFile(firstFile);
dropzone.uploadFile(firstFile);
dropzone.cancelUpload(firstFile);
dropzone.createThumbnail(firstFile, () => {
console.log("createThumbnail")
});
dropzone.createThumbnailFromUrl(firstFile, "/some/url", () => {
console.log("createThumbnailFromUrl")
});
dropzone.accept(firstFile, (e:string|Error) => {
console.log(e);
});
const acceptedFiles = dropzone.getAcceptedFiles();
dropzone.processFiles(acceptedFiles);
const rejectedFiles = dropzone.getRejectedFiles();
dropzone.enqueueFiles(rejectedFiles);
const queuedFiles = dropzone.getQueuedFiles();
dropzone.processFiles(queuedFiles);
const uploadingFiles = dropzone.getUploadingFiles();
dropzone.processFiles(uploadingFiles);
const activeFiles = dropzone.getActiveFiles();
dropzone.processFiles(activeFiles);
const addedFiles = dropzone.getFilesWithStatus(Dropzone.ADDED);
dropzone.processFiles(addedFiles);
dropzone.processQueue();
dropzone.removeAllFiles(true);
dropzone.destroy();

261
dropzone/dropzone.d.ts vendored
View File

@@ -1,10 +1,23 @@
// Type definitions for Dropzone 4.0.1
// Project: http://www.dropzonejs.com/
// Definitions by: Natan Vivo <https://github.com/nvivo>, Andy Hawkins <https://github.com/a904guy/,http://a904guy.com/,http://www.bmbsqd.com>
// Definitions by: Natan Vivo <https://github.com/nvivo>, Andy Hawkins <https://github.com/a904guy/,http://a904guy.com/,http://www.bmbsqd.com>, Vasya Aksyonov <https://github.com/outring>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>
interface DropzoneResizeInfo {
srcX?:number;
srcY?:number;
trgX?:number;
trgY?:number;
srcWidth?:number;
srcHeight?:number;
trgWidth?:number;
trgHeight?:number;
optWidth?:number;
optHeight?:number;
}
interface DropzoneFile extends File {
previewElement: HTMLElement;
previewTemplate: HTMLElement;
@@ -18,109 +31,239 @@ interface DropzoneOptions {
method?: string;
withCredentials?: boolean;
parallelUploads?: number;
uploadMultiple?: boolean;
maxFilesize?: number;
paramName?: string;
uploadMultiple?: boolean;
headers?: any;
addRemoveLinks?: boolean;
previewsContainer?: string;
clickable?: any;
createImageThumbnails?: boolean;
maxThumbnailFilesize?: number;
thumbnailWidth?: number;
thumbnailHeight?: number;
filesizeBase?: number;
maxFiles?: number;
resize?: ( file?: any ) => any;
init?: () => void;
params?: {};
headers?: {},
clickable?: boolean|string|HTMLElement|(string|HTMLElement)[];
ignoreHiddenFiles?: boolean;
acceptedFiles?: string;
accept?: ( file: DropzoneFile, doneCallback: ( ...args: any[] ) => void ) => void;
autoProcessQueue?: boolean;
previewTemplate?: string;
forceFallback?: boolean;
fallback?: () => void;
autoQueue?: boolean;
addRemoveLinks?: boolean;
previewsContainer?: boolean|string|HTMLElement;
capture?: string;
// dictionary options
dictDefaultMessage?: string;
dictFallbackMessage?: string;
dictFallbackText?: string;
dictInvalidFileType?: string;
dictFileTooBig?: string;
dictInvalidFileType?: string;
dictResponseError?: string;
dictCancelUpload?: string;
dictCancelUploadConfirmation?: string;
dictRemoveFile?: string;
dictRemoveFileConfirmation?: string;
dictMaxFilesExceeded?: string;
accept?(file:DropzoneFile, done:(error?:string|Error) => void):void;
init?():void;
forceFallback?: boolean;
fallback?():void;
resize?(file:DropzoneFile):DropzoneResizeInfo;
drop?(e:DragEvent):void;
dragstart?(e:DragEvent):void;
dragend?(e:DragEvent):void;
dragenter?(e:DragEvent):void;
dragover?(e:DragEvent):void;
dragleave?(e:DragEvent):void;
paste?(e:DragEvent):void;
reset?():void;
addedfile?(file:DropzoneFile):void;
addedfiles?(files:DropzoneFile[]):void;
removedfile?(file:DropzoneFile):void;
thumbnail?(file:DropzoneFile, dataUrl:string):void;
error?(file:DropzoneFile, message:string|Error, xhr:XMLHttpRequest):void;
errormultiple?(files:DropzoneFile[], message:string|Error, xhr:XMLHttpRequest):void;
processing?(file:DropzoneFile):void;
processingmultiple?(files:DropzoneFile[]):void;
uploadprogress?(file:DropzoneFile, progress:number, bytesSent:number):void;
totaluploadprogress?(totalProgress:number, totalBytes:number, totalBytesSent:number):void;
sending?(file:DropzoneFile, xhr:XMLHttpRequest, formData:{}):void;
sendingmultiple?(files:DropzoneFile[], xhr:XMLHttpRequest, formData:{}):void;
success?(file:DropzoneFile, responseText:string):void;
successmultiple?(files:DropzoneFile[], responseText:string):void;
canceled?(file:DropzoneFile):void;
canceledmultiple?(file:DropzoneFile[]):void;
complete?(file:DropzoneFile):void;
completemultiple?(file:DropzoneFile[]):void;
maxfilesexceeded?(file:DropzoneFile):void;
maxfilesreached?(files:DropzoneFile[]):void;
queuecomplete?():void;
previewTemplate?: string;
}
declare class Dropzone {
constructor( container: string, options?: DropzoneOptions );
constructor( container: HTMLElement, options?: DropzoneOptions );
constructor(container:string|HTMLElement, options?:DropzoneOptions);
static autoDiscover: boolean;
static options: any;
static confirm: ( question: string, accepted: () => void, rejected?: () => void ) => void;
static autoDiscover:boolean;
static options:any;
static confirm:(question:string, accepted:() => void, rejected?:() => void) => void;
files: DropzoneFile[];
static ADDED:string;
static QUEUED:string;
static ACCEPTED:string;
static UPLOADING:string;
static PROCESSING:string;
static CANCELED:string;
static ERROR:string;
static SUCCESS:string;
enable(): void;
disable(): void;
destroy(): Dropzone;
files:DropzoneFile[];
on( eventName: string, callback: ( ...args: any[] ) => any ): void;
enable():void;
off( eventName: string ): void;
disable():void;
addFile( file: DropzoneFile ): void;
destroy():Dropzone;
removeFile( file: DropzoneFile ): void;
addFile(file:DropzoneFile):void;
removeAllFiles( cancelIfNecessary?: boolean ): void;
removeFile(file:DropzoneFile):void;
processQueue(): void;
removeAllFiles(cancelIfNecessary?:boolean):void;
cancelUpload( file: DropzoneFile ): void;
processQueue():void;
processFiles ( files: DropzoneFile[] ): void;
processFile( file: DropzoneFile ): void;
cancelUpload(file:DropzoneFile):void;
uploadFile( file: DropzoneFile ): void;
processFiles(files:DropzoneFile[]):void;
getAcceptedFiles(): DropzoneFile[];
processFile(file:DropzoneFile):void;
getRejectedFiles(): DropzoneFile[];
uploadFile(file:DropzoneFile):void;
getQueuedFiles(): DropzoneFile[];
getAcceptedFiles():DropzoneFile[];
getUploadingFiles(): DropzoneFile[];
getRejectedFiles():DropzoneFile[];
accept( file: DropzoneFile, done: ( error?: string ) => {} ):void;
getActiveFiles(): DropzoneFile[];
getFilesWithStatus( status: string ): DropzoneFile[];
enqueueFile( file: DropzoneFile ): void;
enqueueFiles( file: DropzoneFile[] ): void;
createThumbnail( file: DropzoneFile, callback?: (...any: any[]) => {}): any;
createThumbnailFromUrl( file: DropzoneFile, url: string, callback?: ( ...any: any[] ) => any ): any;
getQueuedFiles():DropzoneFile[];
emit( eventName: string, file: DropzoneFile, str?: string ): void;
emit( eventName: "thumbnail", file: DropzoneFile, path: string ): void;
emit( eventName: "addedfile", file: DropzoneFile ): void;
emit( eventName: "removedfile", file: DropzoneFile ): void;
emit( eventName: "processing", file: DropzoneFile ): void;
emit( eventName: "canceled", file: DropzoneFile ): void;
emit( eventName: "complete", file: DropzoneFile ): void;
getUploadingFiles():DropzoneFile[];
accept(file:DropzoneFile, done:(error?:string|Error) => void):void;
getActiveFiles():DropzoneFile[];
getFilesWithStatus(status:string):DropzoneFile[];
enqueueFile(file:DropzoneFile):void;
enqueueFiles(file:DropzoneFile[]):void;
createThumbnail(file:DropzoneFile, callback?:(...args:any[]) => void):any;
createThumbnailFromUrl(file:DropzoneFile, url:string, callback?:(...args:any[]) => void):any;
on(eventName:string, callback:(...args:any[]) => void):void;
off(eventName:string):void;
emit(eventName:string, ...args:any[]):void;
on(eventName:"drop", callback:(e:DragEvent) => any):void;
on(eventName:"dragstart", callback:(e:DragEvent) => any):void;
on(eventName:"dragend", callback:(e:DragEvent) => any):void;
on(eventName:"dragenter", callback:(e:DragEvent) => any):void;
on(eventName:"dragover", callback:(e:DragEvent) => any):void;
on(eventName:"dragleave", callback:(e:DragEvent) => any):void;
on(eventName:"paste", callback:(e:DragEvent) => any):void;
on(eventName:"reset"):void;
on(eventName:"addedfile", callback:(file:DropzoneFile) => any):void;
on(eventName:"addedfiles", callback:(files:DropzoneFile[]) => any):void;
on(eventName:"removedfile", callback:(file:DropzoneFile) => any):void;
on(eventName:"thumbnail", callback:(file:DropzoneFile, dataUrl:string) => any):void;
on(eventName:"error", callback:(file:DropzoneFile, message:string|Error) => any):void;
on(eventName:"errormultiple", callback:(files:DropzoneFile[], message:string|Error) => any):void;
on(eventName:"processing", callback:(file:DropzoneFile) => any):void;
on(eventName:"processingmultiple", callback:(files:DropzoneFile[]) => any):void;
on(eventName:"uploadprogress", callback:(file:DropzoneFile, progress:number, bytesSent:number) => any):void;
on(eventName:"totaluploadprogress", callback:(totalProgress:number, totalBytes:number, totalBytesSent:number) => any):void;
on(eventName:"sending", callback:(file:DropzoneFile, xhr:XMLHttpRequest, formData:{}) => any):void;
on(eventName:"sendingmultiple", callback:(files:DropzoneFile[], xhr:XMLHttpRequest, formData:{}) => any):void;
on(eventName:"success", callback:(file:DropzoneFile) => any):void;
on(eventName:"successmultiple", callback:(files:DropzoneFile[]) => any):void;
on(eventName:"canceled", callback:(file:DropzoneFile) => any):void;
on(eventName:"canceledmultiple", callback:(file:DropzoneFile[]) => any):void;
on(eventName:"complete", callback:(file:DropzoneFile) => any):void;
on(eventName:"completemultiple", callback:(file:DropzoneFile[]) => any):void;
on(eventName:"maxfilesexceeded", callback:(file:DropzoneFile) => any):void;
on(eventName:"maxfilesreached", callback:(files:DropzoneFile[]) => any):void;
on(eventName:"queuecomplete"):void;
emit(eventName:"drop", e:DragEvent):void;
emit(eventName:"dragstart", e:DragEvent):void;
emit(eventName:"dragend", e:DragEvent):void;
emit(eventName:"dragenter", e:DragEvent):void;
emit(eventName:"dragover", e:DragEvent):void;
emit(eventName:"dragleave", e:DragEvent):void;
emit(eventName:"paste", e:DragEvent):void;
emit(eventName:"reset"):void;
emit(eventName:"addedfile", file:DropzoneFile):void;
emit(eventName:"addedfiles", files:DropzoneFile[]):void;
emit(eventName:"removedfile", file:DropzoneFile):void;
emit(eventName:"thumbnail", file:DropzoneFile, dataUrl:string):void;
emit(eventName:"error", file:DropzoneFile, message:string|Error):void;
emit(eventName:"errormultiple", files:DropzoneFile[], message:string|Error):void;
emit(eventName:"processing", file:DropzoneFile):void;
emit(eventName:"processingmultiple", files:DropzoneFile[]):void;
emit(eventName:"uploadprogress", file:DropzoneFile, progress:number, bytesSent:number):void;
emit(eventName:"totaluploadprogress", totalProgress:number, totalBytes:number, totalBytesSent:number):void;
emit(eventName:"sending", file:DropzoneFile, xhr:XMLHttpRequest, formData:{}):void;
emit(eventName:"sendingmultiple", files:DropzoneFile[], xhr:XMLHttpRequest, formData:{}):void;
emit(eventName:"success", file:DropzoneFile):void;
emit(eventName:"successmultiple", files:DropzoneFile[]):void;
emit(eventName:"canceled", file:DropzoneFile):void;
emit(eventName:"canceledmultiple", file:DropzoneFile[]):void;
emit(eventName:"complete", file:DropzoneFile):void;
emit(eventName:"completemultiple", file:DropzoneFile[]):void;
emit(eventName:"maxfilesexceeded", file:DropzoneFile):void;
emit(eventName:"maxfilesreached", files:DropzoneFile[]):void;
emit(eventName:"queuecomplete"):void;
emit( eventName: string, e: Event ): void;
emit( eventName: "drop", e: Event ): void;
emit( eventName: "dragstart", e: Event ): void;
emit( eventName: "dragend", e: Event ): void;
emit( eventName: "dragenter", e: Event ): void;
emit( eventName: "dragover", e: Event ): void;
emit( eventName: "dragleave", e: Event ): void;
}
interface JQuery {
dropzone( options: DropzoneOptions ): Dropzone;
dropzone(options:DropzoneOptions): Dropzone;
}
declare module "dropzone" {

View File

@@ -0,0 +1,68 @@
/// <reference path="./favico.js.d.ts"/>
// constructor options
var plain = (): favicojs.Favico => new Favico({
});
var repositioned = (): favicojs.Favico => new Favico({
position: 'upleft'
});
var shaped = (): favicojs.Favico => new Favico({
type: 'rectangle'
});
var usingCustomFont = (): favicojs.Favico => new Favico({
fontFamily: 'FontAwesome',
elementId: 'badgefont'
});
var colored = (): favicojs.Favico => new Favico({
bgColor: '#5CB85C',
textColor: '#ff0'
});
var domBound = (): favicojs.Favico => new Favico({
element: document.getElementById('favico')
});
var iconUrlHandler = (url: string): void => {
console.log(url);
};
var withDataUrl = (): favicojs.Favico => new Favico({
dataUrl: iconUrlHandler
});
var favicons: favicojs.Favico[] = [
plain(),
repositioned(),
shaped(),
usingCustomFont(),
colored(),
domBound(),
withDataUrl(),
];
// public methods
favicons.map(favico => {
// badge
favico.badge(2);
favico.badge(3, 'slide');
favico.badge(3000, {animation: 'none', type: 'rectangle'});
favico.reset();
// image
favico.image(document.getElementById('image'));
// video
favico.video(document.getElementById('video'));
// webcam
favico.webcam();
});

43
favico.js/favico.js.d.ts vendored Normal file
View File

@@ -0,0 +1,43 @@
// Type definitions for favico.js
// Project: http://lab.ejci.net/favico.js/
// Definitions by: Yu Matsushita <https://github.com/drowse314-dev-ymat>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module favicojs {
interface FavicoJsStatic {
new (opt?: FavicoJsOptions): Favico;
}
interface FavicoJsOptions {
bgColor?: string;
textColor?: string;
fontFamily?: string;
fontStyle?: string;
type?: string;
position?: string;
animation?: string;
elementId?: string;
element?: HTMLElement;
dataUrl?: (url: string) => any;
}
interface Favico {
badge(number: number): void;
badge(number: number, animation: string): void;
badge(number: number, opts: FavicoJsOptions): void;
reset(): void;
image(imageElement: HTMLElement): void;
video(imageElement: HTMLElement): void;
webcam(): void;
}
}
declare var Favico: favicojs.FavicoJsStatic;

View File

@@ -11,5 +11,6 @@ declare module "form-data" {
getHeaders(): Object;
// TODO expand pipe
pipe(to: any): any;
submit(params: string|Object, callback: (error: any, response: any) => void): any;
}
}

8
freedom/freedom-core-env.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
// Type definitions for freedom v0.6.26
// Project: https://github.com/freedomjs/freedom
// Definitions by: Jonathan Pevarnek <https://github.com/jpevarnek/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="./freedom.d.ts" />
declare var freedom :freedom.FreedomInCoreEnv;

8
freedom/freedom-module-env.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
// Type definitions for freedom v0.6.26
// Project: https://github.com/freedomjs/freedom
// Definitions by: Jonathan Pevarnek <https://github.com/jpevarnek/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="./freedom.d.ts" />
declare var freedom :freedom.FreedomInModuleEnv;

24
freedom/freedom-tests.ts Normal file
View File

@@ -0,0 +1,24 @@
/// <reference path="../es6-promise/es6-promise.d.ts"/>
/// <reference path="freedom.d.ts" />
var freedomModule :freedom.FreedomInModuleEnv;
var freedomCore :freedom.FreedomInCoreEnv;
var parentModule :freedom.ParentModuleThing = freedomModule();
parentModule.on('message', (x :string) => {
});
var coreInModule :freedom.Core = freedomModule['core']();
coreInModule.getLogger('tag').then((logger :freedom.Logger) => {
logger.log('message');
});
var freedomConsole :freedom.Console.Console = freedomModule['core.console']();
var doneLogging :Promise<void> = freedomConsole.log('source', 'message');
freedomCore('freedom-module.json', {
'logger': 'loggingprovider.json',
'debug': 'log'
}).then((moduleFactory) => {
moduleFactory.close();
});

573
freedom/freedom.d.ts vendored Normal file
View File

@@ -0,0 +1,573 @@
// Type definitions for freedom v0.6.26
// Project: https://github.com/freedomjs/freedom
// Definitions by: Jonathan Pevarnek <https://github.com/jpevarnek/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../es6-promise/es6-promise.d.ts"/>
declare module freedom {
// Common on/emit for message passing interfaces.
interface EventDispatchFn<T> { (eventType: string, value?: T): void; }
interface EventHandlerFn<T> {
(eventType: string, handler: (eventData:T) => void): void;
}
interface Error {
errcode: string;
message: string;
}
// TODO: replace OnAndEmit with EventHandler and EventEmitter;
interface OnAndEmit<T,T2> {
on: EventHandlerFn<T>;
emit: EventDispatchFn<T2>;
}
interface EventHandler {
// Adds |f| as an event handler for all subsiquent events of type |t|.
on(t: string, f: Function): void;
// Adds |f| as an event handler for only the next event of type |t|.
once(t: string, f: Function): void;
// The |off| function removes the event event handling function |f| from
// both |on| and the |once| event handling.
off(t: string, f: Function): void;
}
interface PortModule<T, T2> extends OnAndEmit<T, T2> {
controlChannel: string;
}
interface ModuleSelfConstructor {
// Identifies a named API's provider class.
provideSynchronous: (classFn?: Function) => void;
provideAsynchronous :(classFn?: Function) => void;
providePromises: (classFn?: Function) => void;
}
interface ParentModuleThing extends ModuleSelfConstructor, OnAndEmit<any, any> {
}
interface Logger {
debug(...args: any[]): void;
info(...args: any[]): void;
log(...args: any[]): void;
warn(...args: any[]): void;
error(...args: any[]): void;
}
// See |Core_unprivileged| in |core.unprivileged.js|
interface Core {
// Create a new channel which which to communicate between modules.
createChannel(): Promise<ChannelSpecifier>;
// Given an ChannelEndpointIdentifier for a channel, create a proxy event
// interface for it.
bindChannel(channelIdentifier: string): Promise<Channel>;
// Returns the list of identifiers describing the dependency path.
getId(): Promise<string[]>;
getLogger(tag: string): Promise<Logger>;
}
// Channels are ways that freedom modules can send each other messages.
interface Channel extends OnAndEmit<any,any> {
close(): void;
}
// Specification for a channel.
interface ChannelSpecifier {
channel: Channel; // How to communicate over this channel.
// A freedom channel endpoint identifier. Can be passed over a freedom
// message-passing boundary. It is used to create a channel to the freedom
// module that called createChannel and created this ChannelSpecifier.
identifier: string;
}
// This is the first argument given to a core provider's constructor. It is an
// object that describes the parent module the core provider instance has been
// created for.
interface CoreProviderParentApp {
manifestId: string;
config: {
views: {[viewName: string]: Object};
};
global: {
removeEventListener: (s: string, f: Function, b: boolean) => void;
};
}
// A Freedom module sub is both a function and an object with members. The
// type |T| is the type of the module's stub interface.
interface FreedomModuleFactoryManager<T> {
// This is the factory constructor for a new instance of a stub/channel to a
// module.
(...args: any[]): T;
// This is the call to close a particular stub's channel and resources. It
// is assumed that the argument is a result of the factory constructor. If
// no argument is supplied, all stubs are closed.
close: (freedomModuleStubInstance?: T) => Promise<void>;
api: string;
}
interface FreedomInCoreEnvOptions {
debug?: string; // debug level
logger?: string; // string to json for logging provider.
}
interface FreedomInCoreEnv extends OnAndEmit<any,any> {
// Represents the call to freedom when you create a root module. Returns a
// promise to a factory constructor for the freedom module. The
// |manifestPath| should be a path to a json string that specifies the
// freedom module.
(manifestPath: string, options?: FreedomInCoreEnvOptions):
Promise<FreedomModuleFactoryManager<any>>;
}
interface FreedomInModuleEnv {
// Represents the call to freedom(), which returns the parent module's
// freedom stub interface in an on/emit style. This is a getter.
(): ParentModuleThing;
// Creates an interface to the freedom core provider which can be used to
// create loggers and channels.
// Note: unlike other providers, core is a getter.
'core': FreedomModuleFactoryManager<Core>;
'core.console': FreedomModuleFactoryManager<Console.Console>;
'core.rtcdatachannel': FreedomModuleFactoryManager<RTCDataChannel.RTCDataChannel>;
'core.rtcpeerconnection': FreedomModuleFactoryManager<RTCPeerConnection.RTCPeerConnection>;
'core.storage': FreedomModuleFactoryManager<Storage.Storage>;
'core.tcpsocket': FreedomModuleFactoryManager<TcpSocket.Socket>;
'core.udpsocket': FreedomModuleFactoryManager<UdpSocket.Socket>;
'pgp': FreedomModuleFactoryManager<PgpProvider.PgpProvider>;
'portControl': FreedomModuleFactoryManager<PortControl.PortControl>;
// We use this specification so that you can reference freedom sub-modules by
// an array-lookup of its name. One day, maybe we'll have a nicer way to do
// this.
[moduleName: string]: FreedomModuleFactoryManager<any>;
}
// This generic interface represents any freedom method. Its purpose is to extend
// the basic definition to include the reckless call method, which does not
// produce a reply message.
interface Method0<R> {
(): Promise<R>;
reckless: () => void;
}
interface Method1<T, R> {
(a: T): Promise<R>;
reckless: (a: T) => void;
}
interface Method2<T, U, R> {
(a: T, b: U) : Promise<R>;
reckless: (a: T, b: U) => void;
}
interface Method3<T, U, V, R> {
(a: T, b: U, c: V): Promise<R>;
reckless: (a: T, b: U, c: V) => void;
}
}
declare module freedom.Console {
interface Console {
log(source: string, message: string): Promise<void>;
debug(source: string, message: string): Promise<void>;
info(source: string, message: string): Promise<void>;
warn(source: string, message: string): Promise<void>;
error(source: string, message: string): Promise<void>;
}
}
declare module freedom.RTCDataChannel {
interface Message {
// Exactly one of the below must be specified.
text?: string;
buffer?: ArrayBuffer;
binary?: Blob; // Not yet supported in Chrome.
}
// Constructed by |freedom['rtcdatachannel'](id)| where |id| is a string
// representing the channel id created by an |rtcpeerconnection| object.
interface RTCDataChannel {
getLabel(): Promise<string>;
getOrdered(): Promise<boolean>;
getMaxPacketLifeTime(): Promise<number>;
getMaxRetransmits(): Promise<number>;
getProtocol(): Promise<string>;
getNegotiated(): Promise<boolean>;
getId(): Promise<number>;
getReadyState(): Promise<string>;
getBufferedAmount(): Promise<number>;
on(t: 'onopen', f: () => void): void;
on(t: 'onerror', f: () => void): void;
on(t: 'onclose', f: () => void): void;
on(t: 'onmessage', f: (m: Message) => void): void;
on(t: string, f: Function): void;
close(): Promise<void>;
getBinaryType(): Promise<string>;
setBinaryType(type: string): Promise<void>;
send: freedom.Method1<string, void>;
sendBuffer: freedom.Method1<ArrayBuffer, void>;
}
}
declare module freedom.RTCPeerConnection {
interface RTCIceServer {
urls: string[];
username?: string;
credential?: string;
}
interface RTCConfiguration {
iceServers: RTCIceServer[];
iceTransports?: string;
peerIdentity?: string;
}
interface RTCOfferOptions {
offerToReceiveVideo?: number;
offerToReceiveAudio?: number;
voiceActivityDetection?: boolean;
iceRestart?: boolean;
}
interface RTCSessionDescription {
type: string;
sdp: string;
}
interface RTCIceCandidate {
candidate: string;
sdpMid?: string;
sdpMLineIndex?: number;
}
interface OnIceCandidateEvent {
candidate: RTCIceCandidate
}
interface RTCDataChannelInit {
ordered?: boolean;
maxPacketLifeTime?: number;
maxRetransmits?: number;
protocol?: string;
negotiated?: boolean;
id?: number;
}
// Note: the freedom factory constructor
// |freedom['rtcpeerconnection'](config)| to create an RTCPeerConnection has
// |RTCConfiguration| as the type of its config its argument.
interface RTCPeerConnection {
createOffer(options?: RTCOfferOptions): Promise<RTCSessionDescription>;
createAnswer(): Promise<RTCSessionDescription>;
setLocalDescription(desc: RTCSessionDescription): Promise<void>;
getLocalDescription(): Promise<RTCSessionDescription>;
setRemoteDescription(desc: RTCSessionDescription): Promise<void>;
getRemoteDescription(): Promise<RTCSessionDescription>;
getSignalingState(): Promise<string>;
updateIce(configuration: RTCConfiguration): Promise<void>;
addIceCandidate(candidate: RTCIceCandidate): Promise<void>;
getIceGatheringState(): Promise<string>;
getIceConnectionState(): Promise<string>;
getConfiguration(): Promise<RTCConfiguration>;
getLocalStreams(): Promise<string[]>;
getRemoteStreams(): Promise<string[]>;
getStreamById(id: string): Promise<string>;
addStream(ref: string): Promise<void>;
removeStream(ref: string): Promise<void>;
close(): Promise<void>;
createDataChannel(label: string, init: RTCDataChannelInit): Promise<string>;
getStats(selector?: string): Promise<any>;
on(t: 'ondatachannel', f: (d: {channel: string}) => void): void;
on(t: 'onnegotiationneeded', f: () => void): void;
on(t: 'onicecandidate', f: (d: OnIceCandidateEvent) => void): void;
on(t: 'onsignalingstatechange', f: () => void): void;
on(t: 'onaddstream', f: (d: {stream: number}) => void): void;
on(t: 'onremovestream', f: (d: {stream: number}) => void): void;
on(t: 'oniceconnectionstatechange', f: () => void): void;
on(t: string, f: Function): void;
}
}
declare module freedom.Storage {
interface Storage {
// Fetch array of all keys.
keys(): Promise<string[]>;
// Fetch a value for a key.
get(key: string): Promise<string>;
// Sets a value to a key. Fulfills promise with the previous value, if it
// exists.
set(key: string, value: string): Promise<string>;
// Remove a single key. Fulfills promise with previous value, if exists.
remove(key: string): Promise<string>;
// Remove all data from storage.
clear(): Promise<void>;
} // class Storage
}
declare module freedom.TcpSocket {
interface DisconnectInfo {
errcode: string;
message: string;
}
interface ReadInfo {
data: ArrayBuffer;
}
interface WriteInfo {
bytesWritten: number;
}
interface SocketInfo {
connected: boolean;
localAddress?: string;
localPort?: number;
peerAddress?: string;
peerPort?: number;
}
interface ConnectInfo {
socket: number;
host: string;
port: number;
}
// The TcpSocket class (freedom['core.TcpSocket'])
interface Socket {
listen(address: string, port: number): Promise<void>;
connect(hostname: string, port: number): Promise<void>;
secure(): Promise<void>;
write: freedom.Method1<ArrayBuffer, WriteInfo>;
pause: freedom.Method0<void>;
resume: freedom.Method0<void>;
getInfo(): Promise<SocketInfo>;
close(): Promise<void>;
// TcpSockets have 3 types of events:
on(type: 'onConnection', f: (i: ConnectInfo) => void): void;
on(type: 'onData', f: (i:ReadInfo) => void): void;
off(type: 'onData', f: (i: ReadInfo) => void): void;
on(type: 'onDisconnect', f: (i: DisconnectInfo) => void): void;
on(eventType: string, f: (i: Object) => void): void;
off(eventType: string, f: (i: Object) => void): void;
}
}
declare module freedom.UdpSocket {
// Type for the chrome.socket.getInfo callback:
// https://developer.chrome.com/apps/sockets_udp#type-SocketInfo
// This is also the type returned by getInfo().
interface SocketInfo {
// Note that there are other fields but these are the ones we care about.
localAddress: string;
localPort: number;
}
// Type for the chrome.socket.recvFrom callback:
// http://developer.chrome.com/apps/socket#method-recvFrom
// This is also the type returned to onData callbacks.
interface RecvFromInfo {
resultCode: number;
address: string;
port: number;
data: ArrayBuffer;
}
interface Implementation {
bind(address: string, port: number, continuation: () => void) : void;
sendTo(data: ArrayBuffer, address: string, port: number,
continuation: (bytesWritten: number) => void): void;
destroy(continuation: () => void): void;
getInfo(continuation: (socketInfo: SocketInfo) => void): void;
}
interface Socket {
bind: (address: string, port: number) => Promise<void>;
sendTo: freedom.Method3<ArrayBuffer, string, number, number>;
destroy: () => Promise<void>;
on: (name: string, listener: Function) => void;
getInfo: () => Promise<SocketInfo>;
}
}
declare module freedom.PgpProvider {
interface PublicKey {
key: string;
fingerprint: string;
}
interface VerifyDecryptResult {
data: ArrayBuffer;
signedBy: string[];
}
interface PgpProvider {
// Standard freedom crypto API
setup(passphrase: string, userid: string): Promise<void>;
clear(): Promise<void>;
exportKey(): Promise<PublicKey>;
signEncrypt(data: ArrayBuffer, encryptKey?: string,
sign?: boolean): Promise<ArrayBuffer>;
verifyDecrypt(data: ArrayBuffer,
verifyKey?: string): Promise<VerifyDecryptResult>;
armor(data: ArrayBuffer, type?: string): Promise<string>;
dearmor(data: string): Promise<ArrayBuffer>;
}
}
declare module freedom.PortControl {
interface Mapping {
internalIp: string;
internalPort: number;
externalIp?: string;
externalPort: number;
lifetime: number;
protocol: string;
timeoutId?: number;
nonce?: number[];
errInfo?: string;
}
// A collection of Mappings
interface ActiveMappings {
[extPort: string]: Mapping;
}
// An object returned by probeProtocolSupport()
interface ProtocolSupport {
natPmp: boolean;
pcp: boolean;
upnp: boolean;
}
// Main interface for the module
interface PortControl {
addMapping(intPort: number, extPort: number, lifetime: number): Promise<Mapping>;
deleteMapping(extPort: number): Promise<boolean>;
probeProtocolSupport(): Promise<ProtocolSupport>;
probePmpSupport(): Promise<boolean>;
addMappingPmp(intPort: number, extPort: number, lifetime: number): Promise<Mapping>;
deleteMappingPmp(extPort: number): Promise<boolean>;
probePcpSupport(): Promise<boolean>;
addMappingPcp(intPort: number, extPort: number, lifetime: number): Promise<Mapping>;
deleteMappingPcp(extPort: number): Promise<boolean>;
probeUpnpSupport(): Promise<boolean>;
addMappingUpnp(intPort: number, extPort: number, lifetime: number,
controlUrl?: string): Promise<Mapping>;
deleteMappingUpnp(extPort: number): Promise<boolean>;
getActiveMappings(): Promise<ActiveMappings>;
getPrivateIps(): Promise<string[]>;
close(): Promise<void>;
}
}
declare module freedom.Social {
// Status of a client connected to a social network.
interface ClientState {
userId: string;
clientId: string;
status: string; // Either ONLINE, OFFLINE, or ONLINE_WITH_OTHER_APP
timestamp: number;
}
// The profile of a user on a social network.
interface UserProfile {
userId: string;
name: string;
url?: string;
// Image URI (e.g. data:image/png;base64,adkwe329...)
imageData?: string;
timestamp?: number;
}
interface Users {
[userId: string]: UserProfile;
}
interface Clients {
[clientId: string]: ClientState;
}
// Event for an incoming messages
interface IncomingMessage {
// UserID/ClientID/status of user from whom the message comes from.
from: ClientState;
// Message contents.
message: string;
}
// A request to login to a specific network as a specific agent
interface LoginRequest {
// Name of the application connecting to the network. Other logins with
// the same agent field will be listed as having status |ONLINE|, where
// those with different agents will be listed as
// |ONLINE_WITH_OTHER_CLIENT|
agent: string;
// Version of application
version: string;
// URL of application
url: string;
// When |interactive === true| social will always prompt user for login.
// Promise fails if the user did not login or provided invalid
// credentials. When |interactive === false|, promise fails unless the
// social provider has cached tokens/credentials.
interactive: boolean;
// When true, social provider will remember the token/credentials.
rememberLogin: boolean;
}
interface Social {
// Generic Freedom Event stuff. |on| binds an event handler to event type
// |eventType|. Every time |eventType| event is raised, the function |f|
// will be called.
//
// Message type |onMessage| happens when the user receives a message from
// another contact.
on(eventType: string, f: Function) : void;
on(eventType: 'onMessage', f: (message: IncomingMessage) => void): void;
// Message type |onRosterProfile| events are received when another user's
// profile is received or when a client changes status.
on(eventType: 'onUserProfile', f: (profile: UserProfile) => void): void;
// Message type |onMyStatus| is received when the user's client's status
// changes, e.g. when disconnected and online status becomes offline.
on(eventType: 'onClientState', f: (status: ClientState) => void): void;
// Do a singleton event binding: |f| will only be called once, on the next
// event of type |eventType|. Same events as above.
once(eventType: string, f: Function): void;
login(loginRequest: LoginRequest): Promise<ClientState>;
getUsers(): Promise<Users>;
getClients(): Promise<Clients>;
// Send a message to user on your network
// If the message is sent to a userId, it is sent to all clients
// If the message is sent to a clientId, it is sent to just that one client
// If the destination id is not specified or invalid, promise rejects.
sendMessage(destinationId: string, message: string): Promise<void>;
// Logs the user out of the social network. After the logout promise, the
// user status is OFFLINE.
logout(): Promise<void>;
// Forget any tokens/credentials used for logging in with the last used
// userId.
clearCachedCredentials(): Promise<void>;
}
} // declare module Social

View File

@@ -44,6 +44,9 @@ app.on('ready', () => {
// and load the index.html of the app.
mainWindow.loadUrl(`file://${__dirname}/index.html`);
mainWindow.openDevTools()
var opened: boolean = mainWindow.isDevToolsOpened()
mainWindow.toggleDevTools()
// Emitted when the window is closed.
mainWindow.on('closed', () => {
// Dereference the window object, usually you would store windows

View File

@@ -356,6 +356,10 @@ declare module GitHubElectron {
* Closes the developer tools.
*/
closeDevTools(): void;
/**
* Returns whether the developer tools are opened.
*/
isDevToolsOpened(): boolean;
/**
* Toggle the developer tools.
*/

View File

@@ -0,0 +1,15 @@
/// <reference path="gulp-espower.d.ts" />
/// <reference path="../gulp/gulp.d.ts" />
import espower = require('gulp-espower');
import * as gulp from 'gulp';
gulp.src('src/*.coffee')
.pipe(espower())
.pipe(gulp.dest('out'));
gulp.src('src/*.coffee')
.pipe(espower({ patterns: ['assert(value, [message])'] }))
.pipe(gulp.dest('out'));

27
gulp-espower/gulp-espower.d.ts vendored Normal file
View File

@@ -0,0 +1,27 @@
// Type definitions for gulp-espower
// Project: https://github.com/power-assert-js/gulp-espower
// Definitions by: Qubo <https://github.com/tkQubo>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module "gulp-espower" {
namespace espower {
interface Espower {
/**
* @param options Target patterns for power assert feature instrumentation.
*/
(options?: Options): NodeJS.ReadWriteStream;
}
interface Options {
patterns: string[];
}
}
var espower: espower.Espower;
export = espower;
}

View File

@@ -0,0 +1,47 @@
/// <reference path="../node/node.d.ts" />
/// <reference path="../gulp/gulp.d.ts" />
/// <reference path="gulp-help.d.ts" />
'use strict';
import gulpHelp = require('gulp-help');
var gulp = gulpHelp(require('gulp'));
gulp.task('lint', 'Lints all server side js', function () {
var jshint: () => NodeJS.ReadWriteStream;
gulp.src('./lib/**/*.js')
.pipe(jshint());
});
gulp.task('task-hidden-from-help', false, function () {
// ...
});
gulp.task('version', 'prints the version.', [], function() {
// ...
}, {
aliases: ['v', 'V']
});
gulp.task('version', 'prints the version.', [], function () {
// ...
}, {
options: {
'env=prod': 'description of env, perhaps with available values',
'key=val': 'description of key & val',
'key': 'description of key'
}
});
var gulp2 = require('gulp');
gulpHelp(gulp2, {
description: 'Desc',
aliases: ['h'],
hideEmpty: true,
hideDepsMessage: false,
afterPrintCallback(): any {
console.log('done');
}
});

119
gulp-help/gulp-help.d.ts vendored Normal file
View File

@@ -0,0 +1,119 @@
// Type definitions for gulp-help
// Project: https://github.com/chmontgomery/gulp-help
// Definitions by: Qubo <https://github.com/tkQubo>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../bluebird/bluebird.d.ts" />
/// <reference path="../node/node.d.ts" />
/// <reference path="../gulp/gulp.d.ts" />
/// <reference path="../orchestrator/orchestrator.d.ts" />
declare module "gulp-help" {
import Orchestrator = require('orchestrator');
import gulp = require('gulp');
type HelpOption = string|boolean;
namespace gulpHelp {
interface TaskMethod {
/**
* Define a task.
*
* @param name the name of the task. Tasks that you want to run from the command line should not have spaces in them.
* @param help Custom help message as a string. If you want to hide the task from the help menu, supply false
* @param deps an array of tasks to be executed and completed before your task will run.
* @param fn the function that performs the task's operations. Generally this takes the form of gulp.src().pipe(someplugin()).
* @param option task options
*/
(name: string, help: HelpOption, deps: string[], fn?: gulp.TaskCallback, option?: TaskOptions): any;
/**
* Define a task.
*
* @param name the name of the task. Tasks that you want to run from the command line should not have spaces in them.
* @param help Custom help message as a string. If you want to hide the task from the help menu, supply false
* @param deps an array of tasks to be executed and completed before your task will run.
*/
(name: string, help: HelpOption, deps: string[]): any;
/**
* Define a task.
*
* @param name the name of the task. Tasks that you want to run from the command line should not have spaces in them.
* @param help Custom help message as a string. If you want to hide the task from the help menu, supply false
* @param fn the function that performs the task's operations. Generally this takes the form of gulp.src().pipe(someplugin()).
* @param option task options
*/
(name: string, help: HelpOption, fn?: gulp.TaskCallback, option?: TaskOptions): any;
/**
* Define a task.
*
* @param name the name of the task. Tasks that you want to run from the command line should not have spaces in them.
* @param help Custom help message as a string. If you want to hide the task from the help menu, supply false
*/
(name: string, help: HelpOption): any;
/**
* Define a task.
*
* @param name the name of the task. Tasks that you want to run from the command line should not have spaces in them.
* @param deps an array of tasks to be executed and completed before your task will run.
* @param fn the function that performs the task's operations. Generally this takes the form of gulp.src().pipe(someplugin()).
* @param option task options
*/
(name: string, deps: string[], fn?: gulp.TaskCallback, option?: TaskOptions): any;
/**
* Define a task.
*
* @param name the name of the task. Tasks that you want to run from the command line should not have spaces in them.
* @param fn the function that performs the task's operations. Generally this takes the form of gulp.src().pipe(someplugin()).
* @param option task options
*/
(name: string, fn?: gulp.TaskCallback, option?: TaskOptions): any;
}
interface GulpHelp extends Orchestrator {
task: TaskMethod;
src: gulp.SrcMethod;
dest: gulp.DestMethod;
watch: gulp.WatchMethod;
}
interface TaskOptions {
/**
* List of aliases for this task
*/
aliases?: string[];
/**
* Object documenting options which can be passed to your task
*/
options?: { [key: string]: string };
}
interface GulpHelpOptions {
/**
* Modifies the default help message
*/
description?: string;
/**
* Adds aliases to the default help task
*/
aliases?: string[];
/**
* Hide all tasks with no help message defined. Useful when including 3rd party tasks
*/
hideEmpty?: boolean;
/**
* Hide all task dependencies
*/
hideDepsMessage?: boolean;
/**
* A function to run after the default help task runs
*/
afterPrintCallback?: Function;
}
}
function gulpHelp(gulp: gulp.Gulp, options?: gulpHelp.GulpHelpOptions): gulpHelp.GulpHelp;
export = gulpHelp;
}

View File

@@ -7,7 +7,7 @@ function testFramework(): NodeJS.ReadWriteStream {
return null;
}
gulp.task('test', function (cb) {
gulp.task('test', function (cb: Function) {
gulp.src(['lib/**/*.js', 'main.js'])
.pipe(istanbul()) // Covering files
.pipe(gulp.dest('test-tmp/'))
@@ -19,7 +19,7 @@ gulp.task('test', function (cb) {
});
});
gulp.task('test', function (cb) {
gulp.task('test', function (cb: Function) {
gulp.src(['lib/**/*.js', 'main.js'])
.pipe(istanbul({includeUntested: true})) // Covering files
.pipe(istanbul.hookRequire())
@@ -31,7 +31,7 @@ gulp.task('test', function (cb) {
});
});
gulp.task('test', function (cb) {
gulp.task('test', function (cb: Function) {
gulp.src(['lib/**/*.js', 'main.js'])
.pipe(istanbul({includeUntested: true})) // Covering files
.pipe(istanbul.hookRequire())
@@ -42,4 +42,4 @@ gulp.task('test', function (cb) {
.pipe(istanbul.enforceThresholds({ thresholds: { global: 90 } })) //
.on('end', cb);
});
});
});

View File

@@ -7,6 +7,8 @@
/// <reference path="../gulp/gulp.d.ts" />
declare module 'gulp-protractor' {
import gulp = require('gulp');
interface IOptions {
configFile?: string;
args?: Array<string>;
@@ -16,8 +18,8 @@ declare module 'gulp-protractor' {
interface IGulpProtractor {
getProtractorDir(): string;
protractor(options?: IOptions): NodeJS.ReadWriteStream;
webdriver_standalone: gulp.ITaskCallback;
webdriver_update: gulp.ITaskCallback;
webdriver_standalone: gulp.TaskCallback;
webdriver_update: gulp.TaskCallback;
}
var protractor: IGulpProtractor;

View File

@@ -9,7 +9,7 @@ gulp.task("tsd", () => {
.pipe(tsd());
});
gulp.task("tsd:options", callback => {
gulp.task("tsd:options", (callback: any) => {
tsd({
command: "reinstall",
config: "tsd.json"

View File

@@ -7,6 +7,7 @@
/// <reference path="../gulp/gulp.d.ts" />
declare module "gulp-tsd" {
import gulp = require('gulp');
interface IOptions {
command?: string;
@@ -15,7 +16,7 @@ declare module "gulp-tsd" {
opts?: Object;
}
function tsd(opts?: IOptions, callback?: gulp.ITaskCallback): NodeJS.ReadWriteStream;
function tsd(opts?: IOptions, callback?: gulp.TaskCallback): NodeJS.ReadWriteStream;
export = tsd;
}

View File

@@ -10,7 +10,7 @@ gulp.task('stream', () =>
.pipe(gulp.dest('build'))
);
gulp.task('callback', (cb) =>
gulp.task('callback', (cb: Function) =>
watch('css/**/*.css', () =>
gulp.src('css/**/*.css')
.pipe(watch('css/**/*.css'))

View File

@@ -4,8 +4,8 @@
import gulp = require("gulp");
import browserSync = require("browser-sync");
var typescript: IGulpPlugin = null; // this would be the TypeScript compiler
var jasmine: IGulpPlugin = null; // this would be the jasmine test runner
var typescript: gulp.GulpPlugin = null; // this would be the TypeScript compiler
var jasmine: gulp.GulpPlugin = null; // this would be the jasmine test runner
gulp.task('compile', function()
{
@@ -31,6 +31,7 @@ gulp.task('test', ['compile', 'compile2'], function()
gulp.task('default', ['compile', 'test']);
var opts = {};
gulp.watch('*.html', 'compile');
@@ -66,3 +67,5 @@ gulp.task('serve', ['compile'], () => {
var browser = browserSync.create();
gulp.watch(['*.html', '*.ts'], ['compile', browser.reload]);
});
gulp.start('test', 'compile');

541
gulp/gulp.d.ts vendored
View File

@@ -4,268 +4,287 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module gulp {
/**
* Options to pass to node-glob through glob-stream.
* Specifies two options in addition to those used by node-glob:
* https://github.com/isaacs/node-glob#options
*/
interface ISrcOptions {
/**
* Setting this to <code>false</code> will return <code>file.contents</code> as <code>null</code>
* and not read the file at all.
* Default: <code>true</code>.
*/
read?: boolean;
/**
* Setting this to false will return <code>file.contents</code> as a stream and not buffer files.
* This is useful when working with large files.
* Note: Plugins might not implement support for streams.
* Default: <code>true</code>.
*/
buffer?: boolean;
/**
* The base path of a glob.
*
* Default is everything before a glob starts.
*/
base?: string;
/**
* The current working directory in which to search.
* Defaults to process.cwd().
*/
cwd?: string;
/**
* The place where patterns starting with / will be mounted onto.
* Defaults to path.resolve(options.cwd, "/") (/ on Unix systems, and C:\ or some such on Windows.)
*/
root?: string;
/**
* Include .dot files in normal matches and globstar matches.
* Note that an explicit dot in a portion of the pattern will always match dot files.
*/
dot?: boolean;
/**
* By default, a pattern starting with a forward-slash will be "mounted" onto the root setting, so that a valid
* filesystem path is returned. Set this flag to disable that behavior.
*/
nomount?: boolean;
/**
* Add a / character to directory matches. Note that this requires additional stat calls.
*/
mark?: boolean;
/**
* Don't sort the results.
*/
nosort?: boolean;
/**
* Set to true to stat all results. This reduces performance somewhat, and is completely unnecessary, unless
* readdir is presumed to be an untrustworthy indicator of file existence. It will cause ELOOP to be triggered one
* level sooner in the case of cyclical symbolic links.
*/
stat?: boolean;
/**
* When an unusual error is encountered when attempting to read a directory, a warning will be printed to stderr.
* Set the silent option to true to suppress these warnings.
*/
silent?: boolean;
/**
* When an unusual error is encountered when attempting to read a directory, the process will just continue on in
* search of other matches. Set the strict option to raise an error in these cases.
*/
strict?: boolean;
/**
* See cache property above. Pass in a previously generated cache object to save some fs calls.
*/
cache?: boolean;
/**
* A cache of results of filesystem information, to prevent unnecessary stat calls.
* While it should not normally be necessary to set this, you may pass the statCache from one glob() call to the
* options object of another, if you know that the filesystem will not change between calls.
*/
statCache?: boolean;
/**
* Perform a synchronous glob search.
*/
sync?: boolean;
/**
* In some cases, brace-expanded patterns can result in the same file showing up multiple times in the result set.
* By default, this implementation prevents duplicates in the result set. Set this flag to disable that behavior.
*/
nounique?: boolean;
/**
* Set to never return an empty set, instead returning a set containing the pattern itself.
* This is the default in glob(3).
*/
nonull?: boolean;
/**
* Perform a case-insensitive match. Note that case-insensitive filesystems will sometimes result in glob returning
* results that are case-insensitively matched anyway, since readdir and stat will not raise an error.
*/
nocase?: boolean;
/**
* Set to enable debug logging in minimatch and glob.
*/
debug?: boolean;
/**
* Set to enable debug logging in glob, but not minimatch.
*/
globDebug?: boolean;
}
interface IDestOptions {
/**
* The output folder. Only has an effect if provided output folder is relative.
* Default: process.cwd()
*/
cwd?: string;
/**
* Octal permission string specifying mode for any folders that need to be created for output folder.
* Default: 0777.
*/
mode?: string;
}
/**
* Options that are passed to <code>gaze</code>.
* https://github.com/shama/gaze
*/
interface IWatchOptions {
/** Interval to pass to fs.watchFile. */
interval?: number;
/** Delay for events called in succession for the same file/event. */
debounceDelay?: number;
/** Force the watch mode. Either 'auto' (default), 'watch' (force native events), or 'poll' (force stat polling). */
mode?: string;
/** The current working directory to base file patterns from. Default is process.cwd().. */
cwd?: string;
}
interface IWatchEvent {
/** The type of change that occurred, either added, changed or deleted. */
type: string;
/** The path to the file that triggered the event. */
path: string;
}
/**
* Callback to be called on each watched file change.
*/
interface IWatchCallback {
(event:IWatchEvent): void;
}
interface ITaskCallback {
/**
* Defines a task.
* Tasks may be made asynchronous if they are passing a callback or return a promise or a stream.
* @param cb callback used to signal asynchronous completion. Caller includes <code>err</code> in case of error.
*/
(cb?:(err?:any)=>void): any;
}
interface EventEmitter {
any: any;
}
interface Gulp {
/**
* Define a task.
*
* @param name the name of the task. Tasks that you want to run from the command line should not have spaces in them.
* @param fn the function that performs the task's operations. Generally this takes the form of gulp.src().pipe(someplugin()).
*/
task(name:string, fn:ITaskCallback): any;
/**
* Define a task.
*
* @param name the name of the task. Tasks that you want to run from the command line should not have spaces in them.
* @param dep an array of tasks to be executed and completed before your task will run.
* @param fn the function that performs the task's operations. Generally this takes the form of gulp.src().pipe(someplugin()).
*/
task(name:string, dep:string[], fn?:ITaskCallback): any;
/**
* Takes a glob and represents a file structure. Can be piped to plugins.
* @param glob a glob string, using node-glob syntax
* @param opt an optional option object
*/
src(glob:string, opt?:ISrcOptions): NodeJS.ReadWriteStream;
/**
* Takes a glob and represents a file structure. Can be piped to plugins.
* @param glob an array of glob strings, using node-glob syntax
* @param opt an optional option object
*/
src(glob:string[], opt?:ISrcOptions): NodeJS.ReadWriteStream;
/**
* Can be piped to and it will write files. Re-emits all data passed to it so you can pipe to multiple folders.
* Folders that don't exist will be created.
*
* @param outFolder the path (output folder) to write files to.
* @param opt
*/
dest(outFolder:string, opt?:IDestOptions): NodeJS.ReadWriteStream;
/**
* Can be piped to and it will write files. Re-emits all data passed to it so you can pipe to multiple folders.
* Folders that don't exist will be created.
*
* @param outFolder a function that converts a vinyl File instance into an output path
* @param opt
*/
dest(outFolder:(file:string)=>string, opt?:IDestOptions): NodeJS.ReadWriteStream;
/**
* Watch files and do something when a file changes. This always returns an EventEmitter that emits change events.
*
* @param glob a single glob or array of globs that indicate which files to watch for changes.
* @param opt options, that are passed to the gaze library.
* @param fn a callback or array of callbacks to be called on each change, or names of task(s) to run when a file changes, added with gulp.task().
*/
watch(glob:string, fn:(IWatchCallback|string)): EventEmitter;
watch(glob:string, fn:(IWatchCallback|string)[]): EventEmitter;
watch(glob:string, opt:IWatchOptions, fn:(IWatchCallback|string)): EventEmitter;
watch(glob:string, opt:IWatchOptions, fn:(IWatchCallback|string)[]): EventEmitter;
watch(glob:string[], fn:(IWatchCallback|string)): EventEmitter;
watch(glob:string[], fn:(IWatchCallback|string)[]): EventEmitter;
watch(glob:string[], opt:IWatchOptions, fn:(IWatchCallback|string)): EventEmitter;
watch(glob:string[], opt:IWatchOptions, fn:(IWatchCallback|string)[]): EventEmitter;
}
}
/// <reference path="../orchestrator/orchestrator.d.ts" />
declare module "gulp" {
var _tmp:gulp.Gulp;
export = _tmp;
}
import Orchestrator = require("orchestrator");
interface IGulpPlugin {
(...args: any[]): NodeJS.ReadWriteStream;
namespace gulp {
interface Gulp extends Orchestrator {
/**
* Define a task
* @param name The name of the task.
* @param deps An array of task names to be executed and completed before your task will run.
* @param fn The function that performs the task's operations. For asynchronous tasks, you need to provide a hint when the task is complete:
* <ul>
* <li>Take in a callback</li>
* <li>Return a stream or a promise</li>
* </ul>
*/
task: Orchestrator.AddMethod;
/**
* Emits files matching provided glob or an array of globs. Returns a stream of Vinyl files that can be piped to plugins.
* @param glob Glob or array of globs to read.
* @param opt Options to pass to node-glob through glob-stream.
*/
src: SrcMethod;
/**
* Can be piped to and it will write files. Re-emits all data passed to it so you can pipe to multiple folders.
* Folders that don't exist will be created.
*
* @param outFolder The path (output folder) to write files to. Or a function that returns it, the function will be provided a vinyl File instance.
* @param opt
*/
dest: DestMethod;
/**
* Watch files and do something when a file changes. This always returns an EventEmitter that emits change events.
*
* @param glob a single glob or array of globs that indicate which files to watch for changes.
* @param opt options, that are passed to the gaze library.
* @param fn a callback or array of callbacks to be called on each change, or names of task(s) to run when a file changes, added with task().
*/
watch: WatchMethod;
}
interface GulpPlugin {
(...args: any[]): NodeJS.ReadWriteStream;
}
interface WatchMethod {
/**
* Watch files and do something when a file changes. This always returns an EventEmitter that emits change events.
*
* @param glob a single glob or array of globs that indicate which files to watch for changes.
* @param fn a callback or array of callbacks to be called on each change, or names of task(s) to run when a file changes, added with task().
*/
(glob: string|string[], fn: (WatchCallback|string)): NodeJS.EventEmitter;
/**
* Watch files and do something when a file changes. This always returns an EventEmitter that emits change events.
*
* @param glob a single glob or array of globs that indicate which files to watch for changes.
* @param fn a callback or array of callbacks to be called on each change, or names of task(s) to run when a file changes, added with task().
*/
(glob: string|string[], fn: (WatchCallback|string)[]): NodeJS.EventEmitter;
/**
* Watch files and do something when a file changes. This always returns an EventEmitter that emits change events.
*
* @param glob a single glob or array of globs that indicate which files to watch for changes.
* @param opt options, that are passed to the gaze library.
* @param fn a callback or array of callbacks to be called on each change, or names of task(s) to run when a file changes, added with task().
*/
(glob: string|string[], opt: WatchOptions, fn: (WatchCallback|string)): NodeJS.EventEmitter;
/**
* Watch files and do something when a file changes. This always returns an EventEmitter that emits change events.
*
* @param glob a single glob or array of globs that indicate which files to watch for changes.
* @param opt options, that are passed to the gaze library.
* @param fn a callback or array of callbacks to be called on each change, or names of task(s) to run when a file changes, added with task().
*/
(glob: string|string[], opt: WatchOptions, fn: (WatchCallback|string)[]): NodeJS.EventEmitter;
}
interface DestMethod {
/**
* Can be piped to and it will write files. Re-emits all data passed to it so you can pipe to multiple folders.
* Folders that don't exist will be created.
*
* @param outFolder The path (output folder) to write files to. Or a function that returns it, the function will be provided a vinyl File instance.
* @param opt
*/
(outFolder: string|((file: string) => string), opt?: DestOptions): NodeJS.ReadWriteStream;
}
interface SrcMethod {
/**
* Emits files matching provided glob or an array of globs. Returns a stream of Vinyl files that can be piped to plugins.
* @param glob Glob or array of globs to read.
* @param opt Options to pass to node-glob through glob-stream.
*/
(glob: string|string[], opt?: SrcOptions): NodeJS.ReadWriteStream;
}
/**
* Options to pass to node-glob through glob-stream.
* Specifies two options in addition to those used by node-glob:
* https://github.com/isaacs/node-glob#options
*/
interface SrcOptions {
/**
* Setting this to <code>false</code> will return <code>file.contents</code> as <code>null</code>
* and not read the file at all.
* Default: <code>true</code>.
*/
read?: boolean;
/**
* Setting this to false will return <code>file.contents</code> as a stream and not buffer files.
* This is useful when working with large files.
* Note: Plugins might not implement support for streams.
* Default: <code>true</code>.
*/
buffer?: boolean;
/**
* The base path of a glob.
*
* Default is everything before a glob starts.
*/
base?: string;
/**
* The current working directory in which to search.
* Defaults to process.cwd().
*/
cwd?: string;
/**
* The place where patterns starting with / will be mounted onto.
* Defaults to path.resolve(options.cwd, "/") (/ on Unix systems, and C:\ or some such on Windows.)
*/
root?: string;
/**
* Include .dot files in normal matches and globstar matches.
* Note that an explicit dot in a portion of the pattern will always match dot files.
*/
dot?: boolean;
/**
* By default, a pattern starting with a forward-slash will be "mounted" onto the root setting, so that a valid
* filesystem path is returned. Set this flag to disable that behavior.
*/
nomount?: boolean;
/**
* Add a / character to directory matches. Note that this requires additional stat calls.
*/
mark?: boolean;
/**
* Don't sort the results.
*/
nosort?: boolean;
/**
* Set to true to stat all results. This reduces performance somewhat, and is completely unnecessary, unless
* readdir is presumed to be an untrustworthy indicator of file existence. It will cause ELOOP to be triggered one
* level sooner in the case of cyclical symbolic links.
*/
stat?: boolean;
/**
* When an unusual error is encountered when attempting to read a directory, a warning will be printed to stderr.
* Set the silent option to true to suppress these warnings.
*/
silent?: boolean;
/**
* When an unusual error is encountered when attempting to read a directory, the process will just continue on in
* search of other matches. Set the strict option to raise an error in these cases.
*/
strict?: boolean;
/**
* See cache property above. Pass in a previously generated cache object to save some fs calls.
*/
cache?: boolean;
/**
* A cache of results of filesystem information, to prevent unnecessary stat calls.
* While it should not normally be necessary to set this, you may pass the statCache from one glob() call to the
* options object of another, if you know that the filesystem will not change between calls.
*/
statCache?: boolean;
/**
* Perform a synchronous glob search.
*/
sync?: boolean;
/**
* In some cases, brace-expanded patterns can result in the same file showing up multiple times in the result set.
* By default, this implementation prevents duplicates in the result set. Set this flag to disable that behavior.
*/
nounique?: boolean;
/**
* Set to never return an empty set, instead returning a set containing the pattern itself.
* This is the default in glob(3).
*/
nonull?: boolean;
/**
* Perform a case-insensitive match. Note that case-insensitive filesystems will sometimes result in glob returning
* results that are case-insensitively matched anyway, since readdir and stat will not raise an error.
*/
nocase?: boolean;
/**
* Set to enable debug logging in minimatch and glob.
*/
debug?: boolean;
/**
* Set to enable debug logging in glob, but not minimatch.
*/
globDebug?: boolean;
}
interface DestOptions {
/**
* The output folder. Only has an effect if provided output folder is relative.
* Default: process.cwd()
*/
cwd?: string;
/**
* Octal permission string specifying mode for any folders that need to be created for output folder.
* Default: 0777.
*/
mode?: string;
}
/**
* Options that are passed to <code>gaze</code>.
* https://github.com/shama/gaze
*/
interface WatchOptions {
/** Interval to pass to fs.watchFile. */
interval?: number;
/** Delay for events called in succession for the same file/event. */
debounceDelay?: number;
/** Force the watch mode. Either 'auto' (default), 'watch' (force native events), or 'poll' (force stat polling). */
mode?: string;
/** The current working directory to base file patterns from. Default is process.cwd().. */
cwd?: string;
}
interface WatchEvent {
/** The type of change that occurred, either added, changed or deleted. */
type: string;
/** The path to the file that triggered the event. */
path: string;
}
/**
* Callback to be called on each watched file change.
*/
interface WatchCallback {
(event: WatchEvent): void;
}
interface TaskCallback {
/**
* Defines a task.
* Tasks may be made asynchronous if they are passing a callback or return a promise or a stream.
* @param cb callback used to signal asynchronous completion. Caller includes <code>err</code> in case of error.
*/
(cb?: (err?: any) => void): any;
}
}
var gulp: gulp.Gulp;
export = gulp;
}

View File

@@ -390,7 +390,8 @@ declare module "hapi" {
'try'same as 'optional' but allows for invalid authentication. */
mode: string;
/** a string array of strategy names in order they should be attempted.If only one strategy is used, strategy can be used instead with the single string value.Defaults to the default authentication strategy which is available only when a single strategy is configured. */
strategies: string | Array<string>;
strategies?: string | Array<string>;
strategy?: string;
/** if set, the payload (in requests other than 'GET' and 'HEAD') is authenticated after it is processed.Requires a strategy with payload authentication support (e.g.Hawk).Cannot be set to a value other than 'required' when the scheme sets the options.payload to true.Available values:
falseno payload authentication.This is the default value.
'required'payload authentication required.This is the default value when the scheme sets options.payload to true.

1
hapi/hapi.d.ts vendored
View File

@@ -1314,6 +1314,7 @@ declare module "hapi" {
return reply.continue();
});*/
export class Response extends Events.EventEmitter {
isBoom: boolean;
/** the HTTP response status code. Defaults to 200 (except for errors).*/
statusCode: number;
/** an object containing the response headers where each key is a header field name. Note that this is an incomplete list of headers to be included with the response. Additional headers will be added once the response is prepare for transmission.*/

View File

@@ -0,0 +1,40 @@
/// <reference path="highcharts-ng.d.ts" />
/// <reference path="../angularjs/angular.d.ts" />
var app = angular.module('app', ['highcharts-ng']);
class AppController {
chartConfig: HighChartsNGConfig = {
options: {
chart: {
type: 'bar'
},
tooltip: {
style: {
padding: 10,
fontWeight: 'bold'
}
},
credits: {
enabled: false
},
plotOptions: {}
},
series: [{
data: [10, 15, 12, 8, 7]
}],
title: {
text: 'My Awesome Chart'
},
loading: true
};
constructor($timeout: ng.ITimeoutService) {
var vm = this;
$timeout(function() {
//Some async action
vm.chartConfig.loading = false;
});
}
}
app.controller("AppController", AppController);

43
highcharts-ng/highcharts-ng.d.ts vendored Normal file
View File

@@ -0,0 +1,43 @@
// Type definitions for highcharts-ng 0.0.8
// Project: https://github.com/pablojim/highcharts-ng
// Definitions by: Scott Hatcher <https://github.com/scatcher>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../highcharts/highcharts.d.ts" />
interface HighChartsNGConfig {
options: HighchartsChartOptions;
//The below properties are watched separately for changes.
//Series object (optional) - a list of series using normal highcharts series options.
series?: number[]|[number, number][]| HighchartsDataPoint[];
//Title configuration (optional)
title?: {
text?: string;
};
//Boolean to control showng loading status on chart (optional)
//Could be a string if you want to show specific loading text.
loading?: boolean;
//Configuration for the xAxis (optional). Currently only one x axis can be dynamically controlled.
//properties currentMin and currentMax provied 2-way binding to the chart's maximimum and minimum
xAxis?: {
currentMin?: number;
currentMax?: number;
title?: { text?: string }
},
//Whether to use HighStocks instead of HighCharts (optional). Defaults to false.
useHighStocks?: boolean;
//size (optional) if left out the chart will default to size of the div or something sensible.
size?: {
width?: number;
height?: number;
};
//function (optional) - setup some logic for the chart
func?: (chart: HighchartsChartObject) => void;
}
//Instantiated Chart
interface HighChartsNGChart extends HighChartsNGConfig {
//This is a simple way to access all the Highcharts API that is not currently managed by this directive.
getHighcharts(): HighchartsChartObject;
}

View File

@@ -135,3 +135,11 @@ var highChartSettings: HighchartsOptions = {
var container = $("#container").highcharts(highChartSettings, (chart) => {
chart.series[0].setVisible(true, true);
});
var singleYAxisOptions: HighchartsOptions = {
yAxis: {}
};
var multipleYAxisOptions: HighchartsOptions = {
yAxis: [{},{}]
};

View File

@@ -1169,7 +1169,7 @@ interface HighchartsOptions {
title?: HighchartsTitleOptions;
tooltip?: HighchartsTooltipOptions;
xAxis?: HighchartsAxisOptions;
yAxis?: HighchartsAxisOptions;
yAxis?: HighchartsAxisOptions|HighchartsAxisOptions[];
}
interface HighchartsGlobalOptions extends HighchartsOptions {

90
httperr/httperr-tests.ts Normal file
View File

@@ -0,0 +1,90 @@
/// <reference path="httperr.d.ts" />
import httperr = require('httperr');
// ----------------------------------------
// Basic usage example from: https://github.com/pluma/httperr/blob/1.0.0/README.md
var err = httperr[404]('The path "/example" could not be resolved');
console.log(err);
/*
{ [NotFound: The path "/example" could not be resolved]
title: 'Not Found',
name: 'NotFound',
code: 'NOT_FOUND',
statusCode: 404,
message: 'The path "/example" could not be resolved'
}
*/
throw err;
/*
NotFound: The path "/example" could not be resolved
at ...
*/
console.log(httperr.methodNotAllowed({allowed: ['GET', 'POST']}));
/*
{ [MethodNotAllowed]
title: 'Method Not Allowed',
name: 'MethodNotAllowed',
code: 'METHOD_NOT_ALLOWED',
statusCode: 405,
message: '',
allowed: ['GET', 'POST']
}
*/
err = new httperr.NotFound();
console.log(err);
/*
{ [NotFound]
title: 'Not Found',
name: 'NotFound',
code: 'NOT_FOUND',
statusCode: 404,
message: 'The path "/example" could not be resolved'
}
*/
console.log(err instanceof httperr.NotFound); // true
console.log(err instanceof httperr.notFound); // true
console.log(err instanceof httperr['404']); // true
console.log(err instanceof httperr.MethodNotAllowed); // false
console.log(err instanceof httperr.HttpError); // true
console.log(err instanceof Error); // true
// ----------------------------------------
// Advanced usage: creating custom Error subclasses
var Custom404Error = httperr.createHttpError(404, 'Not Found', config => {
this.message = 'The resource was not found';
this['some custom property'] = config.parameters['some custom parameter'];
});
err = new Custom404Error();
var Custom500Error = httperr.createHttpError(500, 'Something went wrong');
err = new Custom500Error();
// ----------------------------------------
// Advanced usage: returning a JSON serializable representation of an error
var err = httperr.notFound('File Not Found');
console.log(err.toObject());
/*
{
name: 'NotFound',
code: 'NOT_FOUND',
title: 'Not Found',
statusCode: 404,
message: 'File Not Found',
stack: '…'
}
*/
console.log(err.toObject('stack', /^title$/));
/*
{
name: 'NotFound',
code: 'NOT_FOUND',
statusCode: 404,
message: 'File Not Found'
}
*/

292
httperr/httperr.d.ts vendored Normal file
View File

@@ -0,0 +1,292 @@
// Type definitions for httperr v1.0.0
// Project: https://github.com/pluma/httperr
// Definitions by: Troy Gerwien <https://github.com/yortus>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "httperr" {
/** Overall module shape, expressed as an interface. */
interface HttpErr {
/** The base type for all httperr error types. You probably don't want to use this directly. */
HttpError: HttpErrorStatic;
/**
* Creates a new error type for the given HTTP error status.
* @param {number} status - The HTTP response status code for the HTTP error.
* @param {string} title - A human-readable title for the HTTP error.
* @param {Function} init - (optional) A function which will be invoked as a method of the
* new error with the config argument immediately after the error
* is created by the factory. Can be used to process additional
* error-specific configuration parameters.
*/
createHttpError(status: number, title: string, init?: (config: Config) => void): HttpErrorStatic;
// Error builders by camel-cased name.
badRequest: ErrorBuilder;
unauthorized: ErrorBuilder;
paymentRequired: ErrorBuilder;
forbidden: ErrorBuilder;
notFound: ErrorBuilder;
methodNotAllowed: ErrorBuilder;
notAcceptable: ErrorBuilder;
proxyAuthenticationRequired: ErrorBuilder;
requestTimeout: ErrorBuilder;
conflict: ErrorBuilder;
gone: ErrorBuilder;
lengthRequired: ErrorBuilder;
preconditionFailed: ErrorBuilder;
requestEntityTooLarge: ErrorBuilder;
requestUriTooLong: ErrorBuilder;
unsupportedMediaType: ErrorBuilder;
requestedRangeNotSatisfiable: ErrorBuilder;
expectationFailed: ErrorBuilder;
imATeapot: ErrorBuilder;
authenticationTimeout: ErrorBuilder;
enhanceYourCalm: ErrorBuilder;
unprocessableEntity: ErrorBuilder;
locked: ErrorBuilder;
methodFailure: ErrorBuilder;
failedDependency: ErrorBuilder;
unorderedCollection: ErrorBuilder;
upgradeRequired: ErrorBuilder;
preconditionRequired: ErrorBuilder;
tooManyRequests: ErrorBuilder;
requestHeaderFieldsTooLarge: ErrorBuilder;
loginTimeout: ErrorBuilder;
noResponse: ErrorBuilder;
retryWith: ErrorBuilder;
blockedByWindowsParentalControls: ErrorBuilder;
redirect: ErrorBuilder;
unavailableForLegalReasons: ErrorBuilder;
requestHeaderTooLarge: ErrorBuilder;
certError: ErrorBuilder;
noCert: ErrorBuilder;
httpToHttps: ErrorBuilder;
clientClosedRequest: ErrorBuilder;
internalServerError: ErrorBuilder;
notImplemented: ErrorBuilder;
badGateway: ErrorBuilder;
serviceUnavailable: ErrorBuilder;
gatewayTimeout: ErrorBuilder;
httpVersionNotSupported: ErrorBuilder;
variantAlsoNegotiates: ErrorBuilder;
insufficientStorage: ErrorBuilder;
loopDetected: ErrorBuilder;
bandwidthLimitExceeded: ErrorBuilder;
notExtended: ErrorBuilder;
networkAuthenticationRequired: ErrorBuilder;
originError: ErrorBuilder;
connectionTimedOut: ErrorBuilder;
proxyDeclinedRequest: ErrorBuilder;
aTimeoutOccured: ErrorBuilder;
networkReadTimeoutError: ErrorBuilder;
networkConnectTimeoutError: ErrorBuilder;
// Error builders by title-cased name.
BadRequest: ErrorBuilder;
Unauthorized: ErrorBuilder;
PaymentRequired: ErrorBuilder;
Forbidden: ErrorBuilder;
NotFound: ErrorBuilder;
MethodNotAllowed: ErrorBuilder;
NotAcceptable: ErrorBuilder;
ProxyAuthenticationRequired: ErrorBuilder;
RequestTimeout: ErrorBuilder;
Conflict: ErrorBuilder;
Gone: ErrorBuilder;
LengthRequired: ErrorBuilder;
PreconditionFailed: ErrorBuilder;
RequestEntityTooLarge: ErrorBuilder;
RequestUriTooLong: ErrorBuilder;
UnsupportedMediaType: ErrorBuilder;
RequestedRangeNotSatisfiable: ErrorBuilder;
ExpectationFailed: ErrorBuilder;
ImATeapot: ErrorBuilder;
AuthenticationTimeout: ErrorBuilder;
EnhanceYourCalm: ErrorBuilder;
UnprocessableEntity: ErrorBuilder;
Locked: ErrorBuilder;
MethodFailure: ErrorBuilder;
FailedDependency: ErrorBuilder;
UnorderedCollection: ErrorBuilder;
UpgradeRequired: ErrorBuilder;
PreconditionRequired: ErrorBuilder;
TooManyRequests: ErrorBuilder;
RequestHeaderFieldsTooLarge: ErrorBuilder;
LoginTimeout: ErrorBuilder;
NoResponse: ErrorBuilder;
RetryWith: ErrorBuilder;
BlockedByWindowsParentalControls: ErrorBuilder;
Redirect: ErrorBuilder;
UnavailableForLegalReasons: ErrorBuilder;
RequestHeaderTooLarge: ErrorBuilder;
CertError: ErrorBuilder;
NoCert: ErrorBuilder;
HttpToHttps: ErrorBuilder;
ClientClosedRequest: ErrorBuilder;
InternalServerError: ErrorBuilder;
NotImplemented: ErrorBuilder;
BadGateway: ErrorBuilder;
ServiceUnavailable: ErrorBuilder;
GatewayTimeout: ErrorBuilder;
HttpVersionNotSupported: ErrorBuilder;
VariantAlsoNegotiates: ErrorBuilder;
InsufficientStorage: ErrorBuilder;
LoopDetected: ErrorBuilder;
BandwidthLimitExceeded: ErrorBuilder;
NotExtended: ErrorBuilder;
NetworkAuthenticationRequired: ErrorBuilder;
OriginError: ErrorBuilder;
ConnectionTimedOut: ErrorBuilder;
ProxyDeclinedRequest: ErrorBuilder;
ATimeoutOccured: ErrorBuilder;
NetworkReadTimeoutError: ErrorBuilder;
NetworkConnectTimeoutError: ErrorBuilder;
// Error builders by statusCode.
400: ErrorBuilder;
401: ErrorBuilder;
402: ErrorBuilder;
403: ErrorBuilder;
404: ErrorBuilder;
405: ErrorBuilder;
406: ErrorBuilder;
407: ErrorBuilder;
408: ErrorBuilder;
409: ErrorBuilder;
410: ErrorBuilder;
411: ErrorBuilder;
412: ErrorBuilder;
413: ErrorBuilder;
414: ErrorBuilder;
415: ErrorBuilder;
416: ErrorBuilder;
417: ErrorBuilder;
418: ErrorBuilder;
419: ErrorBuilder;
420: ErrorBuilder;
422: ErrorBuilder;
423: ErrorBuilder;
424: ErrorBuilder;
425: ErrorBuilder;
426: ErrorBuilder;
428: ErrorBuilder;
429: ErrorBuilder;
431: ErrorBuilder;
440: ErrorBuilder;
444: ErrorBuilder;
449: ErrorBuilder;
450: ErrorBuilder;
451: ErrorBuilder;
494: ErrorBuilder;
495: ErrorBuilder;
496: ErrorBuilder;
497: ErrorBuilder;
499: ErrorBuilder;
500: ErrorBuilder;
501: ErrorBuilder;
502: ErrorBuilder;
503: ErrorBuilder;
504: ErrorBuilder;
505: ErrorBuilder;
506: ErrorBuilder;
507: ErrorBuilder;
508: ErrorBuilder;
509: ErrorBuilder;
510: ErrorBuilder;
511: ErrorBuilder;
520: ErrorBuilder;
522: ErrorBuilder;
523: ErrorBuilder;
524: ErrorBuilder;
598: ErrorBuilder;
599: ErrorBuilder;
}
/** Constructor function for the HttpError class. */
interface HttpErrorStatic {
new(config?: string | Error | Config, extra?: {}): HttpError;
}
/** An instance of the HttpError class. */
interface HttpError extends Error {
/** A human-readable title for the HTTP error. */
title: string;
code: string;
/** The HTTP response status code for the HTTP error. */
statusCode: number;
toObject(...skip: (string|RegExp)[]): any;
}
/** Configuration object for constructing HttpErrors. */
interface Config {
/** A descriptive human-readable title describing the error's cause. */
message?: string;
/** The underlying exception that caused the HTTP error. */
cause?: Error;
/** A detailed human-readable description of the error's cause and possible solutions. */
details?: string;
/**
* The methods allowed for this URL.
* This property is only available for 405 Method Not Allowed errors
* and can be used to populate the Allow header.
*/
allowed?: string[];
/**
* The minimum delay before the request should be attempted again.
* This property is only available for 429 Too Many Requests and 420 Enhance Your Calm
* (Twitter API) errors and can be used to populate the Retry-After header.
*/
retryAfter?: any;
/**
* The parameters with which the request should be retried.
* This property is only available for 449 Retry With (Microsoft) errors and can be
* used to populate the response status message.
*/
parameters?: any;
/**
* The location for which the request should be repeated.
* This property is only available for 451 Redirect (Microsoft) errors and can be
* used to populate the proprietary X-MS-Location response header.
*/
location?: any;
}
/** Factory function for creating an Error object. */
interface ErrorBuilder {
/**
* Creates an Error object. The new keyword is optional.
* @param {string | Error | Config} config - If config is a string, it will be treated as config.message.
* If config is an Error object, it will be treated as config.cause.
*/
(config?: string | Error | Config): HttpError;
/**
* Creates an Error object. The new keyword is optional.
* @param {string | Error | Config} config - If config is a string, it will be treated as config.message.
* If config is an Error object, it will be treated as config.cause.
*/
new (config?: string | Error | Config): HttpError;
}
// The module value satisfies the HttpErr interface.
var _: HttpErr;
export = _;
}

View File

@@ -0,0 +1,4 @@
/// <reference path="../jquery/jquery.d.ts" />
/// <reference path="jquery-urlparam.d.ts" />
console.log($.urlParam('variable'));

10
jquery-urlparam/jquery-urlparam.d.ts vendored Normal file
View File

@@ -0,0 +1,10 @@
// Type definitions for jquery-urlparam
// Project: https://gist.github.com/stpettersens/e1f4478f299b6f4905c1
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />
interface JQueryStatic {
urlParam(variable: string): string;
}

View File

@@ -1207,12 +1207,24 @@ result = <boolean>_(1).isArray();
result = <boolean>_<any>([]).isArray();
result = <boolean>_({}).isArray();
// _.isBoolean
result = <boolean>_.isBoolean(any);
result = <boolean>_(1).isBoolean();
result = <boolean>_<any>([]).isBoolean();
result = <boolean>_({}).isBoolean();
// _.isDate
result = <boolean>_.isDate(any);
result = <boolean>_(42).isDate();
result = <boolean>_<any>([]).isDate();
result = <boolean>_({}).isDate();
// _.isElement
result = <boolean>_.isElement(any);
result = <boolean>_(42).isElement();
result = <boolean>_<any>([]).isElement();
result = <boolean>_({}).isElement();
// _.isEmpty
result = <boolean>_.isEmpty([1, 2, 3]);
result = <boolean>_.isEmpty({});
@@ -1260,12 +1272,30 @@ result = <boolean>_(undefined).isNaN();
result = <boolean>_.isNative(Array.prototype.push);
result = <boolean>_(Array.prototype.push).isNative();
// _.isNull
result = <boolean>_.isNull(any);
result = <boolean>_(1).isNull();
result = <boolean>_<any>([]).isNull();
result = <boolean>_({}).isNull();
// _.isNumber
result = <boolean>_.isNumber(any);
result = <boolean>_(1).isNumber();
result = <boolean>_<any>([]).isNumber();
result = <boolean>_({}).isNumber();
// _.isObject
result = <boolean>_.isObject(any);
result = <boolean>_(1).isObject();
result = <boolean>_<any>([]).isObject();
result = <boolean>_({}).isObject();
// _.isPlainObject
result = <boolean>_.isPlainObject(any);
result = <boolean>_(1).isPlainObject();
result = <boolean>_<any>([]).isPlainObject();
result = <boolean>_({}).isPlainObject();
// _.isRegExp
result = <boolean>_.isRegExp(any);
result = <boolean>_(1).isRegExp();
@@ -1473,10 +1503,6 @@ interface FirstSecond {
}
result = <FirstSecond>_.invert({ 'first': 'moe', 'second': 'larry' });
result = <boolean>_.isBoolean(null);
result = <boolean>_.isElement(document.body);
// _.isEqual (alias: _.eq)
result = <boolean>_.isEqual(1, 1);
result = <boolean>_(1).isEqual(1);
@@ -1502,13 +1528,6 @@ result = <boolean>_(testEqArray).isEqual(testEqOtherArray, testEqCustomizerFn);
result = <boolean>_.eq(testEqArray, testEqOtherArray, testEqCustomizerFn);
result = <boolean>_(testEqArray).eq(testEqOtherArray, testEqCustomizerFn);
result = <boolean>_.isNull(null);
result = <boolean>_.isNull(undefined);
result = <boolean>_.isObject({});
result = <boolean>_.isObject([1, 2, 3]);
result = <boolean>_.isObject(1);
class Stooge {
constructor(
public name: string,
@@ -1516,10 +1535,6 @@ class Stooge {
) { }
}
result = <boolean>_.isPlainObject(new Stooge('moe', 40));
result = <boolean>_.isPlainObject([1, 2, 3]);
result = <boolean>_.isPlainObject({ 'name': 'moe', 'age': 40 });
result = <string[]>_.keys({ 'one': 1, 'two': 2, 'three': 3 });
result = <string[]>_({ 'one': 1, 'two': 2, 'three': 3 }).keys().value();
@@ -1637,8 +1652,6 @@ var testAttempFn: TestAttemptFn;
result = <TResult|Error>_.attempt<TResult>(testAttempFn);
result = <TResult|Error>_(testAttempFn).attempt<TResult>();
result = <{ name: string }>_.identity({ 'name': 'moe' });
_.mixin({
'capitalize': function (string) {
return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();
@@ -1714,21 +1727,6 @@ result = <number[]>_(10).range().value();
result = <number[]>_(1).range(11).value();
result = <number[]>_(0).range(30, 5).value();
result = <_.TemplateExecutor>_.template('hello <%= name %>');
result = <string>_.template('<b><%- value %></b>', { 'value': '<script>' });
var listTemplate = '<% _.forEach(people, function(name) { %><li><%- name %></li><% }); %>';
result = <string>_.template(listTemplate, { 'people': ['moe', 'larry'] });
result = <string>_.template('hello ${ name }', { 'name': 'curly' });
result = <string>_.template('<% print("hello " + name); %>!', { 'name': 'larry' });
var listTemplate = '<% $.each(people, function(name) { %><li><%- name %></li><% }); %>';
result = <string>_.template(listTemplate, { 'people': ['moe', 'larry'] }, { 'imports': { '$': jQuery } });
result = <_.TemplateExecutor>_.template('hello <%= name %>', null, /*sourceURL:*/ '/basic/greeting.jst');
result = <_.TemplateExecutor>_.template('hi <%= data.name %>!', null, { 'variable': 'data' });
result = <string>(<_.TemplateExecutor>result).source;
class Mage {
public castSpell(n: number) {
return n;
@@ -1739,14 +1737,6 @@ class Mage {
}
}
var mage = new Mage();
result = _.times(3, <() => number>_.partial(_.random, 1, 6));
result = _.times(3, function (n: number) { mage.castSpell(n); });
result = _.times(3, function (n: number) { this.cast(n); }, mage);
result = <string>_.uniqueId('contact_');
result = <string>_.uniqueId();
/*********
* String
*********/
@@ -1755,7 +1745,9 @@ result = <string>_.uniqueId();
result = <string>_.camelCase('Foo Bar');
result = <string>_('Foo Bar').camelCase();
// _.capitalize
result = <string>_.capitalize('fred');
result = <string>_('fred').capitalize();
// _.deburr
result = <string>_.deburr('déjà vu');
@@ -1827,6 +1819,27 @@ result = <boolean>_.startsWith('abc', 'a', 1);
result = <boolean>_('abc').startsWith('a');
result = <boolean>_('abc').startsWith('a', 1);
// _.template
interface TestTemplateOptions {
escape?: RegExp;
evaluate?: RegExp;
imports?: _.Dictionary<any>;
interpolate?: RegExp;
variable?: string;
}
interface TestTemplateExecutor {
(obj?: Object): string;
source: string;
}
{
let testTemplateOptions: TestTemplateOptions
let result: TestTemplateExecutor;
result = _.template('');
result = _.template('', testTemplateOptions);
result = _('').template();
result = _('').template(testTemplateOptions);
}
// _.trim
result = <string>_.trim();
result = <string>_.trim(' abc ');
@@ -1886,6 +1899,22 @@ result = <() => boolean>_(true).constant<boolean>();
result = <() => any[]>_(['a']).constant<any[]>();
result = <() => {}>_({}).constant<{}>();
// _.identity
{
let testIdentityValue: TResult;
let result: TResult;
result = _.identity<TResult>(testIdentityValue);
result = _(testIdentityValue).identity();
}
{
let result: number;
result = _(42).identity();
}
{
let result: boolean[];
result = _<boolean>([]).identity();
}
// _.method
class TestMethod {
a = {
@@ -1910,6 +1939,26 @@ result = <number>(_.methodOf<number>(TestMethodOfObject, 1, 2))(['a', '0']);
result = <number>(_(TestMethodOfObject).methodOf<number>(1, 2).value())('a[0]');
result = <number>(_(TestMethodOfObject).methodOf<number>(1, 2).value())(['a', '0']);
// _.uniqueId
result = <string>_.uniqueId();
result = <string>_.uniqueId('');
result = <string>_('').uniqueId();
result = <string>_.VERSION;
result = <_.Support>_.support;
result = <_.TemplateSettings>_.templateSettings;
// _.times
{
let result: number[];
result = _.times(42);
result = _(42).times().value();
}
{
let testTimesFn: (num: number) => TResult;
let result: TResult[];
result = _.times(42, testTimesFn);
result = _.times(42, testTimesFn, any);
result = _(42).times(testTimesFn).value();
result = _(42).times(testTimesFn, any).value();
}

322
lodash/lodash.d.ts vendored
View File

@@ -6196,6 +6196,23 @@ declare module _ {
isArray(): boolean;
}
//_.isBoolean
interface LoDashStatic {
/**
* Checks if value is classified as a boolean primitive or object.
* @param value The value to check.
* @return Returns true if value is correctly classified, else false.
**/
isBoolean(value?: any): boolean;
}
interface LoDashWrapperBase<T, TWrapper> {
/**
* @see _.isBoolean
*/
isBoolean(): boolean;
}
//_.isDate
interface LoDashStatic {
/**
@@ -6213,6 +6230,23 @@ declare module _ {
isDate(): boolean;
}
//_.isElement
interface LoDashStatic {
/**
* Checks if value is a DOM element.
* @param value The value to check.
* @return Returns true if value is a DOM element, else false.
*/
isElement(value?: any): boolean;
}
interface LoDashWrapperBase<T, TWrapper> {
/**
* @see _.isElement
*/
isElement(): boolean;
}
//_.isEmpty
interface LoDashStatic {
/**
@@ -6346,6 +6380,23 @@ declare module _ {
isNative(): boolean;
}
//_.isNull
interface LoDashStatic {
/**
* Checks if value is null.
* @param value The value to check.
* @return Returns true if value is null, else false.
**/
isNull(value?: any): boolean;
}
interface LoDashWrapperBase<T, TWrapper> {
/**
* see _.isNull
*/
isNull(): boolean;
}
//_.isNumber
interface LoDashStatic {
/**
@@ -6364,6 +6415,45 @@ declare module _ {
isNumber(): boolean;
}
//_.isObject
interface LoDashStatic {
/**
* Checks if value is the language type of Object. (e.g. arrays, functions, objects, regexes, new Number(0),
* and new String(''))
* @param value The value to check.
* @return Returns true if value is an object, else false.
**/
isObject(value?: any): boolean;
}
interface LoDashWrapperBase<T, TWrapper> {
/**
* see _.isObject
*/
isObject(): boolean;
}
//_.isPlainObject
interface LoDashStatic {
/**
* Checks if value is a plain object, that is, an object created by the Object constructor or one with a
* [[Prototype]] of null.
*
* Note: This method assumes objects created by the Object constructor have no inherited enumerable properties.
*
* @param value The value to check.
* @return Returns true if value is a plain object, else false.
*/
isPlainObject(value?: any): boolean;
}
interface LoDashWrapperBase<T, TWrapper> {
/**
* see _.isPlainObject
*/
isPlainObject(): boolean;
}
//_.isRegExp
interface LoDashStatic {
/**
@@ -7063,26 +7153,6 @@ declare module _ {
invert(object: any): any;
}
//_.isBoolean
interface LoDashStatic {
/**
* Checks if value is a boolean value.
* @param value The value to check.
* @return True if the value is a boolean value, else false.
**/
isBoolean(value?: any): boolean;
}
//_.isElement
interface LoDashStatic {
/**
* Checks if value is a DOM element.
* @param value The value to check.
* @return True if the value is a DOM element, else false.
**/
isElement(value?: any): boolean;
}
//_.isEqual
interface EqCustomizer {
(value: any, other: any, indexOrKey?: number|string): boolean;
@@ -7163,37 +7233,6 @@ declare module _ {
thisArg?: any): boolean;
}
//_.isNull
interface LoDashStatic {
/**
* Checks if value is null.
* @param value The value to check.
* @return True if the value is null, else false.
**/
isNull(value?: any): boolean;
}
//_.isObject
interface LoDashStatic {
/**
* Checks if value is the language type of Object. (e.g. arrays, functions, objects, regexes,
* new Number(0), and new String(''))
* @param value The value to check.
* @return True if the value is an object, else false.
**/
isObject(value?: any): boolean;
}
//_.isPlainObject
interface LoDashStatic {
/**
* Checks if value is an object created by the Object constructor.
* @param value The value to check.
* @return True if value is a plain object, else false.
**/
isPlainObject(value?: any): boolean;
}
//_.keys
interface LoDashStatic {
/**
@@ -7583,8 +7622,16 @@ declare module _ {
camelCase(): string;
}
//_.capitalize
interface LoDashStatic {
capitalize(str?: string): string;
capitalize(string?: string): string;
}
interface LoDashWrapper<T> {
/**
* @see _.capitalize
*/
capitalize(): string;
}
//_.deburr
@@ -7828,6 +7875,50 @@ declare module _ {
startsWith(target?: string, position?: number): boolean;
}
//_.template
interface TemplateExecutor {
(data?: Object): string;
source: string;
}
interface LoDashStatic {
/**
* Creates a compiled template function that can interpolate data properties in "interpolate" delimiters,
* HTML-escape interpolated data properties in "escape" delimiters, and execute JavaScript in "evaluate"
* delimiters. Data properties may be accessed as free variables in the template. If a setting object is
* provided it takes precedence over _.templateSettings values.
*
* Note: In the development build _.template utilizes
* [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) for easier
* debugging.
*
* For more information on precompiling templates see
* [lodash's custom builds documentation](https://lodash.com/custom-builds).
*
* For more information on Chrome extension sandboxes see
* [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
*
* @param string The template string.
* @param options The options object.
* @param options.escape The HTML "escape" delimiter.
* @param options.evaluate The "evaluate" delimiter.
* @param options.imports An object to import into the template as free variables.
* @param options.interpolate The "interpolate" delimiter.
* @param options.variable The data object variable name.
* @return Returns the compiled template function.
*/
template(
string: string,
options?: TemplateSettings): TemplateExecutor;
}
interface LoDashWrapper<T> {
/**
* @see _.template
*/
template(options?: TemplateSettings): TemplateExecutor;
}
//_.trim
interface LoDashStatic {
/**
@@ -7971,13 +8062,34 @@ declare module _ {
//_.identity
interface LoDashStatic {
/**
* This method returns the first argument provided to it.
* @param value Any value.
* @return value.
**/
* This method returns the first argument provided to it.
* @param value Any value.
* @return Returns value.
*/
identity<T>(value?: T): T;
}
interface LoDashWrapper<T> {
/**
* @see _.identity
*/
identity(): T;
}
interface LoDashArrayWrapper<T> {
/**
* @see _.identity
*/
identity(): T[];
}
interface LoDashObjectWrapper<T> {
/**
* @see _.identity
*/
identity(): T;
}
//_.method
interface LoDashStatic {
/**
@@ -8192,75 +8304,61 @@ declare module _ {
runInContext(context: any): typeof _;
}
//_.template
interface LoDashStatic {
/**
* A micro-templating method that handles arbitrary delimiters, preserves whitespace, and
* correctly escapes quotes within interpolated code.
*
* Note: In the development build, _.template utilizes sourceURLs for easier debugging. See
* http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl
*
* For more information on precompiling templates see:
* http://lodash.com/#custom-builds
*
* For more information on Chrome extension sandboxes see:
* http://developer.chrome.com/stable/extensions/sandboxingEval.html
* @param text The template text.
* @param data The data object used to populate the text.
* @param options The options object.
* @param options.escape The "escape" delimiter.
* @param options.evaluate The "evaluate" delimiter.
* @param options.import An object to import into the template as local variables.
* @param options.interpolate The "interpolate" delimiter.
* @param sourceURL The sourceURL of the template's compiled source.
* @param variable The data object variable name.
* @return Returns the compiled Lo-Dash HTML template or a TemplateExecutor if no data is passed.
**/
template(
text: string): TemplateExecutor;
/**
* @see _.template
**/
template(
text: string,
data: any,
options?: TemplateSettings,
sourceURL?: string,
variable?: string): any /* string or TemplateExecutor*/;
}
interface TemplateExecutor {
(...data: any[]): string;
source: string;
}
//_.times
interface LoDashStatic {
/**
* Executes the callback n times, returning an array of the results of each callback execution.
* The callback is bound to thisArg and invoked with one argument; (index).
* @param n The number of times to execute the callback.
* @param callback The function called per iteration.
* @param thisArg The this binding of callback.
**/
* Invokes the iteratee function n times, returning an array of the results of each invocation. The iteratee is
* bound to thisArg and invoked with one argument; (index).
*
* @param n The number of times to invoke iteratee.
* @param iteratee The function invoked per iteration.
* @param thisArg The this binding of iteratee.
* @return Returns the array of results.
*/
times<TResult>(
n: number,
callback: (num: number) => TResult,
context?: any): TResult[];
iteratee: (num: number) => TResult,
thisArg?: any
): TResult[];
/**
* @see _.times
*/
times(n: number): number[];
}
interface LoDashWrapper<T> {
/**
* @see _.times
*/
times<TResult>(
iteratee: (num: number) => TResult,
thisArgs?: any
): LoDashArrayWrapper<TResult>;
/**
* @see _.times
*/
times(): LoDashArrayWrapper<number>;
}
//_.uniqueId
interface LoDashStatic {
/**
* Generates a unique ID. If prefix is provided the ID will be appended to it.
* @param prefix The value to prefix the ID with.
* @return Returns the unique ID.
**/
* Generates a unique ID. If prefix is provided the ID is appended to it.
* @param prefix The value to prefix the ID with.
* @return Returns the unique ID.
*/
uniqueId(prefix?: string): string;
}
interface LoDashWrapper<T> {
/**
* @see _.uniqueId
*/
uniqueId(): string;
}
//_.constant
interface LoDashStatic {
/**

View File

@@ -98,5 +98,4 @@ declare module loglevel {
export function noConflict():any;
}
declare
var log:typeof loglevel;
declare var log:typeof loglevel;

View File

@@ -44,7 +44,7 @@ declare module Matter
{
/**
* Clears the engine including the world, pairs and broadphase.
* @param engine
* @param engine
*/
static clear(engine:Engine):void;
@@ -844,24 +844,24 @@ declare module Matter
*/
type?:string;
}
export class Query
{
/**
* Casts a ray segment against a set of bodies and returns all collisions, ray width is optional. Intersection points are not provided.
*
* @param bodies
* @param startPoint
* @param endPoint
*
* @param bodies
* @param startPoint
* @param endPoint
* @param [rayWidth]
*
*
* @returns Object[] Collisions
*/
static ray( bodies:Array<Body>, startPoint:Vector, endPoint:Vector, rayWidth?:number ):Array<any>;
/**
* Returns all bodies whose bounds are inside (or outside if set) the given set of bounds, from the given set of bodies.
*
*
* @param bodies
* @param bounds
* @returns Body[] The bodies matching the query
@@ -1375,7 +1375,7 @@ declare module Matter
* @param vertices
* @returns The polygon's moment of inertia
*/
static inertia( vertices:Array<Vector>, mass:number ):number;
static inertia ( vertices:Array<Vector>, mass:number ):number;
/**
* Rotates the set of vertices in-place.
@@ -1384,7 +1384,7 @@ declare module Matter
* @param angle
* @param point
*/
static static ( vertices:Array<Vector>, angle:number, point:Vector ):void;
static rotate ( vertices:Array<Vector>, angle:number, point:Vector ):void;
/**
* Scales the vertices from a point (default is centre) in-place.

View File

@@ -75,3 +75,5 @@ moment.tz.load({
});
moment.tz.names();
moment.tz.setDefault('America/Los_Angeles');

View File

@@ -68,6 +68,8 @@ interface MomentTimezone {
}): void;
names(): string[];
setDefault(timezone: string): void;
}
declare module 'moment-timezone' {

View File

@@ -47,3 +47,7 @@ interface MustacheStatic {
}
declare var Mustache: MustacheStatic;
declare module 'mustache' {
export = Mustache;
}

View File

@@ -109,6 +109,10 @@ var sql = "SELECT * FROM ?? WHERE ?? = ?";
var inserts = ['users', 'id', userId];
sql = mysql.format(sql, inserts);
var sql = "INSERT INTO posts SET ?";
var post = { id: 1, title: 'Hello MySQL' };
sql = mysql.format(sql, post);
connection.config.queryFormat = function (query, values) {
if (!values) return query;
return query.replace(/\:(\w+)/g, function (txt: string, key: string) {

3
mysql/mysql.d.ts vendored
View File

@@ -15,6 +15,7 @@ declare module "mysql" {
function escape(value: any): string;
function format(sql: string): string;
function format(sql: string, values: Array<any>): string;
function format(sql: string, values: any): string;
interface IMySql {
createConnection(connectionUri: string): IConnection;
@@ -24,6 +25,7 @@ declare module "mysql" {
escape(value: any): string;
format(sql: string): string;
format(sql: string, values: Array<any>): string;
format(sql: string, values: any): string;
}
interface IConnectionStatic {
@@ -69,6 +71,7 @@ declare module "mysql" {
format(sql: string): string;
format(sql: string, values: Array<any>): string;
format(sql: string, values: any): string;
on(ev: string, callback: (...args: any[]) => void): IConnection;
on(ev: 'error', callback: (err: IError) => void): IConnection;

View File

@@ -0,0 +1,52 @@
/// <reference path="ng-dialog.d.ts" />
/// <reference path="../angularjs/angular.d.ts" />
var app = angular.module('testModule', ['ngDialog']);
class DialogTestController {
constructor(ngDialog: angular.dialog.IDialogService) {
ngDialog.close("login-popup", "bye");
ngDialog.closeAll("bye");
var defaults = ngDialog.getDefaults();
var dialogs = ngDialog.getOpenDialogs();
ngDialog.isOpen("bye");
var loginDialog = ngDialog.open({
template: "login.html",
className: "default flat-ui",
closeByEscape: false,
name: "login-popup"
});
if (loginDialog.id === "login-popup") {
loginDialog.close("closing");
}
var deleteConfirm = ngDialog.openConfirm({
template: "confirm.html"
});
}
}
class LoginDialogController {
constructor($scope: angular.dialog.IDialogScope) {
$scope.closeThisDialog("bye");
}
}
app.controller('TestController', DialogTestController);
app.config((ngDialogProvider: angular.dialog.IDialogProvider) => {
ngDialogProvider.setDefaults({
className: "flat-ui"
})
});

105
ng-dialog/ng-dialog.d.ts vendored Normal file
View File

@@ -0,0 +1,105 @@
// Type definitions for ngDialog
// Project: https://github.com/likeastore/ngDialog
// Definitions by: Stephen Lautier <https://github.com/stephenlautier>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts" />
declare module angular.dialog {
interface IDialogService {
getDefaults(): IDialogOptions;
open(options: IDialogOpenOptions): IDialogOpenResult;
openConfirm(options: IDialogOpenOptions): IPromise<any>;
/**
* Determine whether the specified dialog is open or not.
* @param id Dialog id to check for.
* @returns {boolean} Indicating whether it exists or not.
*/
isOpen(id: string): boolean;
close(id: string, value?: any): void;
closeAll(value?: any): void;
getOpenDialogs(): string[];
}
interface IDialogOpenResult {
id: string;
close: (value?: string) => void;
closePromise: IPromise<void>;
}
interface IDialogProvider extends angular.IServiceProvider {
/**
* Default options for the dialogs.
* @param defaultOptions
* @returns {}
*/
setDefaults(defaultOptions: IDialogOptions): void;
}
/**
* Dialog Scope which extends the $scope.
*/
interface IDialogScope extends angular.IScope {
/**
* This allows you to close dialog straight from handler in a popup element.
* @param value Any value passed to this function will be attached to the object which resolves on the close promise for this dialog.
* For dialogs opened with the openConfirm() method the value is used as the reject reason.
*/
closeThisDialog(value?: any): void;
}
interface IDialogOptions {
/**
* This option allows you to control the dialog's look, you can use built-in themes or create your own styled modals.
* It will be appended with the "ngdialog" class e.g. className is "default-theme flat-ui" it will be class="ngdialog default-theme flat-ui".
*/
className?: string;
/**
* If false it allows to hide overlay div behind the modals, default true.
*/
overlay?: boolean;
/**
* If false it allows to hide close button on modals, default true.
*/
showClose?: boolean;
/**
* It allows to close modals by clicking Esc button, default true.
* This will close all open modals if there several of them open at the same time.
*/
closeByEscape?: boolean;
/**
* It allows to close modals by clicking on overlay background, default true. If @see Hammer.js is loaded, it will listen for tap instead of click.
*/
closeByDocument?: boolean;
/**
* If true allows to use plain string as template, default false.
*/
plain?: boolean;
/**
* Give a name for a dialog instance. It is useful for identifying specific dialog if there are multiple dialog boxes opened.
*/
name?: string | number;
preCloseCallback?: string|Function;
}
/**
* Options which are provided to open a dialog.
*/
interface IDialogOpenOptions extends IDialogOptions {
template: string;
controller?: string|any;
controllerAs?: string;
/**
* Scope object that will be passed to dialog. If you use controller with separate $scope service this object will be passed to $scope.$parent param.
*/
scope?: ng.IScope;
}
}

1
nock/nock.d.ts vendored
View File

@@ -56,6 +56,7 @@ declare module "nock" {
reply(responseCode: number, body?: Object, headers?: Object): Scope;
reply(responseCode: number, callback: (uri: string, body: string) => string, headers?: Object): Scope;
replyWithFile(responseCode: number, fileName: string): Scope;
replyWithError(errorMessage: string): Scope;
defaultReplyHeaders(headers: Object): Scope;

View File

@@ -1,18 +1,63 @@
///<reference path='./node-mysql-wrapper.d.ts' />
import wrapper = require("node-mysql-wrapper");
var db = wrapper("mysql://kataras:pass@127.0.0.1/taglub?debug=false&charset=utf8");
var db = wrapper.wrap("mysql://kataras:pass@127.0.0.1/taglub?debug=false&charset=utf8");
class User { //or interface
userId: number;
username: string;
mail: string;
comments: Comment[];
}
interface Comment {
commentId: number;
content: string;
}
db.ready(() => {
db.table("users").on("insert", (parsedResults) => {
var usersDb = db.table<User>("users");
usersDb.findById(16, (_user) => {
console.log("TEST1: \n");
console.log("FOUND USER WITH USERNAME: " + _user.username);
});
/* OR usersDb.findById(18).then(_user=> {
console.log("FOUND USER WITH USERNAME: " + _user.username);
}, (err) => { console.log("ERROR ON FETCHING FINDBY ID: " + err) });
*/
usersDb.find({ userId: 18, comments: { userId: '=' } }, _users=> {
var _user = _users[0];
console.log("TEST2: \n");
console.log(_user.username + " with ");
console.log(_user.comments.length + " comments ");
_user.comments.forEach(_comment=> {
console.log("--------------\n" + _comment.content);
});
});
db.table("users").findAll().then((results) => {
console.dir(results);
usersDb.safeRemove(5620, answer=> {
console.log("TEST 3: \n");
console.log(answer.affectedRows + ' (1) has removed from table: ' + answer.table);
});
db.table("users").find({ userId: 18 }, (results) => {
console.dir(results[0]);
var auser = new User();
auser.username = ' just a username';
auser.mail = ' just an email';
usersDb.save(auser, newUser=> {
console.log("TEST 4: \n");
console.log("NEW USER HAS CREATED WITH NEW USER ID: " + newUser.userId);
});
});

View File

@@ -3,129 +3,129 @@
// Definitions by: Makis Maropoulos <https://github.com/kataras>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///<reference path='../mysql/mysql.d.ts' />
///<reference path='./../mysql/mysql.d.ts' />
///<reference path='./../bluebird/bluebird.d.ts' />
declare module "node-mysql-wrapper" {
import Mysql = require("mysql");
import * as Mysql from 'mysql';
import * as Promise from 'bluebird';
import {EventEmitter} from 'events';
function MySQLWrapperBuilder(connection: string | Mysql.IConnection, ...useOnlyTables: string[]): MySQLWrapper;
var EQUAL_TO_PROPERTY_SYMBOL: string;
enum EVENT_TYPES {
INSERT, UPDATE, DELETE, SAVE
interface Map<T> {
[index: string]: T;
}
interface MySQLConnection {
new (connection: string | Mysql.IConnection): MySQLConnection;
class MysqlUtil {
constructor();
static copyObject<T>(object: T): T;
static toObjectProperty(columnKey: string): string;
static toRowProperty(objectKey: string): string;
static forEachValue<T, U>(map: Map<T>, callback: (value: T) => U): U;
static forEachKey<T, U>(map: Map<T>, callback: (key: string) => U): U;
}
create(connectionUri: string): void;
create(connection: Mysql.IConnection): void;
interface ICriteria {
rawCriteriaObject: any;
tables: string[];
noDatabaseProperties: string[];
whereClause: string;
}
class Criteria implements ICriteria {
rawCriteriaObject: any;
tables: string[];
noDatabaseProperties: string[];
whereClause: string;
constructor(rawCriteriaObject: any, tables: string[], noDatabaseProperties: string[], whereClause: string);
}
class CriteriaBuilder<T> {
private _table;
constructor(table: MysqlTable<T>);
build(rawCriteriaObject: any): Criteria;
}
class MysqlConnection extends EventEmitter {
connection: Mysql.IConnection;
eventTypes: string[];
tableNamesToUseOnly: any[];
tables: MysqlTable<any>[];
constructor(connection: string | Mysql.IConnection);
create(connection: string | Mysql.IConnection): void;
attach(connection: Mysql.IConnection): void;
end(callback: () => void): void;
end(callback?: (error: any) => void): void;
destroy(): void;
link<U>(callback?: () => void): Promise<U>;
connect<U>(callback?: () => void): Promise<U>;
useOnly(...useOnlyTables: string[]): void;
fetchDatabaseInfornation<U>(): Promise<U>;
link(readyCallback?: () => void): Promise<void>;
useOnly(...tables: any[]): void;
fetchDatabaseInfornation(): Promise<void>;
escape(val: string): string;
notice(tableWhichCalled: string, queryStr: string, parsedResults: Object[]): void;
fireEvent(tableWhichCalled: string, queryStr: string, parsedResults: Object[]): void;
watch(tableName: string, evtType: EVENT_TYPES | string, callback: (parsedResults: Object[]) => void): void;
on(tableName: string, evtType: EVENT_TYPES | string, callback: (parsedResults: Object[]) => void): void;
unwatch(tableName: string, evtType: EVENT_TYPES | string, callbackToRemove: () => void): void;
off(tableName: string, evtType: EVENT_TYPES | string, callbackToRemove: () => void): void;
query(mysqlQuery: Mysql.IQueryFunction): void;
table(tableName: string): MySQLTable;
notice(tableWhichCalled: string, queryStr: string, parsedResults: any[]): void;
watch(tableName: string, evtType: any, callback: (parsedResults: any[]) => void): void;
unwatch(tableName: string, evtType: string, callbackToRemove: (parsedResults: any[]) => void): void;
query(queryStr: string, callback: (err: Mysql.IError, results: any) => any, queryArguments?: any[]): void;
table<T>(tableName: string): MysqlTable<T>;
}
interface MySQLTable {
new (tableName: string, connection: MySQLConnection): MySQLTable;
setColumns(columns: string[]): void;
setPrimaryKey(primaryKeyColumnName: string): void;
toString(): string;
model(jsObject: Object): MySQLModel;
watch(evtType: EVENT_TYPES | string, callback: (parsedResults: Object[]) => void): void;
on(evtType: EVENT_TYPES | string, callback: (parsedResults: Object[]) => void): void;
unwatch(evtType: EVENT_TYPES|string, callbackToRemove: () => void): void;
off(evtType: EVENT_TYPES|string, callbackToRemove: () => void): void;
///START DYNAMIC METHODS FOR TABLES CANNOT BE PRE-DEFINED WITH DYNAMIC WAY, YET, SO:
find<U>(jsObject: Object, callback?: (results: Object[]) => void): Promise<U>;
save<U>(jsObject: Object, callback?: (results: Object[]) => void): Promise<U>;
remove<U>(jsObject: Object, callback?: (results: Object[]) => void): Promise<U>;
delete<U>(jsObject: Object, callback?: (results: Object[]) => void): Promise<U>;
safeDelete<U>(jsObject: Object, callback?: (results: Object[]) => void): Promise<U>;
///END
findAll<U>(callback?: (results: Object[]) => void): Promise<U>;
extend(functionName: string, functionToBeSupported: () => any): void;
class MysqlTable<T> {
private _name;
private _connection;
private _columns;
private _primaryKey;
private _criteriaBuilder;
constructor(tableName: string, connection: MysqlConnection);
columns: string[];
primaryKey: string;
connection: MysqlConnection;
name: string;
on(evtType: string, callback: (parsedResults: any[]) => void): void;
off(evtType: string, callbackToRemove: (parsedResults: any[]) => void): void;
has(extendedFunctionName: string): boolean;
extend(functionName: string, theFunction: (...args: any[]) => any): void;
objectFromRow(row: any): any;
rowFromObject(obj: any): any;
getRowAsArray(jsObject: any): Array<any>;
getPrimaryKeyValue(jsObject: any): number | string;
parseQueryResult(result: any, criteria: ICriteria): Promise<any>;
find(criteriaRawJsObject: any, callback?: (_results: T[]) => any): Promise<T[]>;
findById(id: number | string, callback?: (result: T) => any): Promise<T>;
findAll(callback?: (_results: T[]) => any): Promise<T[]>;
save(criteriaRawJsObject: any, callback?: (_result: any) => any): Promise<any>;
safeRemove(id: number | string, callback?: (_result: {
affectedRows: number;
table: string;
}) => any): Promise<{
affectedRows: number;
table: string;
}>;
remove(criteriaRawJsObject: any, callback?: (_result: {
affectedRows: number;
table: string;
}) => any): Promise<{
affectedRows: number;
table: string;
}>;
}
interface MySQLModel {
new (table: MySQLTable, jsObject: Object): MySQLModel;
toObjectProperty(columnKey: string): string;
toRowProperty(objectKey: string): string;
create(jsObject: Object): MySQLModel;
reUse(jsObject: Object): MySQLModel;
toRow(): void;
getRawObject(): Object;
parseTable<U>(mysqlTableToSearch: String, parentObject: Object): Promise<U>;
parseResult<U>(result: Object, tablesToSearch: string[]): Promise<U>;
find<U>(parentObj?: Object): Promise<U>;
findAll<U>(): Promise<U>;
save<U>(): Promise<U>;
safeDelete<U>(): Promise<U>;
remove<U>(): Promise<U>;
delete<U>(): Promise<U>;
}
interface MySQLWrapper {
new (connection?: MySQLConnection): MySQLWrapper;
setConnection(connection: MySQLConnection): void;
useOnly(...useOnlyTables: string[]): void;
has(tableName: string): boolean;
has(tableName: string, methodName: string): boolean;
class MysqlWrapper {
connection: MysqlConnection;
readyListenerCallbacks: Function[];
constructor(connection?: MysqlConnection);
static when(..._promises: Promise<any>[]): Promise<any>;
setConnection(connection: MysqlConnection): void;
useOnly(...useTables: any[]): void;
has(tableName: string, functionName?: string): boolean;
ready(callback: () => void): void;
table<T>(tableName: string): MysqlTable<T>;
noticeReady(): void;
removeReadyListener(callback: () => any): void;
query: Mysql.IQueryFunction;
removeReadyListener(callback: () => void): void;
query(queryStr: string, callback: (err: Mysql.IError, results: any) => any, queryArguments?: any[]): void;
destroy(): void;
end(callback?: () => void): void;
when<U>(): Promise<U[]>;
///START: WE CANNOT PRE-DEFINE THE DYNAMIC TABLES INTO PROPERTIES, SO WE USE INDEX(STRING-TABLENAME) TO GET A TABLE
table(tableName: string): MySQLTable;
///END
end(maybeAcallbackError: (err: any) => void): void;
}
export = MySQLWrapperBuilder;
function wrap(mysqlUrlOrObjectOrMysqlAlreadyConnection: Mysql.IConnection | string, ...useTables: any[]): MysqlWrapper;
}

4
node/node-0.11.d.ts vendored
View File

@@ -1089,12 +1089,12 @@ declare module "crypto" {
setAutoPadding(auto_padding: boolean): void;
}
export function createSign(algorithm: string): Signer;
interface Signer {
interface Signer extends NodeJS.WritableStream {
update(data: any): void;
sign(private_key: string, output_format: string): string;
}
export function createVerify(algorith: string): Verify;
interface Verify {
interface Verify extends NodeJS.WritableStream {
update(data: any): void;
verify(object: string, signature: string, signature_format?: string): boolean;
}

View File

@@ -0,0 +1,40 @@
// Test file for offline-js.
/// <reference path="offline-js.d.ts" />
Offline.options = {
checkOnLoad: false,
interceptRequests: true,
checks: {
xhr: { url: '/connection-test' },
image: { url: 'my-image.gif' },
active: 'image'
},
reconnect: {
initialDelay: 3,
delay: 60
},
requests: true,
game: false
};
Offline.check();
Offline.state;
var handler = () => { },
context = {};
Offline.on("up", handler, context);
Offline.on("down", handler, context);
Offline.on("confirmed-up", handler, context);
Offline.on("confirmed-down", handler, context);
Offline.on("checking", handler, context);
Offline.on("reconnect:started", handler, context);
Offline.on("reconnect:stopped", handler, context);
Offline.on("reconnect:tick", handler, context);
Offline.on("reconnect:connecting", handler, context);
Offline.on("reconnect:failure", handler, context);
Offline.on("requests:flush", handler, context);
Offline.on("requests:hold", handler, context);
Offline.off("up", handler);

64
offline-js/offline-js.d.ts vendored Normal file
View File

@@ -0,0 +1,64 @@
// Type definitions for Offline 0.7.14
// Project: https://github.com/HubSpot/offline
// Definitions by: Chris Wrench <https://github.com/cgwrench>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare var Offline: {
options: OfflineOptions;
check: () => void;
state: string;
on(event: "up", handler: (e: Event) => any, context?: any): void;
on(event: "down", handler: (e: Event) => any, context?: any): void;
on(event: "confirmed-up", handler: (e: Event) => any, context?: any): void;
on(event: "confirmed-down", handler: (e: Event) => any, context?: any): void;
on(event: "checking", handler: (e: Event) => any, context?: any): void;
on(event: "reconnect:started", handler: (e: Event) => any, context?: any): void;
on(event: "reconnect:stopped", handler: (e: Event) => any, context?: any): void;
on(event: "reconnect:tick", handler: (e: Event) => any, context?: any): void;
on(event: "reconnect:connecting", handler: (e: Event) => any, context?: any): void;
on(event: "reconnect:failure", handler: (e: Event) => any, context?: any): void;
on(event: "requests:flush", handler: (e: Event) => any, context?: any): void;
on(event: "requests:hold", handler: (e: Event) => any, context?: any): void;
on(event: string, handler: (e: Event) => any, context?: any): void;
off(event: "up", handler?: (e: Event) => any): void;
off(event: "down", handler?: (e: Event) => any): void;
off(event: "confirmed-up", handler?: (e: Event) => any): void;
off(event: "confirmed-down", handler?: (e: Event) => any): void;
off(event: "checking", handler?: (e: Event) => any): void;
off(event: "reconnect:started", handler?: (e: Event) => any): void;
off(event: "reconnect:stopped", handler?: (e: Event) => any): void;
off(event: "reconnect:tick", handler?: (e: Event) => any): void;
off(event: "reconnect:connecting", handler?: (e: Event) => any): void;
off(event: "reconnect:failure", handler?: (e: Event) => any): void;
off(event: "requests:flush", handler?: (e: Event) => any): void;
off(event: "requests:hold", handler?: (e: Event) => any): void;
off(event: string, handler?: (e: Event) => any): void;
};
interface OfflineOptions {
// TODO Should these types be `boolean|Function`?
// The project documentation is not clear here.
checkOnLoad?: boolean;
interceptRequests?: boolean;
requests?: boolean;
game?: boolean;
checks?: OfflineChecks;
reconnect: {
initialDelay: number;
delay: number;
};
}
interface OfflineChecks {
// TODO "xhr" and "image" probably have different options.
// However, this is not stated in the project documentation.
xhr?: OfflineCheck;
image?: OfflineCheck;
active?: string;
}
interface OfflineCheck {
url: string;
}

View File

@@ -33,6 +33,7 @@ var featureFormat: ol.format.Feature;
var geometry: ol.geom.Geometry;
var loadingstrategy: ol.LoadingStrategy;
var tilegrid: ol.tilegrid.TileGrid;
var vector: ol.source.Vector;
//
// ol.Attribution
@@ -112,6 +113,13 @@ geometryResult.getClosestPoint(coordinate, coordinate);
extent = geometryResult.getExtent();
geometryResult.getExtent(extent);
//
// ol.source
//
vector = new ol.source.Vector({
features: [feature]
});
//
// ol.Feature
//

View File

@@ -1,4 +1,4 @@
// Type definitions for OpenLayers v3.6.0
// Type definitions for OpenLayers v3.6.0
// Project: http://openlayers.org/
// Definitions by: Wouter Goedhart <https://github.com/woutergd>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -147,6 +147,21 @@ declare module olx {
/** experimental Whether to wrap the world horizontally. When set to false, only one world will be rendered. When true, tiles will be requested for one world only, but they will be wrapped horizontally to render multiple worlds. The default is true. */
wrapX?: boolean;
}
/**
* Object literal with config options for the map logo.
*/
interface LogoOptions {
/**
* Link url for the logo. Will be followed when the logo is clicked.
*/
href: string;
/**
* Image src for the logo
*/
src: string;
}
interface MapOptions {
@@ -481,6 +496,21 @@ declare module olx {
}
}
module interaction {
interface DefaultsOptions {
altShiftDragRotate?: boolean;
doubleClickZoom?: boolean;
keyboard?: boolean;
mouseWheelZoom?: boolean;
shiftDragZoom?: boolean;
dragPan?: boolean;
pinchRotate?: boolean;
pinchZoom?: boolean;
zoomDelta?: number;
zoomDuration?: number;
}
}
module layer {
interface BaseOptions {
@@ -626,6 +656,97 @@ declare module olx {
}
}
module source {
interface VectorOptions {
/**
* Attributions.
*/
attributions?: Array<ol.Attribution>;
/**
* Features. If provided as {@link ol.Collection}, the features in the source
* and the collection will stay in sync.
*/
features?: Array<ol.Feature> | ol.Collection<ol.Feature>;
/**
* The feature format used by the XHR feature loader when `url` is set.
* Required if `url` is set, otherwise ignored. Default is `undefined`.
*/
format?: ol.format.Feature;
/**
* The loader function used to load features, from a remote source for example.
* Note that the source will create and use an XHR feature loader when `url` is
* set.
*/
loader?: ol.FeatureLoader;
/**
* Logo.
*/
logo?: string | olx.LogoOptions;
/**
* The loading strategy to use. By default an {@link ol.loadingstrategy.all}
* strategy is used, a one-off strategy which loads all features at once.
*/
strategy?: ol.LoadingStrategy;
/**
* Setting this option instructs the source to use an XHR loader (see
* {@link ol.featureloader.xhr}) and an {@link ol.loadingstrategy.all} for a
* one-off download of all features from that URL.
* Requires `format` to be set as well.
*/
url?: string;
/**
* By default, an RTree is used as spatial index. When features are removed and
* added frequently, and the total number of features is low, setting this to
* `false` may improve performance.
*/
useSpatialIndex?: boolean;
/**
* Wrap the world horizontally. Default is `true`. For vector editing across the
* -180° and 180° meridians to work properly, this should be set to `false`. The
* resulting geometry coordinates will then exceed the world bounds.
*/
wrapX?: boolean;
}
}
module style {
interface FillOptions {
color?: ol.Color | string;
}
interface StyleOptions {
geometry?: string | ol.geom.Geometry | ol.style.GeometryFunction;
fill?: ol.style.Fill;
image?: ol.style.Image;
stroke?: ol.style.Stroke;
text?: ol.style.Text;
zIndex?: number;
}
interface TextOptions {
font?: string;
offsetX?: number;
offsetY?: number;
scale?: number;
rotation?: number;
text?: string;
textAlign?: string;
textBaseline?: string;
fill?: ol.style.Fill;
stroke?: ol.style.Stroke;
}
}
module tilegrid {
interface TileGridOptions {
@@ -2650,13 +2771,16 @@ declare module ol {
class MultiPolygon {
}
class Point {
class Point extends SimpleGeometry {
constructor(coordinates: ol.Coordinate, layout?: geom.GeometryLayout);
getCoordinates(): ol.Coordinate;
setCoordinates(coordinates: ol.Coordinate, opt?: geom.GeometryLayout): void;
}
class Polygon {
}
class SimpleGeometry {
class SimpleGeometry extends Geometry {
}
}
@@ -2724,6 +2848,8 @@ declare module ol {
class Snap {
}
function defaults(opts: olx.interaction.DefaultsOptions): ol.Collection<ol.interaction.Interaction>;
}
module layer {
@@ -3257,6 +3383,14 @@ declare module ol {
}
class Vector {
constructor(opts: olx.source.VectorOptions)
/**
* Get the extent of the features currently in the source.
*/
getExtent(): ol.Extent;
getFeaturesInExtent(extent: ol.Extent): ol.Feature[];
}
class VectorEvent {
@@ -3289,7 +3423,21 @@ declare module ol {
class Circle {
}
/**
* Set fill style for vector features.
*/
class Fill {
constructor(opt_options?: olx.style.FillOptions);
getColor(): ol.Color | string;
/**
* Set the color.
*/
setColor(color: ol.Color | string): void;
getChecksum(): string;
}
class Icon {
@@ -3298,6 +3446,10 @@ declare module ol {
class Image {
}
interface GeometryFunction {
(feature: Feature): ol.geom.Geometry
}
class RegularShape {
}
@@ -3305,10 +3457,82 @@ declare module ol {
constructor();
}
/**
* Container for vector feature rendering styles. Any changes made to the style
* or its children through `set*()` methods will not take effect until the
* feature, layer or FeatureOverlay that uses the style is re-rendered.
*/
class Style {
constructor(opts: olx.style.StyleOptions);
}
/**
* Set text style for vector features.
*/
class Text {
constructor(opt?: olx.style.TextOptions);
getFont(): string;
getOffsetX(): number;
getOffsetY(): number;
getFill(): Fill;
getRotation(): number;
getScale(): number;
getStroke(): Stroke;
getText(): string;
getTextAlign(): string;
getTextBaseline(): string;
/**
* Set the font.
*/
setFont(font: string): void;
/**
* Set the x offset.
*/
setOffsetX(offsetX: number): void;
/**
* Set the y offset.
*/
setOffsetY(offsetY: number): void;
/**
* Set the fill.
*/
setFill(fill: Fill): void;
/**
* Set the rotation.
*/
setRotation(rotation: number): void;
/**
* Set the scale.
*/
setScale(scale: number): void;
/**
* Set the stroke.
*
*/
setStroke(stroke: Stroke): void;
/**
* Set the text.
*/
setText(text: string): void;
/**
* Set the text alignment.
*/
setTextAlign(textAlign: string): void;
/**
* Set the text baseline.
*/
setTextBaseline(textBaseline: string): void;
}
/**

View File

@@ -0,0 +1,8 @@
/// <reference path="./os-locale.d.ts" />
import osLocale, { sync } from 'os-locale';
osLocale((err: any, locale: string) => {
});
var locale: string = sync();

12
os-locale/os-locale.d.ts vendored Normal file
View File

@@ -0,0 +1,12 @@
// Type definitions for os-locale 1.2.1
// Project: https://github.com/sindresorhus/os-locale
// Definitions by: Aya Morisawa <https://github.com/AyaMorisawa>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "os-locale" {
function osLocale(cb: (err: any, locale: string) => void): void;
function osLocaleSync(): string;
export { osLocaleSync as sync };
export default osLocale;
}

View File

@@ -56,3 +56,27 @@ document.registerElement('my-element', MyElement);
// Equivalent:
var el1 = new MyElement();
var el2 = document.createElement('my-element');
// ES6 class syntax
// implicit implementation
class MyElement2 {
is: string;
registered() {
this.is = "my-element2";
}
}
Polymer(MyElement2);
// explicit implementation
class MyElement3 implements polymer.Base {
is: string;
registered() {
this.is = "my-element3";
}
}
Polymer(MyElement3);

View File

@@ -1,4 +1,4 @@
// Type definitions for polymer v1.0
// Type definitions for polymer v1.1.2
// Project: https://github.com/Polymer/polymer
// Definitions by: Louis Grignon <https://github.com/lgrignon>, Suguru Inatomi <https://github.com/laco0416>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -199,6 +199,8 @@ declare module polymer {
observers?: string[];
registered?(): void;
created?(): void;
attached?(): void;
@@ -297,9 +299,9 @@ declare module polymer {
dom:DomApiStatic;
(prototype: Base):webcomponents.CustomElementConstructor;
(prototype: Base|{new ():Base}):webcomponents.CustomElementConstructor;
Class(prototype: Base):webcomponents.CustomElementConstructor;
Class(prototype: Base|{new ():Base}):webcomponents.CustomElementConstructor;
}
}

View File

@@ -5,7 +5,7 @@ import gulp = require("gulp");
import tmp = require("run-sequence");
var runSequence = tmp.use(gulp);
gulp.task("run-sequence", callback => {
gulp.task("run-sequence", (callback: any) => {
runSequence("task1",
["task2", "task3"],
"taks4",

View File

@@ -7,9 +7,10 @@
/// <reference path="../gulp/gulp.d.ts" />
declare module "run-sequence" {
import gulp = require('gulp');
interface IRunSequence {
(...streams: (string | string[] | gulp.ITaskCallback)[]): NodeJS.ReadWriteStream;
(...streams: (string | string[] | gulp.TaskCallback)[]): NodeJS.ReadWriteStream;
use(gulp: gulp.Gulp): IRunSequence;
}

129
rx/rx-lite.d.ts vendored
View File

@@ -50,7 +50,6 @@ declare module Rx {
export module helpers {
function noop(): void;
function notDefined(value: any): boolean;
function isScheduler(value: any): boolean;
function identity<T>(value: T): T;
function defaultNow(): number;
function defaultComparer(left: any, right: any): boolean;
@@ -117,6 +116,7 @@ declare module Rx {
export interface IScheduler {
now(): number;
isScheduler(value: any): boolean;
schedule(action: () => void): IDisposable;
scheduleWithState<TState>(state: TState, action: (scheduler: IScheduler, state: TState) => IDisposable): IDisposable;
@@ -242,6 +242,23 @@ declare module Rx {
combineLatest<T2, T3, T4, T5, TResult>(second: Observable<T2>, third: Observable<T3>, fourth: Observable<T4>, fifth: Observable<T5>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult): Observable<TResult>;
combineLatest<TOther, TResult>(souces: Observable<TOther>[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult): Observable<TResult>;
combineLatest<TOther, TResult>(souces: IPromise<TOther>[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult): Observable<TResult>;
withLatestFrom<T2, TResult>(second: Observable<T2>, resultSelector: (v1: T, v2: T2) => TResult): Observable<TResult>;
withLatestFrom<T2, TResult>(second: IPromise<T2>, resultSelector: (v1: T, v2: T2) => TResult): Observable<TResult>;
withLatestFrom<T2, T3, TResult>(second: Observable<T2>, third: Observable<T3>, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable<TResult>;
withLatestFrom<T2, T3, TResult>(second: Observable<T2>, third: IPromise<T3>, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable<TResult>;
withLatestFrom<T2, T3, TResult>(second: IPromise<T2>, third: Observable<T3>, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable<TResult>;
withLatestFrom<T2, T3, TResult>(second: IPromise<T2>, third: IPromise<T3>, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable<TResult>;
withLatestFrom<T2, T3, T4, TResult>(second: Observable<T2>, third: Observable<T3>, fourth: Observable<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T2, T3, T4, TResult>(second: Observable<T2>, third: Observable<T3>, fourth: IPromise<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T2, T3, T4, TResult>(second: Observable<T2>, third: IPromise<T3>, fourth: Observable<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T2, T3, T4, TResult>(second: Observable<T2>, third: IPromise<T3>, fourth: IPromise<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T2, T3, T4, TResult>(second: IPromise<T2>, third: Observable<T3>, fourth: Observable<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T2, T3, T4, TResult>(second: IPromise<T2>, third: Observable<T3>, fourth: IPromise<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T2, T3, T4, TResult>(second: IPromise<T2>, third: IPromise<T3>, fourth: Observable<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T2, T3, T4, TResult>(second: IPromise<T2>, third: IPromise<T3>, fourth: IPromise<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T2, T3, T4, T5, TResult>(second: Observable<T2>, third: Observable<T3>, fourth: Observable<T4>, fifth: Observable<T5>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult): Observable<TResult>;
withLatestFrom<TOther, TResult>(souces: Observable<TOther>[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult): Observable<TResult>;
withLatestFrom<TOther, TResult>(souces: IPromise<TOther>[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult): Observable<TResult>;
concat(...sources: Observable<T>[]): Observable<T>;
concat(...sources: IPromise<T>[]): Observable<T>;
concat(sources: Observable<T>[]): Observable<T>;
@@ -292,7 +309,7 @@ declare module Rx {
do(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): Observable<T>;
doAction(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): Observable<T>; // alias for do
tap(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): Observable<T>; // alias for do
doOnNext(onNext: (value: T) => void, thisArg?: any): Observable<T>;
doOnError(onError: (exception: any) => void, thisArg?: any): Observable<T>;
doOnCompleted(onCompleted: () => void, thisArg?: any): Observable<T>;
@@ -306,7 +323,7 @@ declare module Rx {
materialize(): Observable<Notification<T>>;
repeat(repeatCount?: number): Observable<T>;
retry(retryCount?: number): Observable<T>;
scan<TAcc>(seed: TAcc, accumulator: (acc: TAcc, value: T) => TAcc): Observable<TAcc>;
scan<TAcc>(accumulator: (acc: TAcc, value: T, seed: TAcc) => TAcc): Observable<TAcc>;
scan(accumulator: (acc: T, value: T) => T): Observable<T>;
skipLast(count: number): Observable<T>;
startWith(...values: T[]): Observable<T>;
@@ -323,12 +340,34 @@ declare module Rx {
selectMany<TResult>(selector: (value: T) => IPromise<TResult>): Observable<TResult>;
selectMany<TResult>(other: Observable<TResult>): Observable<TResult>;
selectMany<TResult>(other: IPromise<TResult>): Observable<TResult>;
selectMany<TResult>(selector: (value: T) => TResult[]): Observable<TResult>; // alias for selectMany
flatMap<TOther, TResult>(selector: (value: T) => Observable<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable<TResult>; // alias for selectMany
flatMap<TOther, TResult>(selector: (value: T) => IPromise<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable<TResult>; // alias for selectMany
flatMap<TResult>(selector: (value: T) => Observable<TResult>): Observable<TResult>; // alias for selectMany
flatMap<TResult>(selector: (value: T) => IPromise<TResult>): Observable<TResult>; // alias for selectMany
flatMap<TResult>(other: Observable<TResult>): Observable<TResult>; // alias for selectMany
flatMap<TResult>(other: IPromise<TResult>): Observable<TResult>; // alias for selectMany
flatMap<TResult>(selector: (value: T) => TResult[]): Observable<TResult>; // alias for selectMany
/**
* Projects each notification of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence.
* @param {Function} onNext A transform function to apply to each element; the second parameter of the function represents the index of the source element.
* @param {Function} onError A transform function to apply when an error occurs in the source sequence.
* @param {Function} onCompleted A transform function to apply when the end of the source sequence is reached.
* @param {Any} [thisArg] An optional "this" to use to invoke each transform.
* @returns {Observable} An observable sequence whose elements are the result of invoking the one-to-many transform function corresponding to each notification in the input sequence.
*/
selectManyObserver<T2, T3, T4>(onNext: (value: T, index: number) => Observable<T2>, onError: (exception: any) => Observable<T3>, onCompleted: () => Observable<T4>, thisArg?: any): Observable<T2 | T3 | T4>;
/**
* Projects each notification of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence.
* @param {Function} onNext A transform function to apply to each element; the second parameter of the function represents the index of the source element.
* @param {Function} onError A transform function to apply when an error occurs in the source sequence.
* @param {Function} onCompleted A transform function to apply when the end of the source sequence is reached.
* @param {Any} [thisArg] An optional "this" to use to invoke each transform.
* @returns {Observable} An observable sequence whose elements are the result of invoking the one-to-many transform function corresponding to each notification in the input sequence.
*/
flatMapObserver<T2, T3, T4>(onNext: (value: T, index: number) => Observable<T2>, onError: (exception: any) => Observable<T3>, onCompleted: () => Observable<T4>, thisArg?: any): Observable<T2 | T3 | T4>;
selectConcat<T2, R>(selector: (value: T, index: number) => Observable<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable<R>;
selectConcat<T2, R>(selector: (value: T, index: number) => IPromise<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable<R>;
@@ -337,30 +376,30 @@ declare module Rx {
selectConcat<R>(sequence: Observable<R>): Observable<R>;
/**
* Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then
* Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then
* transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
* @param selector A transform function to apply to each source element; the second parameter of the function represents the index of the source element.
* @param [thisArg] Object to use as this when executing callback.
* @returns An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences
* @returns An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences
* and that at any point in time produces the elements of the most recent inner observable sequence that has been received.
*/
selectSwitch<TResult>(selector: (value: T, index: number, source: Observable<T>) => Observable<TResult>, thisArg?: any): Observable<TResult>;
/**
* Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then
* Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then
* transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
* @param selector A transform function to apply to each source element; the second parameter of the function represents the index of the source element.
* @param [thisArg] Object to use as this when executing callback.
* @returns An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences
* @returns An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences
* and that at any point in time produces the elements of the most recent inner observable sequence that has been received.
*/
flatMapLatest<TResult>(selector: (value: T, index: number, source: Observable<T>) => Observable<TResult>, thisArg?: any): Observable<TResult>; // alias for selectSwitch
/**
* Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then
* Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then
* transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
* @param selector A transform function to apply to each source element; the second parameter of the function represents the index of the source element.
* @param [thisArg] Object to use as this when executing callback.
* @since 2.2.28
* @returns An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences
* @returns An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences
* and that at any point in time produces the elements of the most recent inner observable sequence that has been received.
*/
switchMap<TResult>(selector: (value: T, index: number, source: Observable<T>) => TResult, thisArg?: any): Observable<TResult>; // alias for selectSwitch
@@ -384,7 +423,7 @@ declare module Rx {
* Converts an existing observable sequence to an ES6 Compatible Promise
* @example
* var promise = Rx.Observable.return(42).toPromise(RSVP.Promise);
*
*
* // With config
* Rx.config.Promise = RSVP.Promise;
* var promise = Rx.Observable.return(42).toPromise();
@@ -471,36 +510,12 @@ declare module Rx {
fromArray<T>(array: T[], scheduler?: IScheduler): Observable<T>;
fromArray<T>(array: { length: number;[index: number]: T; }, scheduler?: IScheduler): Observable<T>;
/**
* Converts an iterable into an Observable sequence
*
* @example
* var res = Rx.Observable.fromIterable(new Map());
* var res = Rx.Observable.fromIterable(function* () { yield 42; });
* var res = Rx.Observable.fromIterable(new Set(), Rx.Scheduler.timeout);
* @param generator Generator to convert from.
* @param [scheduler] Scheduler to run the enumeration of the input sequence on.
* @returns The observable sequence whose elements are pulled from the given generator sequence.
*/
fromIterable<T>(generator: () => { next(): { done: boolean; value?: T; }; }, scheduler?: IScheduler): Observable<T>;
/**
* Converts an iterable into an Observable sequence
*
* @example
* var res = Rx.Observable.fromIterable(new Map());
* var res = Rx.Observable.fromIterable(new Set(), Rx.Scheduler.timeout);
* @param iterable Iterable to convert from.
* @param [scheduler] Scheduler to run the enumeration of the input sequence on.
* @returns The observable sequence whose elements are pulled from the given generator sequence.
*/
fromIterable<T>(iterable: {}, scheduler?: IScheduler): Observable<T>; // todo: can't describe ES6 Iterable via TypeScript type system
generate<TState, TResult>(initialState: TState, condition: (state: TState) => boolean, iterate: (state: TState) => TState, resultSelector: (state: TState) => TResult, scheduler?: IScheduler): Observable<TResult>;
never<T>(): Observable<T>;
/**
* This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments.
*
*
* @example
* var res = Rx.Observable.of(1, 2, 3);
* @since 2.2.28
@@ -509,7 +524,7 @@ declare module Rx {
of<T>(...values: T[]): Observable<T>;
/**
* This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments.
* This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments.
* @example
* var res = Rx.Observable.ofWithScheduler(Rx.Scheduler.timeout, 1, 2, 3);
* @since 2.2.28
@@ -577,6 +592,38 @@ declare module Rx {
combineLatest<TOther, TResult>(souces: Observable<TOther>[], resultSelector: (...otherValues: TOther[]) => TResult): Observable<TResult>;
combineLatest<TOther, TResult>(souces: IPromise<TOther>[], resultSelector: (...otherValues: TOther[]) => TResult): Observable<TResult>;
withLatestFrom<T, T2, TResult>(first: Observable<T>, second: Observable<T2>, resultSelector: (v1: T, v2: T2) => TResult): Observable<TResult>;
withLatestFrom<T, T2, TResult>(first: IPromise<T>, second: Observable<T2>, resultSelector: (v1: T, v2: T2) => TResult): Observable<TResult>;
withLatestFrom<T, T2, TResult>(first: Observable<T>, second: IPromise<T2>, resultSelector: (v1: T, v2: T2) => TResult): Observable<TResult>;
withLatestFrom<T, T2, TResult>(first: IPromise<T>, second: IPromise<T2>, resultSelector: (v1: T, v2: T2) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, TResult>(first: Observable<T>, second: Observable<T2>, third: Observable<T3>, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, TResult>(first: Observable<T>, second: Observable<T2>, third: IPromise<T3>, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, TResult>(first: Observable<T>, second: IPromise<T2>, third: Observable<T3>, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, TResult>(first: Observable<T>, second: IPromise<T2>, third: IPromise<T3>, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, TResult>(first: IPromise<T>, second: Observable<T2>, third: Observable<T3>, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, TResult>(first: IPromise<T>, second: Observable<T2>, third: IPromise<T3>, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, TResult>(first: IPromise<T>, second: IPromise<T2>, third: Observable<T3>, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, TResult>(first: IPromise<T>, second: IPromise<T2>, third: IPromise<T3>, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, T4, TResult>(first: Observable<T>, second: Observable<T2>, third: Observable<T3>, fourth: Observable<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, T4, TResult>(first: Observable<T>, second: Observable<T2>, third: Observable<T3>, fourth: IPromise<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, T4, TResult>(first: Observable<T>, second: Observable<T2>, third: IPromise<T3>, fourth: Observable<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, T4, TResult>(first: Observable<T>, second: Observable<T2>, third: IPromise<T3>, fourth: IPromise<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, T4, TResult>(first: Observable<T>, second: IPromise<T2>, third: Observable<T3>, fourth: Observable<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, T4, TResult>(first: Observable<T>, second: IPromise<T2>, third: Observable<T3>, fourth: IPromise<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, T4, TResult>(first: Observable<T>, second: IPromise<T2>, third: IPromise<T3>, fourth: Observable<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, T4, TResult>(first: Observable<T>, second: IPromise<T2>, third: IPromise<T3>, fourth: IPromise<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, T4, TResult>(first: IPromise<T>, second: Observable<T2>, third: Observable<T3>, fourth: Observable<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, T4, TResult>(first: IPromise<T>, second: Observable<T2>, third: Observable<T3>, fourth: IPromise<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, T4, TResult>(first: IPromise<T>, second: Observable<T2>, third: IPromise<T3>, fourth: Observable<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, T4, TResult>(first: IPromise<T>, second: Observable<T2>, third: IPromise<T3>, fourth: IPromise<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, T4, TResult>(first: IPromise<T>, second: IPromise<T2>, third: Observable<T3>, fourth: Observable<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, T4, TResult>(first: IPromise<T>, second: IPromise<T2>, third: Observable<T3>, fourth: IPromise<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, T4, TResult>(first: IPromise<T>, second: IPromise<T2>, third: IPromise<T3>, fourth: Observable<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, T4, TResult>(first: IPromise<T>, second: IPromise<T2>, third: IPromise<T3>, fourth: IPromise<T4>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable<TResult>;
withLatestFrom<T, T2, T3, T4, T5, TResult>(first: Observable<T>, second: Observable<T2>, third: Observable<T3>, fourth: Observable<T4>, fifth: Observable<T5>, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult): Observable<TResult>;
withLatestFrom<TOther, TResult>(souces: Observable<TOther>[], resultSelector: (...otherValues: TOther[]) => TResult): Observable<TResult>;
withLatestFrom<TOther, TResult>(souces: IPromise<TOther>[], resultSelector: (...otherValues: TOther[]) => TResult): Observable<TResult>;
concat<T>(...sources: Observable<T>[]): Observable<T>;
concat<T>(...sources: IPromise<T>[]): Observable<T>;
concat<T>(sources: Observable<T>[]): Observable<T>;
@@ -618,6 +665,8 @@ declare module Rx {
* @returns An Observable sequence which wraps the existing promise success and failure.
*/
fromPromise<T>(promise: IPromise<T>): Observable<T>;
prototype: any;
}
export var Observable: ObservableStatic;
@@ -626,11 +675,11 @@ declare module Rx {
hasObservers(): boolean;
}
export interface Subject<T> extends ISubject<T> {
}
export interface Subject<T> extends ISubject<T> {
}
interface SubjectStatic {
new <T>(): Subject<T>;
interface SubjectStatic {
new <T>(): Subject<T>;
create<T>(observer?: Observer<T>, observable?: Observable<T>): ISubject<T>;
}

10
rx/rx.aggregates.d.ts vendored
View File

@@ -40,17 +40,9 @@ declare module Rx {
sequenceEqual(second: T[]): Observable<boolean>;
elementAt(index: number): Observable<T>;
elementAtOrDefault(index: number, defaultValue?: T): Observable<T>;
single(predicate?: (value: T, index: number, source: Observable<T>) => boolean, thisArg?: any): Observable<T>;
singleOrDefault(predicate?: (value: T, index: number, source: Observable<T>) => boolean, defaultValue?: T, thisArg?: any): Observable<T>;
first(predicate?: (value: T, index: number, source: Observable<T>) => boolean, thisArg?: any): Observable<T>;
firstOrDefault(predicate?: (value: T, index: number, source: Observable<T>) => boolean, defaultValue?: T, thisArg?: any): Observable<T>;
last(predicate?: (value: T, index: number, source: Observable<T>) => boolean, thisArg?: any): Observable<T>;
lastOrDefault(predicate?: (value: T, index: number, source: Observable<T>) => boolean, defaultValue?: T, thisArg?: any): Observable<T>;
find(predicate: (value: T, index: number, source: Observable<T>) => boolean, thisArg?: any): Observable<T>;
findIndex(predicate: (value: T, index: number, source: Observable<T>) => boolean, thisArg?: any): Observable<number>;
}
@@ -58,4 +50,4 @@ declare module Rx {
declare module "rx.aggregates" {
export = Rx;
}
}

View File

@@ -65,7 +65,9 @@ declare module Rx {
<T>(func: Function, context?: any): (...args: any[]) => Observable<T>;
};
fromEvent<T>(element: any, eventName: string, selector?: (arguments: any[]) => T): Observable<T>;
fromEventPattern<T>(addHandler: (handler: Function) => void, removeHandler: (handler: Function) => void, selector?: (arguments: any[])=>T): Observable<T>;
fromEvent<T>(element: NodeList, eventName: string, selector?: (arguments: any[]) => T): Observable<T>;
fromEvent<T>(element: Node, eventName: string, selector?: (arguments: any[]) => T): Observable<T>;
fromEvent<T>(element: {on: (name: string, cb: (e: any) => any) => void; off: (name: string, cb: (e: any) => any) => void}, eventName: string, selector?: (arguments: any[]) => T): Observable<T>;
fromEventPattern<T>(addHandler: (handler: Function) => void, removeHandler: (handler: Function) => void, selector?: (arguments: any[])=>T): Observable<T>;
}
}

View File

@@ -81,4 +81,4 @@ module Rx.Tests.Async {
function startAsync() {
var o: Rx.Observable<string> = Rx.Observable.startAsync(() => <Rx.IPromise<string>>null);
}
}
}

2
rx/rx.async.d.ts vendored
View File

@@ -40,4 +40,4 @@ declare module Rx {
declare module "rx.async" {
export = Rx;
}
}

View File

@@ -8,4 +8,4 @@
declare module "rx.backpressure" {
export = Rx;
}
}

View File

@@ -44,10 +44,10 @@ declare module Rx {
/**
* Returns an observable sequence that shares a single subscription to the underlying sequence.
* This operator is a specialization of publish which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.
*
*
* @example
* var res = source.share();
*
*
* @returns An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.
*/
share(): Observable<T>;
@@ -58,10 +58,10 @@ declare module Rx {
/**
* Returns an observable sequence that shares a single subscription to the underlying sequence and starts with an initialValue.
* This operator is a specialization of publishValue which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.
*
*
* @example
* var res = source.shareValue(42);
*
*
* @param initialValue Initial value received by observers upon subscription.
* @returns An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.
*/

2
rx/rx.binding.d.ts vendored
View File

@@ -8,4 +8,4 @@
declare module "rx.binding" {
export = Rx;
}
}

View File

@@ -9,24 +9,24 @@ declare module Rx {
interface Observable<T> {
/**
* Returns a new observable that triggers on the second and subsequent triggerings of the input observable.
* The Nth triggering of the input observable passes the arguments from the N-1th and Nth triggering as a pair.
* Returns a new observable that triggers on the second and subsequent triggerings of the input observable.
* The Nth triggering of the input observable passes the arguments from the N-1th and Nth triggering as a pair.
* The argument passed to the N-1th triggering is held in hidden internal state until the Nth triggering occurs.
* @returns An observable that triggers on successive pairs of observations from the input observable as an array.
*/
pairwise(): Observable<T[]>;
/**
/**
* Returns two observables which partition the observations of the source by the given function.
* The first will trigger observations for those values for which the predicate returns true.
* The second will trigger observations for those values where the predicate returns false.
* The predicate is executed once for each subscribed observer.
* Both also propagate all error observations arising from the source and each completes
* The first will trigger observations for those values for which the predicate returns true.
* The second will trigger observations for those values where the predicate returns false.
* The predicate is executed once for each subscribed observer.
* Both also propagate all error observations arising from the source and each completes
* when the source completes.
* @param predicate
* @param predicate
* The function to determine which output Observable will trigger a particular observation.
* @returns
* An array of observables. The first triggers when the predicate returns true,
* An array of observables. The first triggers when the predicate returns true,
* and the second triggers when the predicate returns false.
*/
partition(predicate: (value: T, index: number, source: Observable<T>) => boolean, thisArg: any): Observable<T>[];

View File

@@ -33,4 +33,4 @@ declare module Rx {
declare module "rx.coincidence" {
export = Rx;
}
}

4
rx/rx.d.ts vendored
View File

@@ -1,4 +1,4 @@
// Type definitions for RxJS v2.2.28
// Type definitions for RxJS v2.5.3
// Project: http://rx.codeplex.com/
// Definitions by: gsino <http://www.codeplex.com/site/users/view/gsino>, Igor Oleinikov <https://github.com/Igorbek>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -39,7 +39,7 @@ declare module Rx {
distinct(skipParameter: boolean, valueSerializer: (value: T) => string): Observable<T>;
distinct<TKey>(keySelector?: (value: T) => TKey, keySerializer?: (key: TKey) => string): Observable<T>;
groupBy<TKey, TElement>(keySelector: (value: T) => TKey, skipElementSelector?: boolean, keySerializer?: (key: TKey) => string): Observable<GroupedObservable<TKey, T>>;
groupBy<TKey, TElement>(keySelector: (value: T) => TKey, elementSelector: (value: T) => TElement, keySerializer?: (key: TKey) => string): Observable<GroupedObservable<TKey, T>>;
groupBy<TKey, TElement>(keySelector: (value: T) => TKey, elementSelector: (value: T) => TElement, keySerializer?: (key: TKey) => string): Observable<GroupedObservable<TKey, TElement>>;
groupByUntil<TKey, TDuration>(keySelector: (value: T) => TKey, skipElementSelector: boolean, durationSelector: (group: GroupedObservable<TKey, T>) => Observable<TDuration>, keySerializer?: (key: TKey) => string): Observable<GroupedObservable<TKey, T>>;
groupByUntil<TKey, TElement, TDuration>(keySelector: (value: T) => TKey, elementSelector: (value: T) => TElement, durationSelector: (group: GroupedObservable<TKey, TElement>) => Observable<TDuration>, keySerializer?: (key: TKey) => string): Observable<GroupedObservable<TKey, TElement>>;
}

View File

@@ -29,13 +29,13 @@ declare module Rx {
/**
* Repeats source as long as condition holds emulating a do while loop.
* @param condition The condition which determines if the source will be repeated.
* @returns An observable sequence which is repeated as long as the condition holds.
* @returns An observable sequence which is repeated as long as the condition holds.
*/
doWhile(condition: () => boolean): Observable<T>;
/**
* Expands an observable sequence by recursively invoking selector.
*
*
* @param selector Selector function to invoke for each produced element, resulting in another sequence to which the selector will be invoked recursively again.
* @param [scheduler] Scheduler on which to perform the expansion. If not provided, this defaults to the current thread scheduler.
* @returns An observable sequence containing all the elements produced by the recursive expansion.
@@ -64,7 +64,7 @@ declare module Rx {
interface ObservableStatic {
/**
* Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers <IE9
*
*
* @example
* res = Rx.Observable.if(condition, obs1, obs2);
* @param condition The condition which determines if the thenSource or elseSource will be run.
@@ -79,7 +79,7 @@ declare module Rx {
/**
* Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers <IE9
*
*
* @example
* res = Rx.Observable.if(condition, obs1, scheduler);
* @param condition The condition which determines if the thenSource or empty sequence will be run.
@@ -92,7 +92,7 @@ declare module Rx {
/**
* Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers <IE9
*
*
* @example
* res = Rx.Observable.if(condition, obs1, obs2);
* @param condition The condition which determines if the thenSource or elseSource will be run.
@@ -107,7 +107,7 @@ declare module Rx {
/**
* Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers <IE9
*
*
* @example
* res = Rx.Observable.if(condition, obs1, scheduler);
* @param condition The condition which determines if the thenSource or empty sequence will be run.
@@ -123,7 +123,7 @@ declare module Rx {
* There is an alias for this method called 'forIn' for browsers <IE9
* @param sources An array of values to turn into an observable sequence.
* @param resultSelector A function to apply to each item in the sources array to turn it into an observable sequence.
* @returns An observable sequence from the concatenated observable sequences.
* @returns An observable sequence from the concatenated observable sequences.
*/
for<T, TResult>(sources: T[], resultSelector: (item: T) => Observable<TResult>): Observable<TResult>;
@@ -132,7 +132,7 @@ declare module Rx {
* There is an alias for this method called 'forIn' for browsers <IE9
* @param sources An array of values to turn into an observable sequence.
* @param resultSelector A function to apply to each item in the sources array to turn it into an observable sequence.
* @returns An observable sequence from the concatenated observable sequences.
* @returns An observable sequence from the concatenated observable sequences.
*/
forIn<T, TResult>(sources: T[], resultSelector: (item: T) => Observable<TResult>): Observable<TResult>;
@@ -141,7 +141,7 @@ declare module Rx {
* There is an alias for this method called 'whileDo' for browsers <IE9
* @param condition The condition which determines if the source will be repeated.
* @param source The observable sequence or promise that will be run if the condition function returns true.
* @returns An observable sequence which is repeated as long as the condition holds.
* @returns An observable sequence which is repeated as long as the condition holds.
*/
while<T>(condition: () => boolean, source: Observable<T>): Observable<T>;
while<T>(condition: () => boolean, source: IPromise<T>): Observable<T>;
@@ -151,7 +151,7 @@ declare module Rx {
* There is an alias for this method called 'whileDo' for browsers <IE9
* @param condition The condition which determines if the source will be repeated.
* @param source The observable sequence or promise that will be run if the condition function returns true.
* @returns An observable sequence which is repeated as long as the condition holds.
* @returns An observable sequence which is repeated as long as the condition holds.
*/
whileDo<T>(condition: () => boolean, source: Observable<T>): Observable<T>;
whileDo<T>(condition: () => boolean, source: IPromise<T>): Observable<T>;
@@ -159,14 +159,14 @@ declare module Rx {
/**
* Uses selector to determine which source in sources to use.
* There is an alias 'switchCase' for browsers <IE9.
*
*
* @example
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, obs0);
* @param selector The function which extracts the value for to test in a case statement.
* @param sources A object which has keys which correspond to the case statement labels.
* @param elseSource The observable sequence or promise that will be run if the sources are not matched.
*
* @returns An observable sequence which is determined by a case statement.
*
* @returns An observable sequence which is determined by a case statement.
*/
case<T>(selector: () => string, sources: { [key: string]: Observable<T>; }, elseSource: Observable<T>): Observable<T>;
case<T>(selector: () => string, sources: { [key: string]: IPromise<T>; }, elseSource: Observable<T>): Observable<T>;
@@ -176,16 +176,16 @@ declare module Rx {
/**
* Uses selector to determine which source in sources to use.
* There is an alias 'switchCase' for browsers <IE9.
*
*
* @example
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 });
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, scheduler);
*
*
* @param selector The function which extracts the value for to test in a case statement.
* @param sources A object which has keys which correspond to the case statement labels.
* @param scheduler Scheduler used to create Rx.Observabe.Empty.
*
* @returns An observable sequence which is determined by a case statement.
*
* @returns An observable sequence which is determined by a case statement.
*/
case<T>(selector: () => string, sources: { [key: string]: Observable<T>; }, scheduler?: IScheduler): Observable<T>;
case<T>(selector: () => string, sources: { [key: string]: IPromise<T>; }, scheduler?: IScheduler): Observable<T>;
@@ -193,14 +193,14 @@ declare module Rx {
/**
* Uses selector to determine which source in sources to use.
* There is an alias 'switchCase' for browsers <IE9.
*
*
* @example
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, obs0);
* @param selector The function which extracts the value for to test in a case statement.
* @param sources A object which has keys which correspond to the case statement labels.
* @param elseSource The observable sequence or promise that will be run if the sources are not matched.
*
* @returns An observable sequence which is determined by a case statement.
*
* @returns An observable sequence which is determined by a case statement.
*/
case<T>(selector: () => number, sources: { [key: number]: Observable<T>; }, elseSource: Observable<T>): Observable<T>;
case<T>(selector: () => number, sources: { [key: number]: IPromise<T>; }, elseSource: Observable<T>): Observable<T>;
@@ -210,16 +210,16 @@ declare module Rx {
/**
* Uses selector to determine which source in sources to use.
* There is an alias 'switchCase' for browsers <IE9.
*
*
* @example
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 });
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, scheduler);
*
*
* @param selector The function which extracts the value for to test in a case statement.
* @param sources A object which has keys which correspond to the case statement labels.
* @param scheduler Scheduler used to create Rx.Observabe.Empty.
*
* @returns An observable sequence which is determined by a case statement.
*
* @returns An observable sequence which is determined by a case statement.
*/
case<T>(selector: () => number, sources: { [key: number]: Observable<T>; }, scheduler?: IScheduler): Observable<T>;
case<T>(selector: () => number, sources: { [key: number]: IPromise<T>; }, scheduler?: IScheduler): Observable<T>;
@@ -227,14 +227,14 @@ declare module Rx {
/**
* Uses selector to determine which source in sources to use.
* There is an alias 'switchCase' for browsers <IE9.
*
*
* @example
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, obs0);
* @param selector The function which extracts the value for to test in a case statement.
* @param sources A object which has keys which correspond to the case statement labels.
* @param elseSource The observable sequence or promise that will be run if the sources are not matched.
*
* @returns An observable sequence which is determined by a case statement.
*
* @returns An observable sequence which is determined by a case statement.
*/
switchCase<T>(selector: () => string, sources: { [key: string]: Observable<T>; }, elseSource: Observable<T>): Observable<T>;
switchCase<T>(selector: () => string, sources: { [key: string]: IPromise<T>; }, elseSource: Observable<T>): Observable<T>;
@@ -244,16 +244,16 @@ declare module Rx {
/**
* Uses selector to determine which source in sources to use.
* There is an alias 'switchCase' for browsers <IE9.
*
*
* @example
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 });
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, scheduler);
*
*
* @param selector The function which extracts the value for to test in a case statement.
* @param sources A object which has keys which correspond to the case statement labels.
* @param scheduler Scheduler used to create Rx.Observabe.Empty.
*
* @returns An observable sequence which is determined by a case statement.
*
* @returns An observable sequence which is determined by a case statement.
*/
switchCase<T>(selector: () => string, sources: { [key: string]: Observable<T>; }, scheduler?: IScheduler): Observable<T>;
switchCase<T>(selector: () => string, sources: { [key: string]: IPromise<T>; }, scheduler?: IScheduler): Observable<T>;
@@ -261,14 +261,14 @@ declare module Rx {
/**
* Uses selector to determine which source in sources to use.
* There is an alias 'switchCase' for browsers <IE9.
*
*
* @example
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, obs0);
* @param selector The function which extracts the value for to test in a case statement.
* @param sources A object which has keys which correspond to the case statement labels.
* @param elseSource The observable sequence or promise that will be run if the sources are not matched.
*
* @returns An observable sequence which is determined by a case statement.
*
* @returns An observable sequence which is determined by a case statement.
*/
switchCase<T>(selector: () => number, sources: { [key: number]: Observable<T>; }, elseSource: Observable<T>): Observable<T>;
switchCase<T>(selector: () => number, sources: { [key: number]: IPromise<T>; }, elseSource: Observable<T>): Observable<T>;
@@ -278,23 +278,23 @@ declare module Rx {
/**
* Uses selector to determine which source in sources to use.
* There is an alias 'switchCase' for browsers <IE9.
*
*
* @example
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 });
* res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, scheduler);
*
*
* @param selector The function which extracts the value for to test in a case statement.
* @param sources A object which has keys which correspond to the case statement labels.
* @param scheduler Scheduler used to create Rx.Observabe.Empty.
*
* @returns An observable sequence which is determined by a case statement.
*
* @returns An observable sequence which is determined by a case statement.
*/
switchCase<T>(selector: () => number, sources: { [key: number]: Observable<T>; }, scheduler?: IScheduler): Observable<T>;
switchCase<T>(selector: () => number, sources: { [key: number]: IPromise<T>; }, scheduler?: IScheduler): Observable<T>;
/**
* Runs all observable sequences in parallel and collect their last elements.
*
*
* @example
* res = Rx.Observable.forkJoin([obs1, obs2]);
* @param sources Array of source sequences or promises.
@@ -305,7 +305,7 @@ declare module Rx {
/**
* Runs all observable sequences in parallel and collect their last elements.
*
*
* @example
* res = Rx.Observable.forkJoin(obs1, obs2, ...);
* @param args Source sequences or promises.
@@ -318,4 +318,4 @@ declare module Rx {
declare module "rx.experimental" {
export = Rx;
}
}

View File

@@ -57,4 +57,4 @@ declare module Rx {
declare module "rx.joinpatterns" {
export = Rx;
}
}

2
rx/rx.lite.d.ts vendored
View File

@@ -12,4 +12,4 @@
declare module "rx.lite" {
export = Rx;
}
}

2
rx/rx.testing.d.ts vendored
View File

@@ -61,4 +61,4 @@ declare module Rx {
declare module "rx.testing" {
export = Rx;
}
}

10
rx/rx.time-lite.d.ts vendored
View File

@@ -19,11 +19,21 @@ declare module Rx {
export interface Observable<T> {
delay(dueTime: Date, scheduler?: IScheduler): Observable<T>;
delay(dueTime: number, scheduler?: IScheduler): Observable<T>;
debounce(dueTime: number, scheduler?: IScheduler): Observable<T>;
throttleWithTimeout(dueTime: number, scheduler?: IScheduler): Observable<T>;
/**
* @deprecated use #debounce or #throttleWithTimeout instead.
*/
throttle(dueTime: number, scheduler?: IScheduler): Observable<T>;
timeInterval(scheduler?: IScheduler): Observable<TimeInterval<T>>;
timestamp(scheduler?: IScheduler): Observable<Timestamp<T>>;
sample(interval: number, scheduler?: IScheduler): Observable<T>;
sample<TSample>(sampler: Observable<TSample>, scheduler?: IScheduler): Observable<T>;
timeout(dueTime: Date, other?: Observable<T>, scheduler?: IScheduler): Observable<T>;
timeout(dueTime: number, other?: Observable<T>, scheduler?: IScheduler): Observable<T>;
}

9
rx/rx.time.d.ts vendored
View File

@@ -13,7 +13,12 @@ declare module Rx {
delayWithSelector(subscriptionDelay: number, delayDurationSelector: (item: T) => number): Observable<T>;
timeoutWithSelector<TTimeout>(firstTimeout: Observable<TTimeout>, timeoutdurationSelector?: (item: T) => Observable<TTimeout>, other?: Observable<T>): Observable<T>;
throttleWithSelector<TTimeout>(throttleDurationSelector: (item: T) => Observable<TTimeout>): Observable<T>;
debounceWithSelector<TTimeout>(debounceDurationSelector: (item: T) => Observable<TTimeout>): Observable<T>;
/**
* @deprecated use #debounceWithSelector instead.
*/
throttleWithSelector<TTimeout>(debounceDurationSelector: (item: T) => Observable<TTimeout>): Observable<T>;
skipLastWithTime(duration: number, scheduler?: IScheduler): Observable<T>;
takeLastWithTime(duration: number, timerScheduler?: IScheduler, loopScheduler?: IScheduler): Observable<T>;
@@ -58,4 +63,4 @@ declare module Rx {
declare module "rx.time" {
export = Rx;
}
}

View File

@@ -38,4 +38,4 @@ declare module Rx {
declare module "rx.virtualtime" {
export = Rx;
}
}

View File

@@ -56,6 +56,7 @@ $("#e6").select2({
ajax: {
url: "http://api.rottentomatoes.com/api/public/v1.0/movies.json",
dataType: 'jsonp',
cache: false,
data: function (term, page) {
return {
q: term,
@@ -195,4 +196,4 @@ $("#e8").select2("enable", false);
$("#e8").select2("readonly", false);
$("#e8").select2('container');
$("#e8").select2('onSortStart');
$("#e8").select2('onSortEnd');
$("#e8").select2('onSortEnd');

View File

@@ -26,6 +26,7 @@ interface Select2AjaxOptions {
url?: any;
dataType?: string;
quietMillis?: number;
cache?: boolean;
data?: (term: string, page: number, context: any) => any;
results?: (term: any, page: number, context: any) => any;
}

View File

@@ -47,11 +47,14 @@ interface GTaskAttributes {
revision? : number;
name? : string;
}
interface GTaskInstance extends Sequelize.Instance<GTaskInstance, GTaskAttributes> {}
interface GTaskInstance extends Sequelize.Instance<GTaskInstance, GTaskAttributes> {
upRevision(): void;
}
var GTask = s.define<GTaskInstance, GTaskAttributes>( 'task', { revision : Sequelize.INTEGER, name : Sequelize.STRING });
GUser.hasMany(GTask);
GTask.create({ revision: 1, name: 'test' }).then( (gtask) => gtask.upRevision() );
//

Some files were not shown because too many files have changed in this diff Show More