Merge remote-tracking branch 'upstream/master'

This commit is contained in:
marcelk
2015-09-04 14:45:55 +02:00
207 changed files with 17099 additions and 6717 deletions
+75 -23
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)
+61
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
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;
}
}
+2 -2
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;
}
}
}
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1 +1 @@
--experimentalDecorators --target ES5
--experimentalDecorators --noImplicitAny --target ES5
+1615 -1468
View File
File diff suppressed because it is too large Load Diff
+689
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;
}
+11 -11
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 {
+8
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;
}
///////////////////////////////////////////////////////////////////////////
+3 -1
View File
@@ -1,3 +1,5 @@
/// <reference path="./async.d.ts" />
import async = require("async");
async.map(["a", "b", "c"], (item, cb) => cb(null, [item.toUpperCase()]), (err, results) => { });
async.map(["a", "b", "c"], (item, cb) => cb(null, [item.toUpperCase()]), (err, results) => { });
+225 -7
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
});
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+35 -22
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.
+3 -1
View File
@@ -1,7 +1,9 @@
/// <reference path="./bowser.d.ts" />
import Bowser = require('bowser');
Bowser.msedge === true;
Bowser.test(['msie']) === true;
Bowser.a === Bowser.c;
Bowser.osversion > 10;
Bowser.osversion === '10.1A';
Bowser.osversion === '10.1A';
+1 -1
View File
@@ -42,7 +42,7 @@ declare module BowserModule {
/** Grade X browser */
x: boolean;
name: string;
version: string;
version: string|number;
osversion: string|number;
}
+13 -7
View File
@@ -11,7 +11,7 @@ function test_dataType() {
var x = typ.parentEnum === <breeze.core.IEnum> breeze.DataType;
var isFalse = breeze.DataType.contains(breeze.DataType.Double);
var dt = breeze.DataType.fromName("Decimal");
}
function test_dataProperty() {
@@ -33,7 +33,7 @@ function test_dataService() {
var em = new breeze.EntityManager({
dataService: ds
});
}
function test_entityAspect() {
@@ -69,7 +69,7 @@ function test_entityAspect() {
var errorsAdded = validationChangeArgs.added;
var errorsCleared = validationChangeArgs.removed;
});
}
function test_entityKey() {
@@ -132,7 +132,7 @@ function test_entityManager() {
serviceName: "breeze/NorthwindIBModel",
metadataStore: metadataStore
});
return new breeze.QueryOptions({
mergeStrategy: null,
fetchStrategy: this.fetchStrategy
@@ -157,7 +157,7 @@ function test_entityManager() {
var cust2 = em1.createEntity("Customer", { companyName: "foo" });
var cust3 = em1.createEntity("foo", { xxx: 3 }, breeze.EntityState.Added);
em1.attachEntity(cust1, breeze.EntityState.Added);
em1.clear();
var em2 = em1.createEmptyCopy();
@@ -246,7 +246,7 @@ function test_entityManager() {
var custType = <breeze.EntityType> em1.metadataStore.getEntityType("Customer");
var orderType = <breeze.EntityType> em1.metadataStore.getEntityType("Order");
if (em1.hasChanges([custType, orderType])) { };
var bundle = em1.exportEntities();
window.localStorage.setItem("myEntityManager", bundle);
var bundleFromStorage = window.localStorage.getItem("myEntityManager");
@@ -434,7 +434,7 @@ function test_entityState() {
return es === breeze.EntityState.Unchanged;
var es = anEntity.entityAspect.entityState;
return es.isUnchangedOrModified();
return es === breeze.EntityState.Unchanged || es === breeze.EntityState.Modified;
}
@@ -443,12 +443,14 @@ function test_entityType() {
var myEntityType: breeze.EntityType;
var dataProperty1: breeze.DataProperty, dataProperty2: breeze.DataProperty, navigationProperty1: breeze.DataProperty;
var em1: breeze.EntityManager;
/* NOTE https://github.com/borisyankov/DefinitelyTyped/pull/5590
var entityManager = new breeze.EntityType({
metadataStore: myMetadataStore,
serviceName: "breeze/NorthwindIBModel",
name: "person",
namespace: "myAppNamespace"
});
*/
myEntityType.addProperty(dataProperty1);
myEntityType.addProperty(dataProperty2);
myEntityType.addProperty(navigationProperty1);
@@ -759,9 +761,11 @@ function test_validator() {
orderType = <breeze.EntityType> em1.metadataStore.getEntityType("Order");
var orderDateProperty = orderType.getProperty("OrderDate");
orderDateProperty.validators.push(breeze.Validator.date());
/* NOTE https://github.com/borisyankov/DefinitelyTyped/pull/5590
var v0 = breeze.Validator.maxLength({ maxLength: 5, displayName: "City" });
v0.validate("adasdfasdf");
var errMessage = v0.getMessage();
*/
custType = <breeze.EntityType> em1.metadataStore.getEntityType("Customer");
var customerIdProperty = custType.getProperty("CustomerID");
customerIdProperty.validators.push(breeze.Validator.guid());
@@ -788,6 +792,7 @@ function test_validator() {
regionProperty.validators.push(breeze.Validator.string());
custType = <breeze.EntityType> em1.metadataStore.getEntityType("Customer");
regionProperty = custType.getProperty("Region");
/* NOTE https://github.com/borisyankov/DefinitelyTyped/pull/5590
regionProperty.validators.push(breeze.Validator.stringLength({ minLength: 2, maxLength: 5 }));
var validator = breeze.Validator.maxLength({ maxLength: 5, displayName: "City" });
var result = validator.validate("asdf");
@@ -796,6 +801,7 @@ function test_validator() {
var errMsg = result.errorMessage;
var context = result.context;
var sameValidator = result.validator;
*/
var valFn = function (v: any) {
if (v == null) return true;
return (v.substr(0,2) === "US");
+3 -1
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
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;
+1 -1
View File
@@ -29,7 +29,7 @@ $ = cheerio.load(html, {
normalizeWhitespace: true,
xmlMode: true,
decodeEntities: true,
lowercaseTags: true,
lowerCaseTags: true,
lowerCaseAttributeNames: true,
recognizeCDATA: true,
recognizeSelfClosing: true
+4 -2
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;
+2
View File
@@ -1,3 +1,5 @@
/// <reference path="./clone.d.ts" />
import clone = require("clone");
var original = {
+33
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
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;
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
/// <reference path="../express/express.d.ts"/>
/// <reference path="./connect-slashes.d.ts"/>
import express = require('express');
import slashes = require('connect-slashes');
+2
View File
@@ -1,3 +1,5 @@
/// <reference path="./contextjs.d.ts" />
import context = require("contextjs");
context.init();
@@ -1,3 +1,5 @@
/// <reference path="./convert-source-map.d.ts" />
import convert = require("convert-source-map");
var json = convert
@@ -10,4 +12,4 @@ var modified = convert
.toJSON();
console.log(json);
console.log(modified);
console.log(modified);
+146 -151
View File
@@ -22,13 +22,13 @@ declare type PropertyKey = string | number | symbol;
// #############################################################################################
// ECMAScript 6: Object & Function
// Modules: es6.object.assign, es6.object.is, es6.object.set-prototype-of,
// Modules: es6.object.assign, es6.object.is, es6.object.set-prototype-of,
// es6.object.to-string, es6.function.name and es6.function.has-instance.
// #############################################################################################
interface ObjectConstructor {
/**
* Copy the values of all of the enumerable own properties from one or more source objects to a
* Copy the values of all of the enumerable own properties from one or more source objects to a
* target object. Returns the target object.
* @param target The target object to copy to.
* @param sources One or more source objects to copy properties from.
@@ -57,10 +57,10 @@ interface Function {
*/
name: string;
/**
* Determines if a constructor object recognizes an object as one of the
/**
* Determines if a constructor object recognizes an object as one of the
* constructors instances.
* @param value The object to test.
* @param value The object to test.
*/
[Symbol.hasInstance](value: any): boolean;
}
@@ -71,30 +71,25 @@ interface Function {
// and es6.array.find-index
// #############################################################################################
interface ArrayLike<T> {
length: number;
[n: number]: T;
}
interface Array<T> {
/**
* Returns the value of the first element in the array where predicate is true, and undefined
/**
* Returns the value of the first element in the array where predicate is true, and undefined
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found, find
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found, find
* immediately returns that element value. Otherwise, find returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): T;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
/**
* Returns the index of the first element in the array where predicate is true, and undefined
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found, find
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found, find
* immediately returns that element value. Otherwise, find returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: T) => boolean, thisArg?: any): number;
@@ -102,21 +97,21 @@ interface Array<T> {
/**
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
* @param start index to start filling the array at. If start is negative, it is treated as
* length+start where length is the length of the array.
* @param end index to stop filling the array at. If end is negative, it is treated as
* @param start index to start filling the array at. If start is negative, it is treated as
* length+start where length is the length of the array.
* @param end index to stop filling the array at. If end is negative, it is treated as
* length+end.
*/
fill(value: T, start?: number, end?: number): T[];
/**
/**
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
* @param end If not specified, length of the this object is used as its default value.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start: number, end?: number): T[];
@@ -161,47 +156,47 @@ interface ArrayConstructor {
// #############################################################################################
// ECMAScript 6: String & RegExp
// Modules: es6.string.from-code-point, es6.string.raw, es6.string.code-point-at,
// es6.string.ends-with, es6.string.includes, es6.string.repeat,
// Modules: es6.string.from-code-point, es6.string.raw, es6.string.code-point-at,
// es6.string.ends-with, es6.string.includes, es6.string.repeat,
// es6.string.starts-with, and es6.regexp
// #############################################################################################
interface String {
/**
* Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
* value of the UTF-16 encoded code point starting at the string element at position pos in
* the String resulting from converting this object to a String.
* If there is no element at that position, the result is undefined.
* Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
* value of the UTF-16 encoded code point starting at the string element at position pos in
* the String resulting from converting this object to a String.
* If there is no element at that position, the result is undefined.
* If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
*/
codePointAt(pos: number): number;
/**
* Returns true if searchString appears as a substring of the result of converting this
* object to a String, at one or more positions that are
* Returns true if searchString appears as a substring of the result of converting this
* object to a String, at one or more positions that are
* greater than or equal to position; otherwise, returns false.
* @param searchString search string
* @param searchString search string
* @param position If position is undefined, 0 is assumed, so as to search all of the String.
*/
includes(searchString: string, position?: number): boolean;
/**
* Returns true if the sequence of elements of searchString converted to a String is the
* same as the corresponding elements of this object (converted to a String) starting at
* Returns true if the sequence of elements of searchString converted to a String is the
* same as the corresponding elements of this object (converted to a String) starting at
* endPosition length(this). Otherwise returns false.
*/
endsWith(searchString: string, endPosition?: number): boolean;
/**
* Returns a String value that is made from count copies appended together. If count is 0,
* Returns a String value that is made from count copies appended together. If count is 0,
* T is the empty String is returned.
* @param count number of copies to append
*/
repeat(count: number): string;
/**
* Returns true if the sequence of elements of searchString converted to a String is the
* same as the corresponding elements of this object (converted to a String) starting at
* Returns true if the sequence of elements of searchString converted to a String is the
* same as the corresponding elements of this object (converted to a String) starting at
* position. Otherwise returns false.
*/
startsWith(searchString: string, position?: number): boolean;
@@ -216,7 +211,7 @@ interface StringConstructor {
/**
* String.raw is intended for use as a tag function of a Tagged Template String. When called
* as such the first argument will be a well formed template call site object and the rest
* as such the first argument will be a well formed template call site object and the rest
* parameter will contain the substitution values.
* @param template A well-formed template string call site representation.
* @param substitutions A set of substitution values.
@@ -248,14 +243,14 @@ interface RegExp {
interface NumberConstructor {
/**
* The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1
* that is representable as a Number value, which is approximately:
* that is representable as a Number value, which is approximately:
* 2.2204460492503130808472633361816 x 10‍‍16.
*/
EPSILON: number;
/**
* Returns true if passed value is finite.
* Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a
* Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a
* number. Only finite values of the type number, result in true.
* @param number A numeric value.
*/
@@ -268,7 +263,7 @@ interface NumberConstructor {
isInteger(number: number): boolean;
/**
* Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
* Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
* number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
* to a number. Only values of the type number, that are also NaN, result in true.
* @param number A numeric value.
@@ -281,30 +276,30 @@ interface NumberConstructor {
*/
isSafeInteger(number: number): boolean;
/**
* The value of the largest integer n such that n and n + 1 are both exactly representable as
* a Number value.
/**
* The value of the largest integer n such that n and n + 1 are both exactly representable as
* a Number value.
* The value of Number.MIN_SAFE_INTEGER is 9007199254740991 2^53 1.
*/
MAX_SAFE_INTEGER: number;
/**
* The value of the smallest integer n such that n and n 1 are both exactly representable as
* a Number value.
/**
* The value of the smallest integer n such that n and n 1 are both exactly representable as
* a Number value.
* The value of Number.MIN_SAFE_INTEGER is 9007199254740991 ((2^53 1)).
*/
MIN_SAFE_INTEGER: number;
/**
* Converts a string to a floating-point number.
* @param string A string that contains a floating-point number.
* Converts a string to a floating-point number.
* @param string A string that contains a floating-point number.
*/
parseFloat(string: string): number;
/**
* Converts A string to an integer.
* @param s A string to convert into a number.
* @param radix A value between 2 and 36 that specifies the base of the number in numString.
* @param radix A value between 2 and 36 that specifies the base of the number in numString.
* If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
* All other strings are considered decimal.
*/
@@ -350,7 +345,7 @@ interface Math {
log1p(x: number): number;
/**
* Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of
* Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of
* the natural logarithms).
* @param x A numeric expression.
*/
@@ -436,8 +431,8 @@ interface Symbol {
}
interface SymbolConstructor {
/**
* A reference to the prototype.
/**
* A reference to the prototype.
*/
prototype: Symbol;
@@ -448,14 +443,14 @@ interface SymbolConstructor {
(description?: string|number): symbol;
/**
* Returns a Symbol object from the global symbol registry matching the given key if found.
* Returns a Symbol object from the global symbol registry matching the given key if found.
* Otherwise, returns a new symbol with this key.
* @param key key to search for.
*/
for(key: string): symbol;
/**
* Returns a key from the global symbol registry matching the given Symbol if found.
* Returns a key from the global symbol registry matching the given Symbol if found.
* Otherwise, returns a undefined.
* @param sym Symbol to find the key for.
*/
@@ -463,72 +458,72 @@ interface SymbolConstructor {
// Well-known Symbols
/**
* A method that determines if a constructor object recognizes an object as one of the
* constructors instances. Called by the semantics of the instanceof operator.
/**
* A method that determines if a constructor object recognizes an object as one of the
* constructors instances. Called by the semantics of the instanceof operator.
*/
hasInstance: symbol;
/**
/**
* A Boolean value that if true indicates that an object should flatten to its array elements
* by Array.prototype.concat.
*/
isConcatSpreadable: symbol;
/**
* A method that returns the default iterator for an object. Called by the semantics of the
/**
* A method that returns the default iterator for an object. Called by the semantics of the
* for-of statement.
*/
iterator: symbol;
/**
* A regular expression method that matches the regular expression against a string. Called
* by the String.prototype.match method.
* A regular expression method that matches the regular expression against a string. Called
* by the String.prototype.match method.
*/
match: symbol;
/**
* A regular expression method that replaces matched substrings of a string. Called by the
/**
* A regular expression method that replaces matched substrings of a string. Called by the
* String.prototype.replace method.
*/
replace: symbol;
/**
* A regular expression method that returns the index within a string that matches the
* A regular expression method that returns the index within a string that matches the
* regular expression. Called by the String.prototype.search method.
*/
search: symbol;
/**
* A function valued property that is the constructor function that is used to create
/**
* A function valued property that is the constructor function that is used to create
* derived objects.
*/
species: symbol;
/**
* A regular expression method that splits a string at the indices that match the regular
* A regular expression method that splits a string at the indices that match the regular
* expression. Called by the String.prototype.split method.
*/
split: symbol;
/**
/**
* A method that converts an object to a corresponding primitive value.Called by the ToPrimitive
* abstract operation.
*/
toPrimitive: symbol;
/**
/**
* A String value that is used in the creation of the default string description of an object.
* Called by the built-in method Object.prototype.toString.
*/
toStringTag: symbol;
/**
* An Object whose own property names are property names that are excluded from the with
/**
* An Object whose own property names are property names that are excluded from the with
* environment bindings of the associated objects.
*/
unscopables: symbol;
/**
* Non-standard. Use simple mode for core-js symbols. See https://github.com/zloirock/core-js/#caveats-when-using-symbol-polyfill
*/
@@ -544,12 +539,12 @@ declare var Symbol: SymbolConstructor;
interface Object {
/**
* Determines whether an object has a property with the specified name.
* Determines whether an object has a property with the specified name.
* @param v A property name.
*/
hasOwnProperty(v: PropertyKey): boolean;
/**
/**
* Determines whether a specified property is enumerable.
* @param v A property name.
*/
@@ -564,17 +559,17 @@ interface ObjectConstructor {
getOwnPropertySymbols(o: any): symbol[];
/**
* Gets the own property descriptor of the specified object.
* An own property descriptor is one that is defined directly on the object and is not
* inherited from the object's prototype.
* Gets the own property descriptor of the specified object.
* An own property descriptor is one that is defined directly on the object and is not
* inherited from the object's prototype.
* @param o Object that contains the property.
* @param p Name of the property.
*/
getOwnPropertyDescriptor(o: any, propertyKey: PropertyKey): PropertyDescriptor;
/**
* Adds a property to an object, or modifies attributes of an existing property.
* @param o Object on which to add or modify the property. This can be a native JavaScript
* Adds a property to an object, or modifies attributes of an existing property.
* @param o Object on which to add or modify the property. This can be a native JavaScript
* object (that is, a user-defined object or a built in object) or a DOM object.
* @param p The property name.
* @param attributes Descriptor for the property. It can be for a data property or an accessor
@@ -693,17 +688,17 @@ interface Array<T> {
/** Iterator */
[Symbol.iterator](): IterableIterator<T>;
/**
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): IterableIterator<[number, T]>;
/**
/**
* Returns an list of keys in the array
*/
keys(): IterableIterator<number>;
/**
/**
* Returns an list of values in the array
*/
values(): IterableIterator<T>;
@@ -776,21 +771,21 @@ interface Promise<T> {
}
interface PromiseConstructor {
/**
* A reference to the prototype.
/**
* A reference to the prototype.
*/
prototype: Promise<any>;
/**
* Creates a new Promise.
* @param executor A callback used to initialize the promise. This callback is passed two arguments:
* a resolve callback used resolve the promise with a value or the result of another promise,
* @param executor A callback used to initialize the promise. This callback is passed two arguments:
* a resolve callback used resolve the promise with a value or the result of another promise,
* and a reject callback used to reject the promise with a provided reason or error.
*/
new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
/**
* Creates a Promise that is resolved with an array of results when all of the provided Promises
* Creates a Promise that is resolved with an array of results when all of the provided Promises
* resolve, or rejected when any Promise is rejected.
* @param values An array of Promises.
* @returns A new Promise.
@@ -798,7 +793,7 @@ interface PromiseConstructor {
all<T>(values: Iterable<T | PromiseLike<T>>): Promise<T[]>;
/**
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
* or rejected.
* @param values An array of Promises.
* @returns A new Promise.
@@ -859,7 +854,7 @@ declare module Reflect {
// #############################################################################################
// ECMAScript 7
// Modules: es7.array.includes, es7.string.at, es7.string.lpad, es7.string.rpad,
// Modules: es7.array.includes, es7.string.at, es7.string.lpad, es7.string.rpad,
// es7.object.to-array, es7.object.get-own-property-descriptors, es7.regexp.escape,
// es7.map.to-json, and es7.set.to-json
// #############################################################################################
@@ -918,14 +913,14 @@ interface ArrayConstructor {
*/
join<T>(array: ArrayLike<T>, separator?: string): string;
/**
* Reverses the elements in an Array.
* Reverses the elements in an Array.
*/
reverse<T>(array: ArrayLike<T>): T[];
/**
* Removes the first element from an array and returns it.
*/
shift<T>(array: ArrayLike<T>): T;
/**
/**
* Returns a section of an array.
* @param start The beginning of the specified portion of the array.
* @param end The end of the specified portion of the array.
@@ -988,21 +983,21 @@ interface ArrayConstructor {
/**
* Performs the specified action for each element in an array.
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
*/
forEach<T>(array: ArrayLike<T>, callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;
/**
* Calls a defined callback function on each element of an array, and returns an array that contains the results.
* @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
* @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
*/
map<T, U>(array: ArrayLike<T>, callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];
/**
* Returns the elements of an array that meet the condition specified in a callback function.
* @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
* Returns the elements of an array that meet the condition specified in a callback function.
* @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
*/
filter<T>(array: ArrayLike<T>, callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T[];
@@ -1021,53 +1016,53 @@ interface ArrayConstructor {
*/
reduce<T>(array: ArrayLike<T>, callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
/**
/**
* Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
*/
reduceRight<T, U>(array: ArrayLike<T>, callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
/**
/**
* Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
*/
reduceRight<T>(array: ArrayLike<T>, callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
/**
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries<T>(array: ArrayLike<T>): IterableIterator<[number, T]>;
/**
/**
* Returns an list of keys in the array
*/
keys<T>(array: ArrayLike<T>): IterableIterator<number>;
/**
/**
* Returns an list of values in the array
*/
values<T>(array: ArrayLike<T>): IterableIterator<T>;
/**
* Returns the value of the first element in the array where predicate is true, and undefined
/**
* Returns the value of the first element in the array where predicate is true, and undefined
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found, find
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found, find
* immediately returns that element value. Otherwise, find returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find<T>(array: ArrayLike<T>, predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): T;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
/**
* Returns the index of the first element in the array where predicate is true, and undefined
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found, find
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found, find
* immediately returns that element value. Otherwise, find returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex<T>(array: ArrayLike<T>, predicate: (value: T) => boolean, thisArg?: any): number;
@@ -1075,21 +1070,21 @@ interface ArrayConstructor {
/**
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
* @param start index to start filling the array at. If start is negative, it is treated as
* length+start where length is the length of the array.
* @param end index to stop filling the array at. If end is negative, it is treated as
* @param start index to start filling the array at. If start is negative, it is treated as
* length+start where length is the length of the array.
* @param end index to stop filling the array at. If end is negative, it is treated as
* length+end.
*/
fill<T>(array: ArrayLike<T>, value: T, start?: number, end?: number): T[];
/**
/**
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
* @param end If not specified, length of the this object is used as its default value.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin<T>(array: ArrayLike<T>, target: number, start: number, end?: number): T[];
@@ -1113,7 +1108,7 @@ interface ObjectConstructor {
* Non-standard.
*/
classof(value: any): string;
/**
* Non-standard.
*/
@@ -1477,13 +1472,13 @@ declare module core {
}
declare module "core-js" {
export = core;
export = core;
}
declare module "core-js/shim" {
export = core;
export = core;
}
declare module "core-js/core" {
export = core;
export = core;
}
declare module "core-js/core/$for" {
import $for = core.$for;
@@ -2149,10 +2144,10 @@ declare module "core-js/fn/symbol/unscopables" {
export = unscopables;
}
declare module "core-js/es5" {
export = core;
export = core;
}
declare module "core-js/es6" {
export = core;
export = core;
}
declare module "core-js/es6/array" {
var Array: typeof core.Array;
@@ -2211,7 +2206,7 @@ declare module "core-js/es6/weak-set" {
export = WeakSet;
}
declare module "core-js/es7" {
export = core;
export = core;
}
declare module "core-js/es7/array" {
var Array: typeof core.Array;
@@ -2238,32 +2233,32 @@ declare module "core-js/es7/string" {
export = String;
}
declare module "core-js/js" {
export = core;
export = core;
}
declare module "core-js/js/array" {
var Array: typeof core.Array;
export = Array;
}
declare module "core-js/web" {
export = core;
export = core;
}
declare module "core-js/web/dom" {
export = core;
export = core;
}
declare module "core-js/web/immediate" {
export = core;
export = core;
}
declare module "core-js/web/timers" {
export = core;
export = core;
}
declare module "core-js/libary" {
export = core;
export = core;
}
declare module "core-js/libary/shim" {
export = core;
export = core;
}
declare module "core-js/libary/core" {
export = core;
export = core;
}
declare module "core-js/libary/core/$for" {
import $for = core.$for;
@@ -2928,10 +2923,10 @@ declare module "core-js/libary/fn/symbol/unscopables" {
export = unscopables;
}
declare module "core-js/libary/es5" {
export = core;
export = core;
}
declare module "core-js/libary/es6" {
export = core;
export = core;
}
declare module "core-js/libary/es6/array" {
var Array: typeof core.Array;
@@ -2990,7 +2985,7 @@ declare module "core-js/libary/es6/weak-set" {
export = WeakSet;
}
declare module "core-js/libary/es7" {
export = core;
export = core;
}
declare module "core-js/libary/es7/array" {
var Array: typeof core.Array;
@@ -3017,21 +3012,21 @@ declare module "core-js/libary/es7/string" {
export = String;
}
declare module "core-js/libary/js" {
export = core;
export = core;
}
declare module "core-js/libary/js/array" {
var Array: typeof core.Array;
export = Array;
}
declare module "core-js/libary/web" {
export = core;
export = core;
}
declare module "core-js/libary/web/dom" {
export = core;
export = core;
}
declare module "core-js/libary/web/immediate" {
export = core;
export = core;
}
declare module "core-js/libary/web/timers" {
export = core;
export = core;
}
+26 -20
View File
@@ -52,11 +52,11 @@ declare module CryptoJS{
init(cfg?: C): void
create(cfg?: C): IHasher<C>
update(messageUpdate: WordArray): Hasher
update(messageUpdate: string): Hasher
update(messageUpdate: WordArray): Hasher
finalize(messageUpdate?: WordArray): WordArray
finalize(messageUpdate?: string): WordArray
finalize(messageUpdate?: WordArray): WordArray
blockSize: number
@@ -69,16 +69,16 @@ declare module CryptoJS{
//tparam C - Configuration type
interface IHasherHelper<C>{
(message: WordArray, cfg?: C): WordArray
(message: string, cfg?: C): WordArray
(message: WordArray, cfg?: C): WordArray
}
interface HasherHelper extends IHasherHelper<Object>{}
interface IHasherHmacHelper{
(message: WordArray, key: WordArray): WordArray
(message: string, key: string): WordArray
(message: string, key: WordArray): WordArray
(message: WordArray, key: string): WordArray
(message: string, key: string): WordArray
(message: WordArray, key: WordArray): WordArray
}
//tparam C - Configuration type
@@ -90,11 +90,11 @@ declare module CryptoJS{
create(xformMode?: number, key?: WordArray, cfg?: C): ICipher<C>
init(xformMode?: number, key?: WordArray, cfg?: C): void
process(dataUpdate: WordArray): WordArray
process(dataUpdate: string): WordArray
process(dataUpdate: WordArray): WordArray
finalize(dataUpdate?: WordArray): WordArray
finalize(dataUpdate?: string): WordArray
finalize(dataUpdate?: WordArray): WordArray
keySize: number
ivSize: number
@@ -128,6 +128,7 @@ declare module CryptoJS{
interface BlockCipher extends IStreamCipher<IBlockCipherCfg>{}
interface IBlockCipherCfg {
iv?: WordArray;
mode?: mode.IBlockCipherModeImpl //default CBC
padding?: pad.IPaddingImpl //default Pkcs7
}
@@ -163,6 +164,9 @@ declare module CryptoJS{
interface SerializableCipher extends ISerializableCipher<ISerializableCipherCfg>{}
interface ISerializableCipherCfg{
format?: format.IFormatter //default OpenSSLFormatter
iv?: WordArray;
mode?: mode.IBlockCipherModeImpl;
padding?: pad.IPaddingImpl;
}
interface IPasswordBasedCipher<C extends IPasswordBasedCipherCfg> extends Base{
@@ -177,19 +181,21 @@ declare module CryptoJS{
interface PasswordBasedCipher extends IPasswordBasedCipher<IPasswordBasedCipherCfg>{}
interface IPasswordBasedCipherCfg extends ISerializableCipherCfg{
kdf?: kdf.IKdfImpl //default OpenSSLKdf
mode?: mode.IBlockCipherModeImpl;
padding?: pad.IPaddingImpl;
}
/** see Cipher._createHelper */
interface ICipherHelper<C>{
encrypt(message: WordArray, key: WordArray, cfg?: C): CipherParams
encrypt(message: string, password: string, cfg?: C): CipherParams
encrypt(message: string, key: WordArray, cfg?: C): CipherParams
encrypt(message: WordArray, password: string, cfg?: C): CipherParams
encrypt(message: string, password: string, cfg?: C): CipherParams
encrypt(message: WordArray, key: WordArray, cfg?: C): CipherParams
decrypt(ciphertext: CipherParamsData, key: WordArray, cfg?: C): WordArray
decrypt(ciphertext: string, password: string, cfg?: C): WordArray
decrypt(ciphertext: string, key: WordArray, cfg?: C): WordArray
decrypt(ciphertext: CipherParamsData, password: string, cfg?: C): WordArray
decrypt(ciphertext: string, password: string, cfg?: C): WordArray
decrypt(ciphertext: CipherParamsData, key: WordArray, cfg?: C): WordArray
}
interface CipherHelper extends ICipherHelper<Object>{}
@@ -228,8 +234,8 @@ declare module CryptoJS{
}
interface IKdfImpl{
execute(password: string, keySize: number, ivSize: number, salt?: lib.WordArray): lib.CipherParams
execute(password: string, keySize: number, ivSize: number, salt?: string): lib.CipherParams
execute(password: string, keySize: number, ivSize: number, salt?: lib.WordArray): lib.CipherParams
}
}
@@ -305,26 +311,26 @@ declare module CryptoJS{
}
interface HMAC extends lib.Base{
init(hasher?: lib.Hasher, key?: lib.WordArray): void
init(hasher?: lib.Hasher, key?: string): void
create(hasher?: lib.Hasher, key?: lib.WordArray): HMAC
init(hasher?: lib.Hasher, key?: lib.WordArray): void
create(hasher?: lib.Hasher, key?: string): HMAC
create(hasher?: lib.Hasher, key?: lib.WordArray): HMAC
update(messageUpdate: lib.WordArray): HMAC
update(messageUpdate: string): HMAC
update(messageUpdate: lib.WordArray): HMAC
finalize(messageUpdate?: lib.WordArray): lib.WordArray
finalize(messageUpdate?: string): lib.WordArray
finalize(messageUpdate?: lib.WordArray): lib.WordArray
}
interface EvpKDF extends lib.Base{
cfg: IEvpKDFCfg
init(cfg?: IEvpKDFCfg): void
create(cfg?: IEvpKDFCfg): EvpKDF
compute(password: lib.WordArray, salt: lib.WordArray): lib.WordArray
compute(password: string, salt: string): lib.WordArray
compute(password: string, salt: lib.WordArray): lib.WordArray
compute(password: lib.WordArray, salt: string): lib.WordArray
compute(password: string, salt: string): lib.WordArray
compute(password: lib.WordArray, salt: lib.WordArray): lib.WordArray
}
interface IEvpKDFCfg{
keySize?: number //default 128/32
@@ -332,10 +338,10 @@ declare module CryptoJS{
iterations?: number //default 1
}
interface IEvpKDFHelper{
(password: lib.WordArray, salt: lib.WordArray, cfg?: IEvpKDFCfg): lib.WordArray
(password: string, salt: string, cfg?: IEvpKDFCfg): lib.WordArray
(password: string, salt: lib.WordArray, cfg?: IEvpKDFCfg): lib.WordArray
(password: lib.WordArray, salt: string, cfg?: IEvpKDFCfg): lib.WordArray
(password: string, salt: string, cfg?: IEvpKDFCfg): lib.WordArray
(password: lib.WordArray, salt: lib.WordArray, cfg?: IEvpKDFCfg): lib.WordArray
}
interface PBKDF2 extends EvpKDF{} //PBKDF2 is same as EvpKDF
+1 -1
View File
@@ -50,7 +50,7 @@ YUI.add('algo-aes-test', function (Y) {
var expectedKey = key.toString();
var expectedIv = iv.toString();
C.AES.encrypt(message, key, { iv: iv });
C.AES.encrypt(message, key, { iv });
Y.Assert.areEqual(expectedMessage, message.toString());
Y.Assert.areEqual(expectedKey, key.toString());
+1 -1
View File
@@ -74,7 +74,7 @@ YUI.add('algo-des-test', function (Y) {
var expectedKey = key.toString();
var expectedIv = iv.toString();
C.DES.encrypt(message, key, { iv: iv });
C.DES.encrypt(message, key, { iv });
Y.Assert.areEqual(expectedMessage, message.toString());
Y.Assert.areEqual(expectedKey, key.toString());
+1 -1
View File
@@ -58,7 +58,7 @@ YUI.add('algo-tripledes-test', function (Y) {
var expectedKey = key.toString();
var expectedIv = iv.toString();
C.TripleDES.encrypt(message, key, { iv: iv });
C.TripleDES.encrypt(message, key, { iv });
Y.Assert.areEqual(expectedMessage, message.toString());
Y.Assert.areEqual(expectedKey, key.toString());
+1 -1
View File
@@ -120,7 +120,7 @@ module Tests.ui {
$('<div/>').dxAutocomplete({
items: ["Bern", "Lyon", "Lander"],
value: options.value,
onValueChange: function (e:{ value: string }) {
onValueChanged: function (e:{ value: string }) {
options.setValue(e.value);
}
}).appendTo(container);
+192 -126
View File
@@ -1789,7 +1789,7 @@ declare module DevExpress.ui {
interval?: number;
/** Specifies the maximum zoom level of a calendar, which is used to pick the date. */
maxZoomLevel?: string;
/** Specifies the minimal zoom level of a calendar, which is used to pick the date. */
/** Specifies the minimal zoom level of a calendar, which is used to pick the date. */
minZoomLevel?: string;
/** Specifies the type of date/time picker. */
pickerType?: string;
@@ -1827,8 +1827,8 @@ declare module DevExpress.ui {
maxZoomLevel?: string;
/** Specifies the minimum zoom level of the calendar. */
minZoomLevel?: string;
/** The template to be used for rendering calendar cells. */
cellTemplate?: any;
/** The template to be used for rendering calendar cells. */
cellTemplate?: any;
}
/** A calendar widget. */
export class dxCalendar extends Editor {
@@ -1869,7 +1869,7 @@ declare module DevExpress.ui {
/** A container widget used to arrange inner elements. */
export class dxBox extends CollectionWidget {
constructor(element: JQuery, options?: dxBoxOptions);
constructor(element: Element, options?: dxBoxOptions);
constructor(element: Element, options?: dxBoxOptions);
}
export interface dxResponsiveBoxOptions extends CollectionWidgetOptions {
/** Specifies the collection of rows for the grid used to position layout elements. */
@@ -1887,14 +1887,77 @@ declare module DevExpress.ui {
constructor(element: Element, options?: dxBoxOptions);
}
export interface dxAutocompleteOptions extends dxDropDownListOptions {
/** Specifies the current value displayed by the widget. */
value?: string;
/** The minimum number of characters that must be entered into the text box to begin a search. */
minSearchLength?: number;
accessKey?: string;
activeStateEnabled?: boolean;
attr?: any;
dataSource?: any;
disabled?: boolean;
displayValue?: string;
fieldEditEnabled?: boolean;
focusStateEnabled?: boolean;
height?: string | number | (() => string | number);
hint?: string;
hoverStateEnabled?: boolean;
isValid?: boolean;
items?: any[];
/**
* The template to be used for rendering items.
* Defaults Value: "item"
*/
itemTemplate?: string | Node | JQuery | (() => string | Node | JQuery);
/** Specifies the maximum count of items displayed by the widget. */
maxItemCount?: number;
maxLength?: string | number;
/** The minimum number of characters that must be entered into the text box to begin a search. */
minSearchLength?: number;
mode?: string; // "text" | "email" | "search" | "tel" | "url" | "password"
onChange?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onClosed?: (e: { component: any; element: JQuery; model: any }) => void;
onContentReady?: (e: { component: any; element: JQuery; model: any }) => void;
onCopy?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onCut?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onDisposing?: (e: { component: any; element: JQuery; model: any }) => void;
onEnterKey?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onFocusIn?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onFocusOut?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onInitialized?: (e: { component: any; element: JQuery }) => void;
onInput?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onItemClick?: (e: { component: any; element: JQuery; model: any; itemElement: HTMLElement }) => void;
onKeyDown?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onKeyPress?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onKeyUp?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onOpened?: (e: { component: any; element: JQuery; model: any }) => void;
onOptionChanged?: (e: { component: any; element: JQuery; model: any; value: any }) => void;
onPaste?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onSelectionChanged?: (e: { component: any; element: JQuery; model: any; selectedItem: any }) => void;
onValueChanged?: (e: { component: any; element: JQuery; model: any; value: any; previousValue: any; itemData: any; jQueryEvent: JQueryEventObject }) => void;
opened?: boolean;
placeholder?: string;
readOnly?: boolean;
rtlEnabled?: boolean;
searchExpr?: string;
searchMode?: string; // "contains" | "startswith"
searchTimeout?: number;
/** Gets the currently selected item. */
selectedItem?: Object;
selectedItem?: any;
showClearButton?: boolean;
spellcheck?: boolean;
tabIndex?: number;
text?: string;
validationError?: any;
validationMessageMode?: string; // "auto" | "always"
/** Specifies the current value displayed by the widget. */
value?: string;
/**
* CAn be any DOM event names separated by spaces.
*/
valueChangeEvent?: string;
valueExpr?: string | Function;
visible?: boolean;
width?: string | number | (() => string | number);
}
/** A textbox widget that supports autocompletion. */
export class dxAutocomplete extends dxDropDownList {
@@ -2978,9 +3041,9 @@ declare module DevExpress.ui {
lookup?: {
/** Specifies whether or not a user can nullify values of a lookup column. */
allowClearing?: boolean;
/**
Specifies the data source providing data for a lookup column.
*/
/**
* Specifies the data source providing data for a lookup column.
*/
dataSource?: any;
/** Specifies the expression defining the data source field whose values must be displayed. */
displayExpr?: any;
@@ -3013,6 +3076,9 @@ Specifies the data source providing data for a lookup column.
showInColumnChooser?: boolean;
/** Specifies the identifier of the column. */
name?: string;
// NOTE https://github.com/borisyankov/DefinitelyTyped/pull/5590
text?: string;
value?: any;
}
export interface dxDataGridOptions extends WidgetOptions {
/** Specifies whether the outer borders of the grid are visible or not. */
@@ -3108,10 +3174,10 @@ Specifies the data source providing data for a lookup column.
cancel?: string;
}
};
/**
An array of grid columns.
*/
columns?: Array<dxDataGridColumn>;
/**
* An array of grid columns.
*/
columns?: dxDataGridColumn[];
onContentReady?: Function;
contentReadyAction?: Function;
/** Specifies a function that customizes grid columns after they are created. */
@@ -3208,9 +3274,9 @@ An array of grid columns.
autoExpandAll?: boolean;
/** Specifies the message displayed in a group row when the corresponding group is continued from the previous page. */
groupContinuedMessage?: string;
/**
Specifies the message displayed in a group row when the corresponding group continues on the next page.
*/
/**
* Specifies the message displayed in a group row when the corresponding group continues on the next page.
*/
groupContinuesMessage?: string;
};
/** Specifies options that configure the group panel. */
@@ -3590,9 +3656,9 @@ Specifies the message displayed in a group row when the corresponding group cont
removeRow(rowIndex: number): void;
/** Saves changes made in a grid. */
saveEditData(): void;
/**
Searches grid records by a search string.
*/
/**
* Searches grid records by a search string.
*/
searchByText(text: string): void;
/** Selects all grid records. */
selectAll(): void;
@@ -4304,7 +4370,7 @@ declare module DevExpress.viz.charts {
clearSelection(): void;
/** Gets the color of a particular series. */
getColor(): string;
/**
/**
* Gets a point from the series point collection based on the specified argument.
* @deprecated getPointsByArg(pointArg).md
*/
@@ -4509,8 +4575,8 @@ declare module DevExpress.viz.charts {
/** Specifies a precision for the percentage values displayed in the labels of a full-stacked-like series. */
percentPrecision?: number;
}
export interface BaseCommonSeriesConfig {
/** Specifies the data source field that provides arguments for series points. */
export interface BaseCommonSeriesConfig {
/** Specifies the data source field that provides arguments for series points. */
argumentField?: string;
axis?: string;
/** An object defining the label configuration options for a series in the dxChart widget. */
@@ -4570,30 +4636,30 @@ declare module DevExpress.viz.charts {
visible?: boolean;
/** Specifies a line width. */
width?: number;
/** Configures error bars. */
valueErrorBar?: {
/** Specifies whether error bars must be displayed in full or partially. */
displayMode?: string;
/** Specifies the data field that provides data for low error values. */
lowValueField?: string;
/** Specifies the data field that provides data for high error values. */
highValueField?: string;
/** Specifies how error bar values must be calculated. */
type?: string;
/** Specifies the value to be used for generating error bars. */
value?: number;
/** Specifies the color of error bars. */
color?: string;
/** Specifies the opacity of error bars. */
opacity?: number;
/** Specifies the length of the lines that indicate the error bar edges. */
/** Configures error bars. */
valueErrorBar?: {
/** Specifies whether error bars must be displayed in full or partially. */
displayMode?: string;
/** Specifies the data field that provides data for low error values. */
lowValueField?: string;
/** Specifies the data field that provides data for high error values. */
highValueField?: string;
/** Specifies how error bar values must be calculated. */
type?: string;
/** Specifies the value to be used for generating error bars. */
value?: number;
/** Specifies the color of error bars. */
color?: string;
/** Specifies the opacity of error bars. */
opacity?: number;
/** Specifies the length of the lines that indicate the error bar edges. */
edgeLength?: number;
/** Specifies the width of the error bar line. */
lineWidth?: number;
};
}
export interface CommonPointOptions {
/** Specifies border options for points in the line and area series. */
/** Specifies the width of the error bar line. */
lineWidth?: number;
};
}
export interface CommonPointOptions {
/** Specifies border options for points in the line and area series. */
border?: viz.core.Border;
/** Specifies the points color. */
color?: string;
@@ -4624,9 +4690,9 @@ declare module DevExpress.viz.charts {
/** Specifies a symbol for presenting points of the line and area series. */
symbol?: string;
visible?: boolean;
}
export interface ChartCommonPointOptions extends CommonPointOptions {
/** An object specifying the parameters of an image that is used as a point marker. */
}
export interface ChartCommonPointOptions extends CommonPointOptions {
/** An object specifying the parameters of an image that is used as a point marker. */
image?: {
/** Specifies the height of an image that is used as a point marker. */
height?: any;
@@ -4635,9 +4701,9 @@ declare module DevExpress.viz.charts {
/** Specifies the width of an image that is used as a point marker. */
width?: any;
};
}
export interface PolarCommonPointOptions extends CommonPointOptions {
/** An object specifying the parameters of an image that is used as a point marker. */
}
export interface PolarCommonPointOptions extends CommonPointOptions {
/** An object specifying the parameters of an image that is used as a point marker. */
image?: {
/** Specifies the height of an image that is used as a point marker. */
height?: number;
@@ -4646,7 +4712,7 @@ declare module DevExpress.viz.charts {
/** Specifies the width of an image that is used as a point marker. */
width?: number;
};
}
}
/** An object that defines configuration options for chart series. */
export interface CommonSeriesConfig extends BaseCommonSeriesConfig {
/** Specifies the data source field that provides a 'close' value for a _candleStick_ or _stock_ series. */
@@ -4737,14 +4803,14 @@ declare module DevExpress.viz.charts {
/** Sets the series type. */
type?: string;
}
/** An object that defines configuration options for polar chart series. */
export interface CommonPolarSeriesConfig extends BaseCommonSeriesConfig {
/** Specifies whether or not to close the chart by joining the end point with the first point. */
/** An object that defines configuration options for polar chart series. */
export interface CommonPolarSeriesConfig extends BaseCommonSeriesConfig {
/** Specifies whether or not to close the chart by joining the end point with the first point. */
closed?: boolean;
label?: SeriesConfigLabel;
point?: PolarCommonPointOptions;
}
export interface CommonPolarSeriesSettings extends CommonPolarSeriesConfig {
}
export interface CommonPolarSeriesSettings extends CommonPolarSeriesConfig {
/** An object that specifies configuration options for all series of the <i>area</i> type in the chart. */
area?: CommonPolarSeriesConfig;
/** An object that specifies configuration options for all series of the _bar_ type in the chart. */
@@ -4842,7 +4908,7 @@ declare module DevExpress.viz.charts {
/** Specifies a data source field that represents the series name. */
nameField?: string;
}
export interface PolarSeriesTemplate {
export interface PolarSeriesTemplate {
/** Specifies a callback function that returns a series object with individual series settings. */
customizeSeries?: (seriesName: string) => PolarSeriesConfig;
/** Specifies a data source field that represents the series name. */
@@ -4859,18 +4925,18 @@ declare module DevExpress.viz.charts {
export interface PolarCommonConstantLineLabel {
/** Indicates whether or not to display labels for the axis constant lines. */
visible?: boolean;
/** Specifies font options for a constant line label. */
/** Specifies font options for a constant line label. */
font?: viz.core.Font;
}
export interface ConstantLineStyle {
/** Specifies a color for a constant line. */
}
export interface ConstantLineStyle {
/** Specifies a color for a constant line. */
color?: string;
/** Specifies a dash style for a constant line. */
dashStyle?: string;
/** Specifies a constant line width in pixels. */
width?: number;
}
export interface ChartCommonConstantLineStyle extends ConstantLineStyle {
}
export interface ChartCommonConstantLineStyle extends ConstantLineStyle {
/** An object defining constant line label options. */
label?: ChartCommonConstantLineLabel;
/** Specifies the space between the constant line label and the left/right side of the constant line. */
@@ -4878,24 +4944,24 @@ declare module DevExpress.viz.charts {
/** Specifies the space between the constant line label and the top/bottom side of the constant line. */
paddingTopBottom?: number;
}
export interface PolarCommonConstantLineStyle extends ConstantLineStyle {
/** An object defining constant line label options. */
export interface PolarCommonConstantLineStyle extends ConstantLineStyle {
/** An object defining constant line label options. */
label?: PolarCommonConstantLineLabel;
}
export interface CommonAxisLabel {
/** Specifies font options for axis labels. */
}
export interface CommonAxisLabel {
/** Specifies font options for axis labels. */
font?: viz.core.Font;
/** Specifies the spacing between an axis and its labels in pixels. */
indentFromAxis?: number;
/** Indicates whether or not axis labels are visible. */
visible?: boolean;
}
}
export interface ChartCommonAxisLabel extends CommonAxisLabel {
/** Specifies the label's position relative to the tick (grid line). */
alignment?: string;
/** Specifies the overlap resolving algorithm to be applied to axis labels. */
/** Specifies the overlap resolving algorithm to be applied to axis labels. */
overlappingBehavior?: {
/** Specifies how to arrange axis labels. */
/** Specifies how to arrange axis labels. */
mode?: string;
/** Specifies the angle used to rotate axis labels. */
rotationAngle?: number;
@@ -4907,7 +4973,7 @@ declare module DevExpress.viz.charts {
/** Specifies the overlap resolving algorithm to be applied to axis labels. */
overlappingBehavior?: string;
}
export interface CommonAxisTitle {
export interface CommonAxisTitle {
/** Specifies font options for an axis title. */
font?: viz.core.Font;
/** Specifies a margin for an axis title in pixels. */
@@ -4916,7 +4982,7 @@ declare module DevExpress.viz.charts {
export interface BaseCommonAxisSettings {
/** Specifies the color of the line that represents an axis. */
color?: string;
/** Specifies whether ticks/grid lines of a discrete axis are located between labels or cross the labels. */
/** Specifies whether ticks/grid lines of a discrete axis are located between labels or cross the labels. */
discreteAxisDivisionMode?: string;
/** An object defining the configuration options for the grid lines of an axis in the dxPolarChart widget. */
grid?: {
@@ -4929,7 +4995,7 @@ declare module DevExpress.viz.charts {
/** Specifies the width of grid lines. */
width?: number;
};
/** Specifies the options of the minor grid. */
/** Specifies the options of the minor grid. */
minorGrid?: {
/** Specifies a color for the lines of the minor grid. */
color?: string;
@@ -4955,7 +5021,7 @@ declare module DevExpress.viz.charts {
/** Indicates whether or not ticks are visible on an axis. */
visible?: boolean;
};
/** Specifies the options of the minor ticks. */
/** Specifies the options of the minor ticks. */
minorTick?: {
/** Specifies a color for the minor ticks. */
color?: string;
@@ -4969,18 +5035,18 @@ declare module DevExpress.viz.charts {
/** Specifies the width of the line that represents an axis in the chart. */
width?: number;
}
export interface ChartCommonAxisSettings extends BaseCommonAxisSettings {
export interface ChartCommonAxisSettings extends BaseCommonAxisSettings {
/** Specifies the appearance of all the widget's constant lines. */
constantLineStyle?: ChartCommonConstantLineStyle;
/** An object defining the label configuration options that are common for all axes in the dxChart widget. */
label?: ChartCommonAxisLabel;
/** Specifies a coefficient that determines the spacing between the maximum series point and the axis. */
maxValueMargin?: number;
maxValueMargin?: number;
/** Specifies a coefficient that determines the spacing between the minimum series point and the axis. */
minValueMargin?: number;
minValueMargin?: number;
/** Specifies, in pixels, the space reserved for an axis. */
placeholderSize?: number;
/** An object defining configuration options for strip style. */
/** An object defining configuration options for strip style. */
stripStyle?: {
/** An object defining the configuration options for a strip label style. */
label?: {
@@ -5001,7 +5067,7 @@ declare module DevExpress.viz.charts {
/** Indicates whether or not to display series with indents from axis boundaries. */
valueMarginsEnabled?: boolean;
}
export interface PolarCommonAxisSettings extends BaseCommonAxisSettings {
export interface PolarCommonAxisSettings extends BaseCommonAxisSettings {
/** Specifies the appearance of all the widget's constant lines. */
constantLineStyle?: PolarCommonConstantLineStyle;
/** An object defining the label configuration options that are common for all axes in the dxPolarChart widget. */
@@ -5023,12 +5089,12 @@ declare module DevExpress.viz.charts {
/** Specifies the text to be displayed in a constant line label. */
text?: string;
}
export interface PolarConstantLineLabel extends PolarCommonConstantLineLabel {
export interface PolarConstantLineLabel extends PolarCommonConstantLineLabel {
/** Specifies the text to be displayed in a constant line label. */
text?: string;
}
export interface AxisLabel {
/** Specifies the text for a hint that appears when a user hovers the mouse pointer over a label on the value axis. */
export interface AxisLabel {
/** Specifies the text for a hint that appears when a user hovers the mouse pointer over a label on the value axis. */
customizeHint?: (argument: { value: any; valueText: string }) => string;
/** Specifies a callback function that returns the text to be displayed in value axis labels. */
customizeText?: (argument: { value: any; valueText: string }) => string;
@@ -5036,9 +5102,9 @@ declare module DevExpress.viz.charts {
format?: string;
/** Specifies a precision for the formatted value displayed in the axis labels. */
precision?: number;
}
}
export interface ChartAxisLabel extends ChartCommonAxisLabel, AxisLabel {}
export interface PolarAxisLabel extends PolarCommonAxisLabel, AxisLabel {}
export interface PolarAxisLabel extends PolarCommonAxisLabel, AxisLabel {}
export interface AxisTitle extends CommonAxisTitle {
/** Specifies the text for the value axis title. */
text?: string;
@@ -5048,19 +5114,19 @@ declare module DevExpress.viz.charts {
label?: ChartConstantLineLabel;
}
export interface ChartConstantLine extends ChartConstantLineStyle {
/** An object defining constant line label options. */
/** An object defining constant line label options. */
label?: ChartConstantLineLabel;
/** Specifies a value to be displayed by a constant line. */
value?: any;
}
export interface PolarConstantLine extends PolarCommonConstantLineStyle {
/** An object defining constant line label options. */
}
export interface PolarConstantLine extends PolarCommonConstantLineStyle {
/** An object defining constant line label options. */
label?: PolarConstantLineLabel;
/** Specifies a value to be displayed by a constant line. */
value?: any;
}
export interface Axis {
/** Specifies a coefficient for dividing the value axis. */
}
export interface Axis {
/** Specifies a coefficient for dividing the value axis. */
axisDivisionFactor?: number;
/** Specifies the order in which discrete values are arranged on the value axis. */
categories?: Array<any>;
@@ -5074,11 +5140,11 @@ declare module DevExpress.viz.charts {
minorTickCount?: number;
/** Specifies the required type of the value axis. */
type?: string;
/** Specifies the pane on which the current value axis will be displayed. */
/** Specifies the pane on which the current value axis will be displayed. */
pane?: string;
/** Specifies options for value axis strips. */
strips?: Array<Strip>;
}
}
export interface ChartAxis extends ChartCommonAxisSettings, Axis {
/** Defines an array of the value axis constant lines. */
constantLines?: Array<ChartConstantLine>;
@@ -5095,52 +5161,52 @@ declare module DevExpress.viz.charts {
/** Specifies the title for a value axis. */
title?: AxisTitle;
}
export interface PolarAxis extends PolarCommonAxisSettings, Axis {
export interface PolarAxis extends PolarCommonAxisSettings, Axis {
/** Defines an array of the value axis constant lines. */
constantLines?: Array<PolarConstantLine>;
/** Specifies options for value axis labels. */
label?: PolarAxisLabel;
}
export interface ArgumentAxis {
/** Specifies the desired type of axis values. */
export interface ArgumentAxis {
/** Specifies the desired type of axis values. */
argumentType?: string;
/** Specifies the elements that will be highlighted when the argument axis is hovered over. */
hoverMode?: string;
}
}
export interface ChartArgumentAxis extends ChartAxis, ArgumentAxis {}
export interface PolarArgumentAxis extends PolarAxis, ArgumentAxis {
/** Specifies a start angle for the argument axis in degrees. */
export interface PolarArgumentAxis extends PolarAxis, ArgumentAxis {
/** Specifies a start angle for the argument axis in degrees. */
startAngle?: number;
/** Specifies whether or not to display the first point at the angle specified by the startAngle option. */
firstPointOnStartAngle?: boolean;
/** Specifies the period of the argument values in the data source. */
period?: number;
}
export interface ValueAxis {
}
export interface ValueAxis {
/** Specifies the name of the value axis. */
name?: string;
/** Specifies whether or not to indicate a zero value on the value axis. */
showZero?: boolean;
/** Specifies the desired type of axis values. */
valueType?: string;
}
}
export interface ChartValueAxis extends ChartAxis, ValueAxis {
/** Specifies the spacing, in pixels, between multiple value axes in a chart. */
multipleAxesSpacing?: number;
/** Specifies the value by which the chart's value axes are synchronized. */
synchronizedValue?: number;
}
export interface PolarValueAxis extends PolarAxis, ValueAxis {
/** Indicates whether to display series with indents from axis boundaries. */
valueMarginsEnabled?: boolean;
/** Specifies a coefficient that determines the spacing between the maximum series point and the axis. */
export interface PolarValueAxis extends PolarAxis, ValueAxis {
/** Indicates whether to display series with indents from axis boundaries. */
valueMarginsEnabled?: boolean;
/** Specifies a coefficient that determines the spacing between the maximum series point and the axis. */
maxValueMargin?: number;
/** Specifies a coefficient that determines the spacing between the minimum series point and the axis. */
minValueMargin?: number;
tick?: {
visible?: boolean;
}
}
tick?: {
visible?: boolean;
}
}
export interface CommonPane {
/** Specifies a background color in a pane. */
backgroundColor?: string;
@@ -5281,7 +5347,7 @@ declare module DevExpress.viz.charts {
asyncSeriesRendering?: boolean;
}): void;
}
export interface AdvancedLegend extends core.BaseLegend {
export interface AdvancedLegend extends core.BaseLegend {
/** Specifies the text for a hint that appears when a user hovers the mouse pointer over a legend item. */
customizeHint?: (seriesInfo: { seriesName: string; seriesIndex: number; seriesColor: string; }) => string;
/** <p>Specifies a callback function that returns the text to be displayed by legend items.</p> */
@@ -5322,7 +5388,7 @@ declare module DevExpress.viz.charts {
/** Specifies whether a single series or multiple series can be selected in the chart. */
seriesSelectionMode?: string;
/** Specifies how the chart must behave when series point labels overlap. */
resolveLabelOverlapping?: string;
resolveLabelOverlapping?: string;
}
export interface Legend extends AdvancedLegend {
/** Specifies whether the legend is located outside or inside the chart's plot. */
@@ -5463,7 +5529,7 @@ declare module DevExpress.viz.charts {
/** Specifies whether or not point labels can be hidden when the layout is adapting. */
keepLabels?: boolean;
};
/** Indicates whether or not to display a "spider web". */
/** Indicates whether or not to display a "spider web". */
useSpiderWeb?: boolean;
/** Specifies argument axis options for the dxPolarChart widget. */
argumentAxis?: PolarArgumentAxis;
@@ -5517,7 +5583,7 @@ declare module DevExpress.viz.charts {
onLegendClick?: any;
legendClick?: any;
/** Specifies how the chart must behave when series point labels overlap. */
resolveLabelOverlapping?: string;
resolveLabelOverlapping?: string;
}
/** A circular chart widget for HTML JS applications. */
export class dxPieChart extends BaseChart {
@@ -5889,7 +5955,7 @@ declare module DevExpress.viz.rangeSelector {
behavior?: {
/** Indicates whether or not you can swap sliders. */
allowSlidersSwap?: boolean;
/**
/**
Indicates whether or not animation is enabled.
*/
animationEnabled?: boolean;
@@ -6004,7 +6070,7 @@ Indicates whether or not animation is enabled.
maxRange?: any;
/** Specifies the number of minor ticks between neighboring major ticks. */
minorTickCount?: number;
/**
/**
Specifies an interval between minor ticks.
*/
minorTickInterval?: any;
@@ -6035,8 +6101,8 @@ Specifies an interval between minor ticks.
useTicksAutoArrangement?: boolean;
/** Specifies the type of values on the scale. */
valueType?: string;
/** Specifies the order of arguments on a discrete scale. */
categories?: Array<any>;
/** Specifies the order of arguments on a discrete scale. */
categories?: Array<any>;
};
/** Specifies the range to be selected when displaying the dxRangeSelector. */
selectedRange?: {
@@ -6337,9 +6403,9 @@ declare module DevExpress.viz.map {
centerChanged?: (center: Array<number>) => void;
/** A handler for the centerChanged event. */
onCenterChanged?: (e: {
center: Array<number>;
component: dxVectorMap;
element: Element;
center: Array<number>;
component: dxVectorMap;
element: Element;
}) => void;
/** A handler for the tooltipShown event. */
onTooltipShown?: (e: {
+2
View File
@@ -1,3 +1,5 @@
/// <reference path="./dragula.d.ts" />
import dragula = require("dragula");
// containers
+187
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
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();
+202 -59
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" {
+59 -64
View File
@@ -12,7 +12,7 @@ interface IteratorResult<T> {
interface IterableShim<T> {
/**
* Shim for an ES6 iterable. Not intended for direct use by user code.
* Shim for an ES6 iterable. Not intended for direct use by user code.
*/
"_es6-shim iterator_"(): Iterator<T>;
}
@@ -39,7 +39,7 @@ interface StringConstructor {
/**
* String.raw is intended for use as a tag function of a Tagged Template String. When called
* as such the first argument will be a well formed template call site object and the rest
* as such the first argument will be a well formed template call site object and the rest
* parameter will contain the substitution values.
* @param template A well-formed template string call site representation.
* @param substitutions A set of substitution values.
@@ -49,40 +49,40 @@ interface StringConstructor {
interface String {
/**
* Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
* value of the UTF-16 encoded code point starting at the string element at position pos in
* the String resulting from converting this object to a String.
* If there is no element at that position, the result is undefined.
* Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
* value of the UTF-16 encoded code point starting at the string element at position pos in
* the String resulting from converting this object to a String.
* If there is no element at that position, the result is undefined.
* If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
*/
codePointAt(pos: number): number;
/**
* Returns true if searchString appears as a substring of the result of converting this
* object to a String, at one or more positions that are
* Returns true if searchString appears as a substring of the result of converting this
* object to a String, at one or more positions that are
* greater than or equal to position; otherwise, returns false.
* @param searchString search string
* @param searchString search string
* @param position If position is undefined, 0 is assumed, so as to search all of the String.
*/
includes(searchString: string, position?: number): boolean;
/**
* Returns true if the sequence of elements of searchString converted to a String is the
* same as the corresponding elements of this object (converted to a String) starting at
* Returns true if the sequence of elements of searchString converted to a String is the
* same as the corresponding elements of this object (converted to a String) starting at
* endPosition length(this). Otherwise returns false.
*/
endsWith(searchString: string, endPosition?: number): boolean;
/**
* Returns a String value that is made from count copies appended together. If count is 0,
* Returns a String value that is made from count copies appended together. If count is 0,
* T is the empty String is returned.
* @param count number of copies to append
*/
repeat(count: number): string;
/**
* Returns true if the sequence of elements of searchString converted to a String is the
* same as the corresponding elements of this object (converted to a String) starting at
* Returns true if the sequence of elements of searchString converted to a String is the
* same as the corresponding elements of this object (converted to a String) starting at
* position. Otherwise returns false.
*/
startsWith(searchString: string, position?: number): boolean;
@@ -130,19 +130,14 @@ interface String {
sub(): string;
/** Returns a <sup> HTML element */
sup(): string;
sup(): string;
/**
* Shim for an ES6 iterable. Not intended for direct use by user code.
* Shim for an ES6 iterable. Not intended for direct use by user code.
*/
"_es6-shim iterator_"(): IterableIteratorShim<string>;
}
interface ArrayLike<T> {
length: number;
[n: number]: T;
}
interface ArrayConstructor {
/**
* Creates an array from an array-like object.
@@ -180,24 +175,24 @@ interface ArrayConstructor {
}
interface Array<T> {
/**
* Returns the value of the first element in the array where predicate is true, and undefined
/**
* Returns the value of the first element in the array where predicate is true, and undefined
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found, find
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found, find
* immediately returns that element value. Otherwise, find returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): T;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
/**
* Returns the index of the first element in the array where predicate is true, and undefined
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found, find
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found, find
* immediately returns that element value. Otherwise, find returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: T) => boolean, thisArg?: any): number;
@@ -205,41 +200,41 @@ interface Array<T> {
/**
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
* @param start index to start filling the array at. If start is negative, it is treated as
* length+start where length is the length of the array.
* @param end index to stop filling the array at. If end is negative, it is treated as
* @param start index to start filling the array at. If start is negative, it is treated as
* length+start where length is the length of the array.
* @param end index to stop filling the array at. If end is negative, it is treated as
* length+end.
*/
fill(value: T, start?: number, end?: number): T[];
/**
/**
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
* @param end If not specified, length of the this object is used as its default value.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start: number, end?: number): T[];
/**
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): IterableIteratorShim<[number, T]>;
/**
/**
* Returns an list of keys in the array
*/
keys(): IterableIteratorShim<number>;
/**
/**
* Returns an list of values in the array
*/
values(): IterableIteratorShim<T>;
/**
* Shim for an ES6 iterable. Not intended for direct use by user code.
* Shim for an ES6 iterable. Not intended for direct use by user code.
*/
"_es6-shim iterator_"(): IterableIteratorShim<T>;
}
@@ -247,14 +242,14 @@ interface Array<T> {
interface NumberConstructor {
/**
* The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1
* that is representable as a Number value, which is approximately:
* that is representable as a Number value, which is approximately:
* 2.2204460492503130808472633361816 x 10‍‍16.
*/
EPSILON: number;
/**
* Returns true if passed value is finite.
* Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a
* Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a
* number. Only finite values of the type number, result in true.
* @param number A numeric value.
*/
@@ -267,7 +262,7 @@ interface NumberConstructor {
isInteger(number: number): boolean;
/**
* Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
* Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
* number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
* to a number. Only values of the type number, that are also NaN, result in true.
* @param number A numeric value.
@@ -280,30 +275,30 @@ interface NumberConstructor {
*/
isSafeInteger(number: number): boolean;
/**
* The value of the largest integer n such that n and n + 1 are both exactly representable as
* a Number value.
/**
* The value of the largest integer n such that n and n + 1 are both exactly representable as
* a Number value.
* The value of Number.MIN_SAFE_INTEGER is 9007199254740991 2^53 1.
*/
MAX_SAFE_INTEGER: number;
/**
* The value of the smallest integer n such that n and n 1 are both exactly representable as
* a Number value.
/**
* The value of the smallest integer n such that n and n 1 are both exactly representable as
* a Number value.
* The value of Number.MIN_SAFE_INTEGER is 9007199254740991 ((2^53 1)).
*/
MIN_SAFE_INTEGER: number;
/**
* Converts a string to a floating-point number.
* @param string A string that contains a floating-point number.
* Converts a string to a floating-point number.
* @param string A string that contains a floating-point number.
*/
parseFloat(string: string): number;
/**
* Converts A string to an integer.
* @param s A string to convert into a number.
* @param radix A value between 2 and 36 that specifies the base of the number in numString.
* @param radix A value between 2 and 36 that specifies the base of the number in numString.
* If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
* All other strings are considered decimal.
*/
@@ -312,7 +307,7 @@ interface NumberConstructor {
interface ObjectConstructor {
/**
* Copy the values of all of the enumerable own properties from one or more source objects to a
* Copy the values of all of the enumerable own properties from one or more source objects to a
* target object. Returns the target object.
* @param target The target object to copy to.
* @param sources One or more source objects to copy properties from.
@@ -390,7 +385,7 @@ interface Math {
log1p(x: number): number;
/**
* Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of
* Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of
* the natural logarithms).
* @param x A numeric expression.
*/
@@ -497,21 +492,21 @@ interface Promise<T> {
}
interface PromiseConstructor {
/**
* A reference to the prototype.
/**
* A reference to the prototype.
*/
prototype: Promise<any>;
/**
* Creates a new Promise.
* @param executor A callback used to initialize the promise. This callback is passed two arguments:
* a resolve callback used resolve the promise with a value or the result of another promise,
* @param executor A callback used to initialize the promise. This callback is passed two arguments:
* a resolve callback used resolve the promise with a value or the result of another promise,
* and a reject callback used to reject the promise with a provided reason or error.
*/
new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
/**
* Creates a Promise that is resolved with an array of results when all of the provided Promises
* Creates a Promise that is resolved with an array of results when all of the provided Promises
* resolve, or rejected when any Promise is rejected.
* @param values An array of Promises.
* @returns A new Promise.
@@ -519,7 +514,7 @@ interface PromiseConstructor {
all<T>(values: IterableShim<T | PromiseLike<T>>): Promise<T[]>;
/**
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
* or rejected.
* @param values An array of Promises.
* @returns A new Promise.
@@ -670,4 +665,4 @@ declare module "es6-shim" {
function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
function setPrototypeOf(target: any, proto: any): boolean;
}
}
}
+68
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
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;
+23 -23
View File
@@ -1,29 +1,29 @@
/// <reference path="fbsdk.d.ts" />
window.fbAsyncInit = function() {
FB.init(
{
appId : '{your-app-id}',
xfbml : true,
version : 'v2.0'
}
);
FB.init(
{
appId : '{your-app-id}',
xfbml : true,
version : 'v2.0'
}
);
FB.ui(
{
method: 'share',
href: 'https://developers.facebook.com/docs/dialogs/'
},
function(response) {
console.log(response);
}
);
FB.ui(
{
method: 'share',
href: 'https://developers.facebook.com/docs/dialogs/'
},
function(response) {
console.log(response);
}
);
FB.api(
"/me",
"POST",
function (fbResponse){
console.log(fbResponse);
}
);
FB.api(
"/me",
"POST",
function (fbResponse){
console.log(fbResponse);
}
);
};
+130 -76
View File
@@ -4,132 +4,186 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface FBInitParams{
appId ?: string;
authResponse ?: string;
cookie ?: boolean;
frictionlessRequests ?: boolean;
hideFlashCallback ?: Function;
logging ?: boolean;
status ?: boolean;
version ?: string;
xfbml ?: boolean;
appId?: string;
authResponse?: string;
cookie?: boolean;
frictionlessRequests?: boolean;
hideFlashCallback?: Function;
logging?: boolean;
status?: boolean;
version?: string;
xfbml?: boolean;
}
interface FBUIParams{
method : string;
interface ShareDialogParams {
method: string; // "share"
href: string;
}
interface PageTabDialogParams {
method: string; // "pagetab"
app_id: string;
redirect_uri?: string;
display?: any;
}
interface RequestsDialogParams {
method: string; // "apprequests"
app_id: string;
redirect_uri?: string;
to?: string;
message: string;
action_type?: string; // "send" | "askfor" | "turn"
object_id?: string;
filters: string /* "app_users" | "app_non_users" */ | {
name: string;
user_ids: string[];
};
suggestions?: string[];
exclude_ids?: string[];
max_recipients?: number;
data?: string;
title?: string;
}
interface SendDialogParams {
method: string; // "send"
app_id: string;
redirect_uri?: string;
display?: any;
to?: string;
link: string;
}
interface PayDialogParams {
method: string; // "pay"
action: string; // "purchaseitem"
product: string;
quantity?: number;
quantity_min?: number;
quantity_max?: number;
request_id?: string;
pricepoint_id?: string;
test_currency?: string;
}
declare type FBUIParams = ShareDialogParams
| PageTabDialogParams
| RequestsDialogParams
| SendDialogParams
| PayDialogParams;
interface FBLoginOptions{
auth_type ?: string;
scope ?: string;
return_scopes ?: boolean;
enable_profile_selector ?: boolean;
profile_selector_ids ?: string;
auth_type?: string;
scope?: string;
return_scopes?: boolean;
enable_profile_selector?: boolean;
profile_selector_ids?: string;
}
interface FBSDKEvents{
/* This method allows you to subscribe to a range of events, and define callback functions for when they fire. */
subscribe(event : string, callback : (fbResponseObject : Object) => any) : void;
/* This method allows you to subscribe to a range of events, and define callback functions for when they fire. */
subscribe(event : string, callback : (fbResponseObject : Object) => any) : void;
/* This method allows you to un-subscribe a callback from any events previously subscribed to using .Event.subscribe(). */
unsubscribe(event : string, callback : (fbResponseObject : Object) => any) : void;
/* This method allows you to un-subscribe a callback from any events previously subscribed to using .Event.subscribe(). */
unsubscribe(event : string, callback : (fbResponseObject : Object) => any) : void;
}
interface FBSDKXFBML{
/* This function parses and renders XFBML markup in a document on the fly. */
parse(ParseElement ?: Element) : void;
parse(ParseElement ?: HTMLElement) : void;
/* This function parses and renders XFBML markup in a document on the fly. */
parse(ParseElement?: Element) : void;
parse(ParseElement?: HTMLElement) : void;
}
interface FBSDKCanvasPrefetcher{
/* Tells Facebook that the current page uses a specified resource. */
addStaticResource(res : string) : void;
/* Tells Facebook that the current page uses a specified resource. */
addStaticResource(res : string) : void;
/* Controls how statistics are collected on resources used by your application. */
setCollectionMode(option : string) : void;
/* Controls how statistics are collected on resources used by your application. */
setCollectionMode(option : string) : void;
}
interface FBSDKCanvasSize{
height ?: Number;
width ?: Number;
height?: Number;
width?: Number;
}
interface FBSDKCanvasDoneLoading{
time_delta_ms : Number;
time_delta_ms : Number;
}
interface FBSDKCanvas{
Prefetcher : FBSDKCanvasPrefetcher;
Prefetcher : FBSDKCanvasPrefetcher;
/* Hides the HTML element passed in via the elem param from view. */
hideFlashElement(element : Element) : void;
hideFlashElement(element : HTMLElement) : void;
/* Hides the HTML element passed in via the elem param from view. */
hideFlashElement(element : Element) : void;
hideFlashElement(element : HTMLElement) : void;
/* Displays the HTML element passed in via the elem param, after it has been hidden via FB.Canvas.hideFlashElement. */
showFlashElement(element : Element) : void;
showFlashElement(element : HTMLElement) : void;
/* Displays the HTML element passed in via the elem param, after it has been hidden via FB.Canvas.hideFlashElement. */
showFlashElement(element : Element) : void;
showFlashElement(element : HTMLElement) : void;
/* Tells Facebook to scroll to a specific location of your canvas page. */
scrollTo(x : Number, y : Number) : void;
/* Tells Facebook to scroll to a specific location of your canvas page. */
scrollTo(x : Number, y : Number) : void;
/* Starts or stops a timer which will grow your iframe to fit the content every few milliseconds. */
setAutoGrow(stopTimer : boolean) : void;
setAutoGrow(diffInterval : Number) : void;
setAutoGrow(stopTimer : boolean, diffInterval : Number) : void
/* Starts or stops a timer which will grow your iframe to fit the content every few milliseconds. */
setAutoGrow(stopTimer : boolean) : void;
setAutoGrow(diffInterval : Number) : void;
setAutoGrow(stopTimer : boolean, diffInterval : Number) : void
/* Tells Facebook to resize your iframe. */
setSize(canvasSizeOptions : FBSDKCanvasSize) : void;
/* Tells Facebook to resize your iframe. */
setSize(canvasSizeOptions : FBSDKCanvasSize) : void;
/* Registers the callback for inline processing (i.e. without page reload) of user actions when they click on any link to the current app from Canvas */
setUrlHandler(handler ?: Function) : string;
/* Registers the callback for inline processing (i.e. without page reload) of user actions when they click on any link to the current app from Canvas */
setUrlHandler(handler?: Function) : string;
/* Calls you back with an integer, in milliseconds, of the timing of the page load, beginning from the time when the first bytes arrive on
the client, and ending from the point at which you call this function.
*/
setDoneLoading(handler ?: Function) : FBSDKCanvasDoneLoading;
/* Calls you back with an integer, in milliseconds, of the timing of the page load, beginning from the time when the first bytes arrive on
the client, and ending from the point at which you call this function.
*/
setDoneLoading(handler?: Function) : FBSDKCanvasDoneLoading;
/* Call startTimer to resume the timer after a period of time for the page load that you didn't wish to measure, which you began by calling stopTimer. */
startTimer() : void;
/* Call startTimer to resume the timer after a period of time for the page load that you didn't wish to measure, which you began by calling stopTimer. */
startTimer() : void;
/* Call stopTimer when you wish to stop timing the page load for a period of time */
stopTimer(handler ?: (fbResponseObject : Object) => any) : void;
/* Call stopTimer when you wish to stop timing the page load for a period of time */
stopTimer(handler?: (fbResponseObject : Object) => any) : void;
}
interface FBSDK{
/* This method is used to initialize and setup the SDK. */
init(fbInitObject : FBInitParams) : void;
/* This method is used to initialize and setup the SDK. */
init(fbInitObject : FBInitParams) : void;
/* This method lets you make calls to the Graph API. */
api(path : string, method : string, callback : (fbResponseObject : Object) => any) : Object;
api(path : string, params : Object, callback : (fbResponseObject : Object) => any) : Object;
api(path : string, method : string, params : Object, callback : (fbResponseObject : Object) => any) : Object;
/* This method lets you make calls to the Graph API. */
api(path : string, method : string, callback : (fbResponseObject : Object) => any) : Object;
api(path : string, params : Object, callback : (fbResponseObject : Object) => any) : Object;
api(path : string, method : string, params : Object, callback : (fbResponseObject : Object) => any) : Object;
/* This method is used to trigger different forms of Facebook created UI dialogs. */
ui(params : FBUIParams, handler : (fbResponseObject : Object) => any) : void;
/* This method is used to trigger different forms of Facebook created UI dialogs. */
ui(params : FBUIParams, handler : (fbResponseObject : Object) => any) : void;
/* Allows you to determine if a user is logged in to Facebook and has authenticated your app */
getLoginStatus(handler : Function, force ?: Boolean) : void;
/* Allows you to determine if a user is logged in to Facebook and has authenticated your app */
getLoginStatus(handler : Function, force?: Boolean) : void;
/* Calling FB.login prompts the user to authenticate your application using the Login Dialog. */
login(handler : (fbResponseObject : Object) => any, params ?: FBLoginOptions): void;
/* Calling FB.login prompts the user to authenticate your application using the Login Dialog. */
login(handler : (fbResponseObject : Object) => any, params?: FBLoginOptions): void;
/* Log the user out of your site and Facebook */
logout(handler : (fbResponseObject : Object) => any) : void;
/* Log the user out of your site and Facebook */
logout(handler : (fbResponseObject : Object) => any) : void;
/* Synchronous accessor for the current authResponse. */
getAuthResponse() : Object;
/* Synchronous accessor for the current authResponse. */
getAuthResponse() : Object;
Event : FBSDKEvents;
XFBML : FBSDKXFBML;
Canvas : FBSDKCanvas;
Event : FBSDKEvents;
XFBML : FBSDKXFBML;
Canvas : FBSDKCanvas;
}
interface Window{
fbAsyncInit() : any;
fbAsyncInit() : any;
}
declare module "FB" {
export = FB;
export = FB;
}
declare var FB : FBSDK;
+1
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
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
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
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
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
-1
View File
@@ -44,7 +44,6 @@ declare module GeoJSON {
*/
export interface MultiPoint extends GeometryObject
{
coordinates: Position[]
}
@@ -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
+4
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.
*/
+15
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
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;
}
+47
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
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;
}
+4 -4
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);
});
});
});
+4 -2
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;
+1 -1
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"
+2 -1
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;
}
+1 -1
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'))
+5 -2
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');
+280 -261
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;
}
+2 -1
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
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.*/
+5
View File
@@ -64,6 +64,11 @@ interface HeatmapConfiguration {
*/
radius?: number;
/**
* Scales the radius based on map zoom.
*/
scaleRadius?: boolean;
/*
* Indicate whether the heatmap should use a global extrema or a local
* extrema (the maximum and minimum of the currently displayed viewport)
+40
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
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: HighchartsOptions;
//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[] | {data:number[];}[];
//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;
}
+8
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: [{},{}]
};
+2 -2
View File
@@ -249,7 +249,7 @@ interface HighchartsCSSObject {
fontWeight?: string;
left?: string;
opacity?: number;
padding?: string;
padding?: string | number;
position?: string;
top?: string;
}
@@ -1169,7 +1169,7 @@ interface HighchartsOptions {
title?: HighchartsTitleOptions;
tooltip?: HighchartsTooltipOptions;
xAxis?: HighchartsAxisOptions;
yAxis?: HighchartsAxisOptions;
yAxis?: HighchartsAxisOptions|HighchartsAxisOptions[];
}
interface HighchartsGlobalOptions extends HighchartsOptions {
+90
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
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 = _;
}
+9 -4
View File
@@ -22,29 +22,34 @@ declare module i18n {
*/
directory?: string;
/**
/**
* whether to write new locale information to disk
* @default true
*/
updateFiles?: boolean;
/**
/**
* What to use as the indentation unit
* @default "\t"
*/
indent?: string;
/**
/**
* Setting extension of json files (you might want to set this to '.js' according to webtranslateit)
* @default ".json"
*/
extension?: string;
/**
/**
* Enable object notation
* @default false
*/
objectNotation?: boolean;
/**
* json files prefix
*/
prefix?: string;
}
export interface TranslateOptions {
phrase: string;
+9
View File
@@ -19,6 +19,12 @@ interface IResourceStoreKey {
interface I18nTranslateOptions extends I18nextOptions {
defaultValue?: any; // normally a string
// NOTE https://github.com/borisyankov/DefinitelyTyped/pull/5590
toAdd?: any;
child?: any;
sprintf?: any;
count?: any;
context?: any;
}
interface I18nextOptions {
@@ -66,6 +72,9 @@ interface I18nextOptions {
cookieName?: string; // Default value: 'i18next'
postProcess?: string; // Default value: undefined
// NOTE https://github.com/borisyankov/DefinitelyTyped/pull/5590
replace?: any;
}
interface I18nextStatic {
+4
View File
@@ -0,0 +1,4 @@
/// <reference path="../jquery/jquery.d.ts" />
/// <reference path="jquery-urlparam.d.ts" />
console.log($.urlParam('variable'));
+10
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;
}
+3 -3
View File
@@ -28,7 +28,7 @@ ADocument.inject({ id: 5, author: 'John' });
ADocument.inject({ id: 6, author: 'John' });
// bypass the data store
adapter.updateAll(ADocument, { author: 'Johnny' }, { author: 'John' }).then(function (documents) {
adapter.updateAll<{ id?: number; author: string; }>(ADocument, { author: 'Johnny' }, { author: 'John' }).then(function (documents) {
documents[0]; // { id: 5, author: 'Johnny' }
// The updated documents have NOT been injected into the data store because we bypassed the data store
@@ -37,7 +37,7 @@ adapter.updateAll(ADocument, { author: 'Johnny' }, { author: 'John' }).then(func
});
// Normally you would just go through the data store
ADocument.updateAll({ author: 'Johnny' }, { author: 'John' }).then(function (documents) {
ADocument.updateAll<{ id?: number; author: string; }>({ author: 'Johnny' }, { author: 'John' }).then(function (documents) {
documents[0]; // { id: 5, author: 'Johnny' }
// the updated documents have been injected into the data store
@@ -164,4 +164,4 @@ ADocument.create({ author: 'John' }).then(function (document:any) {
// the new document has been injected into the data store
ADocument.get(document.id); // { id: 5, author: 'John' }
});
});
+3 -3
View File
@@ -153,7 +153,7 @@ declare module JSData {
findAll<T>(params?:DSFilterParams, options?:DSAdapterOperationConfiguration):JSDataPromise<Array<T>>;
loadRelations<T>(idOrInstance:string | number | Object, relations:string | Array<string>, options?:DSAdapterOperationConfiguration):JSDataPromise<T>;
update<T>(id:string | number, attrs:Object, options?:DSSaveConfiguration):JSDataPromise<T>;
updateAll<T>(attrs:Object, params?:DSFilterParams, options?:DSAdapterOperationConfiguration):JSDataPromise<Array<T>>;
updateAll<T>(attrs:Object, params?:DSFilterParams & T, options?:DSAdapterOperationConfiguration):JSDataPromise<Array<T>>;
reap(resourceNametions?:DSConfiguration):JSDataPromise<any>;
refresh<T>(id:string | number, options?:DSAdapterOperationConfiguration):JSDataPromise<T>;
save<T>(id:string | number, options?:DSSaveConfiguration):JSDataPromise<T>;
@@ -283,7 +283,7 @@ declare module JSData {
update<T>(config:DSResourceDefinition<T>, id:string | number, attrs:Object, options?:DSConfiguration):JSDataPromise<T>;
updateAll<T>(config:DSResourceDefinition<T>, attrs:Object, params?:DSFilterParams, options?:DSConfiguration):JSDataPromise<T>;
updateAll<T>(config:DSResourceDefinition<T>, attrs:Object, params?:DSFilterParams & T, options?:DSConfiguration):JSDataPromise<T[]>;
}
}
@@ -297,4 +297,4 @@ declare var JSData:{
declare module 'js-data' {
export = JSData;
}
}
+2
View File
@@ -1,3 +1,5 @@
/// <reference path="./jsdom.d.ts" />
import jsdom = require("jsdom");
jsdom.defaultDocumentFeatures.FetchExternalResources = ["img"];
+3 -1
View File
@@ -1,3 +1,5 @@
/// <reference path="./knockout.d.ts" />
import ko = require("knockout");
var myArray = ko.observableArray([1, 2, 3]);
@@ -6,4 +8,4 @@ class MyViewModel {
name = ko.observable("Jeff");
}
ko.applyBindings(new MyViewModel());
ko.applyBindings(new MyViewModel());
+1 -3
View File
@@ -1,6 +1,4 @@
/// <reference path="LeapMotionTS.d.ts" />
import Leap = require('LeapMotionTS');
import Leap = require('./LeapMotionTS');
var controller: Leap.Controller = new Leap.Controller();
controller.addEventListener(Leap.LeapEvent.LEAPMOTION_FRAME, (event: Leap.LeapEvent) => {
+89 -40
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();
}
+210 -112
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 {
/**
+11 -13
View File
@@ -1,3 +1,5 @@
/// <reference path="./mailparser.d.ts" />
import mailparser_mod = require("mailparser");
import MailParser = mailparser_mod.MailParser;
import ParsedMail = mailparser_mod.ParsedMail;
@@ -12,25 +14,25 @@ mailparser.on("headers", function(headers){
});
mailparser.on("end", function(mail){
mail; // object structure for parsed e-mail
mail; // object structure for parsed e-mail
});
// Decode a simple e-mail
// This example decodes an e-mail from a string
var email = "From: 'Sender Name' <sender@example.com>\r\n"+
"To: 'Receiver Name' <receiver@example.com>\r\n"+
"Subject: Hello world!\r\n"+
"\r\n"+
"How are you today?";
// setup an event listener when the parsing finishes
// setup an event listener when the parsing finishes
mailparser.on("end", function(mail_object){
console.log("From:", mail_object.from); //[{address:'sender@example.com',name:'Sender Name'}]
console.log("Subject:", mail_object.subject); // Hello world!
console.log("Text body:", mail_object.text); // How are you today?
console.log("From:", mail_object.from); //[{address:'sender@example.com',name:'Sender Name'}]
console.log("Subject:", mail_object.subject); // Hello world!
console.log("Text body:", mail_object.text); // How are you today?
});
// send the email source to the parser
// send the email source to the parser
mailparser.write(email);
mailparser.end();
@@ -42,7 +44,7 @@ import fs = require("fs");
mailparser.on("end", function(mail_object){
console.log("Subject:", mail_object.subject);
});
fs.createReadStream("email.eml").pipe(mailparser);
@@ -63,7 +65,3 @@ mp.on("attachment", function(attachment, mail){
var output = fs.createWriteStream(attachment.generatedFileName);
attachment.stream.pipe(output);
});
+3 -2
View File
@@ -1,7 +1,8 @@
// These are the examples from the node-mariasql README transposed to TypeScript
// https://github.com/mscdex/node-mariasql
/// <reference path="../node/node-0.10.d.ts" />
/// <reference path="./mariasql.d.ts" />
/// <reference path="../node/node.d.ts" />
// Example 1 - SHOW DATABASES
import util = require('util');
@@ -198,4 +199,4 @@ c.end();
Query #3 finished successfully
Done with all queries
Client closed
*/
*/
+11 -11
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.
+2
View File
@@ -75,3 +75,5 @@ moment.tz.load({
});
moment.tz.names();
moment.tz.setDefault('America/Los_Angeles');
+2
View File
@@ -68,6 +68,8 @@ interface MomentTimezone {
}): void;
names(): string[];
setDefault(timezone: string): void;
}
declare module 'moment-timezone' {
+4
View File
@@ -47,3 +47,7 @@ interface MustacheStatic {
}
declare var Mustache: MustacheStatic;
declare module 'mustache' {
export = Mustache;
}
+4
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
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;
+52
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
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
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;
+2
View File
@@ -1,3 +1,5 @@
/// <reference path="./imap.d.ts" />
import Imap = require('imap');
var inspect = require('util').inspect;
+51 -6
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);
});
});
+104 -104
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;
}
+2
View File
@@ -1,3 +1,5 @@
/// <reference path="./node-polyglot.d.ts" />
import Polyglot = require("node-polyglot");
function instantiatePolyglot(): void {
+2 -2
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;
}
+2 -2
View File
@@ -1622,12 +1622,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;
}
+13 -13
View File
@@ -28,9 +28,9 @@
"resolved": "https://registry.npmjs.org/hoek/-/hoek-2.14.0.tgz"
},
"topo": {
"version": "1.0.2",
"version": "1.0.3",
"from": "topo@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/topo/-/topo-1.0.2.tgz"
"resolved": "https://registry.npmjs.org/topo/-/topo-1.0.3.tgz"
},
"isemail": {
"version": "1.1.1",
@@ -38,9 +38,9 @@
"resolved": "https://registry.npmjs.org/isemail/-/isemail-1.1.1.tgz"
},
"moment": {
"version": "2.10.3",
"version": "2.10.6",
"from": "moment@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.10.3.tgz"
"resolved": "https://registry.npmjs.org/moment/-/moment-2.10.6.tgz"
}
}
},
@@ -103,9 +103,9 @@
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
},
"minimatch": {
"version": "2.0.9",
"version": "2.0.10",
"from": "minimatch@>=2.0.1 <3.0.0",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.9.tgz",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz",
"dependencies": {
"brace-expansion": {
"version": "1.1.0",
@@ -170,9 +170,9 @@
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
},
"minimatch": {
"version": "2.0.9",
"version": "2.0.10",
"from": "minimatch@>=2.0.1 <3.0.0",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.9.tgz",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz",
"dependencies": {
"brace-expansion": {
"version": "1.1.0",
@@ -208,9 +208,9 @@
}
},
"lazy.js": {
"version": "0.4.0",
"version": "0.4.2",
"from": "lazy.js@>=0.4.0 <0.5.0",
"resolved": "https://registry.npmjs.org/lazy.js/-/lazy.js-0.4.0.tgz"
"resolved": "https://registry.npmjs.org/lazy.js/-/lazy.js-0.4.2.tgz"
},
"manticore": {
"version": "0.2.4",
@@ -305,9 +305,9 @@
}
},
"typescript": {
"version": "1.5.3",
"from": "typescript@1.5.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-1.5.3.tgz"
"version": "1.6.0-beta",
"from": "typescript@1.6.0-beta",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-1.6.0-beta.tgz"
}
}
}

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