Merge remote-tracking branch 'upstream/master'

Conflicts:
	slickgrid/SlickGrid.d.ts
This commit is contained in:
Koloto 2015-09-28 15:44:09 +03:00
commit fc24b990cc
339 changed files with 49375 additions and 3327 deletions

View File

@ -10,11 +10,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](adm-zip/adm-zip.d.ts) [adm-zip](https://github.com/cthackers/adm-zip) by [John Vilk](https://github.com/jvilk)
* [:link:](alertify/alertify.d.ts) [alertify](http://fabien-d.github.io/alertify.js) by [John Jeffery](http://github.com/jjeffery)
* [:link:](alt/alt.d.ts) [Alt](https://github.com/goatslacker/alt) by [Michael Shearer](https://github.com/Shearerbeard)
* [:link:](amazon-product-api/amazon-product-api.d.ts) [amazon-product-api](https://github.com/t3chnoboy/amazon-product-api) by [Matti Lehtinen](https://github.com/MattiLehtinen)
* [:link:](amcharts/AmCharts.d.ts) [amCharts](http://www.amcharts.com) by [aleksey-bykov](https://github.com/aleksey-bykov)
* [:link:](amplifyjs/amplifyjs.d.ts) [AmplifyJs](http://amplifyjs.com) by [Jonas Eriksson](https://github.com/joeriks)
* [:link:](amplify-deferred/amplify-deferred.d.ts) [AmplifyJs 1.1.0 using JQuery Deferred](http://amplifyjs.com) by [Jonas Eriksson](https://github.com/joeriks), [Laurentiu Stamate](https://github.com/laurentiustamate94)
* [:link:](amqp-rpc/amqp-rpc.d.ts) [amqp-rpc](https://github.com/demchenkoe/node-amqp-rpc) by [Wonshik Kim](https://github.com/wokim)
* [: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/http.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:](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)
@ -69,9 +72,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](cordova-plugin-email-composer/cordova-plugin-email-composer.d.ts) [Apache Cordova Email Composer plugin](https://github.com/katzer/cordova-plugin-email-composer) by [Dave Taylor](http://davetayls.me)
* [:link:](api-error-handler/api-error-handler.d.ts) [api-error-handler](https://github.com/expressjs/api-error-handler) by [Tanguy Krotoff](https://github.com/tkrotoff)
* [:link:](appframework/appframework.d.ts) [AppFramework](http://app-framework-software.intel.com) by [kyo_ago](https://github.com/kyo-ago)
* [:link:](appletvjs/appletvjs.d.ts) [AppleTVJS](https://developer.apple.com/library/prerelease/tvos/documentation/TVMLJS/Reference/TVJSFrameworkReference/index.html) by [Adam Valverde](https://github.com/brainded)
* [:link:](applicationinsights/applicationinsights.d.ts) [Application Insights](https://github.com/Microsoft/ApplicationInsights-node.js) by [Scott Southwood](https://github.com/scsouthw)
* [:link:](arbiter/Arbiter.d.ts) [Arbiter.js](http://arbiterjs.com) by [Arash Shakery](https://github.com/arash16)
* [:link:](arcgis-js-api/arcgis-js-api.d.ts) [ArcGIS API for JavaScript](http://js.arcgis.com) by [Esri](http://www.esri.com)
* [:link:](archiver/archiver.d.ts) [archiver](https://github.com/archiverjs/node-archiver) by [Esri](https://github.com/archiverjs/node-archiver)
* [:link:](archy/archy.d.ts) [archy](https://github.com/substack/node-archy) by [vvakame](https://github.com/vvakame)
* [:link:](asciify/asciify.d.ts) [asciify](https://www.npmjs.org/package/asciify) by [Alan Norbauer](http://alan.norbauer.com)
* [:link:](aspnet-identity-pw/aspnet-identity-pw.d.ts) [aspnet-identity-pw](https://github.com/Syncbak-Git/aspnet-identity-pw) by [jt000](https://github.com/jt000)
@ -104,6 +109,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](bardjs/bardjs.d.ts) [bardjs](https://github.com/wardbell/bardjs) by [Andrew Archibald](https://github.com/TepigMC)
* [:link:](batch-stream/batch-stream.d.ts) [batch-stream](https://github.com/segmentio/batch-stream) by [Nicholas Penree](http://github.com/drudge)
* [:link:](bcrypt/bcrypt.d.ts) [bcrypt](https://www.npmjs.org/package/bcrypt) by [Peter Harris](https://github.com/codeanimal)
* [:link:](better-curry/better-curry.d.ts) [better-curry](https://github.com/pocesar/js-bettercurry) by [Paulo Cesar](https://github.com/pocesar)
* [:link:](bgiframe/typescript.bgiframe.d.ts) [bgiframe](https://github.com/sumegizoltan/BgiFrame) by [Zoltan Sumegi](https://github.com/sumegizoltan)
* [:link:](big.js/big.js.d.ts) [big.js](https://github.com/MikeMcl/big.js) by [Steve Ognibene](https://github.com/nycdotnet)
* [:link:](bigint/bigint.d.ts) [BigInt](https://github.com/Evgenus/BigInt) by [Eugene Chernyshov](https://github.com/Evgenus)
@ -112,6 +118,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](bitwise-xor/bitwise-xor.d.ts) [bitwise-xor](https://github.com/czzarr/node-bitwise-xor) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](blob-stream/blob-stream.d.ts) [blob-stream](https://github.com/devongovett/blob-stream) by [Eric Hillah](https://github.com/erichillah)
* [:link:](bluebird/bluebird.d.ts) [bluebird](https://github.com/petkaantonov/bluebird) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](bluebird-retry/bluebird-retry.d.ts) [bluebird-retry](https://github.com/jut-io/bluebird-retry) by [Pascal Vomhoff](https://github.com/pvomhoff)
* [:link:](blueimp-md5/blueimp-md5.d.ts) [blueimp-md5](https://github.com/blueimp/JavaScript-MD5) by [Ray Martone](https://github.com/rmartone)
* [:link:](body-parser/body-parser.d.ts) [body-parser](http://expressjs.com) by [Santi Albo](https://github.com/santialbo), [VILIC VANE](https://vilic.info), [Jonathan Häberle](https://github.com/dreampulse)
* [:link:](boom/boom.d.ts) [boom](http://github.com/hapijs/boom) by [Igor Rogatty](http://github.com/rogatty)
@ -119,7 +126,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](bootstrap/bootstrap.d.ts) [Bootstrap](http://twitter.github.com/bootstrap) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker.d.ts) [Bootstrap datetimepicker v3](http://eonasdan.github.io/bootstrap-datetimepicker) by [Jesica N. Fera](https://github.com/bayitajesi)
* [:link:](bootstrap-touchspin/bootstrap-touchspin.d.ts) [Bootstrap TouchSpin](http://www.virtuosoft.eu/code/bootstrap-touchspin) by [Albin Sunnanbo](https://github.com/albinsunnanbo)
* [:link:](bootstrap-notify/bootstrap-notify.d.ts) [bootstrap-notify](https://github.com/Nijikokun/bootstrap-notify) by [Blake Niemyjski](https://github.com/niemyjski)
* [:link:](bootstrap-notify/bootstrap-notify.d.ts) [bootstrap-notify](http://bootstrap-notify.remabledesigns.com) by [Blake Niemyjski](https://github.com/niemyjski), [Robert McIntosh](https://github.com/mouse0270), [Robert Voica](https://github.com/robert-voica)
* [: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)
@ -144,7 +151,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](camljs/camljs.d.ts) [camljs](http://camljs.codeplex.com) by [Andrey Markeev](http://markeev.com)
* [:link:](canvasjs/canvasjs.d.ts) [CanvasJS](http://canvasjs.com) by [Mark Overholt](https://github.com/mover5)
* [:link:](casperjs/casperjs.d.ts) [CasperJS](http://casperjs.org) by [Jed Mao](https://github.com/jedmao)
* [: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/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), [Olivier Chevet](https://github.com/olivr70)
* [: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)
@ -155,6 +162,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](chance/chance.d.ts) [Chance](http://chancejs.com) by [Chris Bowdon](https://github.com/cbowdon)
* [:link:](change-case/change-case.d.ts) [change-case](https://github.com/blakeembrey/change-case) by [Asana](https://asana.com)
* [:link:](chartjs/chart.d.ts) [Chart.js](https://github.com/nnnick/Chart.js) by [Steve Fenton](https://github.com/Steve-Fenton)
* [:link:](chartist/chartist.d.ts) [Chartist](https://github.com/gionkunz/chartist-js) by [Matt Gibbs](https://github.com/mtgibbs)
* [:link:](checksum/checksum.d.ts) [checksum](https://github.com/dshaw/checksum) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](cheerio/cheerio.d.ts) [Cheerio](https://github.com/cheeriojs/cheerio) by [Bret Little](https://github.com/blittle), [VILIC VANE](http://vilic.info), [Wayne Maurer](https://github.com/wmaurer)
* [:link:](chocolatechipjs/chocolatechipjs.d.ts) [chocolatechip](https://github.com/chocolatechipui/ChocolateChipJS) by [Robert Biggs](http://chocolatechip-ui.com)
@ -167,11 +175,13 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](chui/chui.d.ts) [chui](https://github.com/chocolatechipui/chocolatechip-ui) by [Robert Biggs](http://chocolatechip-ui.com)
* [:link:](circular-json/circular-json.d.ts) [circular-json](https://github.com/WebReflection/circular-json) by [Jonathan Pevarnek](https://github.com/jpevarnek)
* [:link:](ckeditor/ckeditor.d.ts) [CKEditor](http://ckeditor.com) by [Ondrej Sevcik](https://github.com/ondrejsevcik)
* [:link:](classnames/classnames.d.ts) [classnames](https://github.com/JedWatson/classnames) by [Dave Keen](http://www.keendevelopment.ch)
* [:link:](classnames/classnames.d.ts) [classnames](https://github.com/JedWatson/classnames) by [Dave Keen](http://www.keendevelopment.ch), [Adi Dahiya](https://github.com/adidahiya), [Jason Killian](https://github.com/JKillian)
* [: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:](codemirror/searchcursor.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [jacqt](https://github.com/jacqt)
* [:link:](codemirror/codemirror-matchbrackets.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [Sixin Li](https://github.com/sixinli)
* [:link:](codemirror/codemirror-showhint.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [jacqt](https://github.com/jacqt), [basarat](https://github.com/basarat)
* [: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)
@ -192,7 +202,10 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](cookie-parser/cookie-parser.d.ts) [cookie-parser](https://github.com/expressjs/cookie-parser) by [Santi Albo](https://github.com/santialbo)
* [:link:](cookiejs/cookiejs.d.ts) [cookie.js](https://github.com/js-coder/cookie.js) by [Boltmade](https://github.com/Boltmade)
* [:link:](cordova-ionic/plugins/keyboard.d.ts) [Cordova Keyboard plugin](https://github.com/driftyco/ionic-plugins-keyboard) by [Hendrik Maus](https://github.com/hendrikmaus)
* [:link:](cordova-plugin-app-version/cordova-plugin-app-version.d.ts) [cordova-plugin-app-version](https://github.com/whiteoctober/cordova-plugin-app-version) by [Markus Wagner](https://github.com/Ritzlgrmft)
* [:link:](cordova-plugin-ibeacon/cordova-plugin-ibeacon.d.ts) [cordova-plugin-ibeacon](https://github.com/petermetz/cordova-plugin-ibeacon) by [Markus Wagner](https://github.com/Ritzlgrmft)
* [:link:](cordovarduino/cordovarduino.d.ts) [Cordovarduino plugin](https://github.com/stereolux/cordovarduino) by [Hendrik Maus](https://github.com/hendrikmaus)
* [:link:](core-decorators/core-decorators.d.ts) [core-decorators.js](https://github.com/jayphelps/core-decorators.js) by [Qubo](https://github.com/tkqubo)
* [:link:](core-js/core-js.d.ts) [core-js](https://github.com/zloirock/core-js) by [Ron Buckton](http://github.com/rbuckton)
* [:link:](cors/cors.d.ts) [cors](https://github.com/troygoode/node-cors) by [Mihhail Lapushkin](https://github.com/mihhail-lapushkin)
* [:link:](couchbase/couchbase.d.ts) [Couchbase Couchnode](https://github.com/couchbase/couchnode) by [Basarat Ali Syed](https://github.com/basarat)
@ -236,6 +249,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](docCookies/docCookies.d.ts) [docCookies](https://developer.mozilla.org/en-US/docs/Web/API/document.cookie) by [Jon Egerton](https://github.com/jonegerton)
* [: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:](documentdb-server/documentdb-server.d.ts) [DocumentDB server side JavaScript SDK](http://dl.windowsazure.com/documentDB/jsserverdocs) by [François Nguyen](https://github.com/lith-light-g)
* [: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), [Samira Bazuzi](https://github.com/bazuzi)
* [:link:](domo/domo.d.ts) [Domo](http://domo-js.com) by [Steve Fenton](https://github.com/Steve-Fenton)
@ -265,6 +279,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
* [:link:](ejs/ejs.d.ts) [ejs.js](http://ejs.co) by [Ben Liddicott](https://github.com/benliddicott/DefinitelyTyped)
* [:link:](jquery.elang/jquery.elang.d.ts) [eLang](https://github.com/sumegizoltan/ELang) by [Zoltan Sumegi](https://github.com/sumegizoltan)
* [:link:](github-electron/github-electron.d.ts) [Electron (shared between main and rederer processes)](http://electron.atom.io) by [jedmao](https://github.com/jedmao)
* [:link:](github-electron/electron-prebuilt.d.ts) [electron-prebuilt](https://github.com/mafintosh/electron-prebuilt) by [rhysd](https://github.com/rhysd)
@ -307,12 +322,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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), [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:](faker/faker.d.ts) [faker](http://marak.com/faker.js) by [Bas Pennings](https://github.com/basp), [Yuki Kokubun](https://github.com/Kuniwak)
* [: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:](featherlight/featherlight.d.ts) [Featherlight](https://noelboss.github.io/featherlight) by [Kaur Kuut](https://github.com/xStrom)
* [: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)
@ -320,7 +337,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](filesystem/filesystem.d.ts) [File System API](http://www.w3.org/TR/file-system-api) by [Kon](http://phyzkit.net)
* [:link:](FileSaver/FileSaver.d.ts) [FileSaver.js](https://github.com/eligrey/FileSaver.js) by [Cyril Schumacher](https://github.com/cyrilschumacher)
* [:link:](Finch/Finch.d.ts) [Finch](https://github.com/stoodder/finchjs) by [David Sichau](https://github.com/DavidSichau)
* [:link:](findup-sync/findup-sync.d.ts) [findup-sync](https://github.com/cowboy/node-findup-sync) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](findup-sync/findup-sync.d.ts) [findup-sync](https://github.com/cowboy/node-findup-sync) by [Bart van der Schoor](https://github.com/Bartvds), [Nathan Brown](https://github.com/ngbrown)
* [:link:](fingerprintjs/fingerprint.d.ts) [fingerprintjs](https://github.com/Valve/fingerprintjs) by [Shunsuke Ohtani](https://github.com/zaneli)
* [:link:](state-machine/state-machine.d.ts) [Finite State Machine](https://github.com/jakesgordon/javascript-state-machine) by [Boris Yankov](https://github.com/borisyankov), [Maarten Docter](https://github.com/mdocter), [William Sears](https://github.com/MrBigDog2U)
* [:link:](firebase/firebase.d.ts) [Firebase API](https://www.firebase.com/docs/javascript/firebase) by [Vincent Botone](https://github.com/vbortone), [Shin1 Kashimura](https://github.com/in-async)
@ -331,17 +348,19 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](flight/flight.d.ts) [Flight](http://flightjs.github.com/flight) by [Jonathan Hedrén](https://github.com/jonathanhedren)
* [:link:](flipsnap/flipsnap.d.ts) [flipsnap.js](http://pxgrid.github.io/js-flipsnap) by [kubosho](https://github.com/kubosho), [gsino](https://github.com/gsino), [Mayuki Sawatari](https://github.com/mayuki)
* [:link:](flot/jquery.flot.d.ts) [Flot](http://www.flotcharts.org) by [Matt Burland](https://github.com/burlandm)
* [:link:](flowjs/flowjs.d.ts) [flowjs](https://github.com/flowjs/flow.js) by [Ryan McNamara](https://github.com/ryan10132)
* [:link:](flux/flux.d.ts) [Flux](http://facebook.github.io/flux) by [Steve Baker](https://github.com/stkb)
* [:link:](fluxxor/fluxxor.d.ts) [Fluxxor](https://github.com/BinaryMuse/fluxxor) by [Yuichi Murata](https://github.com/mrk21)
* [:link:](fontoxml/fontoxml.d.ts) [FontoXML](http://www.fontoxml.com) by [Roland Zwaga](https://github.com/rolandzwaga)
* [:link:](ion.rangeSlider/ion.rangeSlider.d.ts) [for Ion.RangeSlider](https://github.com/IonDen/ion.rangeSlider) by [Sixin Li](https://github.com/sixinli)
* [:link:](forge-di/forge-di.d.ts) [forge-di](https://github.com/nkohari/forge) by [Adam Carr](https://github.com/adamcarr)
* [:link:](form-data/form-data.d.ts) [form-data](https://github.com/felixge/node-form-data) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [: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.d.ts) [freedom](https://github.com/freedomjs/freedom) by [Jonathan Pevarnek](https://github.com/jpevarnek)
* [: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)
@ -356,6 +375,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](gamepad/gamepad.d.ts) [Gamepad API](http://www.w3.org/TR/gamepad) by [Kon](http://phyzkit.net)
* [:link:](gamequery/gamequery.d.ts) [gameQuery](http://gamequeryjs.com) by [David Laubreiter](https://github.com/Laubi)
* [:link:](gently/gently.d.ts) [gently](https://www.npmjs.org/package/gently) by [bonnici](https://github.com/bonnici)
* [:link:](geoip-lite/geoip-lite.d.ts) [GeoIP-lite](https://github.com/bluesmoon/node-geoip) by [Yuce Tekol](http://yuce.me)
* [:link:](geojson/geojson.d.ts) [GeoJSON Format Specification](http://geojson.org) by [Jacob Bruun](https://github.com/cobster)
* [:link:](geometry-dom/geometry-dom.d.ts) [Geometry Format Specification](http://www.w3.org/TR/geometry-1) by [Toshiya Nakakura](https://github.com/nakakura)
* [:link:](giraffe/giraffe.d.ts) [Giraffe](https://github.com/barc/backbone.giraffe) by [Matt McCray](https://github.com/darthapo)
@ -383,18 +403,22 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](google.visualization/google.visualization.d.ts) [Google Visualisation Apis](https://developers.google.com/chart) by [Dan Ludwig](https://github.com/danludwig)
* [:link:](gae.channel.api/gae.channel.api.d.ts) [GoogleAppEngine's Channel API](https://developers.google.com/appengine/docs/java/channel/javascript) by [vvakame](https://github.com/vvakame)
* [:link:](graceful-fs/graceful-fs.d.ts) [graceful-fs](https://github.com/cowboy/graceful-fs) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](graphviz/graphviz.d.ts) [Graphviz](git://github.com/glejeune/node-graphviz.git) by [Matt Frantz](https://github.com/mhfrantz)
* [:link:](greasemonkey/greasemonkey.d.ts) [Greasemonkey](http://www.greasespot.net) by [Kota Saito](https://github.com/kotas)
* [: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:](gridstack/gridstack.d.ts) [Gridstack](http://troolee.github.io/gridstack.js) by [Pascal Senn](https://github.com/PascalSenn)
* [: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/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:](gsap/Ease.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-cheerio/gulp-cheerio.d.ts) [gulp-cheerio](https://github.com/KenPowers/gulp-cheerio) by [Qubo](https://github.com/tkQubo)
* [:link:](gulp-coffeeify/gulp-coffeeify.d.ts) [gulp-coffeeify](https://github.com/nariyu/gulp-coffeeify) by [Qubo](https://github.com/tkQubo)
* [:link:](gulp-coffeelint/gulp-coffeelint.d.ts) [gulp-coffeelint](https://github.com/janraasch/gulp-coffeelint) 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)
@ -403,6 +427,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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-gzip/gulp-gzip.d.ts) [gulp-gzip](https://github.com/jstuckey/gulp-gzip) by [Qubo](https://github.com/tkQubo)
* [: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)
@ -414,6 +439,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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-ng-annotate/gulp-ng-annotate.d.ts) [gulp-ng-annotate](https://github.com/Kagami/gulp-ng-annotate) by [Qubo](https://github.com/tkQubo)
* [:link:](gulp-nodemon/gulp-nodemon.d.ts) [gulp-nodemon](https://github.com/JacksonGariety/gulp-nodemon) by [Qubo](https://github.com/tkQubo)
* [: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)
@ -422,9 +449,12 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](gulp-rev-replace/gulp-rev-replace.d.ts) [gulp-rev-replace](https://github.com/jamesknelson/gulp-rev-replace) by [Tanguy Krotoff](https://github.com/tkrotoff)
* [: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-shell/gulp-shell.d.ts) [gulp-shell](https://github.com/sun-zheng-an/gulp-shell) by [Qubo](https://github.com/tkqubo)
* [: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-svg-sprite/gulp-svg-sprite.d.ts) [gulp-svg-sprite](https://github.com/jkphl/gulp-svg-sprite) by [Qubo](https://github.com/tkqubo)
* [:link:](gulp-task-listing/gulp-task-listing.d.ts) [gulp-task-listing](https://github.com/OverZealous/gulp-task-listing) by [Joe Skeen](http://github.com/joeskeen)
* [: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)
* [:link:](gulp-typedoc/gulp-typedoc.d.ts) [gulp-typedoc](https://github.com/rogierschouten/gulp-typedoc) by [Asana](https://asana.com)
@ -455,8 +485,8 @@ 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:](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:](statuses/statuses.d.ts) [http-errors](https://github.com/jshttp/statuses) 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)
@ -476,6 +506,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](incremental-dom/incremental-dom.d.ts) [Incremetal DOM](https://github.com/google/incremental-dom) by [Basarat Ali Syed](https://github.com/basarat)
* [:link:](inflection/inflection.d.ts) [inflection](https://github.com/dreamerslab/node.inflection) by [Shogo Iwano](https://github.com/shiwano)
* [:link:](ini/ini.d.ts) [ini](https://github.com/isaacs/ini) by [Marcin Porębski](https://github.com/marcinporebski)
* [:link:](inquirer/inquirer.d.ts) [Inquirer.js](https://github.com/SBoudrias/Inquirer.js) by [Qubo](https://github.com/tkQubo)
* [:link:](insight/insight.d.ts) [insight](https://github.com/yeoman/insight) by [vvakame](http://github.com/vvakame)
* [:link:](interactjs/interact.d.ts) [Interacting for interact.js](https://github.com/taye/interact.js) by [Douglas Eichelberger](https://github.com/dduugg), [Adi Dahiya](https://github.com/adidahiya), [Tom Hasner](https://github.com/thasner)
* [:link:](intercomjs/intercom.d.ts) [intercom.js](https://github.com/diy/intercom.js) by [spencerwi](http://github.com/spencerwi)
@ -497,10 +528,12 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](jasmine/jasmine.d.ts) [Jasmine](http://jasmine.github.io) by [Boris Yankov](https://github.com/borisyankov), [Theodore Brown](https://github.com/theodorejb), [David Pärsson](https://github.com/davidparsson)
* [:link:](jasmine-data_driven_tests/jasmine-data_driven_tests.d.ts) [Jasmine Data Driven Tests](https://github.com/gburghardt/jasmine-data_driven_tests) by [Anthony MacKinnon](https://github.com/AnthonyMacKinnon)
* [:link:](jasmine-ajax/jasmine-ajax.d.ts) [jasmine-ajax](https://github.com/jasmine/jasmine-ajax) by [Louis Grignon](https://github.com/lgrignon)
* [:link:](jasmine-es6-promise-matchers/jasmine-es6-promise-matchers.d.ts) [jasmine-es6-promise-matchers](https://github.com/bvaughn/jasmine-es6-promise-matchers) by [Stephen Lautier](https://github.com/stephenlautier)
* [:link:](jasmine-fixture/jasmine-fixture.d.ts) [Jasmine-fixture](https://github.com/searls/jasmine-fixture) by [Craig Brett](https://github.com/craigbrett17)
* [:link:](jasmine-jquery/jasmine-jquery.d.ts) [Jasmine-JQuery](https://github.com/velesin/jasmine-jquery) by [Gregor Stamac](https://github.com/gstamac)
* [:link:](jasmine-matchers/jasmine-matchers.d.ts) [jasmine-matchers](https://github.com/uxebu/jasmine-matchers) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](jasmine-promise-matchers/jasmine-promise-matchers.d.ts) [jasmine-promise-matchers](https://github.com/bvaughn/jasmine-promise-matchers) by [Matthew Hill](https://github.com/matthewjh)
* [:link:](java/java.d.ts) [java](https://github.com/joeferner/java) by [Jim Lloyd](https://github.com/jimlloyd)
* [:link:](java-applet/java-applet.d.ts) [Java Applet](https://www.java.com) by [Cyril Schumacher](https://github.com/cyrilschumacher)
* [:link:](hooker/hooker.d.ts) [JavaScript Hooker](https://github.com/cowboy/javascript-hooker) by [Michael Zabka](https://github.com/misak113)
* [:link:](oauth.js/oauth.js.d.ts) [JavaScript software for implementing an OAuth consumer](https://code.google.com/p/oauth) by [NOBUOKA Yu](https://github.com/nobuoka)
@ -519,7 +552,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](jquery.cleditor/jquery.cleditor.d.ts) [jQuery CLEditor Plugin](http://premiumsoftware.net/CLEditor) by [Jeffery Grajkowski](https://github.com/pushplay)
* [:link:](jquery.colorpicker/jquery.colorpicker.d.ts) [jQuery Colorpicker Plugin](https://github.com/vanderlee/colorpicker) by [Jeffery Grajkowski](https://github.com/pushplay)
* [:link:](jquery.contextMenu/jquery.contextMenu.d.ts) [jQuery contextMenu](http://medialize.github.com/jQuery-contextMenu) by [Natan Vivo](https://github.com/nvivo)
* [:link:](jquery.cookie/jquery.cookie.d.ts) [jQuery Cookie Plugin](https://github.com/carhartl/jquery-cookie) by [Roy Goode](https://github.com/RoyGoode)
* [:link:](jquery.cookie/jquery.cookie.d.ts) [jQuery Cookie Plugin](https://github.com/carhartl/jquery-cookie) by [Roy Goode](https://github.com/RoyGoode), [Ben Lorantfy](https://github.com/BenLorantfy)
* [:link:](jquery.cycle2/jquery.cycle2.d.ts) [jQuery Cycle2 version (build 20140216)](http://jquery.malsup.com/cycle2) by [Donny Nadolny](https://github.com/dnadolny)
* [:link:](jquery.dataTables/jquery.dataTables.d.ts) [JQuery DataTables](http://www.datatables.net) by [Kiarash Ghiaseddin](https://github.com/Silver-Connection/DefinitelyTyped), [Omid Rad](https://github.com/omidkrad), [Armin Sander](https://github.com/pragmatrix)
* [:link:](jquery.fileupload/jquery.fileupload.d.ts) [jQuery File Upload Plugin](https://github.com/blueimp/jQuery-File-Upload) by [Rob Alarcon](https://github.com/rob-alarcon)
@ -543,6 +576,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](jquery.ui.datetimepicker/jquery.ui.datetimepicker.d.ts) [jQuery UI DateTimePicker](http://trentrichardson.com/examples/timepicker) by [dougajmcdonald](https://github.com/dougajmcdonald)
* [:link:](jquery.ui.layout/jquery.ui.layout.d.ts) [jQuery UI Layout Plug-in](http://layout.jquery-dev.net) by [Steve Fenton](https://github.com/Steve-Fenton)
* [:link:](jquery.timepicker/jquery.timepicker.d.ts) [jQuery UI Timepicker](http://fgelinas.com/code/timepicker) by [Anwar Javed](https://github.com/anwarjaved)
* [:link:](jquery-ajax-chain/jquery-ajax-chain.d.ts) [jquery-ajax-chain v](https://github.com/humana-fragilitas/jQuery-Ajax-Chain) by [Andrea Blasio](https://github.com/humana-fragilitas)
* [:link:](jquery-fullscreen/jquery-fullscreen.d.ts) [jquery-fullscreen](https://github.com/kayahr/jquery-fullscreen-plugin) by [Bruno Grieder](https://github.com/bgrieder)
* [:link:](jquery-handsontable/jquery-handsontable.d.ts) [jquery-handsontable](http://handsontable.com) by [Ted John](https://github.com/intelorca)
* [:link:](jquery.menuaim/jquery.menuaim.d.ts) [jQuery-menu-aim](https://github.com/kamens/jQuery-menu-aim) by [Robert Fonseca-Ensor](http://www.robfe.com)
@ -585,13 +619,13 @@ 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-beautify/js-beautify.d.ts) [js_beautify](https://github.com/beautify-web/js-beautify) by [Josh Goldberg](https://github.com/JoshuaKGoldberg)
* [: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)
* [:link:](js-yaml/js-yaml.d.ts) [js-yaml](https://github.com/nodeca/js-yaml) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](js-beautify/js-beautify.d.ts) [js_beautify](https://github.com/beautify-web/js-beautify) by [Josh Goldberg](https://github.com/JoshuaKGoldberg)
* [:link:](blocks/blocks.d.ts) [jsblocks](http://jsblocks.com) by [Krzysztof Śmigiel](https://github.com/ksmigiel)
* [:link:](jsbn/jsbn.d.ts) [jsbn](http://www-cs-students.stanford.edu/%7Etjw/jsbn) by [Eugene Chernyshov](https://github.com/Evgenus)
* [:link:](jscrollpane/jscrollpane.d.ts) [jScrollPane](http://jscrollpane.kelvinluck.com) by [Dániel Tar](https://github.com/qcz)
@ -608,6 +642,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](jsnox/jsnox.d.ts) [JSnoX](https://github.com/af/jsnox) by [Steve Baker](https://github.com/stkb)
* [:link:](json-patch/json-patch.d.ts) [json-patch](https://github.com/bruth/jsonpatch-js) by [vvakame](https://github.com/vvakame)
* [:link:](json-pointer/json-pointer.d.ts) [json-pointer 1.0 l](https://www.npmjs.org/package/json-pointer) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](json-stable-stringify/json-stable-stringify.d.ts) [json-stable-stringify](https://github.com/substack/json-stable-stringify) by [Matt Frantz](https://github.com/mhfrantz)
* [:link:](json5/json5.d.ts) [JSON5](http://json5.org) by [Jason Swearingen](https://jasonswearingen.github.io)
* [:link:](jsoneditoronline/jsoneditoronline.d.ts) [JSONEditorOnline](https://github.com/josdejong/jsoneditoronline) by [Vincent Bortone](https://github.com/vbortone)
* [:link:](jsonpath/jsonpath.d.ts) [jsonpath](https://www.npmjs.org/package/jsonpath) by [Hiroki Horiuchi](https://github.com/horiuchi)
@ -627,6 +662,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](karma/karma.d.ts) [karma](https://github.com/karma-runner/karma) by [Tanguy Krotoff](https://github.com/tkrotoff)
* [:link:](karma-jasmine/karma-jasmine.d.ts) [karma-jasmine plugin](https://github.com/karma-runner/karma-jasmine) by [Michel Salib](https://github.com/michelsalib)
* [:link:](katex/katex.d.ts) [KaTeX v.0.5.0](http://khan.github.io/KaTeX) by [Michael Randolph](https://github.com/mrand01)
* [:link:](kefir/kefir.d.ts) [Kefir](http://rpominov.github.io/kefir) by [Aya Morisawa](https://github.com/AyaMorisawa)
* [:link:](kendo-ui/kendo-ui.d.ts) [Kendo UI Professional](http://www.telerik.com/kendo-ui) by [Telerik](https://github.com/telerik)
* [:link:](keyboardjs/keyboardjs.d.ts) [KeyboardJS](https://github.com/RobertWHurst/KeyboardJS) by [Vincent Bortone](https://github.com/vbortone)
* [:link:](keymaster/keymaster.d.ts) [keymaster](https://github.com/madrobby/keymaster) by [Martin W. Kirst](https://github.com/nitram509)
@ -667,6 +703,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](leapmotionTS/LeapMotionTS.d.ts) [Leap Motion TS](https://github.com/logotype/LeapMotionTS) by [Victor Norgren](https://github.com/logotype)
* [:link:](less/less.d.ts) [LESS](http://lesscss.org) by [Tom Hasner](https://github.com/thasner)
* [:link:](less-middleware/less-middleware.d.ts) [less-middleware](https://github.com/emberfeather/less.js-middleware) by [Federico Bond](https://github.com/federicobond)
* [:link:](level-sublevel/level-sublevel.d.ts) [level-sublevel](https://github.com/dominictarr/level-sublevel) by [Bas Pennings](https://github.com/basp)
* [:link:](levelup/levelup.d.ts) [LevelUp](https://github.com/rvagg/node-levelup) by [Bret Little](https://github.com/blittle)
* [:link:](libxmljs/libxmljs.d.ts) [Libxmljs](https://github.com/polotek/libxmljs) by [François de Campredon](https://github.com/fdecampredon)
* [:link:](dustjs-linkedin/dustjs-linkedin.d.ts) [linkedin dustjs](https://github.com/linkedin/dustjs) by [Marcelo Dezem](http://github.com/mdezem)
@ -709,15 +746,18 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](marked/marked.d.ts) [Marked](https://github.com/chjj/marked) by [William Orr](https://github.com/worr)
* [:link:](markerclustererplus/markerclustererplus.d.ts) [MarkerClustererPlus for Google Maps V3](http://github.com/mahnunchik/markerclustererplus) by [Mathias Rodriguez](http://github.com/enanox)
* [:link:](maskedinput/maskedinput.d.ts) [Masked Input plugin for jQuery](http://digitalbush.com/projects/masked-input-plugin) by [Lokesh Peta](https://github.com/lokeshpeta)
* [:link:](material-ui/material-ui.d.ts) [material-ui](https://github.com/callemall/material-ui) by [Nathan Brown](https://github.com/ngbrown)
* [:link:](mathjax/mathjax.d.ts) [MathJax](https://github.com/mathjax/MathJax) by [Roland Zwaga](https://github.com/rolandzwaga)
* [:link:](matter-js/matter-js.d.ts) [Matter.js](https://github.com/liabru/matter-js) by [Ivane Gegia](https://twitter.com/ivanegegia)
* [:link:](mCustomScrollbar/mCustomScrollbar.d.ts) [mCustomScrollbar](https://github.com/malihu/malihu-custom-scrollbar-plugin) by [Sarah Williams](https://github.com/flurg)
* [:link:](memory-cache/memory-cache.d.ts) [memory-cache](http://github.com/ptarjan/node-cache) by [Jeff Goddard](https://github.com/jedigo)
* [:link:](merge-stream/merge-stream.d.ts) [merge-stream](https://github.com/grncdr/merge-stream) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](merge2/merge2.d.ts) [merge2](https://github.com/teambition/merge2) by [Tanguy Krotoff](https://github.com/tkrotoff)
* [:link:](meshblu/meshblu.d.ts) [meshblu.js](https://github.com/octoblu/meshblu-npm) by [Felipe Nipo](https://github.com/fnipo)
* [:link:](mess/mess.d.ts) [mess](https://github.com/bobrik/node-mess) by [Wim Looman](https://github.com/Nemo157)
* [:link:](messenger/messenger.d.ts) [Messenger.js](https://github.com/HubSpot/messenger) by [Derek Cicerone](https://github.com/derekcicerone)
* [:link:](meteor/meteor.d.ts) [Meteor](http://www.meteor.com) by [Dave Allen](https://github.com/fullflavedave)
* [:link:](node-mysql-wrapper/my-meteor.d.ts) [meteorjs for node-mysql-wrapper which helps in development](https://github.com/nodets/node-mysql-wrapper) by [Makis Maropoulos](https://github.com/kataras)
* [:link:](method-override/method-override.d.ts) [method-override](https://github.com/expressjs/method-override) by [Santi Albo](https://github.com/santialbo)
* [:link:](metismenu/metismenu.d.ts) [metisMenu](http://github.com/onokumus/metisMenu) by [onokums](https://github.com/onokumus)
* [:link:](microsoft-ajax/microsoft.ajax.d.ts) [Microsoft ASP.NET Ajax client side library](http://msdn.microsoft.com/en-us/library/ee341002(v=vs.100).aspx) by [Patrick Magee](https://github.com/pjmagee)
@ -745,16 +785,18 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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.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:](mobservable/mobservable.d.ts) [mobservable](https://mweststrate.github.io/mobservable) by [Michel Weststrate](https://github.com/mweststrate)
* [:link:](mobservable-react/mobservable-react.d.ts) [mobservable](https://github.com/mweststrate/mobservable-react) by [Michel Weststrate](https://github.com/mweststrate)
* [: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-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)
* [:link:](modernizr/modernizr.d.ts) [Modernizr](http://modernizr.com) by [Boris Yankov](https://github.com/borisyankov), [Theodore Brown](https://github.com/theodorejb)
* [:link:](moment-timezone/moment-timezone.d.ts) [moment-timezone.js](http://momentjs.com/timezone) by [Michel Salib](https://github.com/michelsalib)
* [:link:](moment/moment-node.d.ts) [Moment.js](https://github.com/timrwood/moment) by [Michael Lakerveld](https://github.com/Lakerfield), [Aaron King](https://github.com/kingdango), [Hiroki Horiuchi](https://github.com/horiuchi), [Dick van den Brink](https://github.com/DickvdBrink), [Adi Dahiya](https://github.com/adidahiya), [Matt Brooks](https://github.com/EnableSoftware)
* [:link:](moment/moment.d.ts) [Moment.js](https://github.com/timrwood/moment) by [Michael Lakerveld](https://github.com/Lakerfield), [Aaron King](https://github.com/kingdango), [Hiroki Horiuchi](https://github.com/horiuchi), [Dick van den Brink](https://github.com/DickvdBrink), [Adi Dahiya](https://github.com/adidahiya), [Matt Brooks](https://github.com/EnableSoftware)
* [:link:](moment-range/moment-range.d.ts) [Moment.js](https://github.com/gf3/moment-range) by [Bart van den Burg](https://github.com/Burgov), [Wilgert Velinga](https://github.com/wilgert)
* [:link:](moment/moment-node.d.ts) [Moment.js](https://github.com/timrwood/moment) by [Michael Lakerveld](https://github.com/Lakerfield), [Aaron King](https://github.com/kingdango), [Hiroki Horiuchi](https://github.com/horiuchi), [Dick van den Brink](https://github.com/DickvdBrink), [Adi Dahiya](https://github.com/adidahiya), [Matt Brooks](https://github.com/EnableSoftware)
* [:link:](mongodb/mongodb.d.ts) [MongoDB](https://github.com/mongodb/node-mongodb-native) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](mongoose/mongoose.d.ts) [Mongoose](http://mongoosejs.com) by [horiuchi](https://github.com/horiuchi)
* [:link:](mongoose-mock/mongoose-mock.d.ts) [mongoose-mock](https://github.com/JohanObrink/mongoose-mock) by [jt000](https://github.com/jt000)
@ -767,7 +809,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](mpromise/mpromise.d.ts) [mpromise](https://github.com/aheckmann/mpromise) by [Seulgi Kim](https://github.com/sgkim126)
* [:link:](msgpack/msgpack.d.ts) [msgpack.js - MessagePack JavaScript Implementation](https://github.com/uupaa/msgpack.js) by [Shinya Mochizuki](https://github.com/enrapt-mochizuki)
* [:link:](msnodesql/msnodesql.d.ts) [msnodesql](https://github.com/WindowsAzure/node-sqlserver) by [Boris Yankov](https://github.com/borisyankov), [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](mssql/mssql.d.ts) [mssql](https://www.npmjs.com/package/mssql) by [COLSA Corporation](http://www.colsa.com)
* [:link:](msportalfx-test/msportalfx-test.d.ts) [msportalfx-test](https://msazure.visualstudio.com/DefaultCollection/AzureUX/_git/portalfx-msportalfx-test) by [Julio Casal](https://github.com/julioct)
* [:link:](mssql/mssql.d.ts) [mssql](https://www.npmjs.com/package/mssql) by [COLSA Corporation](http://www.colsa.com), [Ben Farr](https://github.com/jaminfarr)
* [:link:](mu2/mu2.d.ts) [mu2](http://github.com/raycmorgan/mu) by [Jeff Goddard](https://github.com/jedigo)
* [:link:](multer/multer.d.ts) [multer](https://github.com/expressjs/multer) by [jt000](https://github.com/jt000), [vilicvane](https://vilic.github.io)
* [:link:](multiplexjs/multiplexjs.d.ts) [Multiplex.js](http://github.com/multiplex/multiplex.js) by [Kamyar Nazeri](http://github.com/KamyarNazeri)
@ -778,8 +821,10 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](ncp/ncp.d.ts) [ncp](https://github.com/AvianFlu/ncp) by [Bart van der Schoor](https://github.com/bartvds)
* [:link:](nedb/nedb.d.ts) [NeDB](https://github.com/louischatriot/nedb) by [Stefan Steinhart](https://github.com/reppners)
* [:link:](needle/needle.d.ts) [needle](https://github.com/tomas/needle) by [San Chen](https://github.com/bigsan)
* [:link:](netmask/netmask.d.ts) [Netmask](https://github.com/rs/node-netmask) by [Matt Frantz](https://github.com/mhfrantz)
* [:link:](nexpect/nexpect.d.ts) [nexpect](https://github.com/nodejitsu/nexpect) by [vvakame](http://github.com/vvakame)
* [:link:](ng-command/ng-command.d.ts) [ng-command](https://github.com/stephenlautier/ng-command) by [Stephen Lautier](https://github.com/stephenlautier)
* [:link:](ng-flow/ng-flow.d.ts) [ng-flow](https://github.com/flowjs/ng-flow) by [Ryan McNamara](https://github.com/ryan10132)
* [: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)
@ -791,10 +836,15 @@ 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:](acl/acl.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo)
* [:link:](mdns/mdns.d.ts) [node_mdns](https://github.com/agnat/node_mdns) by [Stefan Steinhart](https://github.com/reppners)
* [:link:](node_redis/node_redis.d.ts) [node_redis](https://github.com/mranney/node_redis) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](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-cache/node-cache.d.ts) [node-cache](https://github.com/tcs-de/nodecache) by [Ilya Mochalov](https://github.com/chrootsu)
* [:link:](node-calendar/node-calendar.d.ts) [node-calendar](https://www.npmjs.com/package/node-calendar) by [Luzian Zagadinow](https://github.com/luzianz)
* [:link:](config/config.d.ts) [node-config](https://github.com/lorenwest/node-config) by [Roman Korneev](https://github.com/RWander)
* [:link:](convict/convict.d.ts) [node-convict](https://github.com/mozilla/node-convict) by [Wim Looman](https://github.com/Nemo157)
* [:link:](node-ffi/node-ffi.d.ts) [node-ffi](https://github.com/rbranson/node-ffi) by [Paul Loyd](https://github.com/loyd)
* [:link:](node-fibers/node-fibers.d.ts) [node-fibers](https://github.com/laverdet/node-fibers) by [Cary Haynie](https://github.com/caryhaynie)
@ -806,10 +856,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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-mysql-wrapper/node-mysql-wrapper.d.ts) [node-mysql-wrapper](https://github.com/nodets/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:](progress/progress.d.ts) [node-progress](https://github.com/tj/node-progress) by [Sebastian Lenz](https://github.com/sebastian-lenz)
* [: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)
@ -821,12 +872,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](node/node.d.ts) [Node.js](http://nodejs.org) by [Microsoft TypeScript](http://typescriptlang.org), [DefinitelyTyped](https://github.com/borisyankov/DefinitelyTyped)
* [:link:](_debugger/_debugger.d.ts) [Node.js debugger API](http://nodejs.org) by [Basarat Ali Syed](https://github.com/basarat)
* [:link:](restify/restify.d.ts) [node.js REST framework](https://github.com/mcavage/node-restify) by [Bret Little](https://github.com/blittle)
* [:link:](acl/acl.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo)
* [:link:](mdns/mdns.d.ts) [node_mdns](https://github.com/agnat/node_mdns) by [Stefan Steinhart](https://github.com/reppners)
* [:link:](node_redis/node_redis.d.ts) [node_redis](https://github.com/mranney/node_redis) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](each/each.d.ts) [NodeEach](http://www.adaltas.com/projects/node-each) by [Michael Zabka](https://github.com/misak113)
* [:link:](nodemailer/nodemailer-types.d.ts) [Nodemailer](https://github.com/andris9/Nodemailer) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](nodemailer/nodemailer.d.ts) [Nodemailer](https://github.com/andris9/Nodemailer) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](nodemailer/nodemailer-types.d.ts) [Nodemailer](https://github.com/andris9/Nodemailer) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](nodemailer-direct-transport/nodemailer-direct-transport.d.ts) [nodemailer-direct-transport](https://github.com/andris9/nodemailer-direct-transport) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](nodemailer-pickup-transport/nodemailer-pickup-transport.d.ts) [nodemailer-pickup-transport](https://www.npmjs.com/package/nodemailer-pickup-transport) by [Peter Snider](https://github.com/psnider)
* [:link:](nodemailer-smtp-pool/nodemailer-smtp-pool.d.ts) [nodemailer-smtp-pool](https://github.com/andris9/nodemailer-smtp-pool) by [Rogier Schouten](https://github.com/rogierschouten)
@ -834,19 +882,21 @@ 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:](notify/notify.d.ts) [Notify.js](https://github.com/jpillora/notifyjs) by [Xiaohan Zhang](https://github.com/hellochar)
* [: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:](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:](wnumb/wnumb.d.ts) [nouislider](https://github.com/leongersen/wnumb) by [Corey Jepperson](https://github.com/acoreyj)
* [:link:](noVNC/noVNC.d.ts) [noVNC](https://github.com/kanaka/noVNC) by [Ken Smith](https://github.com/smithkl42)
* [:link:](npm/npm.d.ts) [npm](https://github.com/npm/npm) by [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](nprogress/NProgress.d.ts) [NProgress](https://github.com/rstacruz/nprogress) by [Judah Gabriel Himango](http://debuggerdotbreak.wordpress.com)
* [:link:](numbro/numbro.d.ts) [Numbro.js](https://github.com/foretagsplatsen/numbro) by [Vincent Bortone](https://github.com/vbortone)
* [:link:](numeraljs/numeraljs.d.ts) [Numeral.js](https://github.com/adamwdraper/Numeral-js) by [Vincent Bortone](https://github.com/vbortone)
* [:link:](object-assign/object-assign.d.ts) [object-assign](https://github.com/sindresorhus/object-assign) by [Christopher Brown](https://github.com/chbrown)
* [: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:](observe-js/observe-js.d.ts) [observe-js](https://github.com/Polymer/observe-js) by [Oliver Herrmann](https://github.com/herrmanno)
* [: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)
@ -869,9 +919,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](pascal-case/pascal-case.d.ts) [pascal-case](https://github.com/blakeembrey/pascal-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
* [:link:](passport/passport.d.ts) [Passport](http://passportjs.org) by [Horiuchi_H](https://github.com/horiuchi)
* [:link:](passport-strategy/passport-strategy.d.ts) [Passport Strategy module](https://github.com/jaredhanson/passport-strategy) by [Lior Mualem](https://github.com/liorm)
* [:link:](passport-twitter/passport-twitter.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
* [:link:](passport-google-oauth/passport-google-oauth.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
* [:link:](passport-facebook/passport-facebook.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
* [:link:](passport-google-oauth/passport-google-oauth.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
* [:link:](passport-twitter/passport-twitter.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
* [:link:](passport-facebook-token/passport-facebook-token.d.ts) [passport-facebook-token](https://github.com/drudge/passport-facebook-token) by [Ray Martone](https://github.com/rmartone)
* [:link:](passport-local/passport-local.d.ts) [passport-local](https://github.com/jaredhanson/passport-local) by [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](path-case/path-case.d.ts) [path-case](https://github.com/blakeembrey/path-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
@ -890,6 +940,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](phantom/phantom.d.ts) [PhantomJS bridge for NodeJS](https://github.com/sgentle/phantomjs-node) by [horiuchi](https://github.com/horiuchi)
* [:link:](phantomjs/phantomjs.d.ts) [PhantomJS v1.9.0 API](https://github.com/ariya/phantomjs/wiki/API-Reference) by [Jed Hunsaker](https://github.com/jedhunsaker), [Mike Keesey](https://github.com/keesey)
* [:link:](phonegap/phonegap.d.ts) [PhoneGap](http://phonegap.com) by [Boris Yankov](https://github.com/borisyankov), [Dick van den Brink](https://github.com/DickvdBrink)
* [:link:](phonegap-facebook-plugin/phonegap-facebook-plugin.d.ts) [phonegap-facebook-plugin](https://github.com/Wizcorp/phonegap-facebook-plugin) by [Justin Unterreiner](https://github.com/Justin-Credible)
* [:link:](phonegap-plugin-push/phonegap-plugin-push.d.ts) [phonegap-plugin-push](https://github.com/phonegap/phonegap-plugin-push) by [Frederico Galvão](https://github.com/fredgalvao)
* [:link:](photonui/photonui.d.ts) [PhotonUI](https://github.com/wanadev/PhotonUI) by [Florent Poujol](https://github.com/florentpoujol)
* [:link:](photoswipe/photoswipe.d.ts) [PhotoSwipe](http://photoswipe.com) by [Xiaohan Zhang](https://github.com/hellochar)
* [:link:](physijs/physijs.d.ts) [Physijs](http://chandlerprall.github.io/Physijs) by [Satoru Kimura](https://github.com/gyohk)
@ -914,6 +966,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](power-assert/power-assert.d.ts) [power-assert](https://github.com/twada/power-assert) by [vvakame](https://github.com/vvakame)
* [:link:](power-assert-formatter/power-assert-formatter.d.ts) [power-assert-formatter](https://github.com/twada/power-assert-formatter) by [vvakame](https://github.com/vvakame)
* [:link:](precise/precise.d.ts) [precise](https://www.npmjs.org/package/precise) by [Peter Harris](https://github.com/codeanimal)
* [:link:](precond/precond.d.ts) [precond](https://github.com/MathieuTurcotte/node-precond) by [Oliver Schneider](https://github.com/olsio)
* [: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)
@ -925,10 +978,12 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](pty.js/pty.js.d.ts) [pty.js 0.2.7-1](https://github.com/chjj/pty.js) by [Vadim Macagon](https://github.com/enlight)
* [:link:](pubsubjs/pubsub.d.ts) [PubSubJS](https://github.com/mroderick/PubSubJS) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](purl/purl.d.ts) [Purl](https://github.com/allmarkedup/purl) by [Daniel Ferreira Monteiro Alves](https://github.com/danfma)
* [:link:](pusher-js/pusher-js.d.ts) [pusher-js](https://github.com/pusher/pusher-js) by [Qubo](https://github.com/tkqubo)
* [:link:](q/Q.d.ts) [Q](https://github.com/kriskowal/q) by [Barrie Nemetchek](https://github.com/bnemetchek), [Andrew Gaspar](https://github.com/AndrewGaspar), [John Reilly](https://github.com/johnnyreilly)
* [:link:](q-io/Q-io.d.ts) [Q-io](https://github.com/kriskowal/q-io) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](q-retry/q-retry.d.ts) [q-retry](https://github.com/vilic/q-retry) by [VILIC VANE](https://github.com/vilic)
* [:link:](qajax/qajax.d.ts) [Qajax](https://github.com/gre/qajax) by [Boltmade](https://github.com/Boltmade)
* [:link:](qs/qs.d.ts) [qs](https://github.com/hapijs/qs) by [Roman Korneev](https://github.com/RWander)
* [:link:](qtip2/qtip2.d.ts) [qtip2](http://qtip2.com) by [Nathan Pitman](https://github.com/Seltzer)
* [:link:](quixote/quixote.d.ts) [quixote](http://quixote-css.com) by [Aleksandr Filatov](https://github.com/greybax)
* [:link:](qunit/qunit.d.ts) [QUnit](http://qunitjs.com) by [Diullei Gomes](https://github.com/diullei)
@ -936,21 +991,29 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](rabbit.js/rabbit.js.d.ts) [rabbit.js](https://github.com/squaremo/rabbit.js) by [Wonshik Kim](https://github.com/wokim)
* [:link:](ractive/ractive.d.ts) [Ractive](http://ractivejs.org) by [Han Lin Yap](http://yap.nu)
* [:link:](random-string/random-string.d.ts) [random-string](https://github.com/valiton/node-random-string) by [Sam Saint-Pettersen](https://github.com/stpettersens)
* [:link:](rangy/rangy.d.ts) [Rangy](https://github.com/timdown/rangy) by [Rudolph Gottesheim](http://www.midnight-design.at)
* [:link:](raphael/raphael.d.ts) [Raphael](http://raphaeljs.com) by [CheCoxshall](https://github.com/CheCoxshall)
* [:link:](rappid/rappid.d.ts) [Rappid](http://jointjs.com/about-rappid) by [Ewout Van Gossum](https://github.com/DenEwout)
* [:link:](ravenjs/ravenjs.d.ts) [Raven.js](https://github.com/getsentry/raven-js) by [Santi Albo](https://github.com/santialbo)
* [:link:](raygun4js/raygun4js.d.ts) [raygun4js](https://github.com/MindscapeHQ/raygun4js) by [Brian Surowiec](https://github.com/xt0rted)
* [:link:](react/react.d.ts) [React (external module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com)
* [:link:](react/react-global.d.ts) [React (internal module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com)
* [:link:](react/react.d.ts) [React](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com)
* [:link:](react/react-global.d.ts) [React (namespace)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com)
* [:link:](react-dnd/react-dnd.d.ts) [React DnD](https://github.com/gaearon/react-dnd) by [Asana](https://asana.com)
* [:link:](react-router/react-router.d.ts) [React Router](https://github.com/rackt/react-router) by [Yuichi Murata](https://github.com/mrk21), [Václav Ostrožlík](https://github.com/vasek17)
* [:link:](react-mixin/react-mixin.d.ts) [react-mixin](https://github.com/brigand/react-mixin) by [Qubo](https://github.com/tkqubo)
* [:link:](react-props-decorators/react-props-decorators.d.ts) [react-props-decorators](https://github.com/popkirby/react-props-decorators) by [Qubo](https://github.com/tkqubo)
* [:link:](react-redux/react-redux.d.ts) [react-redux](https://github.com/rackt/react-redux) by [Qubo](https://github.com/tkqubo)
* [:link:](react-spinkit/react-spinkit.d.ts) [react-spinkit](https://github.com/KyleAMathews/react-spinkit) by [Qubo](https://github.com/tkqubo)
* [:link:](react-swf/react-swf.d.ts) [react-swf](https://github.com/syranide/react-swf) by [Stepan Mikhaylyuk](https://github.com/stepancar)
* [:link:](react/react-addons.d.ts) [ReactWithAddons (external module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com)
* [:link:](react/react-addons-global.d.ts) [ReactWithAddons (internal module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com)
* [:link:](readdir-stream/readdir-stream.d.ts) [readdir-stream](https://github.com/logicalparadox/readdir-stream) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](recursive-readdir/recursive-readdir.d.ts) [recursive-readdir](https://github.com/jergason/recursive-readdir) by [Elisée Maurer](https://github.com/elisee)
* [:link:](redis/redis.d.ts) [redis](https://github.com/mranney/node_redis) by [Carlos Ballesteros Velasco](https://github.com/soywiz), [Peter Harris](https://github.com/CodeAnimal)
* [:link:](redis/redis.d.ts) [redis](https://github.com/mranney/node_redis) by [Carlos Ballesteros Velasco](https://github.com/soywiz), [Peter Harris](https://github.com/CodeAnimal), [TANAKA Koichi](https://github.com/MugeSo)
* [:link:](redlock/redlock.d.ts) [Redlock](https://github.com/mike-marcacci/node-redlock) by [Ilya Mochalov](https://github.com/chrootsu)
* [:link:](redux/redux.d.ts) [Redux](https://github.com/rackt/redux) by [William Buchwalter](https://github.com/wbuchwalter), [Vincent Prouillet](https://github.com/Keats)
* [:link:](redux-action-utils/redux-action-utils.d.ts) [redux-action-utils](https://github.com/insin/redux-action-utils) by [Qubo](https://github.com/tkqubo)
* [:link:](redux-actions/redux-actions.d.ts) [redux-actions](https://github.com/acdlite/redux-actions) by [Jack Hsu](https://github.com/jaysoo)
* [:link:](redux-devtools/redux-devtools.d.ts) [redux-devtools](https://github.com/gaearon/redux-devtools) by [Qubo](https://github.com/tkqubo)
* [:link:](redux-logger/redux-logger.d.ts) [redux-logger](https://github.com/fcomb/redux-logger) by [Alexander Rusakov](https://github.com/arusakov)
* [:link:](ref/ref.d.ts) [ref](https://github.com/TooTallNate/ref) by [Paul Loyd](https://github.com/loyd)
* [:link:](ref-array/ref-array.d.ts) [ref-array](https://github.com/TooTallNate/ref-array) by [Paul Loyd](https://github.com/loyd)
* [:link:](ref-struct/ref-struct.d.ts) [ref-struct](https://github.com/TooTallNate/ref-struct) by [Paul Loyd](https://github.com/loyd)
@ -961,13 +1024,16 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
* [:link:](response-time/response-time.d.ts) [response-time](https://github.com/expressjs/response-time) by [Uros Smolnik](https://github.com/urossmolnik)
* [:link:](rest-io/rest-io.d.ts) [rest-io](https://github.com/EnoF/rest-io) by [Andy Tang](https://github.com/EnoF), [Stefan Schacherl](https://github.com/TheBay0r)
* [:link:](rest/rest.d.ts) [rest.js](https://github.com/cujojs/rest) by [Wim Looman](https://github.com/Nemo157)
* [:link:](restangular/restangular.d.ts) [Restangular](https://github.com/mgonto/restangular) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](restful.js/restful.js.d.ts) [restful.js](https://github.com/marmelab/restful.js) by [Qubo](https://github.com/tkqubo)
* [:link:](rethinkdb/rethinkdb.d.ts) [Rethinkdb](http://rethinkdb.com) by [Sean Hess](https://seanhess.github.io)
* [:link:](reveal/reveal.d.ts) [Reveal](https://github.com/hakimel/reveal.js) by [grapswiz](https://github.com/grapswiz)
* [:link:](rickshaw/rickshaw.d.ts) [Rickshaw](http://code.shutterstock.com/rickshaw) by [Blake Niemyjski](https://github.com/niemyjski)
* [:link:](rimraf/rimraf.d.ts) [rimraf](https://github.com/isaacs/rimraf) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](riotjs/riotjs.d.ts) [riot.js](https://github.com/moot/riotjs) by [vvakame](https://github.com/vvakame)
* [:link:](riotcontrol/riotcontrol.d.ts) [RiotControl](https://github.com/jimsparkman/RiotControl) by [Ilya Mochalov](https://github.com/chrootsu)
* [:link:](rivets/rivets.d.ts) [rivets](http://rivetsjs.com) by [Trevor Baron](https://github.com/TrevorDev)
* [: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)
@ -1008,8 +1074,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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](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:](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-favicon/serve-favicon.d.ts) [serve-favicon](https://github.com/expressjs/serve-favicon) by [Uros Smolnik](https://github.com/urossmolnik)
* [:link:](serve-static/serve-static.d.ts) [serve-static](https://github.com/expressjs/serve-static) by [Uros Smolnik](https://github.com/urossmolnik)
* [:link:](sharedworker/SharedWorker.d.ts) [SharedWorker](http://www.w3.org/TR/workers) by [Toshiya Nakakura](https://github.com/nakakura)
* [: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)
@ -1023,6 +1089,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](signalr/signalr.d.ts) [SignalR](http://www.asp.net/signalr) by [Boris Yankov](https://github.com/borisyankov), [T. Michael Keesey](https://github.com/keesey)
* [:link:](signature_pad/signature_pad.d.ts) [signature_pad](https://github.com/szimek/signature_pad) by [Abubaker Bashir](https://github.com/AbubakerB)
* [:link:](simple-cw-node/simple-cw-node.d.ts) [simple-cw-node](https://github.com/astronaughts/simple-cw-node) by [vvakame](https://github.com/vvakame)
* [:link:](simplebar/simplebar.d.ts) [simplebar.js](https://github.com/Grsmto/simplebar) by [Gregor Woiwode](https://github.com/gregonnet)
* [:link:](jquery.simplemodal/jquery.simplemodal.d.ts) [SimpleModal](http://www.ericmmartin.com/projects/simplemodal) by [Friedrich von Never](https://github.com/ForNeVeR)
* [:link:](sinon/sinon.d.ts) [Sinon](http://sinonjs.org) by [William Sears](https://github.com/mrbigdog2u)
* [:link:](sinon-chai/sinon-chai.d.ts) [sinon-chai](https://github.com/domenic/sinon-chai) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid), [Jed Mao](https://github.com/jedmao)
@ -1040,6 +1107,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](snapsvg/snapsvg.d.ts) [Snap-SVG](https://github.com/adobe-webplatform/Snap.svg) by [Lars Klein](https://github.com/lhk)
* [:link:](socket.io/socket.io.d.ts) [socket.io](http://socket.io) by [PROGRE](https://github.com/progre), [Damian Connolly](https://github.com/divillysausages)
* [:link:](socket.io-client/socket.io-client.d.ts) [socket.io-client](http://socket.io) by [PROGRE](https://github.com/progre), [Damian Connolly](https://github.com/divillysausages)
* [:link:](socket.io.users/socket.io.users.d.ts) [socket.io.users](https://github.com/nodets/socket.io.users) by [Makis Maropoulos](https://github.com/kataras)
* [:link:](sockjs/sockjs.d.ts) [SockJS 0.3.x](https://github.com/sockjs/sockjs-client) by [Emil Ivanov](https://github.com/vladev)
* [:link:](sockjs-node/sockjs-node.d.ts) [sockjs-node 0.3.x](https://github.com/sockjs/sockjs-node) by [Phil McCloghry-Laing](https://github.com/pmccloghrylaing)
* [:link:](soundjs/soundjs.d.ts) [SoundJS](http://www.createjs.com/#!/SoundJS) by [Pedro Ferreira](https://bitbucket.org/drk4)
@ -1057,6 +1125,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
* [:link:](static-eval/static-eval.d.ts) [static-eval](https://github.com/substack/static-eval) by [Ben Liddicott](https://github.com/benliddicott/DefinitelyTyped)
* [:link:](stats/stats.d.ts) [Stats.js r12](http://github.com/mrdoob/stats.js) by [Gregory Dalton](https://github.com/gregolai)
* [:link:](statsd-client/statsd-client.d.ts) [statsd-client](https://github.com/msiebuhr/node-statsd-client) by [Peter Kooijmans](https://github.com/peterkooijmans)
* [:link:](status-bar/status-bar.d.ts) [status-bar](https://github.com/atom/status-bar) by [vvakame](https://github.com/vvakame)
@ -1066,6 +1135,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](string_score/string_score.d.ts) [string_score](https://github.com/joshaven/string_score) by [Marcin Porębski](https://github.com/marcinporebski)
* [:link:](string/string.d.ts) [string.js](http://stringjs.com) by [Bas Pennings](https://github.com/basp)
* [: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)
@ -1075,10 +1145,12 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](superagent/superagent.d.ts) [SuperAgent](https://github.com/visionmedia/superagent) by [Alex Varju](https://github.com/varju)
* [:link:](supertest/supertest.d.ts) [SuperTest](https://github.com/visionmedia/supertest) by [Alex Varju](https://github.com/varju)
* [:link:](svg-pan-zoom/svg-pan-zoom.d.ts) [svg-pan-zoom](https://github.com/ariutta/svg-pan-zoom) by [Chintan Shah](https://github.com/Promact)
* [:link:](svg-sprite/svg-sprite.d.ts) [svg-sprite](https://github.com/jkphl/svg-sprite) by [Qubo](https://github.com/tkqubo)
* [:link:](svgjs/svgjs.d.ts) [svg.js](http://www.svgjs.com) by [Sean Hess](https://seanhess.github.io)
* [:link:](svg2png/svg2png.d.ts) [svg2png node package](https://github.com/domenic/svg2png) by [hans windhoff](https://github.com/hansrwindhoff)
* [:link:](svgjs.draggable/svgjs.draggable.d.ts) [svgjs.draggable](http://www.svgjs.com) by [Luigi Trabacchin](https://github.com/LiFeleSs)
* [:link:](swag/swag.d.ts) [swag](https://github.com/elving/swag) by [Shogo Iwano](https://github.com/shiwano)
* [:link:](swaggerize-express/swaggerize-express.d.ts) [swaggerize-express 4.x](https://github.com/krakenjs/swaggerize-express) by [TANAKA Koichi](https://github.com/mugeso)
* [:link:](swap-case/swap-case.d.ts) [swap-case](https://github.com/blakeembrey/swap-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
* [:link:](sweetalert/sweetalert.d.ts) [SweetAlert](https://github.com/t4t5/sweetalert) by [Markus Peloso](https://github.com/ToastHawaii)
* [:link:](swfobject/swfobject.d.ts) [swfobject](https://code.google.com/p/swfobject) by [rou](https://github.com/rou)
@ -1090,6 +1162,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](switchery/switchery.d.ts) [switchery](https://github.com/abpetkov/switchery) by [Bruno Grieder](https://github.com/bgrieder)
* [:link:](swiz/swiz.d.ts) [swiz](https://github.com/racker/node-swiz) by [Jeff Goddard](https://github.com/jedigo)
* [:link:](systemjs/systemjs.d.ts) [System.js](https://github.com/systemjs/systemjs) by [Ludovic HENIN](https://github.com/ludohenin), [Nathan Walker](https://github.com/NathanWalker)
* [:link:](tabris/tabris.d.ts) [Tabris.js](http://tabrisjs.com) by [Tabris.js team](http://github.com/eclipsesource/tabris)
* [:link:](tabtab/tabtab.d.ts) [tabtab](https://github.com/mklabs/node-tabtab) by [Vojtěch Habarta](https://github.com/vojtechhabarta)
* [:link:](tape/tape.d.ts) [tape](https://github.com/substack/tape) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](tar/tar.d.ts) [tar](https://github.com/npm/node-tar) by [Maxime LUCE](https://github.com/SomaticIT)
@ -1125,13 +1198,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](timelinejs/timelinejs.d.ts) [timelinejs](https://github.com/NUKnightLab/TimelineJS) by [Roland Zwaga](https://github.com/rolandzwaga)
* [:link:](timezone-js/timezone-js.d.ts) [timezone-js](https://github.com/mde/timezone-js) by [bonnici](https://github.com/bonnici)
* [:link:](timezonecomplete/timezonecomplete.d.ts) [timezonecomplete](https://github.com/SpiritIT/timezonecomplete) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](tv4/tv4.d.ts) [Tiny Validator tv4](https://github.com/geraintluff/tv4) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](tv4/tv4.d.ts) [Tiny Validator tv4](https://github.com/geraintluff/tv4) by [Bart van der Schoor](https://github.com/Bartvds), [Peter Snider](https://github.com/psnider)
* [:link:](tinycolor/tinycolor.d.ts) [tinycolor](https://github.com/bgrins/TinyColor) by [Mordechai Zuber](https://github.com/M-Zuber)
* [:link:](titanium/titanium.d.ts) [Titanium Mobile](http://www.appcelerator.com) by [Craig Younkins](https://github.com/cyounkins)
* [:link:](title-case/title-case.d.ts) [title-case](https://github.com/blakeembrey/title-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
* [:link:](tmp/tmp.d.ts) [tmp](https://www.npmjs.com/package/tmp) by [Jared Klopper](https://github.com/optical)
* [:link:](to-title-case-gouch/to-title-case-gouch.d.ts) [to-title-case](https://github.com/gouch/to-title-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
* [:link:](toastr/toastr.d.ts) [Toastr](https://github.com/CodeSeven/toastr) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](tooltipster/tooltipster.d.ts) [tooltipster](https://github.com/iamceege/tooltipster) by [Stephen Lautier](https://github.com/stephenlautier)
* [:link:](sencha_touch/SenchaTouch.d.ts) [Touch](http://www.sencha.com/products/touch) by [Brian Kotek](https://github.com/brian428)
* [:link:](traceback/traceback.d.ts) [Traceback](http://github.com/iriscouch/traceback) by [Michael Zabka](https://github.com/misak113)
* [:link:](traverson/traverson.d.ts) [Traverson](https://github.com/basti1302/traverson) by [Marcin Porębski](https://github.com/marcinporebski)
@ -1154,15 +1228,16 @@ 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:](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), [Marcel van de Kamp](https://github.com/marcel-k)
* [: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)
* [:link:](umbraco/umbraco-resources.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland)
* [:link:](underscore/underscore.d.ts) [Underscore](http://underscorejs.org) by [Boris Yankov](https://github.com/borisyankov), [Josh Baldwin](https://github.com/jbaldwin)
* [:link:](underscore-ko/underscore-ko.d.ts) [Underscore-ko 1.2.2 with underscore](https://github.com/kamranayub/UnderscoreKO) by [Maurits Elbers](https://github.com/MagicMau)
* [:link:](underscore.string/underscore.string.d.ts) [underscore.string](https://github.com/epeli/underscore.string) by [Ry Racherbaumer](http://github.com/rygine)
* [:link:](jquery.uniform/jquery.uniform.d.ts) [Uniform.js](https://github.com/pixelmatrix/uniform) by [flyfishMT](https://github.com/flyfishMT)
* [:link:](uniq/uniq.d.ts) [uniq](https://www.npmjs.com/package/uniq) by [Hans Windhoff](https://github.com/hansrwindhoff)
* [:link:](unique-random/unique-random.d.ts) [unique-random](https://github.com/sindresorhus/unique-random) by [Yuki Kokubun](https://github.com/Kuniwak)
* [: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)
@ -1202,7 +1277,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](webcola/webcola.d.ts) [webcola](https://github.com/tgdwyer/WebCola) by [Qinfeng Chen](https://github.com/qinfchen)
* [:link:](webcomponents.js/webcomponents.js.d.ts) [webcomponents.js](https://github.com/webcomponents/webcomponentsjs) by [Adi Dahiya](https://github.com/adidahiya)
* [:link:](webcrypto/WebCrypto.d.ts) [WebCrypto](http://www.w3.org/TR/WebCryptoAPI) by [Lucas Dixon](https://github.com/iislucas)
* [:link:](webgl-ext/webgl-ext.d.ts) [WebGL Extensions](http://webgl.org) by [Arthur Langereis](https://github.com/zenmumbler)
* [:link:](webix/webix.d.ts) [Webix UI](http://webix.com) by [Maksim Kozhukh](http://github.com/mkozhukh)
* [:link:](webpack/webpack.d.ts) [webpack](https://github.com/webpack/webpack) by [Qubo](https://github.com/tkqubo)
* [:link:](webrtc/MediaStream.d.ts) [WebRTC](http://dev.w3.org/2011/webrtc) by [Ken Smith](https://github.com/smithkl42)
* [:link:](websocket/websocket.d.ts) [websocket](https://github.com/Worlize/WebSocket-Node) by [Paul Loyd](https://github.com/loyd)
* [:link:](websql/websql.d.ts) [websql](http://www.w3.org/TR/webdatabase) by [TeamworkGuy2](https://github.com/TeamworkGuy2)
@ -1222,6 +1299,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](xdate/xdate.d.ts) [XDate](http://arshaw.com/xdate) by [yamada28go](https://github.com/yamada28go)
* [:link:](jsfl/xJSFL.d.ts) [xJSFL](http://www.xjsfl.com) by [soywiz](https://github.com/soywiz)
* [:link:](xlsx/xlsx.d.ts) [xlsx](https://github.com/SheetJS/js-xlsx) by [themauveavenger](https://github.com/themauveavenger)
* [:link:](xml-parser/xml-parser.d.ts) [xml-parser](https://github.com/segmentio/xml-parser) by [Matt Frantz](https://github.com/mhfrantz)
* [:link:](xmlbuilder/xmlbuilder.d.ts) [xmlbuilder](https://github.com/oozcitak/xmlbuilder-js) by [Wallymathieu](http://github.com/wallymathieu)
* [:link:](xpath/xpath.d.ts) [xpath](https://github.com/goto100/xpath) by [Andrew Bradley](https://github.com/cspotcode)
* [:link:](xregexp/xregexp.d.ts) [XRegExp](http://xregexp.com) by [Bart van der Schoor](https://github.com/Bartvds)

View File

@ -0,0 +1,84 @@
/// <reference path="./amazon-product-api.d.ts" />
/// <reference path="../node/node.d.ts"/>
import amazon = require('amazon-product-api');
var client = amazon.createClient({
awsId: process.env.AWS_ACCESS_KEY_ID,
awsSecret: process.env.AWS_SECRET,
awsTag: process.env.AWS_ASSOCIATE_TAG
});
// Item Search
var searchQuery = {
director: 'Quentin Tarantino',
actor: 'Samuel L. Jackson',
searchIndex: 'DVD',
audienceRating: 'R',
responseGroup: 'ItemAttributes,Offers,Images'
};
client.itemSearch(searchQuery).then((results) => {
console.log(getResultCount(results) + " search results");
}).catch(function(err){
console.log(err);
});
client.itemSearch(searchQuery, (err, results) => {
if(err) {
console.log(err);
return;
}
console.log(getResultCount(results) + " search results");
});
// Item Lookup
var lookupQuery = {
itemId: 'B00008OE6I',
idType: 'ASIN',
responseGroup: 'OfferFull',
Condition: 'All'
};
client.itemLookup(lookupQuery).then((results) => {
console.log(getResultCount(results) + " lookup results");
}).catch(function(err){
console.log(err);
});
client.itemLookup(lookupQuery, (err, results) => {
if(err) {
console.log(err);
return;
}
console.log(getResultCount(results) + " lookup results");
});
// Browse Node Lookup
var nodeLookupQuery = {
browseNodeId: '2625373011'
};
client.browseNodeLookup(nodeLookupQuery).then((results) => {
console.log(getResultCount(results) + " node lookup results");
}).catch(function(err){
console.log(err);
});
client.browseNodeLookup(nodeLookupQuery, (err, results) => {
if(err) {
console.log(err);
return;
}
console.log(getResultCount(results) + " node lookup results");
});
function getResultCount(results: Object[]) {
return results != undefined ? results.length : 0;
}

View File

@ -0,0 +1,27 @@
// Type definitions for amazon-product-api
// Project: https://github.com/t3chnoboy/amazon-product-api
// Definitions by: Matti Lehtinen <https://github.com/MattiLehtinen/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../es6-promise/es6-promise.d.ts"/>
declare module "amazon-product-api" {
interface ICredentials {
awsId: string,
awsSecret: string,
awsTag: string
}
interface IAmazonProductQueryCallback {
(err: string, results: Object[]): void;
}
interface IAmazonProductClient {
itemSearch(query: any, callback?: IAmazonProductQueryCallback) : Promise<Object[]>;
itemLookup(query: any, callback?: IAmazonProductQueryCallback) : Promise<Object[]>;
browseNodeLookup(query: any, callback?: IAmazonProductQueryCallback) : Promise<Object[]>;
}
export function createClient(credentials:ICredentials) : IAmazonProductClient;
}

View File

@ -0,0 +1,265 @@
/// <reference path="amplify-deferred.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />
// Copied examples directly from AmplifyJs site
// Subscribe and publish with no data
amplify.subscribe("nodataexample", function () {
alert("nodataexample topic published!");
});
// Subscribe and publish with data
amplify.publish("nodataexample");
amplify.subscribe("dataexample", function (data) {
alert(data.foo); // bar
});
amplify.publish("dataexample", { foo: "bar" });
amplify.subscribe("dataexample2", function (param1, param2) {
alert(param1 + param2); // barbaz
});
//...
amplify.publish("dataexample2", "bar", "baz");
// Subscribe and publish with context and data
amplify.subscribe("datacontextexample", $("p:first"), function (data) {
this.text(data.exampleText); // first p element would have "foo bar baz" as text
});
amplify.publish("datacontextexample", { exampleText: "foo bar baz" });
// Subscribe to a topic with high priority
amplify.subscribe("priorityexample", function (data) {
alert(data.foo);
});
amplify.subscribe("priorityexample", function (data) {
if (data.foo === "oops") {
return false;
}
}, 1);
// Store data with amplify storage picking the default storage technology:
amplify.publish("priorityexample", { foo: "bar" });
amplify.publish("priorityexample", { foo: "oops" });
amplify.store("storeExample1", { foo: "bar" });
amplify.store("storeExample2", "baz");
// retrieve the data later via the key
var myStoredValue = amplify.store("storeExample1"),
myStoredValue2 = amplify.store("storeExample2"),
myStoredValues = amplify.store();
myStoredValue.foo; // bar
myStoredValue2; // baz
myStoredValues.storeExample1.foo; // bar
myStoredValues.storeExample2; // baz
// Store data explicitly with session storage
amplify.store.sessionStorage("explicitExample", { foo2: "baz" });
// retrieve the data later via the key
var myStoredValue2 = amplify.store.sessionStorage("explicitExample");
myStoredValue2.foo2; // baz
// REQUEST
// Set up and use a request utilizing Ajax
amplify.request.define("ajaxExample1", "ajax", {
url: "/myApiUrl",
dataType: "json",
type: "GET"
});
// later in code
amplify.request("ajaxExample1", function (data) {
data.foo; // bar
});
// Set up and use a request utilizing Ajax and Caching
amplify.request.define("ajaxExample2", "ajax", {
url: "/myApiUrl",
dataType: "json",
type: "GET",
cache: "persist"
});
// later in code
amplify.request("ajaxExample2", function (data) {
data.foo; // bar
});
// a second call will result in pulling from the cache
amplify.request("ajaxExample2", function (data) {
data.baz; // qux
})
// Set up and use a RESTful request utilizing Ajax
amplify.request.define("ajaxRESTFulExample", "ajax", {
url: "/myRestFulApi/{type}/{id}",
type: "GET"
})
// later in code
amplify.request("ajaxRESTFulExample",
{
type: "foo",
id: "bar"
},
function (data) {
// /myRESTFulApi/foo/bar was the URL used
data.foo; // bar
}
);
// POST data with Ajax
amplify.request.define("ajaxPostExample", "ajax", {
url: "/myRestFulApi",
type: "POST"
})
// later in code
amplify.request("ajaxPostExample",
{
type: "foo",
id: "bar"
},
function (data) {
data.foo; // bar
}
);
// Using data maps
// When searching Twitter, the key for the search phrase is q.If we want a more descriptive name, such as term, we can use a data map:
amplify.request.define("twitter-search", "ajax", {
url: "http://search.twitter.com/search.json",
dataType: "jsonp",
dataMap: {
term: "q"
}
});
amplify.request("twitter-search", { term: "amplifyjs" });
// Similarly, we can create a request that searches for mentions, by accepting a username:
amplify.request.define("twitter-mentions", "ajax", {
url: "http://search.twitter.com/search.json",
dataType: "jsonp",
dataMap: function (data) {
return {
q: "@" + data.user
};
}
});
amplify.request("twitter-mentions", { user: "amplifyjs" });
// Setting up and using decoders
//Example:
var appEnvelopeDecoder: amplifyDecoder = function (data, status, xhr, success, error) {
if (data.status === "success") {
success(data.data);
} else if (data.status === "fail" || data.status === "error") {
error(data.message, data.status);
} else {
error(data.message, "fatal");
}
};
//a new decoder can be added to the amplifyDecoders interface
interface amplifyDecoders {
appEnvelope: amplifyDecoder;
}
amplify.request.decoders.appEnvelope = appEnvelopeDecoder;
//but you can also just add it via an index
amplify.request.decoders['appEnvelopeStr'] = appEnvelopeDecoder;
amplify.request.define("decoderExample", "ajax", {
url: "/myAjaxUrl",
type: "POST",
decoder: "appEnvelope"
});
amplify.request({
resourceId: "decoderExample",
success: function (data) {
data.foo; // bar
},
error: function (message, level) {
alert("always handle errors with alerts.");
}
});
// POST with caching and single - use decoder
// Example:
amplify.request.define("decoderSingleExample", "ajax", {
url: "/myAjaxUrl",
type: "POST",
decoder: function (data, status, xhr, success, error) {
if (data.status === "success") {
success(data.data);
} else if (data.status === "fail" || data.status === "error") {
error(data.message, data.status);
} else {
error(data.message, "fatal");
}
}
});
amplify.request({
resourceId: "decoderSingleExample",
success: function (data) {
data.foo; // bar
},
error: function (message, level) {
alert("always handle errors with alerts.");
}
});
// Handling Status
// Status in Success and Error Callbacks
// amplify.request comes with built in support for status.The status parameter appears in the default success or error callbacks when using an ajax definition.
amplify.request.define("statusExample1", "ajax", {
//...
});
amplify.request({
resourceId: "statusExample1",
success: function (data, status) {
},
error: function (data, status) {
}
});
amplify.request({
resourceId: "statusExample1"
}).done(function (data, status) {
}).fail(function (data, status) {
}).always(function (data, status) { });

View File

@ -0,0 +1 @@

182
amplify-deferred/amplify-deferred.d.ts vendored Normal file
View File

@ -0,0 +1,182 @@
// Type definitions for AmplifyJs 1.1.0 using JQuery Deferred
// Project: http://amplifyjs.com/
// Definitions by: Jonas Eriksson <https://github.com/joeriks/>, Laurentiu Stamate <https://github.com/laurentiustamate94>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />
interface amplifyRequestSettings {
resourceId: string;
data?: any;
success?: (...args: any[]) => void;
error?: (...args: any[]) => void;
}
interface amplifyDecoder {
(
data?: any,
status?: string,
xhr?: JQueryXHR,
success?: (...args: any[]) => void,
error?: (...args: any[]) => void
): void
}
interface amplifyDecoders {
[decoderName: string]: amplifyDecoder;
jsSend: amplifyDecoder;
}
interface amplifyAjaxSettings extends JQueryAjaxSettings {
cache?: any;
dataMap?: {} | ((data: any) => {});
decoder?: any /* string or amplifyDecoder */;
}
interface amplifyRequest {
/***
* Request a resource.
* resourceId: Identifier string for the resource.
* data: A set of key/value pairs of data to be sent to the resource.
* callback: A function to invoke if the resource is retrieved successfully.
*/
(resourceId: string, hash?: any, callback?: Function): JQueryPromise<any>;
/***
* Request a resource.
* settings: A set of key/value pairs of settings for the request.
* resourceId: Identifier string for the resource.
* data (optional): Data associated with the request.
* success (optional): Function to invoke on success.
* error (optional): Function to invoke on error.
*/
(settings: amplifyRequestSettings): JQueryPromise<any>;
/***
* Define a resource.
* resourceId: Identifier string for the resource.
* requestType: The type of data retrieval method from the server. See the request types sections for more information.
* settings: A set of key/value pairs that relate to the server communication technology. The following settings are available:
* Any settings found in jQuery.ajax().
* cache: See the cache section for more details.
* decoder: See the decoder section for more details.
*/
define(resourceId: string, requestType: string, settings?: amplifyAjaxSettings): void;
/***
* Define a custom request.
* resourceId: Identifier string for the resource.
* resource: Function to handle requests. Receives a hash with the following properties:
* resourceId: Identifier string for the resource.
* data: Data provided by the user.
* success: Callback to invoke on success.
* error: Callback to invoke on error.
*/
define(resourceId: string, resource: (settings: amplifyRequestSettings) => void): void;
decoders: amplifyDecoders;
cache: any;
}
interface amplifySubscribe {
/***
* Subscribe to a message.
* topic: Name of the message to subscribe to.
* callback: Function to invoke when the message is published.
*/
(topic: string, callback: Function): void;
/***
* Subscribe to a message.
* topic: Name of the message to subscribe to.
* context: What this will be when the callback is invoked.
* callback: Function to invoke when the message is published.
* [priority]: Priority relative to other subscriptions for the same message. Lower values have higher priority. Default is 10.
*/
(topic: string, context: any, callback: Function, priority?: number): void;
/***
* Subscribe to a message.
* topic: Name of the message to subscribe to.
* callback: Function to invoke when the message is published.
* [priority]: Priority relative to other subscriptions for the same message. Lower values have higher priority. Default is 10.
*/
(topic: string, callback: Function, priority?: number): void;
}
interface amplifyStorageTypeStore {
/***
* Stores a value for a given key using the default storage type.
*
* key: Identifier for the value being stored.
* value: The value to store. The value can be anything that can be serialized as JSON.
* [options]: A set of key/value pairs that relate to settings for storing the value.
*/
(key: string, value: any, options?: any): void;
/***
* Gets a stored value based on the key.
*/
(key: string): any;
/***
* Gets a hash of all stored values.
*/
(): any;
}
interface amplifyStore extends amplifyStorageTypeStore {
/***
* IE 8+, Firefox 3.5+, Safari 4+, Chrome, Opera 10.5+, iPhone 2+, Android 2+
*/
localStorage: amplifyStorageTypeStore;
/***
* IE 8+, Firefox 2+, Safari 4+, Chrome, Opera 10.5+, iPhone 2+, Android 2+
*/
sessionStorage: amplifyStorageTypeStore;
/***
* Firefox 2+
*/
globalStorage: amplifyStorageTypeStore;
/***
* IE 5 - 7
*/
userData: amplifyStorageTypeStore;
/***
* An in-memory store is provided as a fallback if none of the other storage types are available.
*/
memory: amplifyStorageTypeStore;
}
interface amplifyStatic {
subscribe: amplifySubscribe;
/***
* Remove a subscription.
* topic: The topic being unsubscribed from.
* callback: The callback that was originally subscribed.
*/
unsubscribe(topic: string, callback: Function): void;
/***
* Publish a message.
* topic: The name of the message to publish.
* Any additional parameters will be passed to the subscriptions.
* amplify.publish returns a boolean indicating whether any subscriptions returned false. The return value is true if none of the subscriptions returned false, and false otherwise. Note that only one subscription can return false because doing so will prevent additional subscriptions from being invoked.
*/
publish(topic: string, ...args: any[]): boolean;
store: amplifyStore;
request: amplifyRequest;
}
declare var amplify: amplifyStatic;

View File

@ -45,7 +45,7 @@ declare module angular.growl {
/**
* Pre-defined server error interceptor.
*/
serverMessagesInterceptor: (string|Function)[];
serverMessagesInterceptor: (string|IHttpInterceptorFactory)[];
/**
* Set default TTL settings.

View File

@ -22,8 +22,8 @@ declare module angular.localForage {
}
interface ILocalForageService {
setDriver(driver:string):angular.IPromise<void>;
driver<T>():lf.ILocalForage<T>;
driver(): LocalForageDriver;
setDriver(name: string | string[]): angular.IPromise<void>;
setItem(key:string, value:any):angular.IPromise<void>;
setItem(keys:Array<string>, values:Array<any>):angular.IPromise<void>;

View File

@ -5,6 +5,9 @@
/// <reference path="../angularjs/angular.d.ts" />
// Support for AMD require
declare module 'angular-bootstrap' {}
declare module angular.ui.bootstrap {
interface IAccordionConfig {

View File

@ -158,7 +158,9 @@ class UrlLocatorTestService implements IUrlLocatorTestService {
private stateServiceTest() {
this.$state.go("myState");
this.$state.go(this.$state.current);
this.$state.transitionTo("myState");
this.$state.transitionTo(this.$state.current);
if (this.$state.includes("myState") === true) {
//
}
@ -172,6 +174,20 @@ class UrlLocatorTestService implements IUrlLocatorTestService {
this.$state.get();
this.$state.reload();
// http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.$state#properties
if (this.$state.transition) {
var transitionPromise: ng.IPromise<{}> = this.$state.transition;
transitionPromise.then(() => {
// transition success
}, () => {
// transition failure
}).catch(() => {
// transition failure
}).finally(() => {
// transition ended (success or failure)
});
}
// Accesses the currently resolved values for the current state
// http://stackoverflow.com/questions/28026620/is-there-a-way-to-access-resolved-state-dependencies-besides-injecting-them-into/28027023#28027023
var resolvedValues = this.$state.$current.locals.globals;

View File

@ -228,8 +228,11 @@ declare module angular.ui {
* @param options Options object.
*/
go(to: string, params?: {}, options?: IStateOptions): angular.IPromise<any>;
go(to: IState, params?: {}, options?: IStateOptions): angular.IPromise<any>;
transitionTo(state: string, params?: {}, updateLocation?: boolean): void;
transitionTo(state: IState, params?: {}, updateLocation?: boolean): void;
transitionTo(state: string, params?: {}, options?: IStateOptions): void;
transitionTo(state: IState, params?: {}, options?: IStateOptions): void;
includes(state: string, params?: {}): boolean;
is(state:string, params?: {}): boolean;
is(state: IState, params?: {}): boolean;
@ -237,10 +240,15 @@ declare module angular.ui {
href(state: string, params?: {}, options?: IHrefOptions): string;
get(state: string): IState;
get(): IState[];
/** A reference to the state's config object. However you passed it in. Useful for accessing custom data. */
current: IState;
/** A param object, e.g. {sectionId: section.id)}, that you'd like to test against the current active state. */
params: IStateParamsService;
reload(): void;
/** Currently pending transition. A promise that'll resolve or reject. */
transition: ng.IPromise<{}>;
$current: IResolvedState;
}

12214
angular2/angular2-2.0.0-alpha.37.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,7 @@ class Cmp {
Cmp.annotations = [
Component({
selector: 'cmp',
injectables: [Service, bind(Service2).toValue(null)]
bindings: [Service, bind(Service2).toValue(null)]
}),
View({
template: '{{greeting}} world!',
@ -27,9 +27,9 @@ Cmp.annotations = [
properties: [
'text: tooltip'
],
hostListeners: {
'onmouseenter': 'onMouseEnter()',
'onmouseleave': 'onMouseLeave()'
host: {
'(onmouseenter)': 'onMouseEnter()',
'(onmouseleave)': 'onMouseLeave()'
}
})
];

7000
angular2/angular2.d.ts vendored

File diff suppressed because it is too large Load Diff

1007
angular2/http-2.0.0-alpha.37.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

1007
angular2/http.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -81,7 +81,7 @@ declare module ngRouter {
* ]);
* ```
*/
config(definitions: List<RouteDefinition>): Promise<any>;
config(definitions: Array<RouteDefinition>): Promise<any>;
/**
@ -135,7 +135,7 @@ declare module ngRouter {
* 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;
generate(linkParams: Array<any>): Instruction;
}
class RootRouter extends Router {
@ -258,7 +258,7 @@ declare module ngRouter {
* 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;
generate(linkParams: Array<any>, parentComponent: any): Instruction;
}
class LocationStrategy {
@ -343,7 +343,7 @@ declare module ngRouter {
*/
class Pipeline {
steps: List<Function>;
steps: Array<Function>;
process(instruction: Instruction): Promise<any>;
}
@ -547,7 +547,7 @@ declare module ngRouter {
urlPath: string;
urlParams: List<string>;
urlParams: Array<string>;
params: StringMap<string, any>;
@ -568,7 +568,7 @@ declare module ngRouter {
child: Url;
auxiliary: List<Url>;
auxiliary: Array<Url>;
params: StringMap<string, any>;
@ -594,9 +594,9 @@ declare module ngRouter {
}
const routerDirectives : List<any> ;
const routerDirectives : Array<any> ;
var routerInjectables : List<any> ;
var routerInjectables : Array<any> ;
class Route implements RouteDefinition {
@ -669,7 +669,7 @@ declare module ngRouter {
const ROUTE_DATA : OpaqueToken ;
var RouteConfig : (configs: List<RouteDefinition>) => ClassDecorator ;
var RouteConfig : (configs: Array<RouteDefinition>) => ClassDecorator ;
interface ComponentDefinition {

View File

@ -81,7 +81,7 @@ declare module ngRouter {
* ]);
* ```
*/
config(definitions: List<RouteDefinition>): Promise<any>;
config(definitions: Array<RouteDefinition>): Promise<any>;
/**
@ -135,7 +135,7 @@ declare module ngRouter {
* 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;
generate(linkParams: Array<any>): Instruction;
}
class RootRouter extends Router {
@ -258,7 +258,7 @@ declare module ngRouter {
* 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;
generate(linkParams: Array<any>, parentComponent: any): Instruction;
}
class LocationStrategy {
@ -343,7 +343,7 @@ declare module ngRouter {
*/
class Pipeline {
steps: List<Function>;
steps: Array<Function>;
process(instruction: Instruction): Promise<any>;
}
@ -547,7 +547,7 @@ declare module ngRouter {
urlPath: string;
urlParams: List<string>;
urlParams: Array<string>;
params: StringMap<string, any>;
@ -568,7 +568,7 @@ declare module ngRouter {
child: Url;
auxiliary: List<Url>;
auxiliary: Array<Url>;
params: StringMap<string, any>;
@ -596,9 +596,9 @@ declare module ngRouter {
const ROUTE_DATA : OpaqueToken ;
const ROUTER_DIRECTIVES : List<any> ;
const ROUTER_DIRECTIVES : Array<any> ;
const ROUTER_BINDINGS : List<any> ;
const ROUTER_BINDINGS : Array<any> ;
class Route implements RouteDefinition {
@ -669,7 +669,7 @@ declare module ngRouter {
data?: any;
}
var RouteConfig : (configs: List<RouteDefinition>) => ClassDecorator ;
var RouteConfig : (configs: Array<RouteDefinition>) => ClassDecorator ;
interface ComponentDefinition {

738
angular2/router-2.0.0-alpha.37.d.ts vendored Normal file
View File

@ -0,0 +1,738 @@
// Type definitions for Angular v2.0.0-alpha.37
// 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;
/**
* Constructs a child router. You probably don't need to use this unless you're writing a reusable
* component.
*/
auxRouter(hostComponent: any): Router;
/**
* Register an outlet to notified of primary route changes.
*
* You probably don't need to use this unless you're writing a reusable component.
*/
registerPrimaryOutlet(outlet: RouterOutlet): Promise<boolean>;
/**
* Register an outlet to notified of auxiliary route changes.
*
* You probably don't need to use this unless you're writing a reusable component.
*/
registerAuxOutlet(outlet: RouterOutlet): Promise<boolean>;
/**
* Given an instruction, returns `true` if the instruction is currently active,
* otherwise `false`.
*/
isRouteActive(instruction: Instruction): boolean;
/**
* Dynamically update the routing configuration and trigger a navigation.
*
* # Usage
*
* ```
* router.config([
* { 'path': '/', 'component': IndexComp },
* { 'path': '/user/:id', 'component': UserComp },
* ]);
* ```
*/
config(definitions: 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: 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 {
name: string;
/**
* Called by the Router to instantiate a new component during the commit phase of a navigation.
* This method in turn is responsible for calling the `onActivate` hook of its child.
*/
activate(nextInstruction: ComponentInstruction): Promise<any>;
/**
* Called by the {@link Router} during the commit phase of a navigation when an outlet
* reuses a component between different routes.
* This method in turn is responsible for calling the `onReuse` hook of its child.
*/
reuse(nextInstruction: ComponentInstruction): Promise<any>;
/**
* Called by the {@link Router} when an outlet reuses a component across navigations.
* This method in turn is responsible for calling the `onReuse` hook of its child.
*/
deactivate(nextInstruction: ComponentInstruction): Promise<any>;
/**
* Called by the {@link Router} during recognition phase of a navigation.
*
* If this resolves to `false`, the given navigation is cancelled.
*
* This method delegates to the child component's `canDeactivate` hook if it exists,
* and otherwise resolves to true.
*/
canDeactivate(nextInstruction: ComponentInstruction): Promise<boolean>;
/**
* Called by the {@link Router} during recognition phase of a navigation.
*
* If the new child component has a different Type than the existing child component,
* this will resolve to `false`. You can't reuse an old component when the new component
* is of a different Type.
*
* Otherwise, this method delegates to the child component's `canReuse` hook if it exists,
* or resolves to true if the hook is not present.
*/
canReuse(nextInstruction: ComponentInstruction): Promise<boolean>;
}
/**
* 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;
isRouteActive: boolean;
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: 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 {
platformStrategy: LocationStrategy;
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: 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}.
*
* `ComponentInstruction`s are [https://en.wikipedia.org/wiki/Hash_consing](hash consed). You should
* never construct one yourself with "new." Instead, rely on {@link PathRecognizer} to construct
* `ComponentInstruction`s.
*
* You should not modify this object. It should be treated as immutable.
*/
class ComponentInstruction {
reuse: boolean;
urlPath: string;
urlParams: string[];
params: StringMap<string, any>;
componentType: any;
resolveComponentType(): Promise<ng.Type>;
specificity: any;
terminal: any;
routeData(): Object;
}
/**
* This class represents a parsed URL
*/
class Url {
path: string;
child: Url;
auxiliary: Url[];
params: StringMap<string, any>;
toString(): string;
segmentToString(): string;
}
class OpaqueToken {
toString(): string;
}
const ROUTE_DATA : OpaqueToken ;
const ROUTER_DIRECTIVES : any[] ;
const ROUTER_BINDINGS : any[] ;
class Route implements RouteDefinition {
data: any;
path: string;
component: ng.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: ng.Type;
as: string;
loader: Function;
redirectTo: string;
}
class AsyncRoute implements RouteDefinition {
data: any;
path: string;
loader: Function;
as: string;
}
interface RouteDefinition {
path: string;
component?: ng.Type | ComponentDefinition;
loader?: Function;
redirectTo?: string;
as?: string;
data?: any;
}
var RouteConfig : (configs: RouteDefinition[]) => ClassDecorator ;
interface ComponentDefinition {
type: string;
loader?: Function;
component?: ng.Type;
}
}
declare module "angular2/router" {
export = ngRouter;
}

505
angular2/router.d.ts vendored
View File

@ -1,4 +1,4 @@
// Type definitions for Angular v2.0.0-alpha.36
// Type definitions for Angular v2.0.0-alpha.37
// Project: http://angular.io/
// Definitions by: angular team <https://github.com/angular/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@ -28,52 +28,75 @@ 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.
* Constructs a child router. You probably don't need to use this unless you're writing a reusable
* component.
*/
registerOutlet(outlet: RouterOutlet): Promise<boolean>;
auxRouter(hostComponent: any): Router;
/**
* Register an outlet to notified of primary route changes.
*
* You probably don't need to use this unless you're writing a reusable component.
*/
registerPrimaryOutlet(outlet: RouterOutlet): Promise<boolean>;
/**
* Register an outlet to notified of auxiliary route changes.
*
* You probably don't need to use this unless you're writing a reusable component.
*/
registerAuxOutlet(outlet: RouterOutlet): Promise<boolean>;
/**
* Given an instruction, returns `true` if the instruction is currently active,
* otherwise `false`.
*/
isRouteActive(instruction: Instruction): boolean;
/**
* Dynamically update the routing configuration and trigger a navigation.
*
*
* # Usage
*
*
* ```
* router.config([
* { 'path': '/', 'component': IndexComp },
@ -81,129 +104,153 @@ declare module ngRouter {
* ]);
* ```
*/
config(definitions: List<RouteDefinition>): Promise<any>;
config(definitions: 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;
generate(linkParams: 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.
* Called by the Router to instantiate a new component during the commit phase of a navigation.
* This method in turn is responsible for calling the `onActivate` hook of its child.
*/
commit(instruction: Instruction): Promise<any>;
activate(nextInstruction: ComponentInstruction): Promise<any>;
/**
* Called by Router during recognition phase
* Called by the {@link Router} during the commit phase of a navigation when an outlet
* reuses a component between different routes.
* This method in turn is responsible for calling the `onReuse` hook of its child.
*/
canDeactivate(nextInstruction: Instruction): Promise<boolean>;
reuse(nextInstruction: ComponentInstruction): Promise<any>;
/**
* Called by Router during recognition phase
* Called by the {@link Router} when an outlet reuses a component across navigations.
* This method in turn is responsible for calling the `onReuse` hook of its child.
*/
canReuse(nextInstruction: Instruction): Promise<boolean>;
deactivate(nextInstruction: Instruction): Promise<any>;
deactivate(nextInstruction: ComponentInstruction): Promise<any>;
/**
* Called by the {@link Router} during recognition phase of a navigation.
*
* If this resolves to `false`, the given navigation is cancelled.
*
* This method delegates to the child component's `canDeactivate` hook if it exists,
* and otherwise resolves to true.
*/
canDeactivate(nextInstruction: ComponentInstruction): Promise<boolean>;
/**
* Called by the {@link Router} during recognition phase of a navigation.
*
* If the new child component has a different Type than the existing child component,
* this will resolve to `false`. You can't reuse an old component when the new component
* is of a different Type.
*
* Otherwise, this method delegates to the child component's `canReuse` hook if it exists,
* or resolves to true if the hook is not present.
*/
canReuse(nextInstruction: ComponentInstruction): Promise<boolean>;
}
/**
* 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
@ -211,21 +258,23 @@ declare module ngRouter {
* current component's parent.
*/
class RouterLink {
visibleHref: string;
isRouteActive: boolean;
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.
@ -233,83 +282,83 @@ declare module ngRouter {
* 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;
generate(linkParams: 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:
@ -318,47 +367,49 @@ declare module ngRouter {
* - `/my/app/user/123/` **is not** normalized
*/
class Location {
platformStrategy: LocationStrategy;
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>;
steps: 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({
@ -372,17 +423,17 @@ declare module ngRouter {
* ```
*/
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({
@ -392,7 +443,7 @@ declare module ngRouter {
* canReuse() {
* return true;
* }
*
*
* onReuse(next, prev) {
* this.params = next.params;
* }
@ -400,18 +451,18 @@ declare module ngRouter {
* ```
*/
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({
@ -421,7 +472,7 @@ declare module ngRouter {
* canReuse() {
* return true;
* }
*
*
* onReuse(next, prev) {
* this.params = next.params;
* }
@ -429,19 +480,19 @@ declare module ngRouter {
* ```
*/
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({
@ -455,19 +506,19 @@ declare module ngRouter {
* ```
*/
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({
@ -477,7 +528,7 @@ declare module ngRouter {
* canReuse(next, prev) {
* return next.params.id == prev.params.id;
* }
*
*
* onReuse(next, prev) {
* this.id = next.params.id;
* }
@ -485,22 +536,22 @@ declare module ngRouter {
* ```
*/
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({
@ -514,172 +565,170 @@ declare module ngRouter {
*/
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}.
*
* `ComponentInstruction`s are [https://en.wikipedia.org/wiki/Hash_consing](hash consed). You should
* never construct one yourself with "new." Instead, rely on {@link PathRecognizer} to construct
* `ComponentInstruction`s.
*
* You should not modify this object. It should be treated as immutable.
*/
class ComponentInstruction {
reuse: boolean;
urlPath: string;
urlParams: List<string>;
urlParams: string[];
params: StringMap<string, any>;
componentType: any;
resolveComponentType(): Promise<Type>;
resolveComponentType(): Promise<ng.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.
* This class represents a parsed URL
*/
interface Type extends Function {
new(args: any): any;
class Url {
path: string;
child: Url;
auxiliary: Url[];
params: StringMap<string, any>;
toString(): string;
segmentToString(): string;
}
class OpaqueToken {
toString(): string;
}
const ROUTE_DATA : OpaqueToken ;
const ROUTER_DIRECTIVES : List<any> ;
const ROUTER_BINDINGS : List<any> ;
const ROUTER_DIRECTIVES : any[] ;
const ROUTER_BINDINGS : any[] ;
class Route implements RouteDefinition {
data: any;
path: string;
component: Type;
component: ng.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;
component: ng.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;
component?: ng.Type | ComponentDefinition;
loader?: Function;
redirectTo?: string;
as?: string;
data?: any;
}
var RouteConfig : (configs: List<RouteDefinition>) => ClassDecorator ;
var RouteConfig : (configs: RouteDefinition[]) => ClassDecorator ;
interface ComponentDefinition {
type: string;
loader?: Function;
component?: Type;
component?: ng.Type;
}
}
declare module "angular2/router" {

View File

@ -16,7 +16,7 @@ declare module ngtoaster {
error(params: IPopParams): void
error(title?:string, body?:string, timeout?:number, bodyOutputType?:string, clickHandler?:EventListener,
toasterId?:number): void
into(params: IPopParams): void
info(params: IPopParams): void
info(title?:string, body?:string, timeout?:number, bodyOutputType?:string, clickHandler?:EventListener,
toasterId?:number): void
wait(params: IPopParams): void

View File

@ -26,15 +26,15 @@ declare module angular.animate {
* AnimateService
* see http://docs.angularjs.org/api/ngAnimate/service/$animate
*/
interface IAnimateService extends angular.IAnimateService {
interface IAnimateService {
/**
* Globally enables / disables animations.
*
* @param value If provided then set the animation on or off.
* @param element If provided then the element will be used to represent the enable/disable operation.
* @param value If provided then set the animation on or off.
* @returns current animation state
*/
enabled(value?: boolean, element?: JQuery): boolean;
enabled(element?: JQuery, value?: boolean): boolean;
/**
* Performs an inline animation on the element.

View File

@ -16,6 +16,33 @@ declare module "angular-cookies" {
*/
declare module angular.cookies {
/**
* Cookies options
* see https://docs.angularjs.org/api/ngCookies/provider/$cookiesProvider#defaults
*/
interface ICookiesOptions {
/**
* The cookie will be available only for this path and its sub-paths.
* By default, this would be the URL that appears in your base tag.
*/
path?: string;
/**
* The cookie will be available only for this domain and its sub-domains.
* For obvious security reasons the user agent will not accept the cookie if the
* current domain is not a sub domain or equals to the requested domain.
*/
domain?: string;
/**
* String of the form "Wdy, DD Mon YYYY HH:MM:SS GMT" or a Date object
* indicating the exact date/time this cookie will expire.
*/
expires?: string|Date;
/**
* The cookie will be available only in secured connection.
*/
secure?: boolean;
}
/**
* CookieService
* see http://docs.angularjs.org/api/ngCookies.$cookies
@ -31,10 +58,11 @@ declare module angular.cookies {
interface ICookiesService {
get(key: string): string;
getObject(key: string): any;
getObject<T>(key: string): T;
getAll(): any;
put(key: string, value: string, options?: any): void;
putObject(key: string, value: any, options?: any): void;
remove(key: string, options?: any): void;
put(key: string, value: string, options?: ICookiesOptions): void;
putObject(key: string, value: any, options?: ICookiesOptions): void;
remove(key: string, options?: ICookiesOptions): void;
}
/**

View File

@ -10,6 +10,11 @@ declare module "angular-mocks/ngMock" {
export = _;
}
declare module "angular-mocks/ngMockE2E" {
var _: string;
export = _;
}
declare module "angular-mocks/ngAnimateMock" {
var _: string;
export = _;

View File

@ -933,3 +933,19 @@ function NgModelControllerTyping() {
});
};
}
function ngFilterTyping() {
var $filter: angular.IFilterService;
var items: string[];
$filter("name")(items, "test");
$filter("name")(items, {name: "test"});
$filter("name")(items, (val, index, array) => {
return array;
});
$filter("name")(items, (val, index, array) => {
return array;
}, (actual, expected) => {
return actual == expected;
});
}

175
angularjs/angular.d.ts vendored
View File

@ -782,7 +782,23 @@ declare module angular {
*
* @param name Name of the filter function to retrieve
*/
(name: string): Function;
(name: string): IFilterFunc;
}
interface IFilterFunc {
<T>(array: T[], expression: string | IFilterPatternObject | IFilterPredicateFunc<T>, comparator?: IFilterComparatorFunc<T>|boolean): T[];
}
interface IFilterPatternObject {
[name: string]: string;
}
interface IFilterPredicateFunc<T> {
(value: T, index: number, array: T[]): T[];
}
interface IFilterComparatorFunc<T> {
(actual: T, expected: T): boolean;
}
/**
@ -1230,8 +1246,9 @@ declare module angular {
///////////////////////////////////////////////////////////////////////////
interface IControllerService {
// Although the documentation doesn't state this, locals are optional
(controllerConstructor: Function, locals?: any, bindToController?: any): any;
(controllerName: string, locals?: any, bindToController?: any): any;
<T>(controllerConstructor: new (...args: any[]) => T, locals?: any, bindToController?: any): T;
<T>(controllerConstructor: Function, locals?: any, bindToController?: any): T;
<T>(controllerName: string, locals?: any, bindToController?: any): T;
}
interface IControllerProvider extends IServiceProvider {
@ -1312,51 +1329,25 @@ declare module angular {
/**
* Runtime equivalent of the $httpProvider.defaults property. Allows configuration of default headers, withCredentials as well as request and response transformations.
*/
defaults: IRequestConfig;
defaults: IHttpProviderDefaults;
/**
* Array of config objects for currently pending requests. This is primarily meant to be used for debugging purposes.
*/
pendingRequests: any[];
pendingRequests: IRequestConfig[];
}
/**
* Object describing the request to be made and how it should be processed.
* see http://docs.angularjs.org/api/ng/service/$http#usage
*/
interface IRequestShortcutConfig {
interface IRequestShortcutConfig extends IHttpProviderDefaults {
/**
* {Object.<string|Object>}
* Map of strings or objects which will be turned to ?key1=value1&key2=value2 after the url. If the value is not a string, it will be JSONified.
*/
params?: any;
/**
* Map of strings or functions which return strings representing HTTP headers to send to the server. If the return value of a function is null, the header will not be sent.
*/
headers?: any;
/**
* Name of HTTP header to populate with the XSRF token.
*/
xsrfHeaderName?: string;
/**
* Name of cookie containing the XSRF token.
*/
xsrfCookieName?: string;
/**
* {boolean|Cache}
* If true, a default $http cache will be used to cache the GET request, otherwise if a cache instance built with $cacheFactory, this cache will be used for caching.
*/
cache?: any;
/**
* whether to to set the withCredentials flag on the XHR object. See [requests with credentials]https://developer.mozilla.org/en/http_access_control#section_5 for more information.
*/
withCredentials?: boolean;
/**
* {string|Object}
* Data to be sent as the request message data.
@ -1364,25 +1355,12 @@ declare module angular {
data?: any;
/**
* {function(data, headersGetter)|Array.<function(data, headersGetter)>}
* Transform function or an array of such functions. The transform function takes the http request body and headers and returns its transformed (typically serialized) version.
*/
transformRequest?: any;
/**
* {function(data, headersGetter)|Array.<function(data, headersGetter)>}
* Transform function or an array of such functions. The transform function takes the http response body and headers and returns its transformed (typically deserialized) version.
*/
transformResponse?: any;
/**
* {number|Promise}
* Timeout in milliseconds, or promise that should abort the request when resolved.
*/
timeout?: any;
timeout?: number|IPromise<any>;
/**
* See requestType.
* See [XMLHttpRequest.responseType]https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#xmlhttprequest-responsetype
*/
responseType?: string;
}
@ -1425,31 +1403,98 @@ declare module angular {
then<TResult>(successCallback: (response: IHttpPromiseCallbackArg<T>) => IPromise<TResult>|TResult, errorCallback?: (response: IHttpPromiseCallbackArg<any>) => any): IPromise<TResult>;
}
// See the jsdoc for transformData() at https://github.com/angular/angular.js/blob/master/src/ng/http.js#L228
interface IHttpResquestTransformer {
(data: any, headersGetter: IHttpHeadersGetter): any;
}
// The definition of fields are the same as IHttpPromiseCallbackArg
interface IHttpResponseTransformer {
(data: any, headersGetter: IHttpHeadersGetter, status: number): any;
}
interface IHttpRequestConfigHeaders {
[requestType: string]: string|(() => string);
common?: string|(() => string);
get?: string|(() => string);
post?: string|(() => string);
put?: string|(() => string);
patch?: string|(() => string);
}
/**
* Object that controls the defaults for $http provider
* Object that controls the defaults for $http provider. Not all fields of IRequestShortcutConfig can be configured
* via defaults and the docs do not say which. The following is based on the inspection of the source code.
* https://docs.angularjs.org/api/ng/service/$http#defaults
* https://docs.angularjs.org/api/ng/service/$http#usage
* https://docs.angularjs.org/api/ng/provider/$httpProvider The properties section
*/
interface IHttpProviderDefaults {
cache?: boolean;
/**
* {boolean|Cache}
* If true, a default $http cache will be used to cache the GET request, otherwise if a cache instance built with $cacheFactory, this cache will be used for caching.
*/
cache?: any;
/**
* Transform function or an array of such functions. The transform function takes the http request body and
* headers and returns its transformed (typically serialized) version.
* @see {@link https://docs.angularjs.org/api/ng/service/$http#transforming-requests-and-responses}
*/
transformRequest?: ((data: any, headersGetter?: any) => any)|((data: any, headersGetter?: any) => any)[];
xsrfCookieName?: string;
transformRequest?: IHttpResquestTransformer |IHttpResquestTransformer[];
/**
* Transform function or an array of such functions. The transform function takes the http response body and
* headers and returns its transformed (typically deserialized) version.
*/
transformResponse?: IHttpResponseTransformer | IHttpResponseTransformer[];
/**
* Map of strings or functions which return strings representing HTTP headers to send to the server. If the
* return value of a function is null, the header will not be sent.
* The key of the map is the request verb in lower case. The "common" key applies to all requests.
* @see {@link https://docs.angularjs.org/api/ng/service/$http#setting-http-headers}
*/
headers?: IHttpRequestConfigHeaders;
/** Name of HTTP header to populate with the XSRF token. */
xsrfHeaderName?: string;
/** Name of cookie containing the XSRF token. */
xsrfCookieName?: string;
/**
* whether to to set the withCredentials flag on the XHR object. See [requests with credentials]https://developer.mozilla.org/en/http_access_control#section_5 for more information.
*/
withCredentials?: boolean;
headers?: {
common?: any;
post?: any;
put?: any;
patch?: any;
}
/**
* A function used to the prepare string representation of request parameters (specified as an object). If
* specified as string, it is interpreted as a function registered with the $injector. Defaults to
* $httpParamSerializer.
*/
paramSerializer?: string | ((obj: any) => string);
}
interface IHttpInterceptor {
request?: (config: IRequestConfig) => IRequestConfig|IPromise<IRequestConfig>;
requestError?: (rejection: any) => any;
response?: <T>(response: IHttpPromiseCallbackArg<T>) => IPromise<T>|T;
responseError?: (rejection: any) => any;
}
interface IHttpInterceptorFactory {
(...args: any[]): IHttpInterceptor;
}
interface IHttpProvider extends IServiceProvider {
defaults: IHttpProviderDefaults;
interceptors: any[];
/**
* Register service factories (names or implementations) for interceptors which are called before and after
* each request.
*/
interceptors: (string|IHttpInterceptorFactory|(string|IHttpInterceptorFactory)[])[];
useApplyAsync(): boolean;
useApplyAsync(value: boolean): IHttpProvider;
@ -1669,18 +1714,6 @@ declare module angular {
inheritedData(key?: string): any;
}
///////////////////////////////////////////////////////////////////////
// AnimateService
// see http://docs.angularjs.org/api/ng.$animate
///////////////////////////////////////////////////////////////////////
interface IAnimateService {
addClass(element: JQuery, className: string, done?: Function): IPromise<any>;
enter(element: JQuery, parent: JQuery, after: JQuery, done?: Function): void;
leave(element: JQuery, done?: Function): void;
move(element: JQuery, parent: JQuery, after: JQuery, done?: Function): void;
removeClass(element: JQuery, className: string, done?: Function): void;
}
///////////////////////////////////////////////////////////////////////////
// AUTO module (angular.js)
///////////////////////////////////////////////////////////////////////////
@ -1693,7 +1726,7 @@ declare module angular {
interface IInjectorService {
annotate(fn: Function): string[];
annotate(inlineAnnotatedFunction: any[]): string[];
get<T>(name: string): T;
get<T>(name: string, caller?: string): T;
has(name: string): boolean;
instantiate<T>(typeConstructor: Function, locals?: any): T;
invoke(inlineAnnotatedFunction: any[]): any;

View File

@ -3,7 +3,7 @@
module Analytics {
angular.module("angulartics.app", ["angulartics"])
.config(["$analyticsProvider", ($analyticsProvider: Angulartics.IAnalyticsServiceProvider) => {
.config(["$analyticsProvider", ($analyticsProvider:angulartics.IAnalyticsServiceProvider) => {
angulartics.waitForVendorApi("location", 1000, (message: string) => {
console.log(message);
});
@ -17,9 +17,10 @@ module Analytics {
console.log(action);
});
$analyticsProvider.registerPageTrack((path: string, locationObj: ng.ILocationService) => {
$analyticsProvider.registerPageTrack((path:string, locationObj:angular.ILocationService) => {
console.log("viewed " + path);
});
$analyticsProvider.settings.pageTracking.basePath = "/my/base/path";
}]);
}

View File

@ -4,16 +4,15 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts" />
declare module angulartics {
interface Angulartics {
waitForVendorApi(objectName: string, delay: number, containsField?: any, registerFn?: any, onTimeout?: boolean): void;
}
declare module Angulartics {
interface IAngularticsStatic {
waitForVendorApi(objectName:string, delay:number, containsField?:any, registerFn?:any, onTimeout?:boolean): void;
}
interface IAnalyticsService {
eventTrack(eventName: string, properties?: any): any;
pageTrack(path: string, location?: ng.ILocationService): any;
pageTrack(path:string, location?:angular.ILocationService): any;
setAlias(alias: string): any;
setUsername(username: string): any;
setUserProperties(properties: any): any;
@ -27,13 +26,23 @@ declare module Angulartics {
withAutoBase(value: boolean): void;
developerMode(value: boolean): void;
registerPageTrack(callback: (path: string, location?: ng.ILocationService) => any): void;
registerPageTrack(callback:(path:string, location?:angular.ILocationService) => any): void;
registerEventTrack(callback: (eventName: string, properties?: any) => any): void;
registerSetAlias(callback: (alias: string) => any): void
registerSetUsername(callback: (username: string) => any): void
registerSetUserProperties(callback: (userProperties: any) => any): void
registerSetSuperProperties(callback: (superProperties: any) => any): void
settings: {
pageTracking: {
autoTrackingVirtualPages: boolean,
autoTrackingFirstPage: boolean,
basePath: string,
autoBasePath: boolean
},
developerMode: boolean
}
}
}
declare var angulartics:Angulartics;
declare var angulartics:angulartics.IAngularticsStatic;

21
appletvjs/README.md Normal file
View File

@ -0,0 +1,21 @@
# AppleTVJS Definitions Usage Notes
## Referencing AppleTVJS definition files in your code
To do that, simply add `/// <reference path="appletvjs.d.ts" />` at the top of your code.
This will allow you to have intellisense in your AppleTVJS typescript code.
## Global objects
AppleTVJS has a global App object instance that is your entry point into the javascript app. There is also a Device and navigationDocument object that is in the global context. To access any of these simply use them in your TypeScript code as so. They have aliases in the type definition file for your convenience.
## The AppleTVJS namespace
All non global objects have interfaces in the AppleTVJS type definition file are contained in the AppleTVJS namespace.
To use them simple provide the namespace like so:
```ts
var keyboard: AppleTVJS.Keyboard = textfield.getFeature('Keyboard');
```

View File

@ -0,0 +1,215 @@
/// <reference path="appletvjs.d.ts" />
//test the global app events and functions
function test_AppEvents() {
App.onError = function (options: any) {
//do something
}
App.onExit = function (options: any) {
//do something
}
App.onLaunch = function (options: any) {
//do something
}
App.reload({ someProperty: 'Testing...' });
}
//test the global device object properties
function test_DeviceProperties() {
var appIdentifier = Device.appIdentifier;
var appVersion = Device.appVersion;
var model = Device.model;
var productType = Device.productType;
var systemVersion = Device.systemVersion;
var vendorIdentifier = Device.vendorIdentifier;
}
function test_FeatureElement() {
var parser = new DOMParser();
var document = parser.parseFromString('<menuBar id="menuBar"></menuBar><textField id="textField"></textField>', "application/xml");
var textField = document.getElementById("textField");
textField.addEventListener("change", function() {
change.call(this, textField);
});
var change = function (textField: AppleTVJS.FeatureElement){
var keyboard: AppleTVJS.Keyboard = textField.getFeature('Keyboard');
var text = keyboard.text;
};
var menuBar = document.getElementById("menuBar");
textField.addEventListener("change", function() {
change.call(this, textField);
});
var select = function (menuBar: AppleTVJS.FeatureElement) {
var menuBarDocument: AppleTVJS.MenuBarDocument = menuBar.getFeature('MenuBarDocument');
var document = menuBarDocument.getDocument(menuBar);
menuBarDocument.setDocument(document, menuBar);
menuBarDocument.setSelectedItem(menuBar);
};
}
function test_MediaItem() {
var mediaItem = new AppleTVJS.MediaItem('video', 'http://www.vidme.com/abc123');
mediaItem.artworkImageURL = "http://google.com/artwork.png";
mediaItem.contentRatingDomain = "movie";
mediaItem.contentRatingRanking = 1;
mediaItem.description = "Media Item";
var highlight = new AppleTVJS.Highlight();
highlight.description = "Highlight";
highlight.duration = 10;
highlight.imageURL = "http://google.com/img.png";
highlight.name = "Name of Highlight";
highlight.starttime = 10;
var highlightGroup = new AppleTVJS.HighlightGroup();
highlightGroup.name = "Highlight Group";
highlightGroup.hightlights.push(highlight);
mediaItem.highlightGroups.push(highlightGroup);
var interstitial = new AppleTVJS.Interstitial();
interstitial.duration = 10;
interstitial.starttime = 20;
mediaItem.interstitials.push(interstitial);
mediaItem.isExplicit = false;
mediaItem.resumeTime = 0;
mediaItem.subtitle = "Subtitle";
var loadAssetIDCallback = function (assetID: string, error: string) {
//do something
};
mediaItem.loadAssetID = function (url: string, loadAssetIDCallback: (assetID: string, error: string) => void) {
//do something
};
var loadCertificateCallback = function (certificate: string, error: string) {
//do something
};
mediaItem.loadCertificate = function (url: string, loadCertificateCallback: (certificate: string, error: string) => void) {
//do something
};
var loadKeyCallback = function (key: string, renewalDate: string, error: string) {
//do something
};
mediaItem.loadKey = function (url: string, loadKeyCallback: (key: string, renewalDate: string, error: string) => void) {
//do something
};
}
//test the global navigation document object
function test_navigationDocument() {
var parser = new DOMParser();
var document = parser.parseFromString('<document></document>', "application/xml");
var documents = navigationDocument.documents;
navigationDocument.clear();
navigationDocument.dismissModal();
navigationDocument.insertBeforeDocument(document);
navigationDocument.insertBeforeDocument(document, document);
navigationDocument.popDocument();
navigationDocument.popToDocument(document);
navigationDocument.popToRootDocument();
navigationDocument.presentModal(document);
navigationDocument.pushDocument(document);
navigationDocument.removeDocument(document);
navigationDocument.replaceDocument(document, document);
}
function test_Player() {
var playlist = new AppleTVJS.Playlist();
var mediaItem = new AppleTVJS.MediaItem('audio');
playlist.push(mediaItem);
playlist.pop();
var result: AppleTVJS.MediaItem[] = playlist.splice(0, 1, mediaItem);
var length: number = playlist.length;
var player = new AppleTVJS.Player();
player.playlist = playlist;
var parser = new DOMParser();
var document = parser.parseFromString('<document></document>', "application/xml");
player.overlayDocument = document;
player.present();
player.pause();
player.play();
var playbackState: string = player.playbackState;
player.seekToTime(10);
player.setPlaybackRate(2);
player.stop();
var currentMediaItem: AppleTVJS.MediaItem = player.currentMediaItem;
var nextMediaItem: AppleTVJS.MediaItem = player.nextMediaItem;
var previousMediaItem: AppleTVJS.MediaItem = player.previousMediaItem;
player.mediaItemDidChange = function (reason: string) {
//do something
};
player.requestSeekToTime = function (result) {
//do something
};
player.shouldHandleStateChange = function (result: boolean) {
//do something
};
player.stateDidChange = function (){
//do something
};
player.stateWillChange = function (){
//do something
};
player.timeBoundaryDidCross = function (){
//do something
};
player.timeDidChange = function (){
//do something
};
player.timedMetadata = function (){
//do something
};
}
//test the global settings object
function test_Settings() {
var language = Settings.language;
Settings.onRestrictionsChange = function () {
//do something
}
var restrictions = Settings.restrictions;
var allowsExplicit = restrictions.allowsExplicit;
var maxMovieRank = restrictions.maxMovieRank;
var maxMovieRatingForCountry = restrictions.maxMovieRatingForCountry('US');;
var allowsExplmaxTVShowRankicit = restrictions.maxTVShowRank;
var maxTVShowRatingForCountry = restrictions.maxTVShowRatingForCountry('US');
var storeFrontCountryCode = Settings.storefrontCountryCode;
}
function test_TVError() {
var tvError = new AppleTVJS.TVError();
tvError.code = "404";
tvError.description = "Not found";
tvError.domain = "NSMachErrorDomain";
}

439
appletvjs/appletvjs.d.ts vendored Normal file
View File

@ -0,0 +1,439 @@
// Type definitions for AppleTVJS
// Project: https://developer.apple.com/library/prerelease/tvos/documentation/TVMLJS/Reference/TVJSFrameworkReference/index.html
// Definitions by: Adam Valverde <https://github.com/brainded>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare var App: AppleTVJS.App;
declare var Device: AppleTVJS.Device;
declare var navigationDocument: AppleTVJS.NavigationDocument;
declare var Settings: AppleTVJS.Settings;
declare function evaluateScripts(scripts: string[], complete: (success: boolean) => void): void;
declare module AppleTVJS {
interface App {
/**
* The onError attribute is used to handle any errors sent from the device.
* This attribute must be set to a function that accepts an options argument.
* For example App.onError = function (options) {}.
* */
onError: (options: any) => void;
/**
* The onExit attribute is used to complete any actions that need to be cleaned
* up when the app has been exited. This attribute must be set to a function that
* accepts an options argument. For example App.onExit = function (options) {}.
* */
onExit: (options: any) => void;
/**
* The onLaunch attribute is used to start any required actions when the app
* launches. This attribute must be set to a function that accepts an options
* argument. For example App.onLaunch = function (options) {}.
* */
onLaunch: (options: any) => void;
/**
* This function reloads the initial JavaScript file without quitting the app.
* The optional reloadData parameter provides developers with a way to capture
* and restart the app in its current state. If the reloadData parameter is not
* present, the app is restarted in its initial state. This attribute must be set
* to a function that accepts an options argument.
* For example App.onError = function (options) {}.
* */
reload(options?: any, reloadData?: any): void;
}
interface Device {
/** The unique identifier for the app. */
appIdentifier: string;
/** The current app version. */
appVersion: string;
/** A string that identifies the device model. */
model: string;
/** The version of the product installed on the device. */
productType: string;
/** The operating system on the device. */
systemVersion: string;
/** The UUID of the device. */
vendorIdentifier: string;
}
interface FeatureElement extends Element {
/** Gets a feature for a given element. */
getFeature(feature: string): any;
}
class Highlight {
/** The name of the highlight. */
name: string;
/** The description of the highlight. */
description: string;
/** The starttime of the highlight. */
starttime: number;
/** The duration of the highlight. */
duration: number;
/** The imageURL of the highlight. */
imageURL: string;
}
class HighlightGroup {
/** The name of the highlight group. */
name: string;
/** The hightlights in the highlight group. */
hightlights: Highlight[];
}
class Interstitial {
/** The starttime of the interstitial. */
starttime: number;
/** The duration of the interstitial. */
duration: number;
}
interface Keyboard {
/** The text inside of a searchField or textField element. */
text: string;
/**
* A callback function that is called when the text inside
* of searchField or textField element changes.
* */
onTextChange: () => void;
}
class MediaItem {
/**
* Creates a new MediaItem object from the information stored in the URL location.
* @type: Valid values are: audio, video. Defaults to video.
* @url: The URL pointing to the media item information.
* */
constructor(type: string, url?: string);
/**
* The domain that the rating applies to.
* There are three valid values for this property: movie, music, and tvshow.
* */
contentRatingDomain: string;
/**
* The rating for a video item.
* The rating is a value from 0-1000. This value corresponds to a specific rating
* used by different countries. For example, a rating value can represent a PG-13
* rating in the United State and a MA15+ in Australia.
* */
contentRatingRanking: number;
/**
* A value indicating whether the item has explicit lyrics.
* This property is ignored if the MediaItem object type is video.
* */
isExplicit: boolean;
/** The URL path to the artwork that accompanies the media item. */
artworkImageURL: string;
/** The description for a media item. */
description: string;
/** The subtitle for a the media item. */
subtitle: string;
/** The title of the media item. */
title: string;
/**
* The type of media item.
* The valid values for this attribute are audio and video.
* */
type: string;
/** The URL path to the media item. */
url: string;
/** An array of highlightGroup objects. */
highlightGroups: HighlightGroup[];
/** An array of interstitial objects. */
interstitials: Interstitial[];
/**
* The number, in seconds, that a media item starts playing at.
* Use this to begin playing a MediaItem object at a time other than
* at the beginning of the object. If this property contains anything
* other than 0, the player displays Resume instead of
* Play from beginning on playback.
* */
resumeTime: number;
/** A callback function used to load the asset identifier for an item. */
loadAssetID: (url: string, callback: (assetID: string, error: string) => void) => void;
/** A callback function used to load the security certificate for an item. */
loadCertificate: (url: string, callback: (certificate: string, error: string) => void) => void;
/** A callback function used to load the security key for an item. */
loadKey: (url: string, requestData: any, callback: (key: string, renewalDate: string, error: string) => void) => void;
}
interface MenuBarDocument {
/**
* Retrieves the document associated with the specified menu item.
* */
getDocument(menuItem: Element): Document;
/**
* Associates a document with a menu item.
* */
setDocument(document: Document, menuItem: Element): void;
/**
* Sets the focus in a menu bar to the specified menu item.
* */
setSelectedItem(menuItem: Element): void;
}
interface NavigationDocument {
/**
* Inserts a new document directly before a document currently on the stack.
* */
insertBeforeDocument(document: Document, beforeDocument?: Document): void;
/**
* This function searches the stack for the first instance of the document
* contained in the beforeDocument parameter and inserts the document contained
* in the document parameter on top of it.
* */
pushDocument(document: Document): void;
/**
* Replaces a document on the stack with a new document.
* */
replaceDocument(document: Document, beforeDocument?: Document): void;
/** Dismisses the document displayed in modal view. */
dismissModal(): void;
/**
* Displays the passed document on top of the current document.
* */
presentModal(document: Document): void;
/** The documents currently on the stack. */
documents: Document[];
/**
* Removes all documents currently on the stack.
* */
clear(): void;
/**
* Removes the top most document from the stack.
* */
popDocument(): void;
/**
* Removes all of the documents on the stack that are above the passed document.
* */
popToDocument(document: Document): void;
/**
* Removes all documents from the stack except for the bottom most document.
* */
popToRootDocument(): void;
/**
* Removes the specified document from the stack.
* */
removeDocument(document: Document): void;
}
class Player {
/** The annotations for a video created by placing a DOM document over the video. */
overlayDocument: Document;
/** The play list for a player. */
playlist: Playlist;
/** Shows the player UI if it is not currently visible. */
present(): void;
/** Pauses the currently playing media item. */
pause(): void;
/** Plays the currently selected media item. */
play(): void;
/**
* The current state of the player.
*
* This property can contain the following valid values:
* begin
* end
* loading
* playing
* paused
* scanning
* */
playbackState: string;
/** Sets the playback point to a specified time. */
seekToTime(time: number): void;
/** Sets the playback speed. */
setPlaybackRate(playbackRate: number): void;
/** Stops the currently playing item and dismisses the player UI. */
stop(): void;
/** The currently selected media item in the playlist. */
currentMediaItem: MediaItem;
/** The next media item in the playlist. */
nextMediaItem: MediaItem;
/** The previous MediaItem object in the playlist. */
previousMediaItem: MediaItem;
/**
* An event notifying the listener that the player is about to change media items.
*
* Valid values are:
* errorDidOccur
* fastForwardedToEndOfMediaItem
* mannuallyChanged
* newPlaylist
* playerInvalidated
* playedToEndOfMediaItem
* */
mediaItemDidChange: (reason: string) => void;
/**
* An event that indicates if a seek to time request was accomplished.
*
* The values for this attribute can be one of the following:
* true The seek performed as requested.
* false or null The seek was not performed.
* An integer value The seek will be performed to the stated value and not the initial requested value.
* */
requestSeekToTime: (result?: any) => void;
/** An event that indicates a state change request has occurred. */
shouldHandleStateChange: (result: boolean) => void;
/** An event that indicates the state has changed. */
stateDidChange: () => void;
/** An event that indicates the state is about to change. */
stateWillChange: () => void;
/** An event that indicates a particular playback time has been crossed. */
timeBoundaryDidCross: () => void;
/** An event that happens at a specified interval. */
timeDidChange: () => void;
/** An event that happens whenever a specified piece of metadata occurs. */
timedMetadata: () => void;
}
class Playlist {
/** Returns the MediaItem located in the indicated array index. */
item(index: number): MediaItem;
/** The number of items in the playlist. */
length: number;
/** Removes a media item from the end of a playlist. */
pop(): MediaItem;
/** Adds a media item to the end of a playlist. */
push(object: MediaItem): void;
/** Deletes the indicated array elements and replaces them with the specified elements. */
splice(index: number, howManu: number, object: MediaItem): MediaItem[];
}
interface Restrictions {
/** A boolean value that indicates if explicit media is allowed. */
allowsExplicit: boolean;
/** The maximum movie ranking allowed. */
maxMovieRank: number;
/** The maximum movie rating allowed for the specified country. */
maxMovieRatingForCountry(countryCode: string): string;
/** The maximum television show ranking allowed. */
maxTVShowRank: number
/** Sets the maximum television show rating allowed for the specified country. */
maxTVShowRatingForCountry(countryCode: string): string;
}
interface Settings {
/** Contains the restriction information on the device. */
restrictions: Restrictions;
/** Contains the language the device displays information in. */
language: string;
/** Contains the country code used by the store on this device. */
storefrontCountryCode: string;
/**
* Called when changes to a devices restriction information changes.
*/
onRestrictionsChange: () => void;
}
class TVError {
/** The error code. */
code: string;
/** A string containing the description of the error. */
description: string;
/**
* A string containing the error domain.
*
* The predefined error domains:
* NSPOSIXErrorDomain - POSIX/BSD errors
* NSOSStatusErrorDomain - OS X/Carbon errors
* NSMachErrorDomain - Mach errors
* */
domain: string;
/**
* The user info dictionary.
*
* These keys may exist in the user info dictionary:
* NSLocalizedDesciptionKey
* NSFilePathErrorKey
* NSStringEncodingErrorKey
* NSUnderlyingErrorKey
* NSURLErrorKey
* NSLocalizedFailureReasonErrorKey
* NSLocalizedRecoverySuggestionErrorKey
* NSLocalizedRecoveryOptionsErrorKey
* NSRecoveryAttempterErrorKey
* NSHelpAnchorErrorKey
* NSURLErrorFailingURLErrorKey
* NSURLErrorFailingURLStringErrorKey
* NSURLErrorFailingURLPeerTrustErrorKey
* */
userInfo: any;
}
}

14
archiver/archiver-test.ts Normal file
View File

@ -0,0 +1,14 @@
/// <reference path="archiver.d.ts" />
/// <reference path="../node/node.d.ts" />
import Archiver = require('archiver');
import FS = require('fs');
var archiver = Archiver.create('zip');
var writeStream = FS.createWriteStream('./archiver.d.ts');
var readStream = FS.createReadStream('./archiver.d.ts');
archiver.pipe(writeStream);
archiver.append(readStream, {name: 'archiver.d.ts'});
archiver.finalize();

41
archiver/archiver.d.ts vendored Normal file
View File

@ -0,0 +1,41 @@
// Type definitions for archiver v0.15.0
// Project: https://github.com/archiverjs/node-archiver
// Definitions by: Esri <https://github.com/archiverjs/node-archiver>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/* =================== USAGE ===================
import Archiver = require('archiver);
var archiver = Archiver.create('zip');
archiver.pipe(FS.createWriteStream('xxx'));
archiver.append(FS.createReadStream('xxx'));
archiver.finalize();
=============================================== */
/// <reference path="../node/node.d.ts" />
declare module "archiver" {
import * as FS from 'fs';
interface nameInterface {
name?: string;
}
interface Archiver {
pipe(writeStream: FS.WriteStream): void;
append(readStream: FS.ReadStream, name: nameInterface): void;
finalize(): void;
}
interface Options {
}
function archiver(format: string, options?: Options): Archiver;
namespace archiver {
function create(format: string, options?: Options): Archiver;
}
export = archiver;
}

View File

@ -14,4 +14,11 @@ var a2 = new AutoLaunch({
a1.enable();
a2.disable();
var enabled: boolean = a1.isEnabled();
a1.isEnabled(function(enabled: boolean) {
if (enabled) {
return;
}
a1.enable(function(err){ console.log(err.message); });
});

View File

@ -32,7 +32,7 @@ declare class AutoLaunch {
/**
* Returns if auto start up is enabled
*/
isEnabled(callback?: (err: Error) => void): boolean;
isEnabled(callback: (enabled: boolean) => void): void;
}
declare module "auto-launch" {

View File

@ -19,6 +19,7 @@ declare module Backbone {
interface NavigateOptions {
trigger?: boolean;
replace?: boolean;
}
interface RouterOptions {

View File

@ -232,7 +232,7 @@ module bardTests {
_default: $q.when([])
});
controller = $controller('MyController');
controller = $controller<MyController>('MyController');
$rootScope.$apply();
});
}
@ -264,7 +264,7 @@ module bardTests {
_default: $q.when([])
});
controller = $controller('MyController');
controller = $controller<MyController>('MyController');
$rootScope.$apply();
});

View File

@ -0,0 +1,27 @@
/// <reference path="better-curry.d.ts" />
import bc = require('better-curry');
bc.flatten([1,2,3,[1,2],['a']]) === [];
bc.MAX_OPTIMIZED = 5;
function fn(...args: number[]): number[] {
return [].concat([1]);
}
function fn2(arg1: string, arg2: any): number {
return parseInt(arg1 + String(arg2)) + 1;
}
bc.predefine(fn, [1,2])() === [];
bc.predefine(fn, [1,2]).__length === 3;
var f = bc.wrap(fn2, {}, 10, true);
f('1', 2) === 3;
var delegate = bc.delegate({}, 'ok');
delegate.access('ok') === delegate;
delegate.getter('getter').setter('setter') === delegate;
delegate.all(['1','2']);
delegate.revoke('adsf').access('asdf');
BetterCurry.wrap(fn2, {}, -1, false).__length === 10;

50
better-curry/better-curry.d.ts vendored Normal file
View File

@ -0,0 +1,50 @@
// Type definitions for better-curry
// Project: https://github.com/pocesar/js-bettercurry
// Definitions by: Paulo Cesar <https://github.com/pocesar>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare var BetterCurry: BetterCurryModule.BetterCurry;
declare module BetterCurryModule {
export interface DelegateOptions {
as?: string;
len?: number;
args?: any[];
name?: string;
}
export class Delegate<T> {
proto: T;
target: string;
methods: any[];
getters: any[];
setters: any[];
all: (skip?: string[]) => void;
method: (name: string|DelegateOptions) => Delegate<T>;
getter: (name: string|DelegateOptions) => Delegate<T>;
setter: (name: string|DelegateOptions) => Delegate<T>;
access: (name: string|DelegateOptions) => Delegate<T>;
revoke: (name: string) => Delegate<T>;
constructor(proto: T, target: string);
}
export interface OriginalFunctionReminder<T> extends Function {
__length: number;
}
export interface BetterCurry {
predefine: <T extends Function>(fn: T, args: any[], context?: Object, len?: number, checkArguments?: boolean) => OriginalFunctionReminder<T>;
wrap: <T extends Function>(fn: T, context?: Object, len?: number, checkArguments?: boolean) => OriginalFunctionReminder<T>;
flatten: (...args: Array<Array<any>|any>) => any[];
delegate: <T>(proto: T, target: string) => Delegate<T>;
MAX_OPTIMIZED: number;
}
}
declare module 'better-curry' {
var bc: BetterCurryModule.BetterCurry;
export = bc;
}

View File

@ -0,0 +1,35 @@
/// <reference path="bluebird-retry.d.ts" />
/// <reference path="../bluebird/bluebird.d.ts" />
import Promise = require('bluebird');
import retry = require('bluebird-retry');
function promiseSuccess(text:string) {
return Promise.resolve(text);
};
var count = 0;
function myfunc() {
console.log('myfunc called ' + (++count) + ' times');
if (count < 3) {
throw new Error('i fail the first two times');
} else {
return promiseSuccess('i succeed the third time');
}
}
retry(myfunc)
.done(function(result) { console.log(result); } );
//Options example
function logFail() {
console.log(new Date().toISOString());
throw new Error('bail');
}
var options:retry.Options = {
max_tries: 4,
interval: 500
};
retry(logFail, options);

24
bluebird-retry/bluebird-retry.d.ts vendored Normal file
View File

@ -0,0 +1,24 @@
// Type definitions for bluebird-retry
// Project: https://github.com/jut-io/bluebird-retry
// Definitions by: Pascal Vomhoff <https://github.com/pvomhoff>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../bluebird/bluebird.d.ts" />
declare module "bluebird-retry" {
import Promise = require('bluebird');
function retry<T>(func:(param:T)=>void, options?:retry.Options):Promise<T>;
module retry {
export interface Options {
interval?:number;
backoff?:number;
max_interval?:number;
timeout?:number;
max_tries?:number;
}
}
export = retry;
}

View File

@ -550,6 +550,13 @@ fooArrProm = fooArrProm.filter<Foo>((item: Foo) => {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
fooArrProm = fooArrProm.each<Foo, Bar>((item: Foo): Bar => bar);
fooArrProm = fooArrProm.each<Foo, Bar>((item: Foo, index: number): Bar => index ? bar : null);
fooArrProm = fooArrProm.each<Foo, Bar>((item: Foo, index: number, arrayLength: number): Bar => bar);
fooArrProm = fooArrProm.each<Foo, Bar>((item: Foo, index: number, arrayLength: number): Promise<Bar> => barProm);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
fooProm = Promise.try(() => {
return foo;
@ -1123,3 +1130,43 @@ fooArrProm = Promise.filter(fooArr, (item: Foo, index: number, arrayLength: numb
});
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// each()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// fooThenArrThen
fooArrThen = Promise.each(fooThenArrThen, (item: Foo) => bar);
fooArrThen = Promise.each(fooThenArrThen, (item: Foo) => barThen);
fooArrThen = Promise.each(fooThenArrThen, (item: Foo, index: number, arrayLength: number) => bar);
fooArrThen = Promise.each(fooThenArrThen, (item: Foo, index: number, arrayLength: number) => barThen);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// fooArrThen
fooArrThen = Promise.each(fooArrThen, (item: Foo) => bar);
fooArrThen = Promise.each(fooArrThen, (item: Foo) => barThen);
fooArrThen = Promise.each(fooArrThen, (item: Foo, index: number, arrayLength: number) => bar);
fooArrThen = Promise.each(fooArrThen, (item: Foo, index: number, arrayLength: number) => barThen);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// fooThenArr
fooArrThen = Promise.each(fooThenArr, (item: Foo) => bar);
fooArrThen = Promise.each(fooThenArr, (item: Foo) => barThen);
fooArrThen = Promise.each(fooThenArr, (item: Foo, index: number, arrayLength: number) => bar);
fooArrThen = Promise.each(fooThenArr, (item: Foo, index: number, arrayLength: number) => barThen);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// fooArr
fooArrThen = Promise.each(fooArr, (item: Foo) => bar);
fooArrThen = Promise.each(fooArr, (item: Foo) => barThen);
fooArrThen = Promise.each(fooArr, (item: Foo, index: number, arrayLength: number) => bar);
fooArrThen = Promise.each(fooArr, (item: Foo, index: number, arrayLength: number) => barThen);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -328,6 +328,11 @@ declare class Promise<R> implements Promise.Thenable<R>, Promise.Inspection<R> {
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[]>;
/**
* Same as calling ``Promise.each(thisPromise, iterator)``. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
*/
each<R, U>(iterator: (item: R, index: number, arrayLength: number) => U | Promise.Thenable<U>): Promise<R[]>;
/**
* Start the chain of promises with `Promise.try`. Any synchronous exceptions will be turned into rejections on the returned promise.
*
@ -607,6 +612,18 @@ declare class Promise<R> implements Promise.Thenable<R>, Promise.Inspection<R> {
// array with values
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[]>;
/**
* Iterate over an array, or a promise of an array, which contains promises (or a mix of promises and values) with the given iterator function with the signature (item, index, value) where item is the resolved value of a respective promise in the input array. Iteration happens serially. If any promise in the input array is rejected the returned promise is rejected as well.
*
* Resolves to the original array unmodified, this method is meant to be used for side effects. If the iterator function returns a promise or a thenable, the result for the promise is awaited for before continuing with next iteration.
*/
// promise of array with promises of value
static each<R, U>(values: Promise.Thenable<Promise.Thenable<R>[]>, iterator: (item: R, index: number, arrayLength: number) => U | Promise.Thenable<U>): Promise<R[]>;
// array with promises of value
static each<R, U>(values: Promise.Thenable<R>[], iterator: (item: R, index: number, arrayLength: number) => U | Promise.Thenable<U>): Promise<R[]>;
// array with values OR promise of array with values
static each<R, U>(values: R[] | Promise.Thenable<R[]>, iterator: (item: R, index: number, arrayLength: number) => U | Promise.Thenable<U>): Promise<R[]>;
}
declare module Promise {

View File

@ -0,0 +1,52 @@
/// <reference path="bootstrap-notify.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />
//Test for bootstrap-notify v3.1.3
//Copied example directly from Bootstrap-notify site
$.notify({
// options
icon: 'glyphicon glyphicon-warning-sign',
title: 'Bootstrap notify',
message: 'Turning standard Bootstrap alerts into "notify" like notifications',
url: 'https://github.com/mouse0270/bootstrap-notify',
target: '_blank'
},{
// settings
element: 'body',
position: null,
type: "info",
allow_dismiss: true,
newest_on_top: false,
showProgressbar: false,
placement: {
from: "top",
align: "right"
},
offset: 20,
spacing: 10,
z_index: 1031,
delay: 5000,
timer: 1000,
url_target: '_blank',
mouse_over: null,
animate: {
enter: 'animated fadeInDown',
exit: 'animated fadeOutUp'
},
onShow: null,
onShown: null,
onClose: null,
onClosed: null,
icon_type: 'class',
template: '<div data-notify="container" class="col-xs-11 col-sm-3 alert alert-{0}" role="alert">' +
'<button type="button" aria-hidden="true" class="close" data-notify="dismiss">×</button>' +
'<span data-notify="icon"></span> ' +
'<span data-notify="title">{1}</span> ' +
'<span data-notify="message">{2}</span>' +
'<div class="progress" data-notify="progressbar">' +
'<div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div>' +
'</div>' +
'<a href="{3}" target="{4}" data-notify="url"></a>' +
'</div>'
});

View File

@ -1,68 +1,62 @@
// Type definitions for bootstrap-notify
// Project: https://github.com/Nijikokun/bootstrap-notify
// Definitions by: Blake Niemyjski <https://github.com/niemyjski/>
// Type definitions for bootstrap-notify v3.1.3
// Project: http://bootstrap-notify.remabledesigns.com/
// Definitions by: Blake Niemyjski <https://github.com/niemyjski/>, Robert McIntosh <https://github.com/mouse0270>, Robert Voica <https://github.com/robert-voica>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>
/// <reference path="../jquery/jquery.d.ts" />
/* tslint:disable: interface-name no-any */
interface JQueryStatic {
/* tslint:enable: interface-name */
notify(message: string): NotifyReturn;
notify(opts: NotifyOptions, settings?: NotifySettings): NotifyReturn;
notifyDefaults(settings: NotifySettings): void;
notifyClose(): void;
notifyClose(command: string): void;
}
interface NotifyOptions {
/**
Alert style, omit alert- from style name.
@param {string} type
*/
type?: string;
/**
Allow alert to be closable through a close icon.
@param {boolean} closable
*/
closable?: boolean;
/**
Alert transition, pretty sure only fade is supported, you can try others if you wish.
@param {string} transition
*/
transition?: string;
/**
Fade alert out after a certain delay (in ms)
@param {string} fadeOut
*/
fadeOut?: NotifyFadeOutSettings;
/**
Text to show on alert, you can use either html or text. HTML will override text.
@param {MessageOptions} message
*/
message?: MessageOptions;
/**
Called before alert closes.
@param {function} onClose
*/
onClose?: () => void;
/**
Called after alert closes.
@param {function} onClosed
*/
onClosed?: () => void;
message: string;
title?: string;
icon?: string;
url?: string;
target?: string;
}
interface NotifyFadeOutSettings {
enabled?: boolean;
delay?: number;
interface NotifySettings {
element?: string;
position?: string;
type?: string;
allow_dismiss?: boolean;
allow_duplicates?: boolean;
newest_on_top?: boolean;
showProgressbar?: boolean;
placement?: {
from?: string;
align?: string;
};
offset?: number;
spacing?: number;
z_index?: number;
delay?: number;
timer?: number;
url_target?: string;
mouse_over?: string;
animate?: {
enter?: string;
exit?: string;
};
onShow?: () => void;
onShown?: () => void;
onClose?: () => void;
onClosed?: () => void;
icon_type?: string;
template?: string;
}
interface MessageOptions {
html?: string;
text?: string;
}
interface Notification {
show();
hide();
}
interface JQuery {
/**
Creates a notification instance with default options.
@constructor
@param {NotifyOptions} options
*/
notify(options: NotifyOptions): Notification;
interface NotifyReturn {
$ele: JQueryStatic;
close: () => void;
update: (command: string, update: any) => void;
}

View File

@ -137,6 +137,13 @@ interface JQueryEventObject {
value: number|ChangeValue;
}
interface SliderStatics {
new (selector: string, opts: SliderOptions): Slider;
prototype: Slider;
}
declare var Slider: SliderStatics;
/**
* This class is actually not used when using the jQuery version of bootstrap-slider
* The method documentation is still here thouh.

308
chai/chai-2.0.0.d.ts vendored Normal file
View File

@ -0,0 +1,308 @@
// Type definitions for chai 2.0.0
// Project: http://chaijs.com/
// Definitions by: Jed Mao <https://github.com/jedmao/>,
// Bart van der Schoor <https://github.com/Bartvds>,
// Andrew Brown <https://github.com/AGBrown>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module Chai {
interface ChaiStatic {
expect: ExpectStatic;
should(): Should;
/**
* Provides a way to extend the internals of Chai
*/
use(fn: (chai: any, utils: any) => void): any;
assert: AssertStatic;
config: Config;
}
export interface ExpectStatic extends AssertionStatic {
}
export interface AssertStatic extends Assert {
}
export interface AssertionStatic {
(target: any, message?: string): Assertion;
}
interface ShouldAssertion {
equal(value1: any, value2: any, message?: string): void;
Throw: ShouldThrow;
throw: ShouldThrow;
exist(value: any, message?: string): void;
}
interface Should extends ShouldAssertion {
not: ShouldAssertion;
fail(actual: any, expected: any, message?: string, operator?: string): void;
}
interface ShouldThrow {
(actual: Function): void;
(actual: Function, expected: string|RegExp, message?: string): void;
(actual: Function, constructor: Error|Function, expected?: string|RegExp, message?: string): void;
}
interface Assertion extends LanguageChains, NumericComparison, TypeComparison {
not: Assertion;
deep: Deep;
a: TypeComparison;
an: TypeComparison;
include: Include;
contain: Include;
ok: Assertion;
true: Assertion;
false: Assertion;
null: Assertion;
undefined: Assertion;
exist: Assertion;
empty: Assertion;
arguments: Assertion;
Arguments: Assertion;
equal: Equal;
equals: Equal;
eq: Equal;
eql: Equal;
eqls: Equal;
property: Property;
ownProperty: OwnProperty;
haveOwnProperty: OwnProperty;
length: Length;
lengthOf: Length;
match(regexp: RegExp|string, message?: string): Assertion;
string(string: string, message?: string): Assertion;
keys: Keys;
key(string: string): Assertion;
throw: Throw;
throws: Throw;
Throw: Throw;
respondTo(method: string, message?: string): Assertion;
itself: Assertion;
satisfy(matcher: Function, message?: string): Assertion;
closeTo(expected: number, delta: number, message?: string): Assertion;
members: Members;
}
interface LanguageChains {
to: Assertion;
be: Assertion;
been: Assertion;
is: Assertion;
that: Assertion;
which: Assertion;
and: Assertion;
has: Assertion;
have: Assertion;
with: Assertion;
at: Assertion;
of: Assertion;
same: Assertion;
}
interface NumericComparison {
above: NumberComparer;
gt: NumberComparer;
greaterThan: NumberComparer;
least: NumberComparer;
gte: NumberComparer;
below: NumberComparer;
lt: NumberComparer;
lessThan: NumberComparer;
most: NumberComparer;
lte: NumberComparer;
within(start: number, finish: number, message?: string): Assertion;
}
interface NumberComparer {
(value: number, message?: string): Assertion;
}
interface TypeComparison {
(type: string, message?: string): Assertion;
instanceof: InstanceOf;
instanceOf: InstanceOf;
}
interface InstanceOf {
(constructor: Object, message?: string): Assertion;
}
interface Deep {
equal: Equal;
include: Include;
property: Property;
}
interface Equal {
(value: any, message?: string): Assertion;
}
interface Property {
(name: string, value?: any, message?: string): Assertion;
}
interface OwnProperty {
(name: string, message?: string): Assertion;
}
interface Length extends LanguageChains, NumericComparison {
(length: number, message?: string): Assertion;
}
interface Include {
(value: Object, message?: string): Assertion;
(value: string, message?: string): Assertion;
(value: number, message?: string): Assertion;
keys: Keys;
members: Members;
}
interface Keys {
(...keys: string[]): Assertion;
(keys: any[]): Assertion;
}
interface Throw {
(): Assertion;
(expected: string, message?: string): Assertion;
(expected: RegExp, message?: string): Assertion;
(constructor: Error, expected?: string, message?: string): Assertion;
(constructor: Error, expected?: RegExp, message?: string): Assertion;
(constructor: Function, expected?: string, message?: string): Assertion;
(constructor: Function, expected?: RegExp, message?: string): Assertion;
}
interface Members {
(set: any[], message?: string): Assertion;
}
export interface Assert {
/**
* @param expression Expression to test for truthiness.
* @param message Message to display on error.
*/
(expression: any, message?: string): void;
fail(actual?: any, expected?: any, msg?: string, operator?: string): void;
ok(val: any, msg?: string): void;
notOk(val: any, msg?: string): void;
equal(act: any, exp: any, msg?: string): void;
notEqual(act: any, exp: any, msg?: string): void;
strictEqual(act: any, exp: any, msg?: string): void;
notStrictEqual(act: any, exp: any, msg?: string): void;
deepEqual(act: any, exp: any, msg?: string): void;
notDeepEqual(act: any, exp: any, msg?: string): void;
isTrue(val: any, msg?: string): void;
isFalse(val: any, msg?: string): void;
isNull(val: any, msg?: string): void;
isNotNull(val: any, msg?: string): void;
isUndefined(val: any, msg?: string): void;
isDefined(val: any, msg?: string): void;
isFunction(val: any, msg?: string): void;
isNotFunction(val: any, msg?: string): void;
isObject(val: any, msg?: string): void;
isNotObject(val: any, msg?: string): void;
isArray(val: any, msg?: string): void;
isNotArray(val: any, msg?: string): void;
isString(val: any, msg?: string): void;
isNotString(val: any, msg?: string): void;
isNumber(val: any, msg?: string): void;
isNotNumber(val: any, msg?: string): void;
isBoolean(val: any, msg?: string): void;
isNotBoolean(val: any, msg?: string): void;
typeOf(val: any, type: string, msg?: string): void;
notTypeOf(val: any, type: string, msg?: string): void;
instanceOf(val: any, type: Function, msg?: string): void;
notInstanceOf(val: any, type: Function, msg?: string): void;
include(exp: string, inc: any, msg?: string): void;
include(exp: any[], inc: any, msg?: string): void;
notInclude(exp: string, inc: any, msg?: string): void;
notInclude(exp: any[], inc: any, msg?: string): void;
match(exp: any, re: RegExp, msg?: string): void;
notMatch(exp: any, re: RegExp, msg?: string): void;
property(obj: Object, prop: string, msg?: string): void;
notProperty(obj: Object, prop: string, msg?: string): void;
deepProperty(obj: Object, prop: string, msg?: string): void;
notDeepProperty(obj: Object, prop: string, msg?: string): void;
propertyVal(obj: Object, prop: string, val: any, msg?: string): void;
propertyNotVal(obj: Object, prop: string, val: any, msg?: string): void;
deepPropertyVal(obj: Object, prop: string, val: any, msg?: string): void;
deepPropertyNotVal(obj: Object, prop: string, val: any, msg?: string): void;
lengthOf(exp: any, len: number, msg?: string): void;
//alias frenzy
throw(fn: Function, msg?: string): void;
throw(fn: Function, regExp: RegExp): void;
throw(fn: Function, errType: Function, msg?: string): void;
throw(fn: Function, errType: Function, regExp: RegExp): void;
throws(fn: Function, msg?: string): void;
throws(fn: Function, regExp: RegExp): void;
throws(fn: Function, errType: Function, msg?: string): void;
throws(fn: Function, errType: Function, regExp: RegExp): void;
Throw(fn: Function, msg?: string): void;
Throw(fn: Function, regExp: RegExp): void;
Throw(fn: Function, errType: Function, msg?: string): void;
Throw(fn: Function, errType: Function, regExp: RegExp): void;
doesNotThrow(fn: Function, msg?: string): void;
doesNotThrow(fn: Function, regExp: RegExp): void;
doesNotThrow(fn: Function, errType: Function, msg?: string): void;
doesNotThrow(fn: Function, errType: Function, regExp: RegExp): void;
operator(val: any, operator: string, val2: any, msg?: string): void;
closeTo(act: number, exp: number, delta: number, msg?: string): void;
sameMembers(set1: any[], set2: any[], msg?: string): void;
includeMembers(set1: any[], set2: any[], msg?: string): void;
ifError(val: any, msg?: string): void;
}
export interface Config {
includeStack: boolean;
}
export class AssertionError {
constructor(message: string, _props?: any, ssf?: Function);
name: string;
message: string;
showDiff: boolean;
stack: string;
}
}
declare var chai: Chai.ChaiStatic;
declare module "chai" {
export = chai;
}
interface Object {
should: Chai.Assertion;
}

View File

@ -31,6 +31,16 @@ function fail() {
err(() => {
should.fail('foo', 'bar', 'should fail', 'equal');
}, 'expected fail to throw an AssertionError');
err(() => {
expect.fail('foo', 'bar');
}, 'expected fail to throw an AssertionError');
err(() => {
expect.fail('foo', 'bar', 'should fail');
}, 'expected fail to throw an AssertionError');
err(() => {
expect.fail('foo', 'bar', 'should fail', 'equal');
}, 'expected fail to throw an AssertionError');
}
// ReSharper disable once InconsistentNaming
@ -107,11 +117,20 @@ function _undefined() {
}, 'expected \'\' to be undefined');
}
function _NaN() {
expect(NaN).to.be.NaN;
expect(12).to.be.not.NaN;
expect("NaN").to.be.not.NaN;
(NaN).should.be.NaN;
(12).should.be.not.NaN;
("NaN").should.be.not.NaN;
}
function exist() {
var foo = 'bar';
expect(foo).to.exist;
should.exist(foo);
expect(void(0)).to.not.exist;
expect(void (0)).to.not.exist;
should.not.exist(void (0));
}
@ -128,8 +147,8 @@ function argumentsTest() {
}
function equal() {
expect(undefined).to.equal(void(0));
should.equal(undefined, void(0));
expect(undefined).to.equal(void (0));
should.equal(undefined, void (0));
}
function _typeof() {
@ -372,6 +391,9 @@ function match() {
expect('foobar').to.not.match(/^bar/);
'foobar'.should.not.match(/^bar/);
expect('foobar').matches(/^foo/);
'foobar'.should.not.matches(/^bar/);
err(() => {
expect('foobar').to.match(/^bar/i, 'blah');
'foobar'.should.match(/^bar/i, 'blah');
@ -490,8 +512,8 @@ function deepEqual3() {
function deepInclude() {
expect(['foo', 'bar']).to.deep.include(['bar', 'foo']);
['foo', 'bar'].should.deep.include(['bar', 'foo']);
expect(['foo', 'bar']).not.to.deep.equal(['foo', 'baz' ]);
['foo', 'bar'].should.not.deep.equal(['foo', 'baz' ]);
expect(['foo', 'bar']).not.to.deep.equal(['foo', 'baz']);
['foo', 'bar'].should.not.deep.equal(['foo', 'baz']);
}
class FakeArgs {
@ -670,6 +692,20 @@ function ownProperty() {
}, 'blah: expected { length: 12 } to not have own property \'length\'');
}
function ownPropertyDescriptor() {
expect('test').to.have.ownPropertyDescriptor('length');
expect('test').to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 4 });
expect('test').not.to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 3 });
expect('test').to.haveOwnPropertyDescriptor('length').to.have.property('enumerable', false);
expect('test').to.haveOwnPropertyDescriptor('length').to.contain.keys('value');
'test'.should.have.ownPropertyDescriptor('length');
'test'.should.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 4 });
'test'.should.not.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 3 });
'test'.should.haveOwnPropertyDescriptor('length').to.have.property('enumerable', false);
'test'.should.haveOwnPropertyDescriptor('length').to.contain.keys('value');
}
function string() {
expect('foobar').to.have.string('bar');
'foobar'.should.have.string('bar');
@ -707,6 +743,10 @@ function include() {
['foo', 'bar'].should.not.include('baz');
expect(['foo', 'bar']).to.not.include(1);
['foo', 'bar'].should.not.include(1);
// alias
expect(['foo', 'bar']).includes('foo');
['foo', 'bar'].should.includes('foo');
err(() => {
expect(['foo']).to.include('bar', 'blah');
@ -732,6 +772,14 @@ function keys() {
({ foo: 1, bar: 2, baz: 3 }).should.contain.keys('bar', 'foo');
expect({ foo: 1, bar: 2, baz: 3 }).to.contain.keys('baz');
({ foo: 1, bar: 2, baz: 3 }).should.contain.keys('baz');
// alias
expect({ foo: 1, bar: 2, baz: 3 }).contains.keys('baz');
expect({ foo: 1, bar: 2 }).to.have.all.keys(['foo', 'bar']);
expect({ foo: 1, bar: 2 }).to.have.any.keys(['foo', 'bar']);
({ foo: 1, bar: 2, baz: 3 }).should.contain.all.keys('baz');
({ foo: 1, bar: 2, baz: 3 }).should.contain.any.keys('baz');
expect({ foo: 1, bar: 2 }).to.contain.keys('foo');
({ foo: 1, bar: 2 }).should.contain.keys('foo');
@ -830,7 +878,28 @@ function chaining() {
tea.should.be.a('object').and.have.property('name', 'chai');
}
class PoorlyConstructedError {}
function exxtensible() {
expect({}).to.be.extensible;
expect(Object.preventExtensions({})).to.be.not.extensible;
({}).should.be.extensible;
Object.preventExtensions({}).should.not.be.extensible;
}
function sealed() {
expect({}).to.be.not.sealed;
expect(Object.seal({})).to.be.sealed;
({}).should.be.not.sealed;
Object.seal({}).should.be.sealed;
}
function frozen() {
expect({}).to.be.not.frozen;
expect(Object.freeze({})).to.be.frozen;
({}).should.be.not.frozen;
Object.freeze({}).should.be.frozen;
}
class PoorlyConstructedError { }
function _throw() {
// See GH-45: some poorly-constructed custom errors don't have useful names
// on either their constructor or their constructor prototype, but instead
@ -1023,34 +1092,44 @@ function _throw() {
}, 'blah: expected [Function] to throw error including \'hello\' but got \'testing\'');
}
function use(){
function use() {
// ReSharper disable once InconsistentNaming
chai.use((_chai) => {
_chai.can.use.any();
_chai.can.use.any();
});
}
class Klass {
val: number;
constructor() { this.val = 0; }
bar() { }
static baz() { }
}
function respondTo() {
var bar = {};
var obj = new Klass();
expect(Foo).to.respondTo('bar');
Foo.should.respondTo('bar');
expect(Foo).to.not.respondTo('foo');
Foo.should.not.respondTo('foo');
expect(Foo).itself.to.respondTo('func');
expect(Foo).itself.not.to.respondTo('bar');
expect(Klass).to.respondTo('bar');
expect(obj).respondsTo('bar');
Klass.should.respondTo('bar');
Klass.should.respondsTo('bar');
expect(Klass).to.not.respondTo('foo');
Klass.should.not.respondTo('foo');
expect(Klass).itself.to.respondTo('func');
expect(Klass).itself.not.to.respondTo('bar');
expect(bar).to.respondTo('foo');
bar.should.respondTo('foo');
expect(obj).not.to.respondTo('foo');
obj.should.not.respondTo('foo');
err(() => {
expect(Foo).to.respondTo('baz', 'constructor');
Foo.should.respondTo('baz', 'constructor');
}, /^(constructor: expected)(.*)(\[Function: Foo\])(.*)(to respond to \'baz\')$/);
expect(Klass).to.respondTo('baz', 'constructor');
Klass.should.respondTo('baz', 'constructor');
}, /^(constructor: expected)(.*)(\[Function: Klass\])(.*)(to respond to \'baz\')$/);
err(() => {
expect(bar).to.respondTo('baz', 'object');
bar.should.respondTo('baz', 'object');
expect(obj).to.respondTo('baz', 'object');
obj.should.respondTo('baz', 'object');
}, /^(object: expected)(.*)(\{ foo: \[Function\] \}|\{ Object \()(.*)(to respond to \'baz\')$/);
}
@ -1116,6 +1195,23 @@ function sameMembers() {
[5, 4].should.not.have.same.members([6, 3]);
expect([5, 4]).to.not.have.same.members([5, 4, 2]);
[5, 4].should.not.have.same.members([5, 4, 2]);
assert.sameMembers([5, 4], [4, 5]);
}
function sameDeepMembers() {
expect([{ id: 5 }, { id: 4 }]).to.have.same.deep.members([{ id: 4 }, { id: 5 }]);
[{ id: 5 }, { id: 4 }].should.have.same.deep.members([{ id: 4 }, { id: 5 }]);
expect([{ id: 5 }, { id: 4 }]).to.have.same.members([{ id: 5 }, { id: 4 }]);
[{ id: 5 }, { id: 4 }].should.have.same.members([{ id: 5 }, { id: 4 }]);
expect([{ id: 5 }, { id: 4 }]).to.not.have.same.members([]);
[{ id: 5 }, { id: 4 }].should.not.have.same.members([]);
expect([{ id: 5 }, { id: 4 }]).to.not.have.same.members([{ id: 6 }, { id: 3 }]);
[{ id: 5 }, { id: 4 }].should.not.have.same.members([{ id: 6 }, { id: 3 }]);
expect([{ id: 5 }, { id: 4 }]).to.not.have.same.members([{ id: 5 }, { id: 4 }, { id: 2 }]);
[{ id: 5 }, { id: 4 }].should.not.have.same.members([{ id: 5 }, { id: 4 }, { id: 2 }]);
assert.sameDeepMembers([{ id: 5 }, { id: 4 }], [{ id: 4 }, { id: 5 }]);
}
function members() {
@ -1127,16 +1223,48 @@ function members() {
expect([5, 4]).not.members([5, 4, 2]);
}
function increaseDecreaseChange() {
var obj = { val: 10 };
var inc = () => { obj.val++; };
var dec = () => { obj.val--; };
var same = () => { };
expect(inc).to.increase(obj, "val");
expect(inc).increases(obj, "val");
expect(inc).to.change(obj, "val");
expect(dec).to.decrease(obj, "val");
expect(dec).decreases(obj, "val");
expect(dec).to.change(obj, "val");
expect(dec).changes(obj, "val");
expect(inc).to.not.decrease(obj, "val");
expect(dec).to.not.increase(obj, "val");
expect(same).to.not.increase(obj, "val");
expect(same).to.not.decrease(obj, "val");
expect(same).to.not.change(obj, "val");
inc.should.increase(obj, "val");
inc.should.change(obj, "val");
dec.should.decrease(obj, "val");
dec.should.change(obj, "val");
inc.should.not.decrease(obj, "val");
dec.should.not.increase(obj, "val");
same.should.not.change(obj, "val");
}
//tdd
declare function suite(description: string, action: Function):void;
declare function test(description: string, action: Function):void;
declare function suite(description: string, action: Function): void;
declare function test(description: string, action: Function): void;
interface FieldObj {
field: any;
}
class CrashyObject {
inspect (): void {
inspect(): void {
throw new Error('Arg\'s inspect() called even though the test passed');
}
}
@ -1172,6 +1300,9 @@ suite('assert', () => {
assert.ok(true);
assert.ok(1);
assert.ok('test');
assert.isOk(true);
assert.isOk(1);
assert.isOk('test');
err(() => {
assert.ok(false);
@ -1186,6 +1317,27 @@ suite('assert', () => {
}, 'expected \'\' to be truthy');
});
test('notOk', () => {
assert.notOk(false);
assert.notOk(0);
assert.notOk('');
assert.isNotOk(false);
assert.isNotOk(0);
assert.isNotOk('');
err(() => {
assert.notOk(true);
}, 'expected true to be falsy');
err(() => {
assert.notOk(1);
}, 'expected 1 to be falsy');
err(() => {
assert.notOk('test');
}, 'expected \'test\' to be falsy');
});
test('isFalse', () => {
assert.isFalse(false);
@ -1199,7 +1351,7 @@ suite('assert', () => {
});
test('equal', () => {
assert.equal(void(0), undefined);
assert.equal(void (0), undefined);
});
test('typeof / notTypeOf', () => {
@ -1288,19 +1440,19 @@ suite('assert', () => {
});
test('deepEqual', () => {
assert.deepEqual({tea: 'chai'}, {tea: 'chai'});
assert.deepEqual({ tea: 'chai' }, { tea: 'chai' });
err(() => {
assert.deepEqual({tea: 'chai'}, {tea: 'black'});
assert.deepEqual({ tea: 'chai' }, { tea: 'black' });
}, 'expected { tea: \'chai\' } to deeply equal { tea: \'black\' }');
var obja = Object.create({ tea: 'chai' })
, objb = Object.create({ tea: 'chai' });
, objb = Object.create({ tea: 'chai' });
assert.deepEqual(obja, objb);
var obj1 = Object.create({tea: 'chai'})
, obj2 = Object.create({tea: 'black'});
var obj1 = Object.create({ tea: 'chai' })
, obj2 = Object.create({ tea: 'black' });
err(() => {
assert.deepEqual(obj1, obj2);
@ -1309,13 +1461,13 @@ suite('assert', () => {
test('deepEqual (ordering)', () => {
var a = { a: 'b', c: 'd' }
, b = { c: 'd', a: 'b' };
, b = { c: 'd', a: 'b' };
assert.deepEqual(a, b);
});
test('deepEqual (circular)', () => {
var circularObject:any = {}
, secondCircularObject:any = {};
var circularObject: any = {}
, secondCircularObject: any = {};
circularObject.field = circularObject;
secondCircularObject.field = secondCircularObject;
@ -1328,15 +1480,15 @@ suite('assert', () => {
});
test('notDeepEqual', () => {
assert.notDeepEqual({tea: 'jasmine'}, {tea: 'chai'});
assert.notDeepEqual({ tea: 'jasmine' }, { tea: 'chai' });
err(() => {
assert.notDeepEqual({tea: 'chai'}, {tea: 'chai'});
assert.notDeepEqual({ tea: 'chai' }, { tea: 'chai' });
}, 'expected { tea: \'chai\' } to not deeply equal { tea: \'chai\' }');
});
test('notDeepEqual (circular)', () => {
var circularObject:any = {}
, secondCircularObject:any = { tea: 'jasmine' };
var circularObject: any = {}
, secondCircularObject: any = { tea: 'jasmine' };
circularObject.field = circularObject;
secondCircularObject.field = secondCircularObject;
@ -1380,6 +1532,22 @@ suite('assert', () => {
}, 'expected undefined to not equal undefined');
});
test('isNaN', () => {
assert.isNaN(NaN);
err(() => {
assert.isNaN(12);
}, 'expected 12 to be NaN');
});
test('isNotNaN', () => {
assert.isNotNaN(12);
err(() => {
assert.isNotNaN(NaN);
}, 'expected NaN to not NaN');
});
test('isFunction', () => {
var func = () => {
};
@ -1431,7 +1599,7 @@ suite('assert', () => {
test('isNotString', () => {
assert.isNotString(3);
assert.isNotString([ 'hello' ]);
assert.isNotString(['hello']);
err(() => {
assert.isNotString('hello');
@ -1449,7 +1617,7 @@ suite('assert', () => {
test('isNotNumber', () => {
assert.isNotNumber('hello');
assert.isNotNumber([ 5 ]);
assert.isNotNumber([5]);
err(() => {
assert.isNotNumber(4);
@ -1479,7 +1647,7 @@ suite('assert', () => {
test('include', () => {
assert.include('foobar', 'bar');
assert.include([ 1, 2, 3], 3);
assert.include([1, 2, 3], 3);
err(() => {
assert.include('foobar', 'baz');
@ -1492,7 +1660,7 @@ suite('assert', () => {
test('notInclude', () => {
assert.notInclude('foobar', 'baz');
assert.notInclude([ 1, 2, 3 ], 4);
assert.notInclude([1, 2, 3], 4);
err(() => {
assert.notInclude('foobar', 'bar');
@ -1739,4 +1907,42 @@ suite('assert', () => {
}, 'expected [ 1, 54 ] to have the same members as [ 6, 1, 54 ]');
});
test('isAbove', () => {
assert.isAbove(10, 5);
err(() => {
assert.isAbove(1, 5);
}, 'expected 1 to be above 5');
err(() => {
assert.isAbove(5, 5);
}, 'expected 5 to be above 5');
});
test('isBelow', () => {
assert.isBelow(5, 10);
err(() => {
assert.isBelow(5, 1);
}, 'expected 5 to be above 1');
err(() => {
assert.isBelow(5, 5);
}, 'expected 5 to be below 5');
});
test('extensible', () => { assert.extensible({}); });
test('isExtensible', () => { assert.isExtensible({}); });
test('notExtensible', () => { assert.notExtensible(Object.preventExtensions({})); });
test('isNotExtensible', () => { assert.isNotExtensible(Object.preventExtensions({})); });
test('sealed', () => { assert.sealed(Object.seal({})); });
test('isSealed', () => { assert.isSealed(Object.seal({})); });
test('notSealed', () => { assert.notSealed({}); });
test('isNotSealed', () => { assert.isNotSealed({}); });
test('frozen', () => { assert.frozen(Object.freeze({})); });
test('isFrozen', () => { assert.isFrozen(Object.freeze({})); });
test('notFrozen', () => { assert.notFrozen({}); });
test('isNotFrozen', () => { assert.isNotFrozen({}); });
});

94
chai/chai.d.ts vendored
View File

@ -1,10 +1,13 @@
// Type definitions for chai 2.0.0
// Type definitions for chai 3.2.0
// Project: http://chaijs.com/
// Definitions by: Jed Mao <https://github.com/jedmao/>,
// Bart van der Schoor <https://github.com/Bartvds>,
// Andrew Brown <https://github.com/AGBrown>
// Andrew Brown <https://github.com/AGBrown>,
// Olivier Chevet <https://github.com/olivr70>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// <reference path="../assertion-error/assertion-error.d.ts"/>
declare module Chai {
interface ChaiStatic {
@ -16,9 +19,11 @@ declare module Chai {
use(fn: (chai: any, utils: any) => void): any;
assert: AssertStatic;
config: Config;
AssertionError: AssertionError;
}
export interface ExpectStatic extends AssertionStatic {
fail(actual?: any, expected?: any, message?: string, operator?: string): void;
}
export interface AssertStatic extends Assert {
@ -49,15 +54,20 @@ declare module Chai {
interface Assertion extends LanguageChains, NumericComparison, TypeComparison {
not: Assertion;
deep: Deep;
any: KeyFilter;
all: KeyFilter;
a: TypeComparison;
an: TypeComparison;
include: Include;
includes: Include;
contain: Include;
contains: Include;
ok: Assertion;
true: Assertion;
false: Assertion;
null: Assertion;
undefined: Assertion;
NaN: Assertion;
exist: Assertion;
empty: Assertion;
arguments: Assertion;
@ -70,20 +80,35 @@ declare module Chai {
property: Property;
ownProperty: OwnProperty;
haveOwnProperty: OwnProperty;
ownPropertyDescriptor: OwnPropertyDescriptor;
haveOwnPropertyDescriptor: OwnPropertyDescriptor;
length: Length;
lengthOf: Length;
match(regexp: RegExp|string, message?: string): Assertion;
match: Match;
matches: Match;
string(string: string, message?: string): Assertion;
keys: Keys;
key(string: string): Assertion;
throw: Throw;
throws: Throw;
Throw: Throw;
respondTo(method: string, message?: string): Assertion;
respondTo: RespondTo;
respondsTo: RespondTo;
itself: Assertion;
satisfy(matcher: Function, message?: string): Assertion;
satisfy: Satisfy;
satisfies: Satisfy;
closeTo(expected: number, delta: number, message?: string): Assertion;
members: Members;
increase: PropertyChange;
increases: PropertyChange;
decrease: PropertyChange;
decreases: PropertyChange;
change: PropertyChange;
changes: PropertyChange;
extensible: Assertion;
sealed: Assertion;
frozen: Assertion;
}
interface LanguageChains {
@ -134,6 +159,11 @@ declare module Chai {
equal: Equal;
include: Include;
property: Property;
members: Members;
}
interface KeyFilter {
keys: Keys;
}
interface Equal {
@ -148,6 +178,11 @@ declare module Chai {
(name: string, message?: string): Assertion;
}
interface OwnPropertyDescriptor {
(name: string, descriptor: PropertyDescriptor, message?: string): Assertion;
(name: string, message?: string): Assertion;
}
interface Length extends LanguageChains, NumericComparison {
(length: number, message?: string): Assertion;
}
@ -158,11 +193,18 @@ declare module Chai {
(value: number, message?: string): Assertion;
keys: Keys;
members: Members;
any: KeyFilter;
all: KeyFilter;
}
interface Match {
(regexp: RegExp|string, message?: string): Assertion;
}
interface Keys {
(...keys: string[]): Assertion;
(keys: any[]): Assertion;
(keys: Object): Assertion;
}
interface Throw {
@ -175,10 +217,22 @@ declare module Chai {
(constructor: Function, expected?: RegExp, message?: string): Assertion;
}
interface RespondTo {
(method: string, message?: string): Assertion;
}
interface Satisfy {
(matcher: Function, message?: string): Assertion;
}
interface Members {
(set: any[], message?: string): Assertion;
}
interface PropertyChange {
(object: Object, prop: string, msg?: string): Assertion;
}
export interface Assert {
/**
* @param expression Expression to test for truthiness.
@ -189,7 +243,9 @@ declare module Chai {
fail(actual?: any, expected?: any, msg?: string, operator?: string): void;
ok(val: any, msg?: string): void;
isOk(val: any, msg?: string): void;
notOk(val: any, msg?: string): void;
isNotOk(val: any, msg?: string): void;
equal(act: any, exp: any, msg?: string): void;
notEqual(act: any, exp: any, msg?: string): void;
@ -209,6 +265,12 @@ declare module Chai {
isUndefined(val: any, msg?: string): void;
isDefined(val: any, msg?: string): void;
isNaN(val: any, msg?: string): void;
isNotNaN(val: any, msg?: string): void;
isAbove(val: number, abv: number, msg?: string): void;
isBelow(val: number, blw: number, msg?: string): void;
isFunction(val: any, msg?: string): void;
isNotFunction(val: any, msg?: string): void;
@ -279,9 +341,27 @@ declare module Chai {
closeTo(act: number, exp: number, delta: number, msg?: string): void;
sameMembers(set1: any[], set2: any[], msg?: string): void;
includeMembers(set1: any[], set2: any[], msg?: string): void;
sameDeepMembers(set1: any[], set2: any[], msg?: string): void;
includeMembers(superset: any[], subset: any[], msg?: string): void;
ifError(val: any, msg?: string): void;
isExtensible(obj: {}, msg?: string): void;
extensible(obj: {}, msg?: string): void;
isNotExtensible(obj: {}, msg?: string): void;
notExtensible(obj: {}, msg?: string): void;
isSealed(obj: {}, msg?: string): void;
sealed(obj: {}, msg?: string): void;
isNotSealed(obj: {}, msg?: string): void;
notSealed(obj: {}, msg?: string): void;
isFrozen(obj: Object, msg?: string): void;
frozen(obj: Object, msg?: string): void;
isNotFrozen(obj: Object, msg?: string): void;
notFrozen(obj: Object, msg?: string): void;
}
export interface Config {
@ -305,4 +385,4 @@ declare module "chai" {
interface Object {
should: Chai.Assertion;
}
}

170
chartist/chartist-tests.ts Normal file
View File

@ -0,0 +1,170 @@
///<reference path="chartist.d.ts" />
new Chartist.Line('.ct-chart', {
labels: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],
series: [
[12, 9, 7, 8, 5],
[2, 1, 3.5, 7, 3],
[1, 3, 4, 5, 6]
]
}, {
fullWidth: true,
chartPadding: {
right: 40
}
});
var lineChart = new Chartist.Line('.ct-chart', {
labels: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
series: [
[5, 5, 10, 8, 7, 5, 4, null, null, null, 10, 10, 7, 8, 6, 9],
[10, 15, null, 12, null, 10, 12, 15, null, null, 12, null, 14, null, null, null],
[null, null, null, null, 3, 4, 1, 3, 4, 6, 7, 9, 5, null, null, null]
]
}, {
fullWidth: true,
chartPadding: {
right: 10
},
low: 0
});
new Chartist.Line('.ct-chart', {
labels: ['1', '2', '3', '4', '5', '6'],
series: [
{
name: 'Fibonacci sequence',
data: [1, 2, 3, 5, 8, 13]
},
{
name: 'Golden section',
data: [1, 1.618, 2.618, 4.236, 6.854, 11.09]
}
]
});
var data = {
series: [5, 3, 4]
};
var sum = function(a: number, b: number) { return a + b };
new Chartist.Pie('.ct-chart', data, {
labelInterpolationFnc: function(value: number) {
return Math.round(value / data.series.reduce(sum) * 100) + '%';
}
});
new Chartist.Pie('.ct-chart', {
series: [20, 10, 30, 40]
}, {
donut: true,
donutWidth: 60,
startAngle: 270,
total: 200,
showLabel: false
});
// Animation Donut example
var chart = new Chartist.Pie('.ct-chart', {
series: [10, 20, 50, 20, 5, 50, 15],
labels: [1, 2, 3, 4, 5, 6, 7]
}, {
donut: true,
showLabel: false
});
chart.on('draw', function(data: any) {
if(data.type === 'slice') {
// Get the total path length in order to use for dash array animation
var pathLength = data.element._node.getTotalLength();
// Set a dasharray that matches the path length as prerequisite to animate dashoffset
data.element.attr({
'stroke-dasharray': pathLength + 'px ' + pathLength + 'px'
});
// Create animation definition while also assigning an ID to the animation for later sync usage
var animationDefinition: any = {
'stroke-dashoffset': {
id: 'anim' + data.index,
dur: 1000,
from: -pathLength + 'px',
to: '0px',
easing: Chartist.Svg.Easing.easeOutQuint,
// We need to use `fill: 'freeze'` otherwise our animation will fall back to initial (not visible)
fill: 'freeze'
}
};
// If this was not the first slice, we need to time the animation so that it uses the end sync event of the previous animation
if(data.index !== 0) {
animationDefinition['stroke-dashoffset'].begin = 'anim' + (data.index - 1) + '.end';
}
// We need to set an initial value before the animation starts as we are not in guided mode which would do that for us
data.element.attr({
'stroke-dashoffset': -pathLength + 'px'
});
// We can't use guided mode as the animations need to rely on setting begin manually
// See http://gionkunz.github.io/chartist-js/api-documentation.html#chartistsvg-function-animate
data.element.animate(animationDefinition, false);
}
});
new Chartist.Bar('.ct-chart', {
labels: ['XS', 'S', 'M', 'L', 'XL', 'XXL', 'XXXL'],
series: [20, 60, 120, 200, 180, 20, 10]
}, {
distributeSeries: true
});
new Chartist.Bar('.ct-chart', {
labels: ['Quarter 1', 'Quarter 2', 'Quarter 3', 'Quarter 4'],
series: [
[5, 4, 3, 7],
[3, 2, 9, 5],
[1, 5, 8, 4],
[2, 3, 4, 6],
[4, 1, 2, 1]
]
}, {
// Default mobile configuration
stackBars: true,
axisX: {
labelInterpolationFnc: function(value: string) {
return value.split(/\s+/).map(function(word: string) {
return word[0];
}).join('');
}
},
axisY: {
offset: 20
}
}, [
// Options override for media > 400px
['screen and (min-width: 400px)', {
reverseData: true,
horizontalBars: true,
axisX: {
labelInterpolationFnc: Chartist.noop
},
axisY: {
offset: 60
}
}],
// Options override for media > 800px
['screen and (min-width: 800px)', {
stackBars: false,
seriesBarDistance: 10
}],
// Options override for media > 1000px
['screen and (min-width: 1000px)', {
reverseData: false,
horizontalBars: false,
seriesBarDistance: 15
}]
]);

268
chartist/chartist.d.ts vendored Normal file
View File

@ -0,0 +1,268 @@
// Type definitions for Chartist v0.9.4
// Project: https://github.com/gionkunz/chartist-js
// Definitions by: Matt Gibbs <https://github.com/mtgibbs>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module Chartist {
interface ChartistStatic {
Pie: IChartistPieChart;
Bar: IChartistBarChart;
Line: IChartistLineChart;
Svg: any;
noop: Function;
}
interface IResponsiveOptionTuple<T extends IChartOptions> extends Array<string | T> {
0: string;
1: T;
}
interface IChartistBase<T extends IChartOptions> {
container: any;
data: Object;
defaultOptions: T;
options: T;
responsiveOptions: Array<IResponsiveOptionTuple<T>>;
// this most likely doesn't need to be exposed to the user
eventEmitter: any;
supportsForeignObject: boolean;
supportsAnimations: boolean;
resizeListener: any;
update(data: Object, options?: T, override?: boolean): void;
detatch(): void;
/**
* Use this function to register event handlers. The handler callbacks are synchronous and will run in the main thread rather than the event loop.
*
* @method on
* @param event {string} Name of the event. Check the examples for supported events.
* @param handler {Function} The handler function that will be called when an event with the given name was emitted. This function will receive a data argument which contains event data. See the example for more details.
*/
on(event: string, handler: Function): IChartistBase<T>;
/**
* Use this function to un-register event handlers. If the handler function parameter is omitted all handlers for the given event will be un-registered.
*
* @method off
* @param event {string} Name of the event for which a handler should be removed
* @param handler {Function} The handler function that that was previously used to register a new event handler. This handler will be removed from the event handler list. If this parameter is omitted then all event handlers for the given event are removed from the list.
*/
off(event: string, handler?: Function): IChartistBase<T>;
}
interface IChartistPieChart extends IChartistBase<IPieChartOptions> {
new (target: any, data: Object, options?: IPieChartOptions, responsiveOptions?: Array<IResponsiveOptionTuple<IPieChartOptions>>): IChartistPieChart;
}
interface IChartistLineChart extends IChartistBase<ILineChartOptions> {
new (target: any, data: Object, options?: ILineChartOptions, responsiveOptions?: Array<IResponsiveOptionTuple<ILineChartOptions>>): IChartistLineChart;
}
interface IChartistBarChart extends IChartistBase<IBarChartOptions> {
new (target: any, data: Object, options?: IBarChartOptions, responsiveOptions?: Array<IResponsiveOptionTuple<IBarChartOptions>>): IChartistBarChart;
}
interface IChartOptions {
/**
* If true the whole data is reversed including labels, the series order as well as the whole series data arrays.
*/
reverseData?: boolean;
}
interface IPieChartOptions extends IChartOptions {
/**
* Specify a fixed width for the chart as a string (i.e. '100px' or '50%')
*/
width?: number | string;
/**
* Specify a fixed height for the chart as a string (i.e. '100px' or '50%')
*/
height?: number | string;
/**
* Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5}
*/
chartPadding?: IChartPadding | number;
/**
* Override the class names that are used to generate the SVG structure of the chart
*/
classNames?: IPieChartClasses;
/**
* The start angle of the pie chart in degrees where 0 points north. A higher value offsets the start angle clockwise.
*/
startAngle?: number;
/**
* An optional total you can specify. By specifying a total value, the sum of the values in the series must be this total in order to draw a full pie. You can use this parameter to draw only parts of a pie or gauge charts.
*/
total?: number;
/**
* If specified the donut CSS classes will be used and strokes will be drawn instead of pie slices.
*/
donut?: boolean;
/**
* Specify the donut stroke width, currently done in javascript for convenience.
*/
donutWidth?: number;
/**
* Specify if a label should be shown or not
*/
showLabel?: boolean;
/**
* Label position offset from the standard position which is half distance of the radius. This value can be either positive or negative. Positive values will position the label away from the center.
*/
labelOffset?: number;
/**
* This option can be set to 'inside', 'outside' or 'center'. Positioned with 'inside' the labels will be placed on half the distance of the radius to the border of the Pie by respecting the 'labelOffset'. The 'outside' option will place the labels at the border of the pie and 'center' will place the labels in the absolute center point of the chart. The 'center' option only makes sense in conjunction with the 'labelOffset' option.
*/
labelPosition?: string;
/**
* An interpolation function for the label value
*/
labelInterpolationFnc?: Function;
/**
* Label direction can be 'neutral', 'explode' or 'implode'. Default is 'neutral'. The labels anchor will be positioned based on those settings as well as the fact if the labels are on the right or left side of the center of the chart. Usually explode is useful when labels are positioned far away from the center.
*/
labelDirection?: string;
}
interface IChartPadding {
top?: number;
right?: number;
bottom?: number;
left?: number;
}
interface IPieChartClasses {
chartPie?: string;
chartDonut?: string;
series?: string;
slicePie?: string;
sliceDonut?: string;
label?: string;
}
interface IBarChartOptions extends IChartOptions {
axisX?: IBarChartAxis;
axisY?: IBarChartAxis;
width?: number | string;
height?: number | string;
high?: number;
low?: number;
onlyInteger?: boolean;
chartPadding?: IChartPadding;
seriesBarDistance?: number;
/**
* If set to true this property will cause the series bars to be stacked and form a total for each series point. This will also influence the y-axis and the overall bounds of the chart. In stacked mode the seriesBarDistance property will have no effect.
*/
stackBars?: boolean;
horizontalBars?: boolean;
distributeSeries?: boolean;
}
interface IBarChartAxis {
offset?: number;
position?: string;
labelOffset?: {
x?: number;
y?: number;
},
showLabel?: boolean;
showGrid?: boolean;
labelInterpolationFnc?: Function;
scaleMinSpace?: number;
onlyInteger?: boolean;
}
interface IBarChartClasses {
chart?: string;
horizontalBars?: string;
label?: string;
labelGroup?: string;
series?: string;
bar?: string;
grid?: string;
gridGroup?: string;
vertical?: string;
horizontal?: string;
start?: string;
end?: string;
}
interface ILineChartOptions extends IChartOptions {
axisX?: ILineChartXAxis;
axisY?: ILineChartYAxis;
width?: number | string;
height?: number | string;
showLine?: boolean;
showPoint?: boolean;
showArea?: boolean;
areaBase?: number;
lineSmooth?: boolean;
low?: number;
high?: number;
chartPadding?: IChartPadding;
fullWidth?: boolean;
reverseData?: boolean;
classNames?: ILineChartClasses;
}
interface ILineChartAxis {
offset?: number;
position?: string;
labelOffset?: {
x?: number;
y?: number;
};
showLabel?: boolean;
showGrid?: boolean;
labelInterpolationFnc?: Function;
type?: any;
}
interface ILineChartXAxis extends ILineChartAxis {
}
interface ILineChartYAxis extends ILineChartAxis {
scaleMinSpace?: number;
onlyInteger?: boolean;
}
// TODO: Finish documenting all of the defaults
interface ILineChartClasses {
/**
* Default is 'ct-chart-line'
*/
chart?: string;
label?: string;
labelGroup?: string;
series?: string;
line?: string;
point?: string;
area?: string;
grid?: string;
gridGroup?: string;
vertical?: string;
horizontal?: string;
start?: string;
end?: string;
}
}
declare var Chartist: Chartist.ChartistStatic;

2
chartjs/chart.d.ts vendored
View File

@ -27,7 +27,7 @@ interface LinearChartData {
interface CircularChartData {
value: number;
color: string;
color?: string;
highlight?: string;
label?: string;
}

View File

@ -138,6 +138,7 @@ declare module chrome.app.window {
interface WindowEvent {
addListener(callback: () => void): void;
removeListener(callback: () => void): void;
}
var onBoundsChanged: WindowEvent;

View File

@ -245,3 +245,12 @@ function contentSettings() {
}
});
}
// https://developer.chrome.com/extensions/runtime#method-openOptionsPage
function testOptionsPage() {
chrome.runtime.openOptionsPage();
chrome.runtime.openOptionsPage(function() {
// Do a thing ...
});
}

1
chrome/chrome.d.ts vendored
View File

@ -1649,6 +1649,7 @@ declare module chrome.runtime {
export function getPackageDirectoryEntry(callback: (directoryEntry: any) => void): void;
export function getPlatformInfo(callback: (platformInfo: PlatformInfo) => void): void;
export function getURL(path: string): string;
export function openOptionsPage(callback?: () => void): void;
export function reload(): void;
export function requestUpdateCheck(callback: (status: string, details?: UpdateCheckDetails) => void): void;
export function restart(): void;

View File

@ -572,6 +572,10 @@ declare module CKEDITOR {
colorButton_colors?: string;
startupFocus?: boolean;
on?: any;
extraPlugins?: string;
height?: string | number;
toolbarLocation?: string;
readOnly?: boolean;
}

View File

@ -8,9 +8,16 @@ classNames('foo', 'bar'); // => 'foo bar'
classNames('foo', { bar: true }); // => 'foo bar'
classNames({ foo: true }, { bar: true }); // => 'foo bar'
classNames({ foo: true, bar: true }); // => 'foo bar'
classNames(10, 11); // => '10 11';
// lots of arguments of various types
classNames('foo', { bar: true, duck: false }, 'baz', { quux: true }) // => 'foo bar baz quux'
classNames('foo', { bar: true, duck: false }, 'baz', { quux: true }); // => 'foo bar baz quux'
classNames(['foo', 'bar', 'baz']); // => 'foo bar baz'
classNames([1, 2, 3]); // => '1 2 3'
classNames([{ foo: true, bar: false }, { baz: true }]); // => 'foo baz'
classNames(["foo", ["bar", {baz: true}]]); // => 'foo bar baz'
// other falsy values are just ignored
// NOTE: We don't really want to allow this kind of thing with Typescript (otherwise what's the point!)

View File

@ -1,14 +1,18 @@
// Type definitions for classnames
// Project: https://github.com/JedWatson/classnames
// Definitions by: Dave Keen <http://www.keendevelopment.ch>, Adi Dahiya <https://github.com/adidahiya>
// Definitions by: Dave Keen <http://www.keendevelopment.ch>, Adi Dahiya <https://github.com/adidahiya>, Jason Killian <https://github.com/JKillian>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare type ClassValue = string | number | ClassDictionary | ClassArray;
interface ClassDictionary {
[id: string]: boolean;
}
interface ClassArray extends Array<ClassValue> { }
interface ClassNamesFn {
(...classes: (string | ClassDictionary)[]): string;
(...classes: ClassValue[]): string;
}
declare var classNames: ClassNamesFn;

View File

@ -0,0 +1,4 @@
/// <reference path="codemirror.d.ts" />
/// <reference path="codemirror-matchbrackets.d.ts" />
var myCodeMirror: CodeMirror.Editor = CodeMirror(document.body, { matchBrackets: true });

View File

@ -0,0 +1,13 @@
// Type definitions for CodeMirror
// Project: https://github.com/marijnh/CodeMirror
// Definitions by: Sixin Li <https://github.com/sixinli>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// See docs https://codemirror.net/doc/manual.html#addon_matchbrackets
declare module CodeMirror {
interface EditorConfiguration {
// when set to true, causes matching brackets to be highlighted whenever the cursor is next to them
matchBrackets?: boolean;
}
}

View File

@ -1,10 +1,12 @@
// Type definitions for CodeMirror
// Project: https://github.com/marijnh/CodeMirror
// Definitions by: jacqt <https://github.com/jacqt>
// Definitions by: jacqt <https://github.com/jacqt>, basarat <https://github.com/basarat>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// See docs https://codemirror.net/doc/manual.html#addon_show-hint
declare module CodeMirror {
var commands : any;
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
@ -12,13 +14,12 @@ declare module CodeMirror {
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;
function showHint(cm: CodeMirror.Doc, hinter?: (doc: CodeMirror.Doc) => Hints, options?: ShowHintOptions): void;
interface Hints {
from: Position;
to: Position;
list: Hint[] | string[];
list: (Hint | string)[];
}
/** Interface used by showHint.js Codemirror add-on
@ -28,25 +29,27 @@ declare module CodeMirror {
className?: string;
displayText?: string;
from?: Position;
render?: (element: any, self: any, data: any) => void;
/** Called if a completion is picked. If provided *you* are responsible for applying the completion */
hint?: (cm: any, data: Hints, cur: Hint) => void;
render?: (element: HTMLLIElement, data: Hints, cur: Hint) => 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;
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;
showHint: (options: ShowHintOptions) => void;
}
interface IShowHintOptions {
interface ShowHintOptions {
completeSingle: boolean;
hint: (doc : CodeMirror.Doc) => Hints;
hint: (doc: CodeMirror.Doc) => Hints;
}
/** The Handle used to interact with the autocomplete dialog box.*/
@ -59,4 +62,13 @@ declare module CodeMirror {
pick(): void;
data: any;
}
interface EditorConfiguration {
showHint?: boolean;
hintOptions?: ShowHintOptions;
}
}
declare module "codemirror/addon/hint/show-hint" {
export = CodeMirror;
}

View File

@ -787,7 +787,10 @@ declare module CodeMirror {
viewportMargin?: number;
/** Optional lint configuration to be used in conjunction with CodeMirror's linter addon. */
lint?: boolean | LintOptions;
lint?: boolean | LintOptions;
/** Optional value to be used in conduction with CodeMirrors placeholder add-on. */
placeholder?: string;
}
interface TextMarkerOptions {

View File

@ -0,0 +1,16 @@
/// <reference path="codemirror.d.ts" />
/// <reference path="searchcursor.d.ts" />
var doc = new CodeMirror.Doc('text some string and another text match');
var cursor = doc.getSearchCursor('text', new CodeMirror.Pos(0,0), false);
cursor = doc.getSearchCursor('text', new CodeMirror.Pos(0,0));
cursor = doc.getSearchCursor('text');
cursor.find(false);
cursor.findNext();
cursor.findPrevious();
cursor.from();
cursor.to();
cursor.replace("blah");
cursor.replace("text", "origin");

45
codemirror/searchcursor.d.ts vendored Normal file
View File

@ -0,0 +1,45 @@
// 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 {
interface Doc {
/** This method can be used to implement search/replace functionality.
* `query`: This can be a regular * expression or a string (only strings will match across lines -
* if they contain newlines).
* `start`: This provides the starting position of the search. It can be a `{line, ch} object,
* or can be left off to default to the start of the document
* `caseFold`: This is only relevant when matching a string. IT will cause the search to be case-insenstive */
getSearchCursor(query: string | RegExp, start?: Position, caseFold?: boolean): SearchCursor;
}
interface SearchCursor {
/** Searches forward or backward from the current position. The return value indicates whether a match was
* found. If matching a regular expression, the return value will be the array returned by the match method, in case
* you want to extract matched groups */
find(reverse: boolean): boolean | any[];
/** Searches forward from the current position. The return value indicates whether a match was
* found. If matching a regular expression, the return value will be the array returned by the match method, in case
* you want to extract matched groups */
findNext(): boolean | any[];
/** Searches backward from the current position. The return value indicates whether a match was
* found. If matching a regular expression, the return value will be the array returned by the match method, in case
* you want to extract matched groups */
findPrevious(): boolean | any[];
/** Only valid when the last call to find, findNext, or findPrevious did not return false. Returns {line, ch}
* objects pointing the start of the match. */
from(): Position;
/** Only valid when the last call to find, findNext, or findPrevious did not return false. Returns {line, ch}
* objects pointing the end of the match. */
to(): Position;
/** Replaces the currently found match with the given text and adjusts the cursor position to reflect the deplacement. */
replace(text: string, origin?: string): void;
}
}

View File

@ -95,6 +95,13 @@ program.on('--help', () => {
console.log('');
});
program
.command('allow-unknown-option')
.allowUnknownOption()
.action(() => {
console.log('unknown option is allowed');
});
program.parse(process.argv);
console.log('stuff');

View File

@ -158,6 +158,15 @@ declare module commander {
option(flags:string, description?:string, fn?:(arg1:any, arg2:any)=>void, defaultValue?:any):ICommand;
option(flags:string, description?:string, defaultValue?:any):ICommand;
/**
* Allow unknown options on the command line.
*
* @param {Boolean} arg if `true` or omitted, no error will be thrown
* for unknown options.
* @api public
*/
allowUnknownOption(arg?: boolean):ICommand;
/**
* Parse `argv`, settings options and invoking commands when defined.
*

30
config/config-tests.ts Normal file
View File

@ -0,0 +1,30 @@
/// <reference path="config.d.ts" />
import config = require('config');
var value1: string = config.get<string>("");
var value2: any = config.get("");
var has: boolean = config.has("");
// util tests:
var extended1: any = config.util.extendDeep({}, {});
var extended2: any = config.util.extendDeep({}, {}, 20);
var clone1: any = config.util.cloneDeep({});
var clone2: any = config.util.cloneDeep({}, 20);
var equals1: boolean = config.util.equalsDeep({}, {});
var equals2: boolean = config.util.equalsDeep({}, {}, 20);
var diff1: any = config.util.diffDeep({}, {});
var diff2: any = config.util.diffDeep({}, {}, 20);
var immutable1: any = config.util.makeImmutable({});
var immutable2: any = config.util.makeImmutable({}, "");
var immutable3: any = config.util.makeImmutable({}, "", "");
var hidden1: any = config.util.makeHidden({}, "");
var hidden2: any = config.util.makeHidden({}, "", "");
var env: string = config.util.getEnv("");

34
config/config.d.ts vendored Normal file
View File

@ -0,0 +1,34 @@
// Type definitions for node-config
// Project: https://github.com/lorenwest/node-config
// Definitions by: Roman Korneev <https://github.com/RWander>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "config" {
// see https://github.com/lorenwest/node-config/wiki/Using-Config-Utilities
interface IUtil {
// Extend an object (and any object it contains) with one or more objects (and objects contained in them).
extendDeep(mergeInto: any, mergeFrom: any, depth?: number): any;
// Return a deep copy of the specified object.
cloneDeep(copyFrom: any, depth?: number): any;
// Return true if two objects have equal contents.
equalsDeep(object1: any, object2: any, dept?: number): boolean;
// Returns an object containing all elements that differ between two objects.
diffDeep(object1: any, object2: any, depth?: number): any;
// Make a javascript object property immutable (assuring it cannot be changed from the current value).
makeImmutable(object: any, propertyName?: string, propertyValue?: string): any;
// Make an object property hidden so it doesn't appear when enumerating elements of the object.
makeHidden(object: any, propertyName: string, propertyValue?: string): any;
// Get the current value of a config environment variable
getEnv(varName: string): string;
}
export function get<T>(setting: string): T;
export function has(setting: string): boolean;
export var util: IUtil;
}

View File

@ -1,4 +1,4 @@
// Type definitions for cookie-parser
// Type definitions for cookie-parser v1.3.4
// Project: https://github.com/expressjs/cookie-parser
// Definitions by: Santi Albo <https://github.com/santialbo/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@ -8,5 +8,6 @@
declare module "cookie-parser" {
import express = require('express');
function e(secret?: string, options?: any): express.RequestHandler;
namespace e{}
export = e;
}

View File

@ -7,4 +7,6 @@ cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false);
cordova.plugins.Keyboard.close();
cordova.plugins.Keyboard.disableScroll(true);
cordova.plugins.Keyboard.disableScroll(false);
cordova.plugins.Keyboard.show();
cordova.plugins.Keyboard.close();
console.log(cordova.plugins.Keyboard.isVisible);

View File

@ -17,6 +17,14 @@ declare module Ionic {
* Close the keyboard if it is open.
*/
close(): void;
/**
* Force keyboard to be shown on Android.
* This typically helps if autofocus on a text element does not pop up the keyboard automatically
*
* Supported Platforms: Android, Blackberry 10
*/
show(): void;
/**
* Disable native scrolling, useful if you are using JavaScript to scroll

View File

@ -0,0 +1,19 @@
/// <reference path="../cordova/cordova.d.ts" />
/// <reference path="./cordova-plugin-app-version.d.ts" />
cordova.getAppVersion.getAppName()
.then(appName=> {
console.log(appName)
});
cordova.getAppVersion.getPackageName()
.then(packageName=> {
console.log(packageName);
});
cordova.getAppVersion.getVersionCode()
.then(versionCode=> {
console.log(versionCode);
});
cordova.getAppVersion.getVersionNumber()
.then(versionNumber=> {
console.log(versionNumber);
});

View File

@ -0,0 +1,15 @@
// Type definitions for cordova-plugin-app-version v0.1.7
// Project: https://github.com/whiteoctober/cordova-plugin-app-version
// Definitions by: Markus Wagner <https://github.com/Ritzlgrmft/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../q/Q.d.ts" />
interface Cordova {
getAppVersion: {
getAppName: () => Q.IPromise<string>;
getPackageName: () => Q.IPromise<string>;
getVersionCode: () => Q.IPromise<string>;
getVersionNumber: () => Q.IPromise<string>;
};
}

View File

@ -0,0 +1,62 @@
/// <reference path="../cordova/cordova.d.ts" />
/// <reference path="./cordova-plugin-ibeacon.d.ts" />
function registerDelegates() {
cordova.plugins.locationManager.enableDebugLogs();
cordova.plugins.locationManager.delegate.didRangeBeaconsInRegion = (pluginResult) => didRangeBeaconsInRegion(pluginResult);
cordova.plugins.locationManager.delegate.didEnterRegion = (pluginResult) => didEnterRegion(pluginResult);
cordova.plugins.locationManager.delegate.didExitRegion = (pluginResult) => didExitRegion(pluginResult);
cordova.plugins.locationManager.delegate.didDetermineStateForRegion = (pluginResult) => didDetermineStateForRegion(pluginResult);
cordova.plugins.locationManager.delegate.didChangeAuthorizationStatus = (authorizationStatus) => didChangeAuthorizationStatus(authorizationStatus);
cordova.plugins.locationManager.delegate.didStartMonitoringForRegion = (pluginResult) => didStartMonitoringForRegion(pluginResult);
cordova.plugins.locationManager.delegate.monitoringDidFailForRegionWithError = (pluginResult) => monitoringDidFailForRegionWithError(pluginResult);
cordova.plugins.locationManager.onDomDelegateReady();
}
function didRangeBeaconsInRegion(pluginResult: BeaconPlugin.PluginResult): void {
for (var beacon of pluginResult.beacons) {
console.log(beacon.uuid, beacon.major, beacon.minor, beacon.accuracy, beacon.proximity, beacon.rssi, beacon.tx);
}
}
function didEnterRegion(pluginResult: BeaconPlugin.PluginResult): void {
var region: BeaconPlugin.Region = new cordova.plugins.locationManager.BeaconRegion("identifier", "uuid", 1, 2);;
cordova.plugins.locationManager.startRangingBeaconsInRegion(this.createBeaconRegionFromPluginResult(pluginResult))
.then(() => {
console.log("startRangingBeaconsInRegion succeeded");
})
.catch((reason: any) => {
console.error("startRangingBeaconsInRegion failed: " + reason);
});
}
function didExitRegion(pluginResult: BeaconPlugin.PluginResult): void {
var region: BeaconPlugin.Region;
cordova.plugins.locationManager.stopRangingBeaconsInRegion(region)
.then(() => {
console.log("stopRangingBeaconsInRegion succeeded");
})
.catch((reason: any) => {
console.error("stopRangingBeaconsInRegion failed: " + reason);
});
}
function didDetermineStateForRegion(pluginResult: BeaconPlugin.PluginResult): void {
if (pluginResult.state === "CLRegionStateInside") {
console.log(pluginResult.region.identifier);
}
}
function didChangeAuthorizationStatus(authorizationStatus: string): void {
console.log(authorizationStatus);
}
function didStartMonitoringForRegion(pluginResult: BeaconPlugin.PluginResult): void {
console.log(pluginResult.region.identifier);
}
function monitoringDidFailForRegionWithError(pluginResult: BeaconPlugin.PluginResult): void {
console.log(pluginResult.region.identifier);
}

View File

@ -0,0 +1,95 @@
// Type definitions for cordova-plugin-ibeacon v3.3.0
// Project: https://github.com/petermetz/cordova-plugin-ibeacon
// Definitions by: Markus Wagner <https://github.com/Ritzlgrmft/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../q/Q.d.ts" />
interface CordovaPlugins {
locationManager: BeaconPlugin.LocationManager;
}
declare module BeaconPlugin {
/**
* Beacon Plugin.
*/
export interface LocationManager {
delegate: Delegate;
BeaconRegion: BeaconRegion;
onDomDelegateReady(): void;
startMonitoringForRegion(region: Region): Q.Promise<void>;
stopMonitoringForRegion(region: Region): Q.Promise<void>;
requestStateForRegion(region: Region): Q.Promise<void>;
startRangingBeaconsInRegion(region: Region): Q.Promise<void>;
stopRangingBeaconsInRegion(region: Region): Q.Promise<void>;
getAuthorizationStatus(): Q.Promise<PluginResult>;
requestWhenInUseAuthorization(): Q.Promise<void>;
requestAlwaysAuthorization(): Q.Promise<void>;
getMonitoredRegions(): Q.Promise<Region[]>;
getRangedRegions(): Q.Promise<Region[]>;
isRangingAvailable(): Q.Promise<boolean>;
isMonitoringAvailableForClass(region: Region): Q.Promise<boolean>;
startAdvertising(region: Region, measuredPower: boolean): Q.Promise<void>;
stopAdvertising(): Q.Promise<void>;
isAdvertisingAvailable(): Q.Promise<boolean>;
isAdvertising(): Q.Promise<boolean>;
disableDebugLogs(): Q.Promise<void>;
enableDebugNotifications(): Q.Promise<void>;
disableDebugNotifications(): Q.Promise<void>;
enableDebugLogs(): Q.Promise<void>;
isBluetoothEnabled(): Q.Promise<boolean>;
enableBluetooth(): Q.Promise<void>;
disableBluetooth(): Q.Promise<void>;
appendToDeviceLog(message: string): Q.Promise<string>;
}
export interface PluginResult {
eventType: string;
region: Region;
beacons: Beacon[];
authorizationStatus: string;
state: string;
}
export interface Delegate {
didDetermineStateForRegion(pluginResult: PluginResult): void;
didStartMonitoringForRegion(pluginResult: PluginResult): void;
didExitRegion(pluginResult: PluginResult): void;
didEnterRegion(pluginResult: PluginResult): void;
didRangeBeaconsInRegion(pluginResult: PluginResult): void;
peripheralManagerDidStartAdvertising(pluginResult: PluginResult): void;
peripheralManagerDidUpdateState(pluginResult: PluginResult): void;
didChangeAuthorizationStatus(authorizationStatus: string): void;
monitoringDidFailForRegionWithError(pluginResult: PluginResult): void;
}
export interface Region {
identifier: string;
new (identifier: string): Region;
}
export interface BeaconRegion extends Region {
uuid: string;
major: string;
minor: string;
notifyEntryStateOnDisplay: boolean;
new (identifier: string, uuid: string, major?: number, minor?: number, notifyEntryStateOnDisplay?: boolean): BeaconRegion;
}
export interface CircularRegion extends Region {
latitude: number;
longitude: number;
radius: number;
new (identifier: string, latitude: number, longitude: number, radius: number): CircularRegion;
}
export interface Beacon {
uuid: string;
major: string;
minor: string;
proximity: string;
tx: number;
rssi: number;
accuracy: number;
}
}

View File

@ -1,17 +1,32 @@
// Type definitions for Apache Cordova Vibration plugin.
// Project: https://github.com/apache/cordova-plugin-vibration
// Definitions by: Microsoft Open Technologies, Inc. <http://msopentech.com>
// Definitions by: Microsoft Open Technologies, Inc. <http://msopentech.com>, Louis Lagrange <https://github.com/Minishlink/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
//
//
// Copyright (c) Microsoft Open Technologies, Inc.
// Licensed under the MIT license.
interface Navigator {
/**
* Vibrates the device for the specified amount of time.
* @param time Milliseconds to vibrate the device. 0 cancels the vibration. Ignored on iOS.
*/
vibrate(time: number): void;
/**
* Vibrates the device with a given pattern.
* @param time Sequence of durations (in milliseconds) for which to turn on or off the vibrator. Ignored on iOS.
*/
vibrate(time: number[]): void;
}
interface Notification {
/**
* Vibrates the device for the specified amount of time.
* @param time Milliseconds to vibrate the device. Ignored on iOS.
* @deprecated
*/
vibrate(time: number): void
vibrate(time: number): void;
/**
* Vibrates the device with a given pattern.
* @param number[] pattern Pattern with which to vibrate the device.
@ -19,10 +34,12 @@ interface Notification {
* The next value - the number of milliseconds for which to keep the vibrator on before turning it off.
* @param number repeat Optional index into the pattern array at which to start repeating (will repeat until canceled),
* or -1 for no repetition (default).
* @deprecated
*/
vibrateWithPattern(pattern: number[], repeat: number): void;
/**
* Immediately cancels any currently running vibration.
* @deprecated
*/
cancelVibration(): void;
}
}

View File

@ -0,0 +1,169 @@
/// <reference path="core-decorators.d.ts" />
//
// @autobind
//
import { autobind } from 'core-decorators';
class Person {
@autobind
getPerson() {
return this;
}
}
let person = new Person();
let getPerson = person.getPerson;
getPerson() === person;
//
// @readonly
//
import { readonly } from 'core-decorators';
class Meal {
@readonly
entree: string = 'steak';
}
var dinner = new Meal();
dinner.entree = 'salmon';
//
// @override
//
import { override } from 'core-decorators';
class Parent {
speak(first: string, second: string) {}
}
class Child extends Parent {
@override
speak() {}
// SyntaxError: Child#speak() does not properly override Parent#speak(first, second)
}
// or
class Child2 extends Parent {
@override
speaks() {}
// SyntaxError: No descriptor matching Child#speaks() was found on the prototype chain.
//
// Did you mean "speak"?
}
//
// @deprecate (alias: @deprecated)
//
import { deprecate, deprecated } from 'core-decorators';
class Person2 {
@deprecate
facepalm() {}
@deprecate('We stopped facepalming')
facepalmHard() {}
@deprecate('We stopped facepalming', { url: 'http://knowyourmeme.com/memes/facepalm' })
facepalmHarder() {}
}
let person2 = new Person2();
person2.facepalm();
// DEPRECATION Person#facepalm: This function will be removed in future versions.
person2.facepalmHard();
// DEPRECATION Person#facepalmHard: We stopped facepalming
person2.facepalmHarder();
// DEPRECATION Person#facepalmHarder: We stopped facepalming
//
// See http://knowyourmeme.com/memes/facepalm for more details.
//
//
// @debounce
//
import { debounce } from 'core-decorators';
class Editor {
content = '';
@debounce(500)
updateContent(content: string) {
this.content = content;
}
}
//
// @suppressWarnings
//
import { suppressWarnings } from 'core-decorators';
class Person3 {
@deprecated
facepalm() {}
@suppressWarnings
facepalmWithoutWarning() {
this.facepalm();
}
}
let person3 = new Person3();
person3.facepalmWithoutWarning();
// no warning is logged
//
// @nonenumerable
//
import { nonenumerable } from 'core-decorators';
class Meal2 {
entree = 'steak';
@nonenumerable
cost: number = 4.44;
}
var dinner2 = new Meal2();
for (var key in dinner2) {
key;
// "entree" only, not "cost"
}
Object.keys(dinner2);
// ["entree"]
//
// @nonconfigurable
//
import { nonconfigurable } from 'core-decorators';
class Meal3 {
@nonconfigurable
entree: string = 'steak';
}
var dinner3 = new Meal3();
Object.defineProperty(dinner3, 'entree', {
enumerable: false
});
// Cannot redefine property: entree

View File

@ -0,0 +1 @@
--experimentalDecorators --noImplicitAny --target ES5

89
core-decorators/core-decorators.d.ts vendored Normal file
View File

@ -0,0 +1,89 @@
// Type definitions for core-decorators.js v0.1.5
// Project: https://github.com/jayphelps/core-decorators.js
// Definitions by: Qubo <https://github.com/tkqubo>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "core-decorators" {
export interface ClassDecorator {
<TFunction extends Function>(target: TFunction): TFunction|void;
}
export interface ParameterDecorator {
(target: Object, propertyKey: string|symbol, parameterIndex: number): void;
}
export interface PropertyDecorator {
(target: Object, propertyKey: string|symbol): void;
}
export interface MethodDecorator {
<T>(target: Object, propertyKey: string|symbol, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T>|void;
}
export interface PropertyOrMethodDecorator extends MethodDecorator, PropertyDecorator {
(target: Object, propertyKey: string|symbol): void;
}
export interface Deprecate extends MethodDecorator {
(message?: string, option?: DeprecateOption): MethodDecorator;
}
export interface DeprecateOption {
url: string;
}
/**
* Forces invocations of this function to always have this refer to the class instance,
* even if the function is passed around or would otherwise lose its this context. e.g. var fn = context.method;
*/
var autobind: MethodDecorator;
/**
* Marks a property or method as not being writable.
*/
var readonly: PropertyOrMethodDecorator;
/**
* Checks that the marked method indeed overrides a function with the same signature somewhere on the prototype chain.
*/
var override: MethodDecorator;
/**
* Calls console.warn() with a deprecation message. Provide a custom message to override the default one. You can also provide an options hash with a url, for further reading.
*/
var deprecate: Deprecate;
/**
* Calls console.warn() with a deprecation message. Provide a custom message to override the default one. You can also provide an options hash with a url, for further reading.
*/
var deprecated: Deprecate;
/**
* Creates a new debounced function which will be invoked after wait milliseconds since the time it was invoked. Default timeout is 300 ms.
*/
var debounce: (wait: number) => MethodDecorator;
/**
* Suppresses any JavaScript console.warn() call while the decorated function is called. (i.e. on the stack)
*/
var suppressWarnings: MethodDecorator;
/**
* Marks a property or method as not being enumerable.
*/
var nonenumerable: PropertyOrMethodDecorator;
/**
* Marks a property or method as not being writable.
*/
var nonconfigurable: PropertyOrMethodDecorator;
/**
* Initial implementation included, likely slow. WIP.
*/
var memoize: MethodDecorator;
export {
autobind,
readonly,
override,
deprecate,
deprecated,
debounce,
suppressWarnings,
nonenumerable,
nonconfigurable,
memoize // WIP
};
}

View File

@ -139,7 +139,7 @@ function groupedBarChart() {
.style("text-anchor", "end")
.text("Population");
var state = svg.selectAll(".state")
var state = svg.selectAll(".state")
.data(data)
.enter().append("g")
.attr("class", "g")
@ -672,8 +672,8 @@ function dragMultiples() {
function dragmove(d: { x: number; y: number }) {
d3.select(this)
.attr("cx", d.x = Math.max(radius, Math.min(width - radius, (<any> d3.event).x)))
.attr("cy", d.y = Math.max(radius, Math.min(height - radius, (<any> d3.event).y)));
.attr("cx", d.x = Math.max(radius, Math.min(width - radius, (<d3.DragEvent> d3.event).x)))
.attr("cy", d.y = Math.max(radius, Math.min(height - radius, (<d3.DragEvent> d3.event).y)));
}
}
@ -873,7 +873,7 @@ function populationPyramid() {
// Allow the arrow keys to change the displayed year.
window.focus();
d3.select(window).on("keydown", function () {
switch (d3.event.keyCode) {
switch ((<KeyboardEvent> d3.event).keyCode) {
case 37: year = Math.max(year0, year - 10); break;
case 39: year = Math.min(year1, year + 10); break;
}
@ -1167,7 +1167,7 @@ function azimuthalEquidistant() {
.translate([width / 2, height / 2])
.clipAngle(180 - 1e-3)
.precision(.1);
var path = d3.geo.path()
.projection(projection);
@ -1209,7 +1209,7 @@ function azimuthalEquidistant() {
d3.select(self.frameElement).style("height", height + "px");
}
//Example from http://bl.ocks.org/mbostock/4060366
function voronoiTesselation() {
var width = 960,
@ -1237,7 +1237,7 @@ function voronoiTesselation() {
.attr("r", 2);
redraw();
function redraw() {
path = path.data(voronoi(vertices).map(function (d) { return "M" + d.join("L") + "Z"; } ), String);
path.exit().remove();
@ -1254,7 +1254,7 @@ function forceDirectedVoronoi() {
simulate = true,
zoomToAdd = true,
color = d3.scale.quantize<string>().domain([10000, 7250]).range(["#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"])
var numVertices = (w*h) / 3000;
var vertices = d3.range(numVertices).map(function(i) {
var angle = radius * (i+10);
@ -1266,15 +1266,15 @@ function forceDirectedVoronoi() {
var prevEventScale = 1;
var zoom = d3.behavior.zoom().on("zoom", function(d,i) {
if (zoomToAdd){
if ((<any> d3.event).scale > prevEventScale) {
var angle = radius * vertices.length;
vertices.push({x: angle*Math.cos(angle)+(w/2), y: angle*Math.sin(angle)+(h/2)})
} else if (vertices.length > 2 && (<any> d3.event).scale != prevEventScale) {
vertices.pop();
}
force.nodes(vertices).start()
if ((<d3.ZoomEvent> d3.event).scale > prevEventScale) {
var angle = radius * vertices.length;
vertices.push({x: angle*Math.cos(angle)+(w/2), y: angle*Math.sin(angle)+(h/2)})
} else if (vertices.length > 2 && (<d3.ZoomEvent> d3.event).scale != prevEventScale) {
vertices.pop();
}
force.nodes(vertices).start()
} else {
if ((<any> d3.event).scale > prevEventScale) {
if ((<d3.ZoomEvent> d3.event).scale > prevEventScale) {
radius+= .01
} else {
radius -= .01
@ -1285,18 +1285,18 @@ function forceDirectedVoronoi() {
});
force.nodes(vertices).start()
}
prevEventScale = (<any> d3.event).scale;
prevEventScale = (<d3.ZoomEvent> d3.event).scale;
});
d3.select(window)
.on("keydown", function() {
// shift
if(d3.event.keyCode == 16) {
if((<KeyboardEvent> d3.event).keyCode == 16) {
zoomToAdd = false
}
// s
if(d3.event.keyCode == 83) {
if((<KeyboardEvent> d3.event).keyCode == 83) {
simulate = !simulate
if(simulate) {
force.start()
@ -1308,38 +1308,38 @@ function forceDirectedVoronoi() {
.on("keyup", function() {
zoomToAdd = true
})
var svg = d3.select("#chart")
.append("svg")
.attr("width", w)
.attr("height", h)
.call(zoom)
var force = d3.layout.force()
.charge(-300)
.size([w, h])
.on("tick", update);
force.nodes(vertices).start();
var circle = <d3.selection.Update<any>> svg.selectAll("circle");
var path = <d3.selection.Update<any>> svg.selectAll("path");
var link = <d3.selection.Update<any>> svg.selectAll("line");
function update() {
path = path.data(d3_geom_voronoi(vertices));
path.enter().append("path")
// drag node by dragging cell
.call(d3.behavior.drag()
.on("drag", function(d, i) {
vertices[i] = {x: vertices[i].x + (<any> d3.event).dx, y: vertices[i].y + (<any> d3.event).dy}
vertices[i] = {x: vertices[i].x + (<d3.DragEvent> d3.event).dx, y: vertices[i].y + (<d3.DragEvent> d3.event).dy}
})
)
.style("fill", function(d, i) { return color(0) })
path.attr("d", function(d) { return "M" + d.join("L") + "Z"; })
.transition().duration(150).style("fill", function(d, i) { return color(d3.geom.polygon(d).area()) })
path.exit().remove();
circle = circle.data(vertices)
circle.enter().append("circle")
.attr("r", 0)
@ -1347,16 +1347,16 @@ function forceDirectedVoronoi() {
circle.attr("cx", function(d) { return d.x; })
.attr("cy", function(d) { return d.y; });
circle.exit().transition().attr("r", 0).remove();
link = link.data(d3_geom_voronoi.links(vertices))
link.enter().append("line")
link.attr("x1", function(d) { return d.source.x; })
.attr("y1", function(d) { return d.source.y; })
.attr("x2", function(d) { return d.target.x; })
.attr("y2", function(d) { return d.target.y; })
link.exit().remove()
if(!simulate) force.stop()
}
}
@ -1521,7 +1521,7 @@ module hierarchicalEdgeBundling {
.value(function (d) { return d.size; } );
var bundle = d3.layout.bundle<Result>();
var line = d3.svg.line.radial<Result>()
.interpolate("bundle")
.tension(.85)
@ -1851,7 +1851,7 @@ function chordDiagram() {
[8010, 16145, 8090, 8045],
[1013, 990, 940, 6907]
];
var chord = d3.layout.chord()
.padding(.05)
.sortSubgroups(d3.descending)
@ -2031,7 +2031,7 @@ function irisParallel() {
}
function drag(d: string) {
x.range()[i] = (<any> d3.event).x;
x.range()[i] = (<d3.DragEvent> d3.event).x;
traits.sort(function (a, b) { return x(a) - x(b); } );
g.attr("transform", function (d) { return "translate(" + x(d) + ")"; } );
foreground.attr("d", path);
@ -2085,14 +2085,14 @@ function healthAndWealth() {
// The x & y axes.
var xAxis = d3.svg.axis().orient("bottom").scale(xScale).ticks(12, d3.format(",d")),
yAxis = d3.svg.axis().scale(yScale).orient("left");
// Create the SVG container and set the origin.
var svg = d3.select("#chart").append("svg")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
// Add the x-axis.
svg.append("g")
.attr("class", "x axis")
@ -2152,7 +2152,7 @@ function healthAndWealth() {
// Add an overlay for the year label.
var box = (<SVGTextElement>label.node()).getBBox();
var overlay = svg.append("rect")
.attr("class", "overlay")
.attr("x", box.x)
@ -2669,12 +2669,14 @@ function multiTest() {
function testD3Events () {
d3.select('svg')
.on('click', () => {
var coords = [d3.event.pageX, d3.event.pageY];
console.log("clicked", d3.event.target, "at " + coords);
let e = <MouseEvent>d3.event;
var coords = [e.pageX, e.pageY];
console.log("clicked", e.target, "at " + coords);
})
.on('keypress', () => {
if (d3.event.shiftKey) {
console.log('shift + ' + d3.event.which);
let e = <KeyboardEvent>d3.event;
if (e.shiftKey) {
console.log('shift + ' + e.which);
}
});
}
@ -2690,4 +2692,17 @@ function testD3MutlieTimeFormat() {
["%B", function(d) { return d.getMonth(); }],
["%Y", function() { return true; }]
]);
}
function testMultiUtcFormat() {
var format = d3.time.format.utc.multi([
[".%L", function(d) { return d.getMilliseconds(); }],
[":%S", function(d) { return d.getSeconds(); }],
["%I:%M", function(d) { return d.getMinutes(); }],
["%I %p", function(d) { return d.getHours(); }],
["%a %d", function(d) { return d.getDay() && d.getDate() != 1; }],
["%b %d", function(d) { return d.getDate() != 1; }],
["%B", function(d) { return d.getMonth(); }],
["%Y", function() { return true; }]
]);
}

35
d3/d3.d.ts vendored
View File

@ -807,7 +807,7 @@ declare module d3 {
interface Transition<Datum> {
transition(): Transition<Datum>;
delay(): number;
delay(delay: number): Transition<Datum>;
delay(delay: (datum: Datum, index: number, outerIndex: number) => number): Transition<Datum>;
@ -920,16 +920,33 @@ declare module d3 {
export function flush(): void;
}
/**
* Interface for any and all d3 events.
*/
interface Event extends KeyboardEvent, MouseEvent {
}
interface BaseEvent {
type: string;
sourceEvent?: Event;
}
/**
* Define a D3-specific ZoomEvent per https://github.com/mbostock/d3/wiki/Zoom-Behavior#event
*/
interface ZoomEvent extends BaseEvent {
scale: number;
translate: [number, number];
}
/**
* Define a D3-specific DragEvent per https://github.com/mbostock/d3/wiki/Drag-Behavior#on
*/
interface DragEvent extends BaseEvent {
x: number;
y: number;
dx: number;
dy: number;
}
/**
* The current event's value. Use this variable in a handler registered with `selection.on`.
*/
export var event: Event;
export var event: Event | BaseEvent;
/**
* Returns the x and y coordinates of the mouse relative to the provided container element, using d3.event for the mouse's position on the page.
@ -1785,6 +1802,10 @@ declare module d3 {
export module format {
export function multi(formats: Array<[string, (d: Date) => boolean|number]>): Format;
export function utc(specifier: string): Format;
module utc {
export function multi(formats: Array<[string, (d: Date) => boolean|number]>): Format;
}
export var iso: Format;
}

2
diff/diff.d.ts vendored
View File

@ -39,6 +39,8 @@ declare module JsDiff {
function diffWordsWithSpace(oldStr:string, newStr:string):IDiffResult[];
function diffJson(oldObj: Object, newObj: Object): IDiffResult[];
function diffLines(oldStr:string, newStr:string):IDiffResult[];
function diffCss(oldStr:string, newStr:string):IDiffResult[];

File diff suppressed because it is too large Load Diff

538
documentdb-server/documentdb-server.d.ts vendored Normal file
View File

@ -0,0 +1,538 @@
// Type definitions for DocumentDB server side JavaScript SDK
// Project: http://dl.windowsazure.com/documentDB/jsserverdocs
// Definitions by: François Nguyen <https://github.com/lith-light-g>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/** The Context object provides access to all operations that can be performed on DocumentDB data, as well as access to the request and response objects. */
interface IContext {
/** Gets the collection object. */
getCollection(): ICollection;
/** Gets the request object. */
getRequest(): IRequest;
/**
* Gets the response object.
* Note: this is not available in pre-triggers.
*/
getResponse(): IResponse;
}
/**
* The __ object can be used as a shortcut to the Collection and Context objects.
* It derives from the ICollection object via prototype and defines request and response properties
* which are shortcuts to getContext().getRequest() and getContext().getResponse().
*/
interface I__Object extends ICollection {
/** Alias for getContext().getRequest() */
request: IRequest;
/** Alias for getContext().getResponse() */
response: IResponse;
}
interface IQueryAPI {
/**
* Execute a filter on the input stream of documents, resulting in a subset of the input stream that matches the given filter.
* When filter is called by itself, the input document stream is the set of all documents in the current document collection. When used in a chained call, the input document stream is the set of documents returned from the previous query function.
* @param predicate The predicate function for a filter query, which acts as a truth test of whether a document should be filtered or not.
* @param options Optional query options. Should not be used in a chained call.
* @param callback Optional callback for the operation. If no callback is provided, any error in the operation will be thrown and the result document set will be written to the Response body. Should not be used in a chained call.
*/
filter(predicate: (document: Object) => boolean,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<Object>, options: IFeedCallbackOptions) => void): IQueryResponse;
filter<T>(predicate: (document: Object) => boolean,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): IQueryResponse;
/**
* Produce a new set of documents by mapping/projecting the properties of the documents in the input document stream through the given mapping predicate.
* When map is called by itself, the input document stream is the set of all documents in the current document collection. When used in a chained call, the input document stream is the set of documents returned from the previous query function.
* @param predicate The predicate function for a map/projection, which maps the input document's properties into a new document object.
* @param options Optional query options. Should not be used in a chained call.
* @param callback Optional callback for the operation. If no callback is provided, any error in the operation will be thrown and the result document set will be written to the Response body. Should not be used in a chained call.
*/
map(predicate: (document: Object) => Object,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<Object>, options: IFeedCallbackOptions) => void): IQueryResponse;
map<T>(predicate: (document: Object) => Object,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): IQueryResponse;
/**
* Produce a new set of documents by extracting a single property from each document in the input document stream. This is equivalent to a map call that projects only propertyName.
* When pluck is called by itself, the input document stream is the set of all documents in the current document collection. When used in a chained call, the input document stream is the set of documents returned from the previous query function.
* @param propertyName Name of the property to pluck from all documents in the current collection
* @param options Optional query options. Should not be used in a chained call.
* @param callback Optional callback for the operation. If no callback is provided, any error in the operation will be thrown and the result document set will be written to the Response body. Should not be used in a chained call.
*/
pluck(propertyName: string,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<Object>, options: IFeedCallbackOptions) => void): IQueryResponse;
pluck<T>(propertyName: string,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): IQueryResponse;
/**
* Flatten nested arrays from each document in the input document stream.
* When flatten is called by itself, the input document stream is the set of all documents in the current document collection. When used in a chained call, the input document stream is the set of documents returned from the previous query function.
* @param isShallow If true, flattens only the first level of nested arrays (false by default)
* @param options Optional query options. Should not be used in a chained call.
* @param callback Optional callback for the operation. If no callback is provided, any error in the operation will be thrown and the result document set will be written to the Response body. Should not be used in a chained call.
*/
flatten(isShallow?: boolean,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<Object>, options: IFeedCallbackOptions) => void): IQueryResponse;
flatten<T>(isShallow?: boolean,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): IQueryResponse;
/**
* Produce a new set of documents by sorting the documents in the input document stream in ascending order using the given predicate.
* When sortBy is called by itself, the input document stream is the set of all documents in the current document collection. When used in a chained call, the input document stream is the set of documents returned from the previous query function.
* @param predicate Predicate function defining the property to sort by.
* @param options Optional query options. Should not be used in a chained call.
* @param Optional callback for the operation. If no callback is provided, any error in the operation will be thrown and the result document set will be written to the Response body. Should not be used in a chained call.
*/
sortBy(predicate: (document: Object) => string,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<Object>, options: IFeedCallbackOptions) => void): IQueryResponse;
sortBy(predicate: (document: Object) => number,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<Object>, options: IFeedCallbackOptions) => void): IQueryResponse;
sortBy<T>(predicate: (document: Object) => string,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): IQueryResponse;
sortBy<T>(predicate: (document: Object) => number,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): IQueryResponse;
/**
* Produce a new set of documents by sorting the documents in the input document stream in descending order using the given predicate.
* When sortByDescending is called by itself, the input document stream is the set of all documents in the current document collection. When used in a chained call, the input document stream is the set of documents returned from the previous query function.
* @param predicate Predicate function defining the property to sort by.
* @param options Optional query options. Should not be used in a chained call.
* @param callback Optional callback for the operation. If no callback is provided, any error in the operation will be thrown and the result document set will be written to the Response body. Should not be used in a chained call.
*/
sortByDescending(predicate: (document: Object) => string,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<Object>, options: IFeedCallbackOptions) => void): IQueryResponse;
sortByDescending(predicate: (document: Object) => number,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<Object>, options: IFeedCallbackOptions) => void): IQueryResponse;
sortByDescending<T>(predicate: (document: Object) => string,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): IQueryResponse;
sortByDescending<T>(predicate: (document: Object) => number,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): IQueryResponse;
/**
* Terminating call for a chained query. Should be used in conjunction with the opening chain call to perform chained queries.
* When value is called, the query is queued for execution with the given options and callback.
* @param options Optional query options for the entire chained call.
* @param callback Optional callback for the operation. If no callback is provided, any error in the operation will be thrown and the result document set will be written to the Response body.
*/
value(options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<Object>, options: IFeedCallbackOptions) => void): IQueryResponse;
value<T>(options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): IQueryResponse;
}
/**
* Stored procedures and triggers are registered for a particular collection. The Collection object supports create, read, update and delete (CRUD) and query operations on documents and attachments in the current collection.
* All collection operations are completed asynchronously. You can provide a callback to handle the result of the operation, and to perform error handling if necessary.
* Stored procedures and triggers are executed in a time-limited manner. Long-running stored procedures and triggers are defensively timed out and all transactions performed are rolled back.
* We stop queuing collection operations if the stored procedure is close to timing out. You can inspect the boolean return value of all collection operations to see if an operation was not queued and handle this situation gracefully.
*/
interface ICollection extends IQueryAPI {
/** Opening call to start a chained query. Should be used in conjunction with the closing value call to perform chained queries. */
chain(): IQueryResponse;
/**
* Create an attachment for the document.
* @param documentLink resource link of the collection under which the document will be created
* @param body metadata that defines the attachment media like media, contentType. It can include any other properties as part of the metedata.
* @param options optional create options
* @param callback optional callback for the operation. If no callback is provided, any error in the operation will be thrown.
*/
createAttachment(documentLink: string,
body: IAttachment,
options?: ICreateOptions,
callback?: (error: IRequestCallbackError, resources: Object, options: IRequestCallbackOptions) => void): boolean;
/**
* Create a document under the collection.
* @param collectionLink resource link of the collection under which the document will be created
* @param body of the document. The "id" property is required and will be generated automatically if not provided (this behaviour can be overriden using the CreateOptions). Any other properties can be added.
* @param optional create options
* @param optional callback for the operation. If no callback is provided, any error in the operation will be thrown.
*/
createDocument(collectionLink: string,
body: Object,
options?: ICreateOptions,
callback?: (error: IRequestCallbackError, resources: Object, options: IRequestCallbackOptions) => void): boolean;
/**
* Delete an attachment.
* @param attachmentLink resource link of the attachment to be deleted
* @param options optional delete options.
* @param callback optional callback for the operation. If no callback is provided, any error in the operation will be thrown.
*/
deleteAttachment(attachmentLink: string,
options?: IDeleteOptions,
callback?: (error: IRequestCallbackError, resources: Object, options: IRequestCallbackOptions) => void): boolean;
/**
* Delete a document.
* @param documentLink resource link of the document to delete
* @param options optional delete options
* @param callback optional callback for the operation. If no callback is provided, any error in the operation will be thrown.
*/
deleteDocument(documentLink: string,
options?: IDeleteOptions,
callback?: (error: IRequestCallbackError, resources: Object, options: IRequestCallbackOptions) => void): boolean;
/** Get alt link (name-based link) of current collection. */
getAltLink(): string;
/** Get self link of current collection. */
getSelfLink(): string;
/**
* Execute a SQL query on the attachments for the document.
* @param documentLink resource link of the document whose attachments are being queried
* @param query SQL query string. This can also be a JSON object to pass in a parameterized query along with the values.
* @param options optional query options
* @param callback optional callback for the operation. If no callback is provided, any error in the operation will be thrown.
*/
queryAttachments(documentLink: string,
query: string,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<Object>, options: IFeedCallbackOptions) => void): boolean;
queryAttachments(documentLink: string,
query: IParameterizedQuery,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<Object>, options: IFeedCallbackOptions) => void): boolean;
/**
* Execute a SQL query on the documents of the collection.
* @param collectionLink resource link of the collection whose documents are being queried
* @param filterQuery SQL query string. This can also be a JSON object to pass in a parameterized query along with the values.
* @param options optional query options.
* @param callback optional callback for the operation. If no callback is provided, any error in the operation will be thrown.
*/
queryDocuments(collectionLink: string,
filterQuery: string,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<Object>, options: IFeedCallbackOptions) => void): boolean;
queryDocuments<T>(collectionLink: string,
filterQuery: string,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): boolean;
queryDocuments(collectionLink: string,
filterQuery: IParameterizedQuery,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<Object>, options: IFeedCallbackOptions) => void): boolean;
queryDocuments<T>(collectionLink: string,
filterQuery: IParameterizedQuery,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): boolean;
/**
* Read an Attachment.
* @param attachmenLink resource link of the attachment to read
* @param options optional read options
* @param callback optional callback for the operation. If no callback is provided, any error in the operation will be thrown.
*/
readAttachment(attachmenLink: string,
options?: IReadOptions,
callback?: (error: IRequestCallbackError, resources: Object, options: IRequestCallbackOptions) => void): boolean;
/**
* Get all attachments for the document.
* @param documentLink resource link of the document whose attachments are being read
* @param options optional read feed options
* @param callback optional callback for the operation. If no callback is provided, any error in the operation will be thrown.
*/
readAttachments(documentLink: string,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<Object>, options: IFeedCallbackOptions) => void): boolean;
/**
* Read a document.
* @param documentLink resource link of the document to read
* @param options optional read options
* @param callback optional callback for the operation. If no callback is provided, any error in the operation will be thrown.
*/
readDocument(documentLink: string,
options?: IReadOptions,
callback?: (error: IRequestCallbackError, resources: Object, options: IRequestCallbackOptions) => void): boolean;
readDocument<T>(documentLink: string,
options?: IReadOptions,
callback?: (error: IRequestCallbackError, resources: T, options: IRequestCallbackOptions) => void): boolean;
/**
* Get all documents for the collection.
* @param collectionLink resource link of the collection whose documents are being read
* @param options optional read feed options
* @param callback optional callback for the operation. If no callback is provided, any error in the operation will be thrown.
*/
readDocuments(collectionLink: string,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<Object>, options: IFeedCallbackOptions) => void): boolean;
readDocuments<T>(collectionLink: string,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): boolean;
/**
* Replace an attachment.
* @param attachmentLink resource link of the attachment to be replaced
* @param attachment new attachment body
* @param options optional replace options
* @param callback optional callback for the operation. If no callback is provided, any error in the operation will be thrown.
*/
replaceAttachment(attachmentLink: string,
attachment: Object,
options?: IReplaceOptions,
callback?: (error: IRequestCallbackError, resources: Object, options: IRequestCallbackOptions) => void): boolean;
/**
* Replace a document.
* @param documentLink resource link of the document
* @param document new document body
* @param options optional replace options
* @param callback optional callback for the operation. If no callback is provided, any error in the operation will be thrown.
*/
replaceDocument(documentLink: string,
document: Object,
options?: IReplaceOptions,
callback?: (error: IRequestCallbackError, resources: Object, options: IRequestCallbackOptions) => void): boolean;
}
/** Options associated with a create operation. */
interface ICreateOptions {
/** Specifies indexing directives. */
indexAction?: string;
/** Disables automatic generation of "id" field of the document to be created (if it is not provided) */
disableAutomaticIdGeneration?: string;
}
/** Options associated with a delete operation. */
interface IDeleteOptions {
/**
* The entity tag associated with the resource.
* This is matched with the persisted resource before deletion.
*/
etag?: string;
}
/** Will contain error information if an error occurs, undefined otherwise. */
interface IFeedCallbackError {
/** The HTTP response code corresponding to the error. */
number: number;
/** A string containing the error information. */
body: string;
}
/** Information associated with the response to the operation. */
interface IFeedCallbackOptions {
/** Opaque token for continuing the read feed or query. */
continuation: string;
/** Comma delimited string containing the collection's current quota metrics (storage, number of stored procedure, triggers and UDFs) after completion of the operation. */
currentCollectionSizeInMB: string;
/** Comma delimited string containing the collection's maximum quota metrics (storage, number of stored procedure, triggers and UDFs). */
maxCollectionSizeInMB: string;
}
/** Options associated with a read feed or query operation. */
interface IFeedOptions {
/**
* Max number of items to be returned in the enumeration operation.
* Value is 100 by default
*/
pageSize?: number;
/** Opaque token for continuing the enumeration. */
continuation?: string;
/** Allow scan on the queries which couldn't be served as indexing was opted out on the requested paths (only for queryDocuments() and queryAttachments()) */
enableScan?: boolean;
/** Allow order by with low precision (only for queryDocuments(), sortBy() and sortByDescending()) */
enableLowPrecisionOrderBy?: boolean;
}
/**
* Object returned from a query function, namely chain, filter, map, pluck, flatten, or value.
* If the query is part of a chained call, then this object can be used to chain further queries until the final terminating value call.
*/
interface IQueryResponse extends IQueryAPI {
/** True if the query has been queued, false if it is not queued because of a pending timeout. */
isAccepted: boolean;
}
/** Options associated with a read operation. */
interface IReadOptions {
/** The conditional HTTP method ifNoneMatch value. */
ifNoneMatch?: string;
}
/** Options associated with a replace operation. */
interface IReplaceOptions {
/** Specifies indexing directives. */
indexAction?: string;
/**
* The entity tag associated with the resource.
* This is matched with the persisted resource before deletion.
*/
etag?: string;
}
/** Will contain error information if an error occurs, undefined otherwise. */
interface IRequestCallbackError {
/** The HTTP response code corresponding to the error. */
number: number;
/** A string containing the error information. */
body: string;
}
/** Information associated with the response to the operation. */
interface IRequestCallbackOptions {
/** Comma delimited string containing the collection's current quota metrics (storage, number of stored procedure, triggers and UDFs) after completion of the operation. */
currentCollectionSizeInMB: string;
/** Comma delimited string containing the collection's maximum quota metrics (storage, number of stored procedure, triggers and UDFs). */
maxCollectionSizeInMB: string;
/** Set to true if the requested resource has not been modified compared to the provided ETag in the ifNoneMatch parameter for a read request. */
notModified: boolean;
}
interface IAttachment extends Object {
/** MIME contentType of the attachment */
contentType: string;
/** media link associated with the attachment content */
media: string;
}
interface IDocumentMeta extends Object {
id: string;
_self: string;
_ts: string;
_rid?: string;
_etag?: string;
_attachments?: string;
}
/**
* The Request object represents the request message that was sent to the server. This includes information about HTTP headers and the body of the HTTP request sent to the server.
* For triggers, the request represents the operation that is executing when the trigger is run. For example, if the trigger is being run ("triggered") on the creation of a document, then
* the request body contains the JSON body of the document to be created. This can be accessed through the request object and (as JSON) can be natively consumed in JavaScript.
* For stored procedures, the request contains information about the request sent to execute the stored procedure.
*/
interface IRequest {
/**
* Gets the request body.
*/
getBody(): Object;
getBody<T>(): T;
/**
* Gets a specified request header value.
* @param key the name of the header to retrieve
*/
getValue(key: string): string;
/**
* Sets the request body.
* Note: this can be only used in a pre-trigger to overwrite the existing request body.
* The overwritten request body will then be used in the operation associated with this pre-trigger.
* @param value the value to set in the request body
*/
setBody(value: string): void;
setBody(value: Object): void;
/**
* Sets a specified request header value.
* Note: this method cannot be used to create new headers.
* @param key the name of the header
* @param value the value of the header
*/
setValue(key: string, value: string): void;
}
/**
* The Response object represents the response message that will be sent from the server in response to the requested operation. This includes information about the HTTP headers and body of the response from the server.
* The Response object is not present in pre-triggers because they are run before the response is generated.
* For post-triggers, the response represents the operation that was executed before the trigger. For example, if the post-trigger is being run ("triggered") after the creation of a document, then
* the response body contains the JSON body of the document that was created. This can be accessed through the response object and (as JSON) can be natively consumed in JavaScript.
* For stored procedures, the response can be manipulated to send output back to the client-side.
* Note: this object not available in pre-triggers
*/
interface IResponse {
/**
* Gets the response body.
*/
getBody(): Object;
getBody<T>(): T;
/**
* Gets a maximum quota allowed for the resource associated with a post-trigger
* Note: this method is only available in post-triggers
*/
getMaxResourceQuota(): string;
/**
* Gets a current quota usage for the resource associated with a post-trigger
* Note: this method is only available in post-triggers
*/
getResourceQuotaCurrentUsage(): string;
/**
* Gets a specified response header value.
* @param key the name of the header to retrieve
*/
getValue(key: string): string;
/**
* Sets the response body.
* Note: This cannot be done in pre-triggers.
* In post-triggers, the response body is already set with the requested resource and will be overwritten with this call.
* In stored procedures, this call can be used to set the response message body as output to the calling client.
*/
setBody(value: string): void;
setBody(value: Object): void;
/**
* Sets a specified response header value.
* Note: this method cannot be used to create new headers.
* @param key the name of the header
* @param value the value of the header
*/
getValue(key: string, value: string): void;
appendBody(value: string): void;
appendBody(value: Object): void;
}
/** Can be used as the query parameter in queryAttachments and queryDocuments. */
interface IParameterizedQuery {
/** SQL query string. */
query: string;
/** Parameters */
parameters: Array<IQueryParam>;
}
/** Parameter interface for parameterized queries */
interface IQueryParam {
/** Name to use in the query */
name: string;
/** Value of the parameter */
value: any;
}
/** List of error codes returned by database operations in the RequestCallback and FeedCallback. See the corresponding error message for more details. */
interface IErrorCodes {
// Client error
/** (400) Request failed due to bad inputs **/
BadRequest: number;
/** (403) Request was denied access to the resource **/
Forbidden: number;
/** (404) Request tried to access a resource which doesn't exist **/
NotFound: number;
/** (409) Resource with the specified id already exists **/
Conflict: number;
/** (412) Conditions specified in the request options were not met **/
PreconditionFailed: number;
/** (413) Request failed because it was too large **/
RequestEntityTooLarge: number;
/** (449) Request conflicted with the current state of a resource and must be retried from a new transaction from the client side **/
RetryWith: number;
// Server error
/** (500) Server encountered an unexpected error in processing the request **/
InternalServerError: number;
}
declare function getContext(): IContext;
declare var __: I__Object;
declare var ErrorCodes: IErrorCodes;

View File

@ -41,7 +41,7 @@ interface DropzoneOptions {
filesizeBase?: number;
maxFiles?: number;
params?: {};
headers?: {},
headers?: {};
clickable?: boolean|string|HTMLElement|(string|HTMLElement)[];
ignoreHiddenFiles?: boolean;
acceptedFiles?: string;

4
ejs/ejs-tests.ts Normal file
View File

@ -0,0 +1,4 @@
/// <reference path="ejs.d.ts"/>
import ejs = require("ejs");
var people = ['geddy', 'neil', 'alex'];
var html = ejs.render('<%= people.join(", "); %>', { people: people });

91
ejs/ejs.d.ts vendored Normal file
View File

@ -0,0 +1,91 @@
// Type definitions for ejs.js v2.3.3
// Project: http://ejs.co/
// Definitions by: Ben Liddicott <https://github.com/benliddicott/DefinitelyTyped>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "ejs" {
namespace Ejs {
type Data = { [name: string]: any };
type Dependencies = string[];
var cache: Cache;
var localsName: string;
function resolveInclude(name: string, filename: string): string;
function compile(template: string, opts?: Options): (TemplateFunction);
function render(template: string, data?: Data, opts?: Options): string;
function renderFile(path: string, data?: Data, opts?: Options, cb?: Function): any;// TODO RenderFileCallback return type
function clearCache(): any;
function TemplateFunction(data: Data): any;
interface TemplateFunction {
dependencies: Dependencies;
}
interface Options {
cache?: any;
filename?: string;
context?: any;
compileDebug?: boolean;
client?: boolean;
delimiter?: string;
debug?: any;
_with?: boolean;
}
class Template {
constructor(text: string, opts: Options);
opts: Options;
templateText: string;
mode: string;
truncate: boolean;
currentLine: number;
source: string;
dependencies: Dependencies;
createRegex(): RegExp;
compile(): TemplateFunction;
generateSource(): any;
parseTemplateText(): string[];
scanLine(line: string): any;
}
module Template {
interface MODES {
EVAL: string;
ESCAPED: string;
RAW: string;
COMMENT: string;
LITERAL: string;
}
}
function escapeRegexChars(s: string): string;
function escapeXML(markup: string): string;
function shallowCopy<T1>(to: T1, fro: any): T1;
interface Cache {
_data: { [name: string]: any };
set(key: string, val: any): any;
get(key: string): any;
}
var cache: Cache;
function resolve(from1: string, to: string): string;
function resolve(from1: string, from2: string, to: string): string;
function resolve(from1: string, from2: string, from3: string, to: string): string;
function resolve(from1: string, from2: string, from3: string, from4: string, to: string): string;
function resolve(from1: string, from2: string, from3: string, from4: string, from5: string, to: string): string;
function resolve(from1: string, from2: string, from3: string, from4: string, from5: string, from6: string, to: string): string;
function resolve(from1: string, from2: string, from3: string, from4: string, from5: string, from6: string, from7: string, to: string): string;
function resolve(from1: string, from2: string, from3: string, from4: string, from5: string, from6: string, from7: string, from8: string, to: string): string;
function resolve(from1: string, from2: string, from3: string, from4: string, from5: string, from6: string, from7: string, from8: string, from9: string, to: string): string;
function resolve(...args: string[]): string;
function normalize(path: string): string;
function isAbsolute(path: string): boolean;
function join(...args: string[]): string;
function relative(from: string, to: string): string;
var sep: string;
var delimiter: string;
function dirname(path: string): string;
function basename(path: string): string;
function extname(path: string): string;
function filter(xs: any, f: any): any; // TODO WHUT?
}
export = Ejs;
}

View File

@ -12,12 +12,22 @@ declare module "express-jwt" {
function jwt(options: jwt.Options): jwt.RequestHandler;
interface IDoneCallback<T> {
(err: Error, result: T): void;
}
type ICallback = <T>(req: express.Request, payload: T, done: IDoneCallback<boolean>) => void;
module jwt {
export interface Options {
secret: string;
secret: string|ICallback;
userProperty?: string;
skip?: string[];
credentialsRequired?: boolean;
isRevoked?: boolean;
requestProperty?: string;
getToken?: ICallback;
[property: string]: any;
}
export interface RequestHandler extends express.RequestHandler {
unless?: typeof unless;

View File

@ -106,6 +106,8 @@ declare module "express" {
use(handler: ErrorRequestHandler): T;
use(path: string, ...handler: RequestHandler[]): T;
use(path: string, handler: ErrorRequestHandler): T;
use(path: string[], ...handler: RequestHandler[]): T;
use(path: string[], handler: ErrorRequestHandler): T;
}
export function Router(options?: any): Router;
@ -410,6 +412,10 @@ declare module "express" {
originalUrl: string;
url: string;
baseUrl: string;
app: Application;
}
interface MediaType {

173
faker/faker-tests.ts Normal file
View File

@ -0,0 +1,173 @@
/// <reference path="faker.d.ts" />
let resultStr: string;
let resultBool: boolean;
let resultNum: number;
let resultStrArr: string[];
let resultDate: Date;
import faker = require('faker');
faker.locale = 'en';
resultStr = faker.address.zipCode();
resultStr = faker.address.zipCode('###');
resultStr = faker.address.city();
resultStr = faker.address.city(0);
resultStr = faker.address.cityPrefix();
resultStr = faker.address.citySuffix();
resultStr = faker.address.streetName();
resultStr = faker.address.streetAddress();
resultStr = faker.address.streetAddress(false);;
resultStr = faker.address.streetSuffix();
resultStr = faker.address.streetPrefix();
resultStr = faker.address.secondaryAddress();
resultStr = faker.address.county();
resultStr = faker.address.country();
resultStr = faker.address.countryCode();
resultStr = faker.address.state();
resultStr = faker.address.state(false);
resultStr = faker.address.stateAbbr();
resultStr = faker.address.latitude();
resultStr = faker.address.longitude();
resultStr = faker.commerce.color();
resultStr = faker.commerce.department();
resultStr = faker.commerce.productName();
resultStr = faker.commerce.price();
resultStr = faker.commerce.price(0, 0, 0, '#');
resultStr = faker.commerce.productAdjective();
resultStr = faker.commerce.productMaterial();
resultStr = faker.commerce.product();
resultStrArr = faker.company.suffixes();
resultStr = faker.company.companyName();
resultStr = faker.company.companyName(0);
resultStr = faker.company.companySuffix();
resultStr = faker.company.catchPhrase();
resultStr = faker.company.bs();
resultStr = faker.company.catchPhraseAdjective();
resultStr = faker.company.catchPhraseDescriptor();
resultStr = faker.company.catchPhraseNoun();
resultStr = faker.company.bsAdjective();
resultStr = faker.company.bsBuzz();
resultStr = faker.company.bsNoun();
resultDate = faker.date.past();
resultDate = faker.date.future();
resultDate = faker.date.between('foo', 'bar');
resultDate = faker.date.between(new Date(), new Date());
resultDate = faker.date.recent();
resultDate = faker.date.recent(100);
resultStr = faker.date.month();
resultStr = faker.date.month({
abbr: true,
context: true
});
resultStr = faker.date.weekday();
resultStr = faker.date.weekday({
abbr: true,
context: true
});
resultStr = faker.finance.account();
resultStr = faker.finance.account(0);
resultStr = faker.finance.accountName();
resultStr = faker.finance.mask();
resultStr = faker.finance.mask(0, false, false);
resultStr = faker.finance.amount();
resultStr = faker.finance.amount(0, 0, 0, '#');
resultStr = faker.finance.transactionType();
resultStr = faker.finance.currencyCode();
resultStr = faker.finance.currencyName();
resultStr = faker.finance.currencySymbol();
resultStr = faker.hacker.abbreviation();
resultStr = faker.hacker.adjective();
resultStr = faker.hacker.noun();
resultStr = faker.hacker.verb();
resultStr = faker.hacker.ingverb();
resultStr = faker.hacker.phrase();
resultStr = faker.helpers.randomize();
resultNum = faker.helpers.randomize([1,2,3,4]);
resultStr = faker.helpers.randomize(['foo', 'bar', 'quux']);
resultStr = faker.helpers.slugify('foo bar quux');
resultStr = faker.helpers.replaceSymbolWithNumber('foo# bar#');
resultStr = faker.helpers.replaceSymbols('foo# bar? quux#');
resultStrArr = faker.helpers.shuffle(['foo', 'bar', 'quux']);
resultStr = faker.helpers.mustache('{{foo}}{{bar}}', {foo: 'x', bar: 'y'});
const card = faker.helpers.createCard();
resultStr = card.name;
resultStr = card.address.streetA;
const contextualCard = faker.helpers.contextualCard();
resultStr = contextualCard.name;
resultStr = contextualCard.address.suite;
const userCard = faker.helpers.userCard();
resultStr = userCard.name;
resultStr = userCard.address.suite;
resultStr = faker.internet.avatar();
resultStr = faker.internet.email();
resultStr = faker.internet.email('foo', 'bar', 'quux');
resultStr = faker.internet.protocol();
resultStr = faker.internet.url();
resultStr = faker.internet.domainName();
resultStr = faker.internet.domainSuffix();
resultStr = faker.internet.domainWord();
resultStr = faker.internet.ip();
resultStr = faker.internet.userAgent();
resultStr = faker.internet.color();
resultStr = faker.internet.color(0, 0, 0);
resultStr = faker.internet.mac();
resultStr = faker.internet.password();
resultStr = faker.internet.password(0, false, '#', 'foo');
resultStrArr = faker.lorem.words();
resultStrArr = faker.lorem.words(0);
resultStr = faker.lorem.sentence();
resultStr = faker.lorem.sentence(0, 0);
resultStr = faker.lorem.sentences();
resultStr = faker.lorem.sentences(0);
resultStr = faker.lorem.paragraph();
resultStr = faker.lorem.paragraph(0);
resultStr = faker.lorem.paragraphs();
resultStr = faker.lorem.paragraphs(0, '');
resultStr = faker.name.firstName();
resultStr = faker.name.firstName(0);
resultStr = faker.name.lastName();
resultStr = faker.name.lastName(0);
resultStr = faker.name.findName();
resultStr = faker.name.findName('', '', 0);
resultStr = faker.name.jobTitle();
resultStr = faker.name.prefix();
resultStr = faker.name.suffix();
resultStr = faker.name.title();
resultStr = faker.name.jobDescriptor();
resultStr = faker.name.jobArea();
resultStr = faker.name.jobType();
resultStr = faker.phone.phoneNumber();
resultStr = faker.phone.phoneNumber('#');
resultStr = faker.phone.phoneNumberFormat();
// https://github.com/Marak/faker.js/blob/master/lib/phone_number.js#L9-L13
resultStr = faker.phone.phoneNumberFormat(0);
resultStr = faker.phone.phoneFormats();
resultNum = faker.random.number();
resultNum = faker.random.number(0);
resultNum = faker.random.number({
min: 0,
max: 0,
precision: 0
});
resultStr = faker.random.arrayElement();
resultStr = faker.random.arrayElement(['foo', 'bar', 'quux'])
resultStr = faker.random.objectElement();
resultStr = faker.random.objectElement({foo: 'bar', field: 'foo'});
resultStr = faker.random.uuid();
resultBool = faker.random.boolean();
import fakerEn = require('faker/locale/en');
resultStr = faker.name.firstName();

400
faker/faker.d.ts vendored Normal file
View File

@ -0,0 +1,400 @@
// Type definitions for faker
// Project: http://marak.com/faker.js/
// Definitions by: Bas Pennings <https://github.com/basp/>, Yuki Kokubun <https://github.com/Kuniwak>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare var fakerStatic: Faker.FakerStatic;
declare module Faker {
interface FakerStatic {
locale: string;
address: {
zipCode(format?: string): string;
city(format?: number): string;
cityPrefix(): string;
citySuffix(): string;
streetName(): string;
streetAddress(useFullAddress?: boolean): string;
streetSuffix(): string;
streetPrefix(): string;
secondaryAddress(): string;
county(): string;
country(): string;
countryCode(): string;
state(useAbbr?: boolean): string;
stateAbbr(): string;
latitude(): string;
longitude(): string;
};
commerce: {
color(): string;
department(): string;
productName(): string;
price(min?: number, max?: number, dec?: number, symbol?: string): string;
productAdjective(): string;
productMaterial(): string;
product(): string;
};
company: {
suffixes(): string[];
companyName(format?: number): string;
companySuffix(): string;
catchPhrase(): string;
bs(): string;
catchPhraseAdjective(): string;
catchPhraseDescriptor(): string;
catchPhraseNoun(): string;
bsAdjective(): string;
bsBuzz(): string;
bsNoun(): string;
};
date: {
past(years?: number, refDate?: string|Date): Date;
future(years?: number, refDate?: string|Date): Date;
between(from: string|number|Date, to: string|Date): Date;
recent(days?: number): Date;
month(options?: { abbr?: boolean, context?: boolean }): string;
weekday(options?: { abbr?: boolean, context?: boolean }): string;
};
fake(str: string): string;
finance: {
account(length?: number): string;
accountName(): string;
mask(length?: number, parens?: boolean, elipsis?: boolean): string;
amount(min?:number, max?: number, dec?: number, symbol?: string): string;
transactionType(): string;
currencyCode(): string;
currencyName(): string;
currencySymbol(): string;
};
hacker: {
abbreviation(): string;
adjective(): string;
noun(): string;
verb(): string;
ingverb(): string;
phrase(): string;
};
helpers: {
randomize<T>(array: T[]): T;
randomize(): string;
slugify(string?: string): string;
replaceSymbolWithNumber(string?: string, symbol?: string): string;
replaceSymbols(string?: string): string;
shuffle<T>(o: T[]): T[];
shuffle(): string[];
mustache(str: string, data: { [key: string]: string|((substring: string, ...args: any[]) => string) }): string;
createCard(): Faker.Card;
contextualCard(): Faker.ContextualCard;
userCard(): Faker.UserCard;
createTransaction(): Faker.Transaction;
};
image: {
image(): string;
avatar(): string;
imageUrl(width?: number, height?: number, category?: string): string;
abstract(width?: number, height?: number): string;
animals(width?: number, height?: number): string;
business(width?: number, height?: number): string;
cats(width?: number, height?: number): string;
city(width?: number, height?: number): string;
food(width?: number, height?: number): string;
nightlife(width?: number, height?: number): string;
fashion(width?: number, height?: number): string;
people(width?: number, height?: number): string;
nature(width?: number, height?: number): string;
sports(width?: number, height?: number): string;
technics(width?: number, height?: number): string;
transport(width?: number, height?: number): string;
};
internet: {
avatar(): string;
email(firstName?: string, lastName?: string, provider?: string): string;
userName(firstName?: string, lastName?: string): string;
protocol(): string;
url(): string;
domainName(): string;
domainSuffix(): string;
domainWord(): string;
ip(): string;
userAgent(): string;
color(baseRed255?: number, baseGreen255?: number, baseBlue255?: number): string;
mac(): string;
password(len?: number, memorable?: boolean, pattern?: string|RegExp, prefix?: string): string;
};
lorem: {
words(num?: number): string[];
sentence(wordCount?: number, range?: number): string;
sentences(sentenceCount?: number): string;
paragraph(sentenceCount?: number): string;
paragraphs(paragraphCount?: number, separator?: string): string;
};
name: {
firstName(gender?: number): string;
lastName(gender?: number): string;
findName(firstName?: string, lastName?: string, gender?: number): string;
jobTitle(): string;
prefix(): string;
suffix(): string;
title(): string;
jobDescriptor(): string;
jobArea(): string;
jobType(): string;
};
phone: {
phoneNumber(format?: string): string;
phoneNumberFormat(phoneFormatsArrayIndex?: number): string;
phoneFormats(): string;
};
random: {
number(max: number): number;
number(options?: { min?: number, max?: number, precision?: number }): number;
arrayElement(): string;
arrayElement<T>(array: T[]): T;
objectElement(object?: { [key: string]: any }, field?: "key"): string;
objectElement<T>(object?: { [key: string]: T }, field?: any): T;
uuid(): string;
boolean(): boolean;
};
}
interface Card {
name: string;
username: string;
email: string;
address: FullAddress;
phone: string;
website: string;
company: Company;
posts: Post[];
accountHistory: string[];
}
interface FullAddress {
streetA: string;
streetB: string;
streetC: string;
streetD: string;
city: string;
state: string;
county: string;
zipcode: string;
geo: Geo;
}
interface Geo {
lat: string;
lng: string;
}
interface Company {
name: string;
catchPhrase: string;
bs: string;
}
interface Post {
words: string;
sentence: string;
sentences: string;
paragraph: string;
}
interface ContextualCard {
name: string;
username: string;
email: string;
dob: Date;
phone: string;
address: Address;
website: string;
company: Company;
}
interface Address {
street: string;
suite: string;
city: string;
state: string;
zipcode: string;
geo: Geo;
}
interface UserCard {
name: string;
username: string;
email: string;
address: Address;
phone: string;
website: string;
company: Company;
}
interface Transaction {
amount: string;
date: Date;
business: string;
name: string;
type: string;
account: string;
}
}
declare module "faker" {
export = fakerStatic;
}
declare module "faker/locale/de" {
export = fakerStatic;
}
declare module "faker/locale/de_AT" {
export = fakerStatic;
}
declare module "faker/locale/de_CH" {
export = fakerStatic;
}
declare module "faker/locale/el_GR" {
export = fakerStatic;
}
declare module "faker/locale/en" {
export = fakerStatic;
}
declare module "faker/locale/en_AU" {
export = fakerStatic;
}
declare module "faker/locale/en_BORK" {
export = fakerStatic;
}
declare module "faker/locale/en_CA" {
export = fakerStatic;
}
declare module "faker/locale/en_GB" {
export = fakerStatic;
}
declare module "faker/locale/en_IE" {
export = fakerStatic;
}
declare module "faker/locale/en_IND" {
export = fakerStatic;
}
declare module "faker/locale/en_US" {
export = fakerStatic;
}
declare module "faker/locale/en_au_ocker" {
export = fakerStatic;
}
declare module "faker/locale/es" {
export = fakerStatic;
}
declare module "faker/locale/es_MX" {
export = fakerStatic;
}
declare module "faker/locale/fa" {
export = fakerStatic;
}
declare module "faker/locale/fr" {
export = fakerStatic;
}
declare module "faker/locale/fr_CA" {
export = fakerStatic;
}
declare module "faker/locale/ge" {
export = fakerStatic;
}
declare module "faker/locale/it" {
export = fakerStatic;
}
declare module "faker/locale/ja" {
export = fakerStatic;
}
declare module "faker/locale/ko" {
export = fakerStatic;
}
declare module "faker/locale/nb_NO" {
export = fakerStatic;
}
declare module "faker/locale/nep" {
export = fakerStatic;
}
declare module "faker/locale/nl" {
export = fakerStatic;
}
declare module "faker/locale/pl" {
export = fakerStatic;
}
declare module "faker/locale/pt_BR" {
export = fakerStatic;
}
declare module "faker/locale/ru" {
export = fakerStatic;
}
declare module "faker/locale/sk" {
export = fakerStatic;
}
declare module "faker/locale/sv" {
export = fakerStatic;
}
declare module "faker/locale/tr" {
export = fakerStatic;
}
declare module "faker/locale/uk" {
export = fakerStatic;
}
declare module "faker/locale/vi" {
export = fakerStatic;
}
declare module "faker/locale/zh_CN" {
export = fakerStatic;
}
declare module "faker/locale/zh_TW" {
export = fakerStatic;
}

View File

@ -0,0 +1,169 @@
// Tests by: Kaur Kuut <https://github.com/xStrom>
///<reference path="../jquery/jquery.d.ts" />
///<reference path="featherlight.d.ts" />
// Every option as default
var defaultOptions = {
namespace: 'featherlight',
targetAttr: 'data-featherlight',
variant: null as string,
resetCss: false,
background: null as string,
openTrigger: 'click',
closeTrigger: 'click',
filter: null as string,
root: 'body',
openSpeed: 250,
closeSpeed: 250,
closeOnClick: 'background',
closeOnEsc: true,
closeIcon: '&#10005;',
loading: '',
persist: false,
otherClose: null as string,
beforeOpen: $.noop,
beforeContent: $.noop,
beforeClose: $.noop,
afterOpen: $.noop,
afterContent: $.noop,
afterClose: $.noop,
onKeyUp: $.noop,
onResize: $.noop,
type: null as string,
contentFilters: ['jquery', 'image', 'html', 'ajax', 'iframe', 'text']
};
// Every option changed
var changedOptions = {
namespace: 'foo',
targetAttr: 'foo',
variant: 'foo',
resetCss: true,
background: '<div/>',
openTrigger: 'focus',
closeTrigger: 'blur',
filter: 'foo',
root: 'foo',
openSpeed: 'fast',
closeSpeed: 'fast',
closeOnClick: false,
closeOnEsc: false,
closeIcon: 'foo',
loading: 'foo',
persist: 'shared',
otherClose: 'foo',
beforeOpen: (e: JQueryEventObject) => false,
beforeContent: (e: JQueryEventObject) => false,
beforeClose: (e: JQueryEventObject) => false,
afterOpen: (e: JQueryEventObject) => false,
afterContent: (e: JQueryEventObject) => false,
afterClose: (e: JQueryEventObject) => false,
onKeyUp: (e: JQueryEventObject) => false,
onResize: (e: JQueryEventObject) => false,
type: 'text'
};
// Turn off auto bind
$.featherlight.autoBind = false;
// Change some defaults
$.featherlight.defaults.namespace = 'foo';
$.featherlight.defaults.openSpeed = 500;
$.featherlight.defaults.persist = true;
$.featherlight.defaults.text = 'foo';
// Do the simplest manual bind
$('#id').featherlight();
// Bind #id to open #fl
$('#id').featherlight('#fl');
// Bind #id to open #fl with persistance
$('#id').featherlight('#fl', {persist: true});
// Bind #id to open jQuery object
$('#id').featherlight($('<span>Foo!</span>'));
// Bind #id to open jQuery object with persistance
$('#id').featherlight($('<span>Foo!</span>'), {persist: true});
// Bind #id to open #fl with every option set to default
$('#id').featherlight('#fl', defaultOptions);
// Bind #id to open jQuery object with every option set to default
$('#id').featherlight($('<span>Foo!</span>'), defaultOptions);
// Bind #id to open #fl with every option changed
$('#id').featherlight('#fl', changedOptions);
// Bind #id to open jQuery object with every option changed
$('#id').featherlight($('<span>Foo!</span>'), changedOptions);
// Open the default
$.featherlight();
new $.featherlight;
// Open just text
$.featherlight({text: 'Foo!'}).open();
new $.featherlight({text: 'Foo!'}).open();
// Open #fl, and close it
$.featherlight('#fl').close();
new $.featherlight('#fl').close();
// Open #fl with persistance, and close it
$.featherlight('#fl', {persist: true}).close();
new $.featherlight('#fl', {persist: true}).close();
// Open jQuery object, and close it
$.featherlight($('<span>Foo!</span>')).close();
new $.featherlight($('<span>Foo!</span>')).close();
// Open jQuery object with persistance, and close it
$.featherlight($('<span>Foo!</span>'), {persist: true}).close();
new $.featherlight($('<span>Foo!</span>'), {persist: true}).close();
// Open #fl with every option set to default, and close it
$.featherlight('#fl', defaultOptions).close();
new $.featherlight('#fl', defaultOptions).close();
// Open jQuery object with every option set to default, and close it
$.featherlight($('<span>Foo!</span>'), defaultOptions).close();
new $.featherlight($('<span>Foo!</span>'), defaultOptions).close();
// Open #fl with every option changed, and close it
$.featherlight('#fl', changedOptions).close();
new $.featherlight('#fl', changedOptions).close();
// Open jQuery object with every option changed, and close it
$.featherlight($('<span>Foo!</span>'), changedOptions).close();
new $.featherlight($('<span>Foo!</span>'), changedOptions).close();
// Define a custom content filter
// Note: Unfortunately $.featherlight.contentFilters.feed = .. doesn't seem to work
$.featherlight.contentFilters['feed'] = {
regex: /^feed:/,
process: function(url: string) { return $('Loading...'); }
};
// Close the currently open fl
$.featherlight.close();
// Get all the opened fls and close the first
$.featherlight.opened()[0].close();
// Get the currently opened fl
var fl = $.featherlight.current();
// .. and close it
fl.close();
// .. and open it once more
fl.open();
// .. and edit its namespace
fl.namespace = 'foo';
// .. and add a special event handler
fl.afterClose = (e: JQueryEventObject) => false;

114
featherlight/featherlight.d.ts vendored Normal file
View File

@ -0,0 +1,114 @@
// Type definitions for Featherlight v1.3.4
// Project: https://noelboss.github.io/featherlight/
// Definitions by: Kaur Kuut <https://github.com/xStrom>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///<reference path="../jquery/jquery.d.ts" />
declare module Featherlight {
interface Config {
namespace?: string;
targetAttr?: string;
variant?: string;
resetCss?: boolean;
background?: string;
openTrigger?: string;
closeTrigger?: string;
filter?: string;
root?: string;
openSpeed?: number | string;
closeSpeed?: number | string;
closeOnClick?: boolean | string;
closeOnEsc?: boolean;
closeIcon?: string;
loading?: string;
persist?: boolean | string;
otherClose?: string;
beforeOpen?: (event: JQueryEventObject) => any;
beforeContent?: (event: JQueryEventObject) => any;
beforeClose?: (event: JQueryEventObject) => any;
afterOpen?: (event: JQueryEventObject) => any;
afterContent?: (event: JQueryEventObject) => any;
afterClose?: (event: JQueryEventObject) => any;
onKeyUp?: (event: JQueryEventObject) => any;
onResize?: (event: JQueryEventObject) => any;
type?: string;
contentFilters?: any;
jquery?: JQuery;
image?: string;
html?: string;
ajax?: string;
text?: string;
}
interface ContentFilter {
regex?: RegExp;
test?(data: JQuery | string): boolean;
process?(data: JQuery | string): JQuery | JQueryPromise<JQuery>;
}
interface ContentFilters {
[name: string]: ContentFilter;
}
interface Featherlight extends Config {
target: JQuery | string;
$instance: JQuery;
$content: JQuery;
setup(target: JQuery, config?: Config): Featherlight;
setup(target: string, config?: Config): Featherlight;
setup(config: Config): Featherlight;
setup(): Featherlight;
getContent(): JQuery | JQueryPromise<JQuery>;
setContent($content: JQuery): Featherlight;
setContent($content: JQueryPromise<JQuery>): Featherlight;
open(event?: JQueryEventObject): JQueryPromise<JQuery>;
close(event?: JQueryEventObject): JQueryPromise<JQuery>;
}
interface FeatherlightStatic {
($content: JQuery, config?: Config): Featherlight;
($content: string, config?: Config): Featherlight;
(config: Config): Featherlight;
(): Featherlight;
new($content: JQuery, config?: Config): Featherlight;
new($content: string, config?: Config): Featherlight;
new(config: Config): Featherlight;
new(): Featherlight;
attach($source: JQuery, $content: JQuery, config?: Config): JQuery;
attach($source: JQuery, $content: string, config?: Config): JQuery;
attach($source: JQuery, config: Config): JQuery;
attach($source: JQuery): JQuery;
id: number;
autoBind: boolean | string;
defaults: Config;
contentFilters: ContentFilters;
functionAttributes: string[];
readElementConfig(element: HTMLElement, namespace: string): any;
extend(child: any, defaults: any): any;
current(): Featherlight;
opened(): Featherlight[];
close(): JQueryPromise<JQuery>;
}
interface JQueryExtension {
($content: JQuery, config?: Config): JQuery;
($content: string, config?: Config): JQuery;
(config: Config): JQuery;
(): JQuery;
}
}
interface JQueryStatic {
featherlight: Featherlight.FeatherlightStatic;
}
interface JQuery {
featherlight: Featherlight.JQueryExtension;
}

View File

@ -11,3 +11,7 @@ str = findup(['foo', 'bar']);
str = findup('foo', {
debug: true
});
str = findup('foo', {
cwd: "c:\\"
});

View File

@ -1,6 +1,6 @@
// Type definitions for findup-sync v0.1.3
// Type definitions for findup-sync v0.3.0
// Project: https://github.com/cowboy/node-findup-sync
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Nathan Brown <https://github.com/ngbrown>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../minimatch/minimatch.d.ts" />
@ -8,8 +8,11 @@
declare module 'findup-sync' {
import minimatch = require('minimatch');
function mod(pattern: string, opts?: minimatch.IOptions): string;
function mod(pattern: string[], opts?: minimatch.IOptions): string;
interface IOptions extends minimatch.IOptions {
cwd?: string;
}
function mod(pattern: string[] | string, opts?: IOptions): string;
export = mod;
}

78
flowjs/flowjs-tests.ts Normal file
View File

@ -0,0 +1,78 @@
/// <reference path="flowjs.d.ts" />
// flow object
var flowObject: flowjs.IFlow;
var bool: boolean = flowObject.support;
bool = flowObject.supportDirectory;
var obj: Object = flowObject.opts;
var flowFileArray: flowjs.IFlowFile[] = flowObject.files;
flowObject.assignBrowse(<HTMLElement[]> [], false, false, {});
flowObject.assignDrop(<HTMLElement[]> []);
flowObject.unAssignDrop(<HTMLElement[]> []);
flowObject.on("", () => {});
flowObject.off("", () => {});
flowObject.upload();
flowObject.pause();
flowObject.resume();
flowObject.cancel();
flowObject.progress();
bool = flowObject.isUploading();
flowObject.addFile(<File> {});
flowObject.removeFile(<flowjs.IFlowFile> {});
var flowFile: flowjs.IFlowFile = flowObject.getFromUniqueIdentifier("");
var num: number = flowObject.getSize();
num = flowObject.sizeUploaded();
num = flowObject.timeRemaining();
// flow options
var flowOptions: flowjs.IFlowOptions = {};
flowOptions.target = "";
flowOptions.singleFile = true;
flowOptions.chunkSize= 0;
flowOptions.forceChunkSize = true;
flowOptions.simultaneousUploads= 0;
flowOptions.fileParameterName = "";
flowOptions.query = {};
flowOptions.headers = {};
flowOptions.withCredentials = true;
flowOptions.method = "";
flowOptions.testMethod = "";
flowOptions.uploadMethod = "";
flowOptions.allowDuplicateUploads = true;
flowOptions.prioritizeFirstAndLastChunk = true;
flowOptions.testchunks = true;
flowOptions.preprocess = () => {};
flowOptions.initFileFn = () => {};
flowOptions.generateUniqueIdentifier = () => {};
flowOptions.maxChunkRetries= 0;
flowOptions.chunkRetryInterval= 0;
flowOptions.progressCallbacksInterval= 0;
flowOptions.speedSmoothingFactor= 0;
flowOptions.successStatuses = [""];
flowOptions.permanentErrors = [""];
// flow file
flowObject = flowFile.flowObj;
var htmlFile: File = flowFile.file;
var str: string = flowFile.name;
str = flowFile.relativePath;
num = flowFile.size;
str = flowFile.uniqueIdentifier;
num = flowFile.averageSpeed;
num = flowFile.currentSpeed;
var anyArray: any[] = flowFile.chunks;
bool = flowFile.paused;
bool = flowFile.error;
num = flowFile.progress(true);
flowFile.pause();
flowFile.resume();
flowFile.cancel();
flowFile.retry();
flowFile.bootstrap();
bool = flowFile.isUploading();
bool = flowFile.isComplete;
num = flowFile.sizeUploaded;
num = flowFile.timeRemaining;
str = flowFile.getExtension;
str = flowFile.getType;

85
flowjs/flowjs.d.ts vendored Normal file
View File

@ -0,0 +1,85 @@
// Type definitions for flowjs
// Project: https://github.com/flowjs/flow.js
// Definitions by: Ryan McNamara <https://github.com/ryan10132>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module flowjs {
interface IFlow {
support: boolean;
supportDirectory: boolean;
opts: Object;
files: IFlowFile[];
assignBrowse(domNodes: HTMLElement[], isDirectory: boolean, singleFile: boolean, attributes: Object): void;
assignDrop(domNodes: HTMLElement[]): void;
unAssignDrop(domNodes: HTMLElement[]): void;
on(event: string, callback: Function): void;
off(event?: string, callback?: Function): void;
upload(): void;
pause(): void;
resume(): void;
cancel(): void;
progress(): number;
isUploading(): boolean;
addFile(file: File): void;
removeFile(file: IFlowFile): void;
getFromUniqueIdentifier(uniqueIdentifier: string): IFlowFile;
getSize(): number;
sizeUploaded(): number;
timeRemaining(): number;
}
interface IFlowOptions {
target?: string;
singleFile?: boolean;
chunkSize?: number;
forceChunkSize?: boolean;
simultaneousUploads?: number;
fileParameterName?: string;
query?: Object;
headers?: Object;
withCredentials?: boolean;
method?: string;
testMethod?: string;
uploadMethod?: string;
allowDuplicateUploads?: boolean;
prioritizeFirstAndLastChunk?: boolean;
testchunks?: boolean;
preprocess?: Function;
initFileFn?: Function;
generateUniqueIdentifier?: Function;
maxChunkRetries?: number;
chunkRetryInterval?: number;
progressCallbacksInterval?: number;
speedSmoothingFactor?: number;
successStatuses?: string[];
permanentErrors?: string[];
}
interface IFlowFile {
flowObj: IFlow;
file: File;
name: string;
relativePath: string;
size: number;
uniqueIdentifier: string;
averageSpeed: number;
currentSpeed: number;
chunks: any[];
paused: boolean;
error: boolean;
progress(relative: boolean): number;
pause(): void;
resume(): void;
cancel(): void;
retry(): void;
bootstrap(): void;
isUploading(): boolean;
isComplete: boolean;
sizeUploaded: number;
timeRemaining: number;
getExtension: string;
getType: string;
}
}

View File

@ -0,0 +1,19 @@
/// <reference path="geoip-lite.d.ts"/>
// require geoip-lite
import geoip = require('geoip-lite');
// lookup an IP addres
var geo = geoip.lookup('199.16.156.125');
// convert the ip block range to string
if (geo) {
let rangeStart = geoip.pretty(geo.range[0]);
let rangeEnd = geoip.pretty(geo.range[1]);
}
// start the data update watcher
geoip.startWatchingDataUpdate();
// stop the data update watcher
geoip.stopWatchingDataUpdate();

22
geoip-lite/geoip-lite.d.ts vendored Normal file
View File

@ -0,0 +1,22 @@
// Type definitions for GeoIP-lite 1.1.6
// Project: https://github.com/bluesmoon/node-geoip
// Definitions by: Yuce Tekol <http://yuce.me/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module 'geoip-lite' {
module mod {
export interface Lookup {
range: Array<number>; // range start, end
country: string;
region: string;
city: string;
ll: Array<number>; // latitude, longitude
}
export function lookup(ip: string): Lookup;
export function pretty(ip: number): string;
export function startWatchingDataUpdate(): void;
export function stopWatchingDataUpdate(): void;
}
export = mod;
}

View File

@ -43,6 +43,8 @@ app.on('ready', () => {
// and load the index.html of the app.
mainWindow.loadUrl(`file://${__dirname}/index.html`);
mainWindow.loadUrl('file://foo/bar', {userAgent: 'cool-agent', httpReferrer: 'greateRefferer'});
mainWindow.webContents.loadUrl('file://foo/bar', {userAgent: 'cool-agent', httpReferrer: 'greateRefferer'});
mainWindow.openDevTools()
var opened: boolean = mainWindow.isDevToolsOpened()
@ -409,6 +411,7 @@ app.on('ready', () => {
]);
appIcon.setToolTip('This is my application.');
appIcon.setContextMenu(contextMenu);
appIcon.setImage('/path/to/new/icon');
});
// clipboard

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