Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Kiarash Ghiaseddin
2015-03-25 16:57:20 +01:00
368 changed files with 48511 additions and 14891 deletions
+3
View File
@@ -32,6 +32,9 @@ _infrastructure/tests/build
#rx.js
!rx.js
#zip.js
!zip.js
node_modules
.sublimets
+103 -10
View File
@@ -13,24 +13,26 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](amqp-rpc/amqp-rpc.d.ts) [amqp-rpc](https://github.com/demchenkoe/node-amqp-rpc) by [Wonshik Kim](https://github.com/wokim)
* [:link:](angular-file-upload/angular-file-upload.d.ts) [Angular File Upload](https://github.com/danialfarid/angular-file-upload) by [John Reilly](https://github.com/johnnyreilly)
* [:link:](angularjs/angular.d.ts) [Angular JS](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar)
* [:link:](angularjs/angular-animate.d.ts) [Angular JS (ngAnimate module)](http://angularjs.org) by [Michel Salib](https://github.com/michelsalib), [Adi Dahiya](https://github.com/adidahiya)
* [:link:](angularjs/angular-animate.d.ts) [Angular JS (ngAnimate module)](http://angularjs.org) by [Michel Salib](https://github.com/michelsalib), [Adi Dahiya](https://github.com/adidahiya), [Raphael Schweizer](https://github.com/rasch)
* [:link:](angularjs/angular-cookies.d.ts) [Angular JS (ngCookies module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar)
* [:link:](angularjs/angular-mocks.d.ts) [Angular JS (ngMock, ngMockE2E module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar)
* [:link:](angularjs/angular-resource.d.ts) [Angular JS (ngResource module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar), [Michael Jess](http://github.com/miffels)
* [:link:](angularjs/angular-route.d.ts) [Angular JS (ngRoute module)](http://angularjs.org) by [Jonathan Park](https://github.com/park9140)
* [:link:](angularjs/angular-sanitize.d.ts) [Angular JS (ngSanitize module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar)
* [:link:](angular-ui/angular-ui-router.d.ts) [Angular JS (ui.router module)](https://github.com/angular-ui/ui-router) by [Michel Salib](https://github.com/michelsalib)
* [:link:](angular-ui-router/angular-ui-router.d.ts) [Angular JS (ui.router module)](https://github.com/angular-ui/ui-router) by [Michel Salib](https://github.com/michelsalib)
* [:link:](angular-material/angular-material.d.ts) [Angular Material (ng.material module)](https://github.com/angular/material) by [Matt Traynham](https://github.com/mtraynham)
* [:link:](angular-protractor/angular-protractor.d.ts) [Angular Protractor](https://github.com/angular/protractor) by [Bill Armstrong](https://github.com/BillArmstrong)
* [:link:](angular-scenario/angular-scenario.d.ts) [Angular Scenario Testing (ngScenario module)](http://angularjs.org) by [RomanoLindano](https://github.com/RomanoLindano)
* [:link:](angular-translate/angular-translate.d.ts) [Angular Translate (pascalprecht.translate module)](https://github.com/PascalPrecht/angular-translate) by [Michel Salib](https://github.com/michelsalib)
* [:link:](angular-ui-bootstrap/angular-ui-bootstrap.d.ts) [Angular UI Bootstrap](https://github.com/angular-ui/bootstrap) by [Brian Surowiec](https://github.com/xt0rted)
* [:link:](angular-bootstrap-lightbox/angular-bootstrap-lightbox.d.ts) [angular-bootstrap-lightbox](https://github.com/compact/angular-bootstrap-lightbox) by [Roland Zwaga](https://github.com/rolandzwaga)
* [:link:](angular-hotkeys/angular-hotkeys.d.ts) [angular-hotkeys](https://github.com/chieffancypants/angular-hotkeys) by [Jason Zhao](https://github.com/jlz27)
* [:link:](angular-hotkeys/angular-hotkeys.d.ts) [angular-hotkeys](https://github.com/chieffancypants/angular-hotkeys) by [Jason Zhao](https://github.com/jlz27), [Stefan Steinhart](https://github.com/reppners)
* [:link:](angular-http-auth/angular-http-auth.d.ts) [angular-http-auth](https://github.com/witoldsz/angular-http-auth) by [vvakame](https://github.com/vvakame)
* [:link:](angular-local-storage/angular-local-storage.d.ts) [angular-local-storage](https://github.com/grevory/angular-local-storage) by [Ken Fukuyama](https://github.com/kenfdev)
* [:link:](angular-notify/angular-notify.d.ts) [angular-notify](https://github.com/cgross/angular-notify) by [Suwato](https://github.com/Suwato/DefinitelyTyped)
* [:link:](angular-scroll/angular-scroll.d.ts) [angular-scroll](https://github.com/oblador/angular-scroll) by [Sam Herrmann](https://github.com/samherrmann)
* [:link:](angular-spinner/angular-spinner.d.ts) [angular-spinner.js](https://github.com/urish/angular-spinner) by [Marcin Biegała](https://github.com/Biegal)
* [:link:](angular-ui-sortable/angular-ui-sortable.d.ts) [angular.ui.sortable module](https://github.com/angular-ui/ui-sortable) by [Thodoris Greasidis](https://github.com/thgreasi)
* [:link:](angular-agility/angular-agility.d.ts) [AngularAgility](https://github.com/AngularAgility/AngularAgility) by [Roland Zwaga](https://github.com/rolandzwaga)
* [:link:](angularfire/angularfire.d.ts) [AngularFire](http://angularfire.com) by [Dénes Harmath](http://github.com/thSoft)
* [:link:](angularLocalStorage/angularLocalStorage.d.ts) [AngularLocalStorage](https://github.com/agrublev/angularLocalStorage) by [Horiuchi_H](https://github.com/horiuchi)
@@ -39,8 +41,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](any-db/any-db.d.ts) [any-db](https://github.com/grncdr/node-any-db) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](any-db-transaction/any-db-transaction.d.ts) [any-db-transaction](https://github.com/grncdr/node-any-db-transaction) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](cordova/cordova.d.ts) [Apache Cordova](http://cordova.apache.org) by [Microsoft Open Technologies Inc.](http://msopentech.com)
* [:link:](polymer/polymer.app-router.d.ts) [app-router](https://github.com/erikringsmuth/app-router) by [Louis Grignon](https://github.com/lgrignon)
* [:link:](appframework/appframework.d.ts) [AppFramework](http://app-framework-software.intel.com) by [kyo_ago](https://github.com/kyo-ago)
* [:link:](arbiter/Arbiter.d.ts) [Arbiter.js](http://arbiterjs.com) by [Arash Shakery](https://github.com/arash16)
* [:link:](arcgis-js-api/arcgis-js-api.d.ts) [ArcGIS API for JavaScript](http://js.arcgis.com) by [Esri](http://www.esri.com)
* [: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)
* [:link:](assert/assert.d.ts) [assert and power-assert](https://github.com/Jxck/assert) by [vvakame](https://github.com/vvakame)
@@ -53,10 +58,12 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](auth0/auth0.d.ts) [Auth0.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
* [:link:](auth0.widget/auth0.widget.d.ts) [Auth0Widget.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
* [:link:](aws-sdk/aws-sdk.d.ts) [aws-sdk](https://github.com/aws/aws-sdk-js) by [midknight41](https://github.com/midknight41)
* [:link:](axios/axios.d.ts) [axios](https://github.com/mzabriskie/axios) by [Marcel Buesing](https://github.com/marcelbuesing)
* [:link:](node-azure/azure.d.ts) [Azure SDK for Node](https://github.com/WindowsAzure/azure-sdk-for-node) by [Andrew Gaspar](https://github.com/AndrewGaspar), [Anti Veeranna](https://github.com/antiveeranna), [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](backbone/backbone.d.ts) [Backbone](http://backbonejs.org) by [Boris Yankov](https://github.com/borisyankov), [Natan Vivo](https://github.com/nvivo)
* [:link:](backbone-relational/backbone-relational.d.ts) [Backbone-relational](http://backbonerelational.org) by [Eirik Hoem](https://github.com/eirikhm)
* [:link:](backbone.layoutmanager/backbone.layoutmanager.d.ts) [Backbone.LayoutManager](http://layoutmanager.org) by [He Jiang](https://github.com/hejiang2000)
* [:link:](backbone.paginator/backbone.paginator.d.ts) [backbone.paginator](https://github.com/backbone-paginator/backbone.paginator) by [Nyamazing](https://github.com/Nyamazing)
* [:link:](backbone.radio/backbone.radio.d.ts) [Backbone.Radio](https://github.com/marionettejs/backbone.radio) by [Peter Palotas](https://github.com/alphaleonis)
* [:link:](backgrid/backgrid.d.ts) [Backgrid](http://backgridjs.com) by [Jeremy Lujan](https://github.com/jlujan)
* [:link:](bcrypt/bcrypt.d.ts) [bcrypt](https://www.npmjs.org/package/bcrypt) by [Peter Harris](https://github.com/codeanimal)
@@ -65,7 +72,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](bigint/bigint.d.ts) [BigInt](https://github.com/Evgenus/BigInt) by [Eugene Chernyshov](https://github.com/Evgenus)
* [:link:](big-integer/big-integer.d.ts) [BigInteger.js](https://github.com/peterolson/BigInteger.js) by [Ingo Bürk](https://github.com/Airblader), [Roel van Uden](https://github.com/Deathspike)
* [:link:](bigscreen/bigscreen.d.ts) [BigScreen](http://brad.is/coding/BigScreen) by [Douglas Eichelberger](https://github.com/dduugg)
* [:link:](bitwise-xor/bitwise-xor.d.ts) [bitwise-xor](https://github.com/czzarr/node-bitwise-xor) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](bluebird/bluebird.d.ts) [bluebird](https://github.com/petkaantonov/bluebird) by [Bart van der Schoor](https://github.com/Bartvds)
* [: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)
* [:link:](bootbox/bootbox.d.ts) [Bootbox](https://github.com/makeusabrew/bootbox) by [Vincent Bortone](https://github.com/vbortone), [Kon Pik](https://github.com/konpikwastaken)
@@ -76,7 +85,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](bootstrap.paginator/bootstrap.paginator.d.ts) [bootstrap.paginator](https://github.com/lyonlai/bootstrap-paginator) by [derikwhittaker](https://github.com/derikwhittaker)
* [:link:](bootstrap.timepicker/bootstrap.timepicker.d.ts) [bootstrap.timepicker](https://github.com/jdewit/bootstrap-timepicker) by [derikwhittaker](https://github.com/derikwhittaker)
* [:link:](box2d/box2dweb.d.ts) [bootstrap.timepicker](http://code.google.com/p/box2dweb) by [jbaldwin](https://github.com/jbaldwin)
* [:link:](breeze/breeze.d.ts) [Breeze](http://www.breezejs.com) by [Boris Yankov](https://github.com/borisyankov), [IdeaBlade](https://github.com/IdeaBlade/Breeze)
* [:link:](breeze/breeze.d.ts) [Breeze 1.5.x](http://www.breezejs.com) by [Boris Yankov](https://github.com/borisyankov), [IdeaBlade](https://github.com/IdeaBlade/Breeze)
* [:link:](browser-harness/browser-harness.d.ts) [Browser Harness](https://github.com/scriby/browser-harness) by [Chris Scribner](https://github.com/scriby)
* [:link:](browser-sync/browser-sync.d.ts) [browser-sync](http://www.browsersync.io) by [Asana](https://asana.com)
* [:link:](browserify/browserify.d.ts) [Browserify](http://browserify.org) by [Andrew Gaspar](https://github.com/AndrewGaspar)
@@ -84,6 +93,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](buffer-equal/buffer-equal.d.ts) [buffer-equal](https://github.com/substack/node-buffer-equal) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](bl/bl.d.ts) [BufferList](https://github.com/rvagg/bl) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](bufferstream/bufferstream.d.ts) [bufferstream](https://github.com/dodo/node-bufferstream) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](bunyan-prettystream/bunyan-prettystream.d.ts) [bunyan-prettystream](https://www.npmjs.com/package/bunyan-prettystream) by [Jason Swearingen](https://github.com/jasonswearingen)
* [:link:](business-rules-engine/business-rules-engine.d.ts) [business-rules-engine](https://github.com/rsamec/form) by [Roman Samec](https://github.com/rsamec)
* [:link:](byline/byline.d.ts) [byline](https://github.com/jahewson/node-byline) by [Stefan Steinhart](https://github.com/reppners)
* [:link:](camljs/camljs.d.ts) [camljs](http://camljs.codeplex.com) by [Andrey Markeev](http://markeev.com)
@@ -96,10 +106,12 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](chai-http/chai-http.d.ts) [chai-http](https://github.com/chaijs/chai-http) by [Wim Looman](https://github.com/Nemo157)
* [:link:](chai-jquery/chai-jquery.d.ts) [chai-jquery](https://github.com/chaijs/chai-jquery) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid)
* [:link:](chalk/chalk.d.ts) [chalk](https://github.com/sindresorhus/chalk) by [Diullei Gomes](https://github.com/Diullei), [Bart van der Schoor](https://github.com/Bartvds)
* [: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:](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:](chokidar/chokidar.d.ts) [chokidar](https://github.com/paulmillr/chokidar) by [Stefan Steinhart](https://github.com/reppners)
* [:link:](chosen/chosen.jquery.d.ts) [Chosen.JQuery](http://harvesthq.github.com/chosen) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](chroma-js/chroma-js.d.ts) [Chroma.js](https://github.com/gka/chroma.js) by [Sebastian Brückner](https://github.com/invliD)
* [:link:](chrome/chrome.d.ts) [Chrome extension development](http://developer.chrome.com/extensions) by [Matthew Kimber](https://github.com/matthewkimber), [otiai10](https://github.com/otiai10)
@@ -125,17 +137,20 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](createjs/createjs.d.ts) [CreateJS](http://www.createjs.com) by [Pedro Ferreira](https://bitbucket.org/drk4), [Chris Smith](https://github.com/evilangelist), [Satoru Kimura](https://github.com/gyohk)
* [:link:](crossfilter/crossfilter.d.ts) [CrossFilter](https://github.com/square/crossfilter) by [Schmulik Raskin](https://github.com/schmuli)
* [:link:](crossroads/crossroads.d.ts) [Crossroads.js](http://millermedeiros.github.io/crossroads.js) by [Diullei Gomes](https://github.com/diullei)
* [:link:](crypto-js/crypto-js.d.ts) [crypto-js](https://github.com/evanvosberg/crypto-js) by [Michael Zabka](https://github.com/misak113)
* [:link:](cryptojs/cryptojs.d.ts) [CryptoJS](https://code.google.com/p/crypto-js) by [Gia Bảo @ Sân Đình](https://github.com/giabao)
* [:link:](googlemaps.infobubble/google.maps.infobubble.d.ts) [CSS3 InfoBubble with tabs for Google Maps API V3](http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobubble/src) by [Johan Nilsson](https://github.com/Dashue)
* [:link:](csurf/csurf.d.ts) [csurf](https://www.npmjs.org/package/csurf) by [Hiroki Horiuchi](https://github.com/horiuchi)
* [:link:](csv-stringify/csv-stringify.d.ts) [csv-stringify](https://github.com/wdavidw/node-csv-stringify) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](md5/md5.d.ts) [CybozuLabs.MD5](http://labs.cybozu.co.jp/blog/mitsunari/2007/07/md5js_1.html) by [MIZUNE Pine](https://github.com/pine613)
* [:link:](d3/d3.d.ts) [d3JS](http://d3js.org) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](d3.cloud.layout/d3.cloud.layout.d.ts) [d3JS cloud layout plugin by Jason Davies](https://github.com/jasondavies/d3-cloud) by [hans windhoff](https://github.com/hansrwindhoff)
* [:link:](dagre/dagre.d.ts) [dagre](https://github.com/cpettitt/dagre) by [Qinfeng Chen](https://github.com/qinfchen)
* [:link:](dagre-d3/dagre-d3.d.ts) [dagre-d3.core.js](https://github.com/cpettitt/dagre-d3) by [Mark Wong Siang Kai](https://github.com/markwongsk)
* [:link:](dat-gui/dat-gui.d.ts) [dat.GUI](https://github.com/dataarts/dat.gui) by [Satoru Kimura](https://github.com/gyohk)
* [:link:](date.format.js/date.format.d.ts) [Date Format](http://blog.stevenlevithan.com/archives/date-time-format) by [Rob Stutton](https://github.com/balrob)
* [:link:](datejs/datejs.d.ts) [DateJS](http://www.datejs.com) by [David Khristepher Santos](http://github.com/rupertavery)
* [:link:](dcjs/dc.d.ts) [DCJS](https://github.com/dc-js) by [hans windhoff](https://github.com/hansrwindhoff)
* [:link:](dcjs/dc.d.ts) [DCJS](https://github.com/dc-js/dc.js) by [hans windhoff](https://github.com/hansrwindhoff), [matt traynham](https://github.com/mtraynham)
* [:link:](debug/debug.d.ts) [debug](https://github.com/visionmedia/debug) by [Seon-Wook Park](https://github.com/swook)
* [:link:](deep-diff/deep-diff.d.ts) [deep-diff](https://github.com/flitbit/diff) by [ZauberNerd](https://github.com/ZauberNerd)
* [:link:](deep-freeze/deep-freeze.d.ts) [deep-freeze](https://github.com/substack/deep-freeze) by [Bart van der Schoor](https://github.com/Bartvds)
@@ -156,6 +171,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](dot/dot.d.ts) [doT](https://github.com/olado/doT) by [ZombieHunter](https://github.com/ZombieHunter)
* [:link:](dotdotdot/dotdotdot.d.ts) [dotdotdot](http://dotdotdot.frebsite.nl) by [Milan Jaros](https://github.com/milanjaros)
* [:link:](doublearray/doublearray.d.ts) [doublearray](https://github.com/takuyaa/doublearray) by [MIZUSHIMA Junki](https://github.com/mzsm)
* [:link:](drop/drop.d.ts) [Drop](http://github.hubspot.com/drop) by [Adi Dahiya](https://github.com/adidahiya)
* [:link:](dropboxjs/dropboxjs.d.ts) [dropbox-js](https://github.com/dropbox/dropbox-js) by [Steve Fenton](https://github.com/Steve-Fenton), [Pedro Casaubon](https://github.com/xperiments)
* [:link:](dropzone/dropzone.d.ts) [Dropzone](http://www.dropzonejs.com) by [Natan Vivo](https://github.com/nvivo)
* [:link:](dts-bundle/dts-bundle.d.ts) [dts-bundle](https://github.com/TypeStrong/dts-bundle) by [Asana](https://asana.com)
@@ -174,9 +190,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](epiceditor/epiceditor.d.ts) [EpicEditor](http://epiceditor.com) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](errorhandler/errorhandler.d.ts) [errorhandler](https://github.com/expressjs/errorhandler) by [Santi Albo](https://github.com/santialbo)
* [:link:](es6-promise/es6-promise.d.ts) [es6-promise](https://github.com/jakearchibald/ES6-Promise) by [François de Campredon](https://github.com/fdecampredon), [vvakame](https://github.com/vvakame)
* [:link:](escape-latex/escape-latex.d.ts) [escape-latex](https://github.com/dangmai/escape-latex) by [Oliver Schneider](https://github.com/olsio)
* [:link:](esprima/esprima.d.ts) [Esprima](http://esprima.org) by [teppeis](https://github.com/teppeis)
* [:link:](event-loop-lag/event-loop-lag.d.ts) [event-loop-lag](https://github.com/pebble/event-loop-lag) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](eventemitter2/eventemitter2.d.ts) [EventEmitter2](https://github.com/asyncly/EventEmitter2) by [ryiwamoto](https://github.com/ryiwamoto)
* [:link:](eventemitter3/eventemitter3.d.ts) [EventEmitter3](https://github.com/primus/eventemitter3) by [Yuichi Murata](https://github.com/mrk21)
* [:link:](exit/exit.d.ts) [exit](https://github.com/cowboy/node-exit) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](expect.js/expect.js.d.ts) [expect.js](https://github.com/LearnBoost/expect.js) by [Teppei Sato](https://github.com/teppeis)
* [:link:](expectations/expectations.d.ts) [expectations.js](https://github.com/spmason/expectations) by [vvakame](https://github.com/vvakame)
@@ -187,12 +205,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](express-session/express-session.d.ts) [express-session](https://www.npmjs.org/package/express-session) by [Hiroki Horiuchi](https://github.com/horiuchi)
* [:link:](express-unless/express-unless.d.ts) [express-unless](https://www.npmjs.org/package/express-unless) by [Wonshik Kim](https://github.com/wokim)
* [:link:](express-validator/express-validator.d.ts) [express-validator](https://github.com/ctavan/express-validator) by [Nathan Ridley](https://github.com/axefrog), [Jonathan Häberle](http://dreampulse.de)
* [:link:](extend/extend.d.ts) [extend](https://www.npmjs.com/package/extend) by [Stefan Steinhart](https://github.com/reppners)
* [:link:](extjs/ExtJS.d.ts) [ExtJS](http://www.sencha.com/products/extjs) by [Brian Kotek](https://github.com/brian428)
* [:link:](fabricjs/fabricjs.d.ts) [FabricJS](http://fabricjs.com) by [Oliver Klemencic](https://github.com/oklemencic)
* [:link:](fbsdk/fbsdk.d.ts) [Facebook Javascript SDK](https://developers.facebook.com/docs/javascript) by [Joshua Strobl](https://github.com/JoshStrobl)
* [:link:](fancybox/fancybox.d.ts) [fancyBox](https://github.com/fancyapps/fancyBox) by [Boris Yankov](https://github.com/borisyankov)
* [: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:](whatwg-fetch/whatwg-fetch.d.ts) [fetch API](https://github.com/github/fetch) by [Ryan Graham](https://github.com/ryan-codingintrigue)
* [:link:](fibers/fibers.d.ts) [fibers](https://github.com/laverdet/node-fibers) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](filewriter/filewriter.d.ts) [File API: Writer](http://www.w3.org/TR/file-writer-api) by [Kon](http://phyzkit.net)
* [:link:](filesystem/filesystem.d.ts) [File System API](http://www.w3.org/TR/file-system-api) by [Kon](http://phyzkit.net)
@@ -208,6 +228,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](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:](ion.rangeSlider/ion.rangeSlider.d.ts) [for Ion.RangeSlider](https://github.com/IonDen/ion.rangeSlider) by [Sixin Li](https://github.com/sixinli)
* [: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)
@@ -215,9 +236,12 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](fpsmeter/FPSMeter.d.ts) [FPSmeter](http://darsa.in/fpsmeter) by [Aaron Lampros](http://github.com/alampros)
* [:link:](from/from.d.ts) [from](https://github.com/dominictarr/from) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](fs-extra/fs-extra.d.ts) [fs-extra](https://github.com/jprichardson/node-fs-extra) by [midknight41](https://github.com/midknight41)
* [:link:](fs-finder/fs-finder.d.ts) [fs-finder](https://github.com/sakren/node-fs-finder) by [Michael Zabka](https://github.com/misak113)
* [:link:](fs-mock/fs-mock.d.ts) [fs-mock](https://github.com/sakren/node-fs-mock) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](ftdomdelegate/ftdomdelegate.d.ts) [ftdomdelegate](https://github.com/ftlabs/ftdomdelegate) by [Christian Holm Nielsen](https://github.com/dotnetnerd)
* [:link:](fullCalendar/fullCalendar.d.ts) [FullCalendar](http://arshaw.com/fullcalendar) by [Neil Stalker](https://github.com/nestalk)
* [:link:](fuse/fuse.d.ts) [Fuse.js](https://github.com/krisk/Fuse) by [Greg Smith](https://github.com/smrq)
* [:link:](jquery-galleria/jquery-galleria.d.ts) [galleria.js](https://github.com/aino/galleria) by [Robert Imig](https://github.com/rimig)
* [: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)
@@ -236,6 +260,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](google.geolocation/google.geolocation.d.ts) [Google Geolocation](https://code.google.com/p/geo-location-javascript) by [Vincent Bortone](https://github.com/vbortone)
* [:link:](googlemaps/google.maps.d.ts) [Google Geolocation](https://developers.google.com/maps) by [Folia A/S](http://www.folia.dk)
* [:link:](gapi.pagespeedonline/gapi.pagespeedonline.d.ts) [Google Page Speed Online Api](https://developers.google.com/speed/pagespeed) by [Frank M](https://github.com/sgtfrankieboy)
* [:link:](google.picker/google.picker.d.ts) [Google Picker API](https://developers.google.com/picker) by [grapswiz](https://github.com/grapswiz)
* [:link:](recaptcha/recaptcha.d.ts) [Google Recaptcha](https://www.google.com/recaptcha) by [Brent Jenkins](https://github.com/brentj73)
* [:link:](gapi.translate/gapi.translate.d.ts) [Google Translate API](https://developers.google.com/translate) by [Frank M](https://github.com/sgtfrankieboy)
* [:link:](gapi.urlshortener/gapi.urlshortener.d.ts) [Google Url Shortener API](https://developers.google.com/url-shortener) by [Frank M](https://github.com/sgtfrankieboy)
@@ -246,23 +271,33 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](greensock/greensock.d.ts) [GreenSock Animation Platform](http://www.greensock.com/get-started-js) by [Robert S](https://github.com/codebelt)
* [:link:](gridfs-stream/gridfs-stream.d.ts) [gridfs-stream](https://github.com/aheckmann/gridfs-stream) by [Lior Mualem](https://github.com/liorm)
* [:link:](gruntjs/gruntjs.d.ts) [Grunt 0.4.x](http://gruntjs.com) by [Jeff May](https://github.com/jeffmay), [Basarat Ali Syed](https://github.com/basarat)
* [:link:](gsap/TweenLite.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gsap/Ease.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gsap/Core.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gulp/gulp.d.ts) [Gulp v3.8.x](http://gulpjs.com) by [Drew Noakes](https://drewnoakes.com)
* [:link:](gulp-autoprefixer/gulp-autoprefixer.d.ts) [gulp-autoprefixer](https://github.com/sindresorhus/gulp-autoprefixer) by [Asana](https://asana.com)
* [:link:](gulp-concat/gulp-concat.d.ts) [gulp-concat](http://github.com/wearefractal/gulp-concat) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](gulp-flatten/gulp-flatten.d.ts) [gulp-flatten](https://github.com/armed/gulp-flatten) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](gulp-gh-pages/gulp-gh-pages.d.ts) [gulp-gh-pages](https://github.com/rowoot/gulp-gh-pages) by [Asana](https://asana.com)
* [:link:](gulp-if/gulp-if.d.ts) [gulp-if](https://github.com/robrich/gulp-if) by [Asana](https://asana.com)
* [:link:](gulp-inject/gulp-inject.d.ts) [gulp-inject](https://github.com/klei/gulp-inject) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](gulp-istanbul/gulp-istanbul.d.ts) [gulp-istanbul](https://github.com/SBoudrias/gulp-istanbul) by [Asana](https://asana.com)
* [:link:](gulp-less/gulp-less.d.ts) [gulp-less](https://github.com/plus3network/gulp-less) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](gulp-minify-css/gulp-minify-css.d.ts) [gulp-minify-css](https://github.com/jonathanepollack/gulp-minify-css) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](gulp-mocha/gulp-mocha.d.ts) [gulp-mocha](https://github.com/sindresorhus/gulp-mocha) by [Asana](https://asana.com)
* [:link:](gulp-rename/gulp-rename.d.ts) [gulp-rename](https://github.com/hparra/gulp-rename) by [Asana](https://asana.com)
* [:link:](gulp-replace/gulp-replace.d.ts) [gulp-replace](https://github.com/lazd/gulp-replace) by [Asana](https://asana.com)
* [:link:](gulp-sass/gulp-sass.d.ts) [gulp-sass](https://github.com/dlmanning/gulp-sass) by [Asana](https://asana.com)
* [:link:](gulp-sourcemaps/gulp-sourcemaps.d.ts) [gulp-sourcemaps](https://github.com/floridoo/gulp-sourcemaps) by [Asana](https://asana.com)
* [:link:](gulp-tsd/gulp-tsd.d.ts) [gulp-tsd](https://github.com/moznion/gulp-tsd) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](gulp-tslint/gulp-tslint.d.ts) [gulp-tslint](https://github.com/panuhorsmalahti/gulp-tslint) by [Asana](https://asana.com)
* [:link:](gulp-typedoc/gulp-typedoc.d.ts) [gulp-typedoc](https://github.com/rogierschouten/gulp-typedoc) by [Asana](https://asana.com)
* [:link:](gulp-typescript/gulp-typescript.d.ts) [gulp-typescript](https://github.com/ivogabe/gulp-typescript) by [Asana](https://asana.com)
* [:link:](gulp-util/gulp-util.d.ts) [gulp-util v3.0.x](https://github.com/gulpjs/gulp-util) by [jedmao](https://github.com/jedmao)
* [:link:](hammerjs/hammerjs.d.ts) [Hammer.js](http://hammerjs.github.io) by [Philip Bulley](https://github.com/milkisevil), [Han Lin Yap](https://github.com/codler)
* [:link:](handlebars/handlebars.d.ts) [Handlebars](http://handlebarsjs.com) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](hapi/hapi.d.ts) [hapi](http://github.com/spumko/hapi) by [Hakubo](http://github.com/hakubo)
* [:link:](hapi/hapi.d.ts) [hapi](http://github.com/spumko/hapi) by [Jason Swearingen](http://github.com/jasonswearingen)
* [:link:](hasher/hasher.d.ts) [Hasher.js](https://github.com/millermedeiros/hasher) by [flyfishMT](https://github.com/flyfishMT)
* [:link:](hashmap/hashmap.d.ts) [HashMap](https://github.com/flesler/hashmap) by [Rafał Wrzeszcz](http://wrzasq.pl)
* [:link:](Headroom/headroom.d.ts) [headroom.js](http://wicky.nillia.ms/headroom.js) by [Jakub Olek](https://github.com/hakubo)
* [:link:](heatmap.js/heatmap.d.ts) [heatmap.js](https://github.com/pa7/heatmap.js) by [Yang Guan](https://github.com/lookuptable)
@@ -275,6 +310,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](touch-events/touch-events.d.ts) [HTML Touch Events](http://www.w3.org/TR/touch-events) by [Kevin Barabash](https://github.com/kevinb7)
* [: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:](http-status/http-status.d.ts) [http-status](https://github.com/wdavidw/node-http-status) by [Michael Zabka](https://github.com/misak113)
* [:link:](http-string-parser/http-string-parser.d.ts) [http-string-parser](https://github.com/apiaryio/http-string-parser) by [MIZUNE Pine](https://github.com/pine613)
* [:link:](humane/humane.d.ts) [Humane](http://wavded.github.com/humane-js) by [jmvrbanac](https://github.com/jmvrbanac)
* [:link:](i18n-node/i18n-node.d.ts) [i18n-node](https://github.com/mashpie/i18n-node) by [Maxime LUCE](https://github.com/SomaticIT)
@@ -285,10 +321,12 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](imap/imap.d.ts) [imap](https://www.npmjs.com/package/imap) by [Peter Snider](https://github.com/psnider)
* [:link:](impress/impress.d.ts) [Impress.js](https://github.com/bartaz/impress.js) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](inflection/inflection.d.ts) [inflection](https://github.com/dreamerslab/node.inflection) by [Shogo Iwano](https://github.com/shiwano)
* [:link:](ini/ini.d.ts) [ini](https://github.com/isaacs/ini) by [Marcin Porębski](https://github.com/marcinporebski)
* [:link:](insight/insight.d.ts) [insight](https://github.com/yeoman/insight) by [vvakame](http://github.com/vvakame)
* [:link:](interactjs/interact.d.ts) [Interacting for interact.js](https://github.com/taye/interact.js) by [Douglas Eichelberger](https://github.com/dduugg), [Adi Dahiya](https://github.com/adidahiya)
* [:link:](intercomjs/intercom.d.ts) [intercom.js](https://github.com/diy/intercom.js) by [spencerwi](http://github.com/spencerwi)
* [:link:](cordova-ionic/cordova-ionic.d.ts) [Ionic Cordova plugins](https://github.com/driftyco) by [Hendrik Maus](https://github.com/hendrikmaus)
* [:link:](is_js/is_js.d.ts) [is.js](http://arasatasaygin.github.io/is.js) by [Rodrigo Cabral](https://github.com/cabralRodrigo)
* [:link:](iscroll/iscroll.d.ts) [iScroll](http://cubiq.org/iscroll-4) by [Boris Yankov](https://github.com/borisyankov), [Christiaan Rakowski](https://github.com/csrakowski)
* [:link:](iscroll/iscroll-5.d.ts) [iScroll 5](http://cubiq.org/iscroll-5-ready-for-beta-test) by [Christiaan Rakowski](https://github.com/csrakowski)
* [:link:](iscroll/iscroll-lite.d.ts) [iScroll Lite](http://cubiq.org/iscroll-4) by [Boris Yankov](https://github.com/borisyankov), [Christiaan Rakowski](https://github.com/csrakowski)
@@ -302,12 +340,15 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](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:](jbinary/jbinary.d.ts) [jBinary](https://github.com/jDataView/jBinary) by [Tim Bureck](https://github.com/tbureck)
* [:link:](jdataview/jdataview.d.ts) [jDataView](https://github.com/jDataView/jDataView) by [Ingvar Stepanyan](https://github.com/RReverser)
* [:link:](jest/jest.d.ts) [Jest](http://facebook.github.io/jest) by [Asana](https://asana.com)
* [:link:](jjv/jjv.d.ts) [JJV](https://github.com/acornejo/jjv) by [Wim Looman](https://github.com/Nemo157)
* [:link:](jjve/jjve.d.ts) [JJVE](https://github.com/silas/jjve) by [Wim Looman](https://github.com/Nemo157)
* [:link:](johnny-five/johnny-five.d.ts) [johnny-five](https://github.com/rwaldron/johnny-five) by [Toshiya Nakakura](https://github.com/nakakura)
* [:link:](joi/joi.d.ts) [joi](https://github.com/spumko/joi) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](jointjs/jointjs.d.ts) [Joint JS](http://www.jointjs.com) by [Aidan Reel](http://github.com/areel), [David Durman](http://github.com/DavidDurman)
* [:link:](jointjs/jointjs.d.ts) [Joint JS](http://www.jointjs.com) by [Aidan Reel](http://github.com/areel), [David Durman](http://github.com/DavidDurman), [Ewout Van Gossum](https://github.com/DenEwout)
* [:link:](jqrangeslider/jqrangeslider.d.ts) [jQRangeSlider](http://ghusse.github.com/jQRangeSlider) by [Dániel Tar](https://github.com/qcz)
* [:link:](jquery/jquery.d.ts) [jQuery 1.10.x / 2.0.x](http://jquery.com) by [Boris Yankov](https://github.com/borisyankov), [Christian Hoffmeister](https://github.com/choffmeister), [Steve Fenton](https://github.com/Steve-Fenton), [Diullei Gomes](https://github.com/Diullei), [Tass Iliopoulos](https://github.com/tasoili), [Jason Swearingen](https://github.com/jasons-novaleaf), [Sean Hill](https://github.com/seanski), [Guus Goossens](https://github.com/Guuz), [Kelly Summerlin](https://github.com/ksummerlin), [Basarat Ali Syed](https://github.com/basarat), [Nicholas Wolverson](https://github.com/nwolverson), [Derek Cicerone](https://github.com/derekcicerone), [Andrew Gaspar](https://github.com/AndrewGaspar), [James Harrison Fisher](https://github.com/jameshfisher), [Seikichi Kondo](https://github.com/seikichi), [Benjamin Jackman](https://github.com/benjaminjackman), [Poul Sorensen](https://github.com/s093294), [Josh Strobl](https://github.com/JoshStrobl), [John Reilly](https://github.com/johnnyreilly), [Dick van den Brink](https://github.com/DickvdBrink)
* [:link:](jquery.blockUI/jquery.blockUI.d.ts) [jQuery BlockUI Plugin](http://malsup.com/jquery/block) by [Jeffrey Lee](http://blog.darkthread.net)
@@ -319,6 +360,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](jquery.dataTables/jquery.dataTables.d.ts) [JQuery DataTables](http://www.datatables.net) by [Armin Sander](https://github.com/pragmatrix)
* [:link:](jquery.fileupload/jquery.fileupload.d.ts) [jQuery File Upload Plugin](https://github.com/blueimp/jQuery-File-Upload) by [Rob Alarcon](https://github.com/rob-alarcon)
* [:link:](jquery.joyride/jquery.joyride.d.ts) [jQuery JoyRide Plugin](https://github.com/zurb/joyride) by [Vincent Bortone](https://github.com/vbortone)
* [:link:](jqgrid/jqgrid.d.ts) [jQuery jqgrid Plugin](https://github.com/tonytomov/jqGrid) by [Lokesh Peta](https://github.com/lokeshpeta)
* [:link:](jquerymobile/jquerymobile.d.ts) [jQuery Mobile](http://jquerymobile.com) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](jquery.notifyBar/jquery.notifyBar.d.ts) [jQuery Notify Bar](http://www.whoop.ee/posts/2013-04-05-the-resurrection-of-jquery-notify-bar) by [Shunsuke Ohtani](https://github.com/zaneli)
* [:link:](jquery.base64/jquery.base64.d.ts) [jQuery Plugin - base64 codec](https://github.com/yatt/jquery.base64) by [Shinya Mochizuki](https://github.com/enrapt-mochizuki)
@@ -378,6 +420,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](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)
* [:link:](js-data/js-data.d.ts) [JSData](https://github.com/js-data/js-data) by [Stefan Steinhart](https://github.com/reppners)
* [:link:](js-data-http/js-data-http.d.ts) [JSData Http Adapter](https://github.com/js-data/js-data-http) by [Stefan Steinhart](https://github.com/reppners)
* [:link:](js-data-angular/js-data-angular.d.ts) [JSDataAngular](https://github.com/js-data/js-data-angular) by [Stefan Steinhart](https://github.com/reppners)
* [:link:](jsdeferred/jsdeferred.d.ts) [JSDeferred](https://github.com/cho45/jsdeferred) by [Daisuke Mino](https://github.com/minodisk)
* [:link:](jsdom/jsdom.d.ts) [jsdom](https://github.com/tmpvar/jsdom) by [Asana](https://asana.com)
* [:link:](jsesc/jsesc.d.ts) [jsesc](https://github.com/mathiasbynens/jsesc) by [Bart van der Schoor](https://github.com/Bartvds)
@@ -385,17 +430,20 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](jshamcrest/jshamcrest.d.ts) [JsHamcrest](https://github.com/danielfm/jshamcrest) by [David Harkness](https://github.com/dharkness)
* [:link:](hashset/hashset.d.ts) [jshashset](http://www.timdown.co.uk/jshashtable/jshashset.html) by [Sergey Gerasimov](https://github.com/gerich-home)
* [:link:](hashtable/hashtable.d.ts) [jshashtable](http://www.timdown.co.uk/jshashtable) by [Sergey Gerasimov](https://github.com/gerich-home)
* [:link:](jsnox/jsnox.d.ts) [JSnoX](https://github.com/af/jsnox) by [Steve Baker](https://github.com/stkb)
* [:link:](json-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:](jsoneditoronline/jsoneditoronline.d.ts) [JSONEditorOnline](https://github.com/josdejong/jsoneditoronline) by [Vincent Bortone](https://github.com/vbortone)
* [:link:](JSONStream/JSONStream.d.ts) [JSONStream](http://github.com/dominictarr/JSONStream) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](jsonwebtoken/jsonwebtoken.d.ts) [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) by [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](jsplumb/jquery.jsPlumb.d.ts) [jsPlumb 1.3.16 jQuery adapter](http://jsplumb.org) by [Steve Shearn](https://github.com/shearnie)
* [:link:](jsrender/jsrender.d.ts) [JsRender](http://www.jsviews.com/#jsrender) by [Kensuke Matsuzaki](https://github.com/zakki)
* [:link:](jssha/jssha.d.ts) [jsSHA](https://github.com/Caligatio/jsSHA) by [David Li](https://github.com/randombk)
* [:link:](jstorage/jstorage.d.ts) [jStorage](http://www.jstorage.info) by [Danil Flores](https://github.com/dflor003)
* [:link:](jstree/jstree.d.ts) [jsTree](http://www.jstree.com) by [Adam Pluciński](https://github.com/adaskothebeast)
* [:link:](jszip/jszip.d.ts) [JSZip](http://stuk.github.com/jszip) by [mzeiher](https://github.com/mzeiher)
* [:link:](jwplayer/jwplayer.d.ts) [JW Player](http://developer.longtailvideo.com/trac) by [Martin Duparc](https://github.com/martinduparc)
* [:link:](jwt-simple/jwt-simple.d.ts) [jwt-simple](https://github.com/hokaccha/node-jwt-simple) by [Ken Fukuyama](https://github.com/kenfdev)
* [:link:](kafka-node/kafka-node.d.ts) [kafka-node](https://github.com/SOHU-Co/kafka-node) by [Daniel Imrie-Situnayake](https://github.com/dansitu)
* [: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:](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)
@@ -412,17 +460,20 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](knockout.postbox/knockout-postbox.d.ts) [knockout-postbox](https://github.com/rniemeyer/knockout-postbox) by [Judah Gabriel Himango](https://debuggerdotbreak.wordpress.com)
* [:link:](knockout.projections/knockout.projections.d.ts) [knockout-projections](https://github.com/stevesanderson/knockout-projections) by [John Reilly](https://github.com/johnnyreilly)
* [:link:](knockout-secure-binding/knockout-secure-binding.d.ts) [knockout-secure-binding](https://github.com/brianmhunt/knockout-secure-binding) by [Pine Mizune](https://github.com/pine613)
* [:link:](knockout-transformations/knockout-transformations.d.ts) [knockout-transformations](https://github.com/One-com/knockout-transformations) by [John Reilly](https://github.com/johnnyreilly), [Wim Looman](https://github.com/Nemo157)
* [:link:](knockout.mapper/knockout.mapper.d.ts) [Knockout.Mapper](https://github.com/LucasLorentz/knockout.mapper) by [Brandon Meyer](https://github.com/BMeyerKC)
* [:link:](knockout.mapping/knockout.mapping.d.ts) [Knockout.Mapping](https://github.com/SteveSanderson/knockout.mapping) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](knockout.rx/knockout.rx.d.ts) [knockout.rx](https://github.com/Igorbek/knockout.rx) by [Igor Oleinikov](https://github.com/Igorbek)
* [:link:](knockstrap/knockstrap.d.ts) [Knockstrap](http://faulknercs.github.io/Knockstrap) by [Adam Pluciński](https://github.com/adaskothebeast)
* [:link:](knockout.kogrid/ko-grid.d.ts) [ko-grid](http://knockout-contrib.github.io/KoGrid) by [huer12](https://github.com/huer12)
* [:link:](ko.plus/ko.plus.d.ts) [ko.plus](https://github.com/stevegreatrex/ko.plus) by [Howard Richards](https://github.com/conficient)
* [:link:](kolite/kolite.d.ts) [KoLite](https://github.com/CodeSeven/kolite) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](kuromoji/kuromoji.d.ts) [kuromoji.js](https://github.com/takuyaa/kuromoji.js) by [MIZUSHIMA Junki](https://github.com/mzsm)
* [:link:](ladda/ladda.d.ts) [Ladda](https://github.com/hakimel/Ladda) by [Danil Flores](https://github.com/dflor003), [Michael Lee](https://github.com/leemicw)
* [:link:](later/later.d.ts) [LaterJS](http://bunkat.github.io/later) by [Jason D Dryhurst-Smith](http://jasonds.co.uk)
* [:link:](lazy.js/lazy.js.d.ts) [Lazy.js](https://github.com/dtao/lazy.js) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](leaflet/leaflet.d.ts) [Leaflet.js](https://github.com/Leaflet/Leaflet) by [Vladimir Zotov](https://github.com/rgripper)
* [:link:](leaflet-label/leaflet-label.d.ts) [Leaflet.label](https://github.com/Leaflet/Leaflet.label) by [Wim Looman](https://github.com/Nemo157)
* [:link:](jquery.leanModal/jquery.leanModal.d.ts) [leanModal.js](http://leanmodal.finelysliced.com.au) by [FinelySliced](https://github.com/FinelySliced)
* [:link:](leapmotionTS/LeapMotionTS.d.ts) [Leap Motion TS](https://github.com/logotype/LeapMotionTS) by [Victor Norgren](https://github.com/logotype)
* [:link:](less/less.d.ts) [LESS](http://lesscss.org) by [AndrewGaspar](https://github.com/AndrewGaspar)
@@ -437,18 +488,25 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](log4javascript/log4javascript.d.ts) [log4javascript](http://log4javascript.org) by [Markus Wagner](https://github.com/Ritzlgrmft)
* [:link:](log4js/log4js.d.ts) [log4js](https://github.com/nomiddlename/log4js-node) by [Kentaro Okuno](http://github.com/armorik83)
* [:link:](logg/logg.d.ts) [logg](https://github.com/dpup/node-logg) by [Bret Little](https://github.com/blittle)
* [:link:](logrotate-stream/logrotate-stream.d.ts) [logrotate-stream](https://github.com/dstokes/logrotate-stream) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](lolex/lolex.d.ts) [lolex](https://github.com/sinonjs/lolex) by [Wim Looman](https://github.com/Nemo157)
* [:link:](long/long.d.ts) [Long.js](https://github.com/dcodeIO/Long.js) by [Toshihide Hara](https://github.com/kerug)
* [:link:](lru-cache/lru-cache.d.ts) [lru-cache](https://github.com/isaacs/node-lru-cache) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](lscache/lscache.d.ts) [lscache](https://github.com/pamelafox/lscache) by [Chris Martinez](https://github.com/Chris-Martinezz)
* [:link:](lunr/lunr.d.ts) [lunr.js](https://github.com/olivernn/lunr.js) by [Sebastian Lenz](https://github.com/sebastian-lenz)
* [:link:](lz-string/lz-string.d.ts) [lz-string](https://github.com/pieroxy/lz-string) by [Roman Nikitin](https://github.com/M0ns1gn0r)
* [:link:](main-bower-files/main-bower-files.d.ts) [main-bower-files](https://github.com/ck86/main-bower-files) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](mapbox/mapbox.d.ts) [Mapbox](https://www.mapbox.com/mapbox.js) by [Maxime Fabre](https://github.com/anahkiasen)
* [:link:](mapsjs/mapsjs.d.ts) [Mapsjs](https://github.com/mapsjs) by [Matthew James Davis](https://github.com/davismj)
* [:link:](mariasql/mariasql.d.ts) [mariasql](https://github.com/mscdex/node-mariasql) by [MichaelBennett](https://github.com/bennett000)
* [:link:](marionette/marionette.d.ts) [Marionette](https://github.com/marionettejs) by [Zeeshan Hamid](https://github.com/zhamid), [Natan Vivo](https://github.com/nvivo), [Sven Tschui](https://github.com/sventschui)
* [:link:](marked/marked.d.ts) [Marked](https://github.com/chjj/marked) by [William Orr](https://github.com/worr)
* [: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:](mathjax/mathjax.d.ts) [MathJax](https://github.com/mathjax/MathJax) by [Roland Zwaga](https://github.com/rolandzwaga)
* [: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:](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:](method-override/method-override.d.ts) [method-override](https://github.com/expressjs/method-override) by [Santi Albo](https://github.com/santialbo)
@@ -474,6 +532,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](mkpath/mkpath.d.ts) [mkpath](https://www.npmjs.com/package/mkpath) by [Jared Klopper](https://github.com/optical)
* [: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)
* [: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)
@@ -490,6 +549,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](localForage/localForage.d.ts) [Mozilla's localForage](https://github.com/mozilla/localforage) by [david pichsenmeister](https://github.com/3x14159265)
* [:link:](msgpack/msgpack.d.ts) [msgpack.js - MessagePack JavaScript Implementation](https://github.com/uupaa/msgpack.js) by [Shinya Mochizuki](https://github.com/enrapt-mochizuki)
* [: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:](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)
* [:link:](mustache/mustache.d.ts) [Mustache](https://github.com/janl/mustache.js) by [Mark Ashley Bell](https://github.com/markashleybell)
@@ -499,6 +559,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](needle/needle.d.ts) [needle](https://github.com/tomas/needle) by [San Chen](https://github.com/bigsan)
* [:link:](nexpect/nexpect.d.ts) [nexpect](https://github.com/nodejitsu/nexpect) by [vvakame](http://github.com/vvakame)
* [: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:](ngprogress/ngprogress.d.ts) [ngProgress](http://victorbjelkholm.github.io/ngProgress) by [Martin McWhorter](https://github.com/martinmcwhorter)
* [:link:](ngprogress-lite/ngprogress-lite.d.ts) [ngprogress-lite](https://github.com/voronianski/ngprogress-lite) by [Luke Forder](https://github.com/LukeForder)
* [:link:](nightmare/nightmare.d.ts) [Nightmare](https://github.com/segmentio/nightmare) by [horiuchi](https://github.com/horiuchi)
@@ -516,6 +577,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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-persist/node-persist.d.ts) [node-persist](https://github.com/simonlast/node-persist) by [Spencer Williams](http://spencerwi.com)
* [:link:](node-polyglot/node-polyglot.d.ts) [node-polyglot](https://github.com/airbnb/polyglot.js) by [Tim Jackson-Kiely](https://github.com/timjk)
* [:link:](promptly/promptly.d.ts) [node-promptly](https://github.com/IndigoUnited/node-promptly) by [Dan Spencer](https://github.com/danrspencer)
* [:link:](radius/radius.d.ts) [node-radius](https://github.com/retailnext/node-radius) by [Peter Harris](https://github.com/codeanimal)
* [:link:](node-uuid/node-uuid.d.ts) [node-uuid.js](https://github.com/broofa/node-uuid) by [Jeff May](https://github.com/jeffmay)
@@ -523,6 +585,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](xml2js/xml2js.d.ts) [node-xml2js](https://github.com/Leonidas-from-XIV/node-xml2js) by [Michel Salib](https://github.com/michelsalib), [Jason McNeil](https://github.com/jasonrm)
* [:link:](node/node.d.ts) [Node.js](http://nodejs.org) by [Microsoft TypeScript](http://typescriptlang.org), [DefinitelyTyped](https://github.com/borisyankov/DefinitelyTyped)
* [:link:](restify/restify.d.ts) [node.js REST framework](https://github.com/mcavage/node-restify) by [Bret Little](https://github.com/blittle)
* [:link:](acl/acl-mongodbBackend.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo)
* [:link:](acl/acl.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo)
* [:link:](acl/acl-redisBackend.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo)
* [:link:](mdns/mdns.d.ts) [node_mdns](https://github.com/agnat/node_mdns) by [Stefan Steinhart](https://github.com/reppners)
* [:link:](node_redis/node_redis.d.ts) [node_redis](https://github.com/mranney/node_redis) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](each/each.d.ts) [NodeEach](http://www.adaltas.com/projects/node-each) by [Michael Zabka](https://github.com/misak113)
@@ -532,10 +597,13 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](nopt/nopt.d.ts) [nopt](https://github.com/npm/nopt) by [jbondc](https://github.com/jbondc)
* [:link:](notifyjs/notifyjs.d.ts) [notify.js](https://github.com/alexgibson/notify.js) by [soundTricker](https://github.com/soundTricker)
* [:link:](notify/notify.d.ts) [Notify.js](https://github.com/jpillora/notifyjs) by [Xiaohan Zhang](https://github.com/hellochar)
* [:link:](nouislider/nouislider.d.ts) [nouislider](https://github.com/leongersen/noUiSlider) by [Corey Jepperson](https://github.com/acoreyj)
* [:link:](wnumb/wnumb.d.ts) [nouislider](https://github.com/leongersen/wnumb) by [Corey Jepperson](https://github.com/acoreyj)
* [:link:](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:](nprogress/NProgress.d.ts) [NProgress](https://github.com/rstacruz/nprogress) by [Judah Gabriel Himango](http://debuggerdotbreak.wordpress.com)
* [:link:](numeraljs/numeraljs.d.ts) [Numeral.js](https://github.com/adamwdraper/Numeral-js) by [Vincent Bortone](https://github.com/vbortone)
* [:link:](object-hash/object-hash.d.ts) [object-hash](https://github.com/puleos/object-hash) by [Michael Zabka](https://github.com/misak113)
* [:link:](object-path/object-path.d.ts) [objectPath](https://github.com/mariocasciaro/object-path) by [Paulo Cesar](https://github.com/pocesar)
* [:link:](oboe/oboe.d.ts) [oboe](https://github.com/jimhigson/oboe.js) by [Jared Klopper](https://github.com/optical)
* [:link:](oclazyload/oclazyload.d.ts) [oc.LazyLoad](https://github.com/ocombe/ocLazyLoad) by [Roland Zwaga](https://github.com/rolandzwaga)
@@ -550,7 +618,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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-facebook/passport-facebook.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-to-regexp/path-to-regexp.d.ts) [path-to-regexp](https://github.com/pillarjs/path-to-regexp) by [xica](https://github.com/xica)
* [:link:](pathwatcher/pathwatcher.d.ts) [pathwatcher](https://github.com/atom/node-pathwatcher) by [vvakame](https://github.com/vvakame)
* [:link:](pdf/pdf.d.ts) [PDF.js](https://github.com/mozilla/pdf.js) by [Josh Baldwin](https://github.com/jbaldwin)
* [:link:](peerjs/peerjs.d.ts) [PeerJS](http://peerjs.com) by [Toshiya Nakakura](https://github.com/nakakura)
@@ -567,14 +637,19 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](platform/platform.d.ts) [Platform](https://github.com/bestiejs/platform.js) by [Jake Hickman](https://github.com/JakeH)
* [:link:](playerframework/playerFramework.d.ts) [Player Framework (MMPPF)](https://playerframework.codeplex.com) by [Ricardo Sabino](https://github.com/ricardosabino)
* [:link:](pleasejs/please.d.ts) [PleaseJS](http://www.checkman.io/please) by [Toshiya Nakakura](https://github.com/nakakura)
* [:link:](png-async/png-async.d.ts) [png-async](https://github.com/kanreisa/node-png-async) by [Yuki KAN](https://github.com/kanreisa)
* [:link:](podcast/podcast.d.ts) [podcast](http://github.com/maxnowack/node-podcast) by [Niklas Mollenhauer](https://github.com/nikeee)
* [:link:](poly2tri/poly2tri.d.ts) [poly2tri](http://github.com/r3mi/poly2tri.js) by [Elemar Junior](https://github.com/elemarjr)
* [:link:](polymer/polymer.d.ts) [polymer](https://github.com/polymer) by [Louis Grignon](https://github.com/lgrignon)
* [:link:](polymer/polymer.paper-toast.d.ts) [polymer's paper-toast](https://github.com/Polymer/paper-toast) by [Louis Grignon](https://github.com/lgrignon)
* [:link:](polymer/polymer.core-drawer-panel.d.ts) [polymer's paper-toast](https://github.com/Polymer/core-drawer-panel) by [Louis Grignon](https://github.com/lgrignon)
* [:link:](popcorn/popcorn.d.ts) [Popcorn](https://github.com/mozilla/popcorn-js) by [grapswiz](https://github.com/grapswiz)
* [:link:](pouchDB/pouch.d.ts) [Pouch](http://pouchdb.com) by [Bill Sears](https://github.com/MrBigDog2U)
* [:link:](power-assert/power-assert.d.ts) [power-assert](https://github.com/twada/power-assert) by [vvakame](https://github.com/vvakame)
* [: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:](preloadjs/preloadjs.d.ts) [PreloadJS](http://www.createjs.com/#!/PreloadJS) by [Pedro Ferreira](https://bitbucket.org/drk4)
* [:link:](prelude-ls/prelude-ls.d.ts) [prelude.ls](http://www.preludels.com) by [Aya Morisawa](https://github.com/AyaMorisawa)
* [:link:](progressjs/progress.d.ts) [ProgressJs](http://usablica.github.io/progress.js) by [Shunsuke Ohtani](https://github.com/zaneli)
* [:link:](promise-pool/promise-pool.d.ts) [promise-pool](https://github.com/vilic/promise-pool) by [VILIC VANE](https://github.com/vilic)
* [:link:](promises-a-plus/promises-a-plus.d.ts) [promises-a-plus](http://promisesaplus.com) by [Igor Oleinikov](https://github.com/Igorbek)
@@ -588,11 +663,15 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](qajax/qajax.d.ts) [Qajax](https://github.com/gre/qajax) by [Boltmade](https://github.com/Boltmade)
* [:link:](qunit/qunit.d.ts) [QUnit](http://qunitjs.com) by [Diullei Gomes](https://github.com/diullei)
* [: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 0.7.0 edge f22ab8ad0a640591b1c263f57e21d1565cb26bf5](http://ractivejs.org) by [Han Lin Yap](http://yap.nu)
* [:link:](ractive/ractive.d.ts) [Ractive](http://ractivejs.org) by [Han Lin Yap](http://yap.nu)
* [: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:](react/react.d.ts) [React](http://facebook.github.io/react) by [Asana](https://asana.com)
* [:link:](react/react.d.ts) [React (external module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.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)
* [:link:](react-router/react-router.d.ts) [React Router](https://github.com/rackt/react-router) by [Yuichi Murata](https://github.com/mrk21)
* [: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:](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:](ref/ref.d.ts) [ref](https://github.com/TooTallNate/ref) by [Paul Loyd](https://github.com/loyd)
@@ -601,6 +680,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](ref-union/ref-union.d.ts) [ref-union](https://github.com/TooTallNate/ref-union) by [Paul Loyd](https://github.com/loyd)
* [:link:](request/request.d.ts) [request](https://github.com/mikeal/request) by [Carlos Ballesteros Velasco](https://github.com/soywiz), [bonnici](https://github.com/bonnici), [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](requirejs/require.d.ts) [RequireJS](http://requirejs.org) by [Josh Baldwin](https://github.com/jbaldwin)
* [:link:](response-time/response-time.d.ts) [response-time](https://github.com/expressjs/response-time) by [Uros Smolnik](https://github.com/urossmolnik)
* [: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:](rethinkdb/rethinkdb.d.ts) [Rethinkdb](http://rethinkdb.com) by [Sean Hess](https://seanhess.github.io)
@@ -610,6 +690,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](riotjs/riotjs.d.ts) [riot.js](https://github.com/moot/riotjs) by [vvakame](https://github.com/vvakame)
* [:link:](routie/routie.d.ts) [routie](https://github.com/jgallen23/routie) by [Adilson](https://github.com/Adilson)
* [:link:](rtree/rtree.d.ts) [rtree](https://github.com/leaflet-extras/RTree) by [Omede Firouz](https://github.com/oefirouz)
* [:link:](run-sequence/run-sequence.d.ts) [run-sequence](https://github.com/OverZealous/run-sequence) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](rx/rx.d.ts) [RxJS](http://rx.codeplex.com) by [gsino](http://www.codeplex.com/site/users/view/gsino), [Igor Oleinikov](https://github.com/Igorbek)
* [:link:](rx/rx.aggregates.d.ts) [RxJS-Aggregates](http://rx.codeplex.com) by [Carl de Billy](http://carl.debilly.net), [Igor Oleinikov](https://github.com/Igorbek)
* [:link:](rx/rx.all.d.ts) [RxJS-All](http://rx.codeplex.com) by [Carl de Billy](http://carl.debilly.net), [Igor Oleinikov](https://github.com/Igorbek)
@@ -624,6 +705,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](rx/rx.testing.d.ts) [RxJS-Testing](https://github.com/Reactive-Extensions/RxJS) by [Igor Oleinikov](https://github.com/Igorbek)
* [:link:](rx/rx.time.d.ts) [RxJS-Time](http://rx.codeplex.com) by [Carl de Billy](http://carl.debilly.net), [Igor Oleinikov](https://github.com/Igorbek)
* [:link:](rx/rx.virtualtime.d.ts) [RxJS-VirtualTime](http://rx.codeplex.com) by [gsino](http://www.codeplex.com/site/users/view/gsino), [Igor Oleinikov](https://github.com/Igorbek)
* [:link:](s3-uploader/s3-uploader.d.ts) [s3-uploader](https://www.npmjs.com/package/s3-uploader) by [COLSA Corporation](http://www.colsa.com)
* [:link:](sammyjs/sammyjs.d.ts) [Sammy.js](http://sammyjs.org) by [Boris Yankov](https://github.com/borisyankov), [Oisin Grehan](https://github.com/oising)
* [:link:](sanitize-filename/sanitize-filename.d.ts) [sanitize-filename](https://github.com/parshap/node-sanitize-filename) by [Wim Looman](https://github.com/Nemo157)
* [:link:](sanitize-html/sanitize-html.d.ts) [sanitize-html](https://github.com/punkave/sanitize-html) by [Rogier Schouten](https://github.com/rogierschouten)
@@ -635,8 +717,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](semver/semver.d.ts) [semver](https://github.com/isaacs/node-semver) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](sendgrid/sendgrid.d.ts) [sendgrid](https://github.com/sendgrid/sendgrid-nodejs) by [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](sequelize/sequelize.d.ts) [Sequelize 2.0.0 dev13](http://sequelizejs.com) by [samuelneff](https://github.com/samuelneff), [Peter Harris](https://github.com/codeanimal)
* [:link:](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:](shelljs/shelljs.d.ts) [ShellJS](http://shelljs.org) by [Niklas Mollenhauer](https://github.com/nikeee)
* [:link:](should-promised/should-promised.d.ts) [should-promised](https://github.com/shouldjs/promised) by [Yaroslav Admin](https://github.com/devoto13)
* [:link:](should/should.d.ts) [should.js](https://github.com/visionmedia/should.js) by [Alex Varju](https://github.com/varju), [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](showdown/showdown.d.ts) [Showdown](https://github.com/coreyti/showdown) by [cbowdon](https://github.com/cbowdon)
* [:link:](siesta/siesta.d.ts) [Siesta](http://www.bryntum.com/products/siesta) by [bquarmby](https://github.com/bquarmby)
@@ -664,13 +749,16 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](space-pen/space-pen.d.ts) [SpacePen](https://github.com/atom/space-pen) by [vvakame](https://github.com/vvakame)
* [:link:](spectrum/spectrum.d.ts) [spectrum](https://github.com/bgrins/spectrum) by [Mordechai Zuber](https://github.com/M-Zuber)
* [:link:](spin/spin.d.ts) [Spin.js](http://fgnass.github.com/spin.js) by [Boris Yankov](https://github.com/borisyankov), [Theodore Brown](https://github.com/theodorejb)
* [:link:](split/split.d.ts) [split](https://github.com/dominictarr/split) by [Marcin Porębski](https://github.com/marcinporebski)
* [:link:](sprintf/sprintf.d.ts) [sprintff](https://github.com/maritz/node-sprintff) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](sharepoint/SharePoint.d.ts) [sptypescript](http://sptypescript.codeplex.com) by [Stanislav Vyshchepan](http://gandjustas.blogspot.ru), [Andrey Markeev](http://markeev.com)
* [:link:](sqlite3/sqlite3.d.ts) [sqlite3](https://github.com/mapbox/node-sqlite3) by [Nick Malaguti](https://github.com/nmalaguti)
* [:link:](stack-mapper/stack-mapper.d.ts) [stack-mapper](https://github.com/thlorenz/stack-mapper) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](stampit/stampit.d.ts) [stampit](https://github.com/ericelliott/stampit) by [Vasyl Boroviak](https://github.com/koresar)
* [:link:](stats/stats.d.ts) [Stats.js r12](http://github.com/mrdoob/stats.js) by [Gregory Dalton](https://github.com/gregolai)
* [:link:](status-bar/status-bar.d.ts) [status-bar](https://github.com/atom/status-bar) by [vvakame](https://github.com/vvakame)
* [:link:](storejs/storejs.d.ts) [store.js](https://github.com/marcuswestin/store.js) by [Vincent Bortone](https://github.com/vbortone)
* [:link:](stream-series/stream-series.d.ts) [stream-series](https://github.com/rschmukler/stream-series) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](stream-to-array/stream-to-array.d.ts) [stream-to-array](https://github.com/stream-utils/stream-to-array) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](stripe/stripe.d.ts) [stripe](https://stripe.com) by [Eric J. Smith](https://github.com/ejsmith)
* [:link:](stylus/stylus.d.ts) [stylus](https://github.com/LearnBoost/stylus) by [Maxime LUCE](https://github.com/SomaticIT)
@@ -693,6 +781,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](tedious/tedious.d.ts) [tedious](https://pekim.github.io/tedious) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](tedious-connection-pool/tedious-connection-pool.d.ts) [tedious-connection-pool](https://github.com/pekim/tedious-connection-pool) by [Cyprien Autexier](https://github.com/sandorfr)
* [:link:](teechart/teechart.d.ts) [TeeChart](http://www.steema.com) by [Steema Software](https://steema.com)
* [:link:](tether/tether.d.ts) [Tether](http://github.hubspot.com/tether) by [Adi Dahiya](https://github.com/adidahiya)
* [:link:](text-buffer/text-buffer.d.ts) [text-buffer](https://github.com/atom/text-buffer) by [vvakame](https://github.com/vvakame)
* [:link:](text-encoding/text-encoding.d.ts) [text-encoding](https://github.com/inexorabletash/text-encoding) by [MIZUNE Pine](https://github.com/pine613)
* [:link:](threejs/three-canvasrenderer.d.ts) [three.js (CanvasRenderer.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/renderers/CanvasRenderer.js) by [Satoru Kimura](https://github.com/gyohk)
@@ -759,16 +848,19 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](webspeechapi/webspeechapi.d.ts) [Web Speech API](https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html) by [SaschaNaz](https://github.com/saschanaz)
* [:link:](webcola/webcola.d.ts) [webcola](https://github.com/tgdwyer/WebCola) by [Qinfeng Chen](https://github.com/qinfchen)
* [:link:](webcrypto/WebCrypto.d.ts) [WebCrypto](http://www.w3.org/TR/WebCryptoAPI) by [Lucas Dixon](https://github.com/iislucas)
* [:link:](webix/webix.d.ts) [Webix UI](http://webix.com) by [Maksim Kozhukh](http://github.com/mkozhukh)
* [:link:](webrtc/MediaStream.d.ts) [WebRTC](http://dev.w3.org/2011/webrtc) by [Ken Smith](https://github.com/smithkl42)
* [:link:](websocket/websocket.d.ts) [websocket](https://github.com/Worlize/WebSocket-Node) by [Paul Loyd](https://github.com/loyd)
* [:link:](when/when.d.ts) [When](https://github.com/cujojs/when) by [Derek Cicerone](https://github.com/derekcicerone), [Wim Looman](https://github.com/Nemo157)
* [:link:](which/which.d.ts) [which](https://github.com/isaacs/node-which) by [vvakame](https://github.com/vvakame)
* [:link:](windows-service/windows-service.d.ts) [windows-service](https://bitbucket.org/stephenwvickers/node-windows-service) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](winjs/winjs.d.ts) [WinJS](http://try.buildwinjs.com) by [TypeScript samples](https://www.typescriptlang.org), [Adam Hewitt](https://github.com/adamhewitt627), [Craig Treasure](https://github.com/craigktreasure), [Jeff Fisher](https://github.com/xirzec)
* [:link:](winrt/winrt.d.ts) [WinRT](http://msdn.microsoft.com/en-us/library/windows/apps/br211377.aspx) by [TypeScript samples](https://www.typescriptlang.org)
* [:link:](winston/winston.d.ts) [winston](https://github.com/flatiron/winston) by [bonnici](https://github.com/bonnici), [Peter Harris](https://github.com/codeanimal)
* [:link:](wolfy87-eventemitter/wolfy87-eventemitter.d.ts) [wolfy87-eventemitter](https://github.com/Wolfy87/EventEmitter) by [ryiwamoto](https://github.com/ryiwamoto)
* [:link:](wrench/wrench.d.ts) [wrench](https://github.com/ryanmcgrath/wrench-js) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](ws/ws.d.ts) [ws](https://github.com/einaros/ws) by [Paul Loyd](https://github.com/loyd)
* [:link:](x-editable/x-editable.d.ts) [X-Editable](http://vitalets.github.io/x-editable/index.html) by [Chris Kirby](https://github.com/sirkirby)
* [:link:](x2js/xml2json.d.ts) [x2js](https://code.google.com/p/x2js) by [Horiuchi_H](https://github.com/horiuchi)
* [:link:](jsfl/xJSFL.d.ts) [xJSFL](http://www.xjsfl.com) by [soywiz](https://github.com/soywiz)
* [:link:](xpath/xpath.d.ts) [xpath](https://github.com/goto100/xpath) by [Andrew Bradley](https://github.com/cspotcode)
@@ -784,6 +876,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](zepto/zepto.d.ts) [Zepto](http://zeptojs.com) by [Josh Baldwin](https://github.com/jbaldwin)
* [:link:](zeroclipboard/zeroclipboard.d.ts) [ZeroClipboard](https://github.com/jonrohan/ZeroClipboard) by [Eric J. Smith](https://github.com/ejsmith), [Blake Niemyjski](https://github.com/niemyjski), [György Balássy](https://github.com/balassy)
* [:link:](node_zeromq/zmq.d.ts) [ZeroMQ Node](https://github.com/JustinTulloss/zeromq.node) by [Dave McKeown](http://github.com/davemckeown)
* [:link:](zip.js/zip.js.d.ts) [zip.js 2.x](https://github.com/gildas-lormeau/zip.js) by [Louis Grignon](https://github.com/lgrignon)
* [:link:](scroller/easyscroller.d.ts) [Zynga EasyScroller](https://github.com/zynga/scroller) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](scroller/scroller.d.ts) [Zynga Scroller](https://github.com/zynga/scroller) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](viewporter/viewporter.d.ts) [Zynga Viewporter](https://github.com/zynga/viewporter) by [Boris Yankov](https://github.com/borisyankov)
-1
View File
@@ -1 +0,0 @@
--noImplicitAny
+17
View File
@@ -0,0 +1,17 @@
/// <reference path='acl-mongodbBackend.d.ts'/>
// https://github.com/OptimalBits/node_acl/blob/master/Readme.md
import Acl = require('acl');
import mongodb = require('mongodb');
var db: mongodb.Db;
// Using the mongo db backend
var acl = new Acl(new Acl.mongodbBackend(db, 'acl_', true));
// guest is allowed to view blogs
acl.allow('guest', 'blogs', 'view');
// allow function accepts arrays as any parameter
acl.allow('member', 'blogs', ['edit','view', 'delete']);
+22
View File
@@ -0,0 +1,22 @@
// Type definitions for node_acl 0.4.7
// Project: https://github.com/optimalbits/node_acl
// Definitions by: Qubo <https://github.com/tkQubo>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="acl.d.ts" />
/// <reference path="../mongodb/mongodb.d.ts" />
declare module "acl" {
import mongo = require('mongodb');
interface AclStatic {
mongodbBackend: MongodbBackendStatic;
}
interface MongodbBackend extends Backend<Callback> { }
interface MongodbBackendStatic {
new(db: mongo.Db, prefix: string, useSingle: boolean): MongodbBackend;
new(db: mongo.Db, prefix: string): MongodbBackend;
new(db: mongo.Db): MongodbBackend;
}
}
+16
View File
@@ -0,0 +1,16 @@
/// <reference path='acl-redisBackend.d.ts'/>
// https://github.com/OptimalBits/node_acl/blob/master/Readme.md
import Acl = require('acl');
import redis = require('redis');
var client: redis.RedisClient;
// Using the redis backend
var acl = new Acl(new Acl.redisBackend(client, 'acl_'));
// guest is allowed to view blogs
acl.allow('guest', 'blogs', 'view');
// allow function accepts arrays as any parameter
acl.allow('member', 'blogs', ['edit','view', 'delete']);
+21
View File
@@ -0,0 +1,21 @@
// Type definitions for node_acl 0.4.7
// Project: https://github.com/optimalbits/node_acl
// Definitions by: Qubo <https://github.com/tkQubo>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="acl.d.ts" />
/// <reference path='../redis/redis.d.ts'/>
declare module "acl" {
import redis = require('redis');
interface AclStatic {
redisBackend: RedisBackendStatic;
}
interface RedisBackend extends Backend<redis.RedisClient> { }
interface RedisBackendStatic {
new(redis: redis.RedisClient, prefix: string): RedisBackend;
new(redis: redis.RedisClient): RedisBackend;
}
}
+65
View File
@@ -0,0 +1,65 @@
/// <reference path='acl.d.ts'/>
// Sample code from
// https://github.com/OptimalBits/node_acl/blob/master/Readme.md
import Acl = require('acl');
var report = <T>(err: Error, value: T) => {
if (err) {
console.error(err);
}
console.info(value);
};
// Using the memory backend
var acl = new Acl(new Acl.memoryBackend());
// guest is allowed to view blogs
acl.allow('guest', 'blogs', 'view');
// allow function accepts arrays as any parameter
acl.allow('member', 'blogs', ['edit','view', 'delete']);
acl.addUserRoles('joed', 'guest');
acl.addRoleParents('baz', ['foo','bar']);
acl.allow('foo', ['blogs','forums','news'], ['view', 'delete']);
acl.allow('admin', ['blogs','forums'], '*');
acl.allow([
{
roles:['guest','special-member'],
allows:[
{resources:'blogs', permissions:'get'},
{resources:['forums','news'], permissions:['get','put','delete']}
]
},
{
roles:['gold','silver'],
allows:[
{resources:'cash', permissions:['sell','exchange']},
{resources:['account','deposit'], permissions:['put','delete']}
]
}
]);
acl.isAllowed('joed', 'blogs', 'view', (err, res) => {
if (res) {
console.log("User joed is allowed to view blogs");
}
});
acl.isAllowed('jsmith', 'blogs', ['edit','view','delete'])
.then((result) => {
console.dir('jsmith is allowed blogs ' + result);
acl.addUserRoles('jsmith', 'member');
}).then(() =>
acl.isAllowed('jsmith', 'blogs', ['edit','view','delete'])
).then((result) =>
console.dir('jsmith is allowed blogs ' + result)
).then(() => {
acl.allowedPermissions('james', ['blogs','forums'], report);
acl.allowedPermissions('jsmith', ['blogs','forums'], report);
});
+120
View File
@@ -0,0 +1,120 @@
// Type definitions for node_acl 0.4.7
// Project: https://github.com/optimalbits/node_acl
// Definitions by: Qubo <https://github.com/tkQubo>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../bluebird/bluebird.d.ts" />
/// <reference path='../node/node.d.ts'/>
declare module "acl" {
import http = require('http');
import Promise = require("bluebird");
type strings = string|string[];
type Value = string|number;
type Values = Value|Value[];
type Action = () => any;
type Callback = (err: Error) => any;
type AnyCallback = (err: Error, obj: any) => any;
type AllowedCallback = (err: Error, allowed: boolean) => any;
type GetUserId = (req: http.ServerRequest, res: http.ServerResponse) => Value;
interface AclStatic {
new (backend: Backend<any>, logger: Logger, options: Option): Acl;
new (backend: Backend<any>, logger: Logger): Acl;
new (backend: Backend<any>): Acl;
memoryBackend: MemoryBackendStatic;
}
interface Logger {
debug: (msg: string)=>any;
}
interface Acl {
addUserRoles: (userId: Value, roles: strings, cb?: Callback) => Promise<void>;
removeUserRoles: (userId: Value, roles: strings, cb?: Callback) => Promise<void>;
userRoles: (userId: Value, cb?: (err: Error, roles: string[])=>any) => Promise<string[]>;
roleUsers: (role: Value, cb?: (err: Error, users: Values)=>any) => Promise<any>;
hasRole: (userId: Value, role: string, cb?: (err: Error, isInRole: boolean)=>any) => Promise<boolean>;
addRoleParents: (role: string, parents: Values, cb?: Callback) => Promise<void>;
removeRole: (role: string, cb?: Callback) => Promise<void>;
removeResource: (resource: string, cb?: Callback) => Promise<void>;
allow: {
(roles: Values, resources: strings, permissions: strings, cb?: Callback): Promise<void>;
(aclSets: AclSet|AclSet[]): Promise<void>;
}
removeAllow: (role: string, resources: strings, permissions: strings, cb?: Callback) => Promise<void>;
removePermissions: (role: string, resources: strings, permissions: strings, cb?: Function) => Promise<void>;
allowedPermissions: (userId: Value, resources: strings, cb?: AnyCallback) => Promise<void>;
isAllowed: (userId: Value, resources: strings, permissions: strings, cb?: AllowedCallback) => Promise<boolean>;
areAnyRolesAllowed: (roles: strings, resource: strings, permissions: strings, cb?: AllowedCallback) => Promise<any>;
whatResources: (roles: strings, permissions: strings, cb?: AnyCallback) => Promise<any>;
permittedResources: (roles: strings, permissions: strings, cb?: Function) => Promise<void>;
middleware: (numPathComponents: number, userId: Value|GetUserId, actions: strings) => Promise<any>;
}
interface Option {
buckets?: BucketsOption;
}
interface BucketsOption {
meta?: string;
parents?: string;
permissions?: string;
resources?: string;
roles?: string;
users?: string;
}
interface AclSet {
roles: strings;
allows: AclAllow[];
}
interface AclAllow {
resources: strings;
permissions: strings;
}
interface MemoryBackend extends Backend<Action[]> { }
interface MemoryBackendStatic {
new(): MemoryBackend;
}
//
// For internal use
//
interface Backend<T> {
begin: () => T;
end: (transaction: T, cb?: Action) => void;
clean: (cb?: Action) => void;
get: (bucket: string, key: Value, cb?: Action) => void;
union: (bucket: string, keys: Value[], cb?: Action) => void;
add: (transaction: T, bucket: string, key: Value, values: Values) => void;
del: (transaction: T, bucket: string, keys: Value[]) => void;
remove: (transaction: T, bucket: string, key: Value, values: Values) => void;
endAsync: Function; //TODO: Give more specific function signature
getAsync: Function;
cleanAsync: Function;
unionAsync: Function;
}
interface Contract {
(args: IArguments): Contract|NoOp;
debug: boolean;
fulfilled: boolean;
args: any[];
checkedParams: string[];
params: (...types: string[]) => Contract|NoOp;
end: () => void;
}
interface NoOp {
params: (...types: string[]) => NoOp;
end: () => void;
}
var _: AclStatic;
export = _;
}
+1 -1
View File
@@ -5,7 +5,7 @@
/// <reference path="../angularjs/angular.d.ts" />
declare module ng.angularFileUpload {
declare module angular.angularFileUpload {
interface IUploadService {
+8
View File
@@ -6,10 +6,13 @@ var hotkeyProvider: ng.hotkeys.HotkeysProvider;
var hotkeyObj: ng.hotkeys.Hotkey;
hotkeyProvider.add("mod+s", "saves a file", (event: Event, hotkey: ng.hotkeys.Hotkey) => {} );
hotkeyProvider.add(["mod+s"], "saves a file", (event: Event, hotkey: ng.hotkeys.Hotkey) => {} );
hotkeyProvider.add(hotkeyObj);
hotkeyProvider.bindTo(scope);
hotkeyProvider.del("mod+s");
hotkeyProvider.del(["mod+s"]);
hotkeyProvider.get("mod+s");
hotkeyProvider.get(["mod+s"]);
hotkeyProvider.toggleCheatSheet();
hotkeyProvider.add(hotkeyObj.combo, hotkeyObj.description ,hotkeyObj.callback);
@@ -21,5 +24,10 @@ hotkeyProvider.bindTo(scope)
combo: 'w',
description: 'blah blah',
callback: function() {}
})
.add({
combo: ['w', 'mod+w'],
description: 'blah blah',
callback: function() {}
});
+18 -8
View File
@@ -1,40 +1,50 @@
// Type definitions for angular-hotkeys
// Project: https://github.com/chieffancypants/angular-hotkeys
// Definitions by: Jason Zhao <https://github.com/jlz27>
// Definitions by: Jason Zhao <https://github.com/jlz27>, Stefan Steinhart <https://github.com/reppners>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts" />
declare module ng.hotkeys {
declare module angular.hotkeys {
interface HotkeysProvider {
template: string;
templateTitle:string;
includeCheatSheet: boolean;
cheatSheetHotkey: string;
cheatSheetDescription: string;
add(combo: string, description: string, callback: (event: Event, hotkeys: ng.hotkeys.Hotkey) => void): void;
add(combo: string|string[], callback: (event: Event, hotkey?: Hotkey) => void, action?: string, allowIn?: Array<string>, persistent?: boolean): ng.hotkeys.Hotkey;
add(hotkeyObj: ng.hotkeys.Hotkey): void;
add(combo: string|string[], description: string, callback: (event: Event, hotkey?: Hotkey) => void, action?: string, allowIn?: Array<string>, persistent?: boolean): ng.hotkeys.Hotkey;
add(hotkeyObj: ng.hotkeys.Hotkey): ng.hotkeys.Hotkey;
bindTo(scope : ng.IScope): ng.hotkeys.HotkeysProviderChained;
del(combo: string): void;
del(combo: string|string[]): void;
get(combo: string): ng.hotkeys.Hotkey;
del(hotkeyObj: ng.hotkeys.Hotkey): void;
get(combo: string|string[]): ng.hotkeys.Hotkey;
toggleCheatSheet(): void;
purgeHotkeys(): void;
}
interface HotkeysProviderChained {
add(combo: string, description: string, callback: (event: Event, hotkeys: ng.hotkeys.Hotkey) => void): HotkeysProviderChained;
add(combo: string|string[], description: string, callback: (event: Event, hotkeys: ng.hotkeys.Hotkey) => void): HotkeysProviderChained;
add(hotkeyObj: ng.hotkeys.Hotkey): HotkeysProviderChained;
}
interface Hotkey {
combo: string;
combo: string|string[];
description?: string;
callback: (event: Event, hotkey: ng.hotkeys.Hotkey) => void;
action?: string;
allowIn?: Array<string>;
persistent?: boolean;
}
}
+1 -1
View File
@@ -5,7 +5,7 @@
/// <reference path="../angularjs/angular.d.ts" />
declare module ng.httpAuth {
declare module angular.httpAuth {
interface IAuthService {
loginConfirmed(data?:any, configUpdater?:Function):void;
loginCancelled(data?:any, reason?:any):void;
+23
View File
@@ -0,0 +1,23 @@
/// <reference path="./angular-idle.d.ts" />
angular.module('app', ['ngIdle'])
.config(['$keepaliveProvider', '$idleProvider',
($keepaliveProvider: ng.idle.IKeepAliveProvider, $idleProvider: ng.idle.IIdleProvider) => {
$idleProvider.activeOn('mousemove keydown DOMMouseScroll mousewheel mousedown');
$idleProvider.idleDuration(5);
$idleProvider.warningDuration(5);
$idleProvider.keepalive(true)
$idleProvider.autoResume(true);
$keepaliveProvider.interval(10);
}])
.run(['$keepalive', '$idle', ($keepalive: ng.idle.IKeepAliveService, $idle: ng.idle.IIdleService) => {
$idle.watch();
if ($idle.running() || $idle.idling()) {
$idle.unwatch();
}
$keepalive.start();
$keepalive.ping();
$keepalive.stop();
}]);
+134
View File
@@ -0,0 +1,134 @@
// Type definitions for ng-idle v0.3.5
// Project: http://hackedbychinese.github.io/ng-idle/
// Definitions by: mthamil <https://github.com/mthamil>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts" />
declare module angular.idle {
/**
* Used to configure the $keepalive service.
*/
interface IKeepAliveProvider extends IServiceProvider {
/**
* If configured, options will be used to issue a request using $http.
* If the value is null, no HTTP request will be issued.
* You can specify a string, which it will assume to be a URL to a simple GET request.
* Otherwise, you can use the same options $http takes. However, cache will always be false.
*
* @param value May be string or object, default is null.
*/
http(value: any): void;
/**
* This specifies how often the keepalive event is triggered and the
* HTTP request is issued.
*
* @param seconds Integer, default is 5 minutes. Must be greater than 0.
*/
interval(seconds: number): void;
}
/**
* $keepalive will use a timeout to periodically wake, broadcast a $keepalive event on the root scope,
* and optionally make an $http request. By default, the $idle service will stop and start $keepalive
* when a user becomes idle or returns from idle, respectively. It is also started automatically when
* $idle.watch() is called. This can be disabled by configuring the $idleProvider.
*/
interface IKeepAliveService {
/**
* Starts pinging periodically until stop() is called.
*/
start(): void;
/**
* Stops pinging.
*/
stop(): void;
/**
* Performs one ping only.
*/
ping(): void;
}
/**
* Used to configure the $idle service.
*/
interface IIdleProvider extends IServiceProvider {
/**
* Specifies the DOM events the service will watch to reset the idle timeout.
* Multiple events should be separated by a space.
*
* @param events string, default 'mousemove keydown DOMMouseScroll mousewheel mousedown'
*/
activeOn(events: string): void;
/**
* The idle timeout duration in seconds. After this amount of time passes without the user
* performing an action that triggers one of the watched DOM events, the user is considered
* idle.
*
* @param seconds integer, default is 20min
*/
idleDuration(seconds: number): void;
/**
* The amount of time the user has to respond (in seconds) before they have been considered
* timed out.
*
* @param seconds integer, default is 30s
*/
warningDuration(seconds: number): void;
/**
* When true, user activity will automatically interrupt the warning countdown and reset the
* idle state. If false, you will need to manually call watch() when you want to start
* watching for idleness again.
*
* @param enabled boolean, default is true
*/
autoResume(enabled: boolean): void;
/**
* When true, the $keepalive service is automatically stopped and started as needed.
*
* @param enabled boolean, default is true
*/
keepalive(enabled: boolean): void;
}
/**
* $idle, once watch() is called, will start a timeout which if expires, will enter a warning state
* countdown. Once the countdown reaches zero, idle will broadcast a timeout event indicating the
* user has timed out (where your app should log them out or whatever you like). If the user performs
* an action that triggers a watched DOM event that bubbles up to document.body, this will reset the
* idle/warning state and start the process over again.
*/
interface IIdleService {
/**
* Whether or not the watch() has been called and it is watching for idleness.
*/
running(): boolean;
/**
* Whether or not the user appears to be idle.
*/
idling(): boolean;
/**
* Starts watching for idleness, or resets the idle/warning state and continues watching.
*/
watch(): void;
/**
* Stops watching for idleness, and resets the idle/warning state.
*/
unwatch(): void;
}
}
@@ -12,55 +12,53 @@ interface TestScope extends ng.IScope {
property: string;
}
module ng.local.storage.tests {
export class TestController {
constructor($scope: TestScope, localStorageService: ng.local.storage.ILocalStorageService<string>) {
// isSupported
if (localStorageService.isSupported) {
// do something
}
// getStorageType
var storageType: string = localStorageService.getStorageType();
// set
$scope.submit = (key, value) => {
return localStorageService.set(key, value);
};
// get
$scope.getItem = (key) => {
return localStorageService.get(key);
};
// remove
$scope.removeItem = (key) => {
return localStorageService.remove(key);
};
// clearAll(regexp)
$scope.clearNumbers = () => {
return localStorageService.clearAll(/^\d+$/);
};
// clearAll
$scope.clearAll = () => {
return localStorageService.clearAll();
};
// keys
var lsKeys = localStorageService.keys();
// bind
localStorageService.set('property', 'oldValue');
$scope.unbind = localStorageService.bind($scope, 'property');
// deriveKey
console.log(localStorageService.deriveKey('property')); // ls.property
// length
var lsLength: number = localStorageService.length();
export class TestController {
constructor($scope: TestScope, localStorageService: ng.local.storage.ILocalStorageService<string>) {
// isSupported
if (localStorageService.isSupported) {
// do something
}
// getStorageType
var storageType: string = localStorageService.getStorageType();
// set
$scope.submit = (key, value) => {
return localStorageService.set(key, value);
};
// get
$scope.getItem = (key) => {
return localStorageService.get(key);
};
// remove
$scope.removeItem = (key) => {
return localStorageService.remove(key);
};
// clearAll(regexp)
$scope.clearNumbers = () => {
return localStorageService.clearAll(/^\d+$/);
};
// clearAll
$scope.clearAll = () => {
return localStorageService.clearAll();
};
// keys
var lsKeys = localStorageService.keys();
// bind
localStorageService.set('property', 'oldValue');
$scope.unbind = localStorageService.bind($scope, 'property');
// deriveKey
console.log(localStorageService.deriveKey('property')); // ls.property
// length
var lsLength: number = localStorageService.length();
}
}
@@ -72,4 +70,4 @@ app.config(function (localStorageServiceProvider: ng.local.storage.ILocalStorage
.setNotify(true, true);
});
app.controller('TestController', ng.local.storage.tests.TestController);
app.controller('TestController', TestController);
+1 -1
View File
@@ -5,7 +5,7 @@
/// <reference path='../angularjs/angular.d.ts' />
declare module ng.local.storage {
declare module angular.local.storage {
interface ILocalStorageServiceProvider extends IServiceProvider {
/**
* Setter for the prefix
@@ -0,0 +1,94 @@
/// <reference path="angular-material.d.ts" />
var myApp = angular.module('testModule', ['ngMaterial']);
myApp.config((
$mdThemingProvider: ng.material.MDThemingProvider,
$mdIconProvider: ng.material.MDIconProvider) => {
$mdThemingProvider.alwaysWatchTheme(true);
var neonRedMap: ng.material.MDPalette = $mdThemingProvider.extendPalette('red', {
'500': 'ff0000'
});
// Register the new color palette map with the name <code>neonRed</code>
$mdThemingProvider.definePalette('neonRed', neonRedMap);
// Use that theme for the primary intentions
$mdThemingProvider.theme('default')
.primaryPalette('neonRed')
.accentPalette('blue')
.backgroundPalette('grey')
.warnPalette('red')
.dark(true);
$mdIconProvider
.defaultIconSet('my/app/icons.svg') // Register a default set of SVG icons
.iconSet('social', 'my/app/social.svg') // Register a named icon set of SVGs
.icon('android', 'my/app/android.svg') // Register a specific icon (by name)
.icon('work:chair', 'my/app/chair.svg'); // Register icon in a specific set
});
myApp.controller('BottomSheetController', ($scope: ng.IScope, $mdBottomSheet: ng.material.MDBottomSheetService) => {
$scope['openBottomSheet'] = () => {
$mdBottomSheet.show({
template: '<md-bottom-sheet>Hello!</md-bottom-sheet>'
});
};
$scope['hideBottomSheet'] = $mdBottomSheet.hide.bind($mdBottomSheet, 'hide');
$scope['cancelBottomSheet'] = $mdBottomSheet.cancel.bind($mdBottomSheet, 'cancel');
});
myApp.controller('DialogController', ($scope: ng.IScope, $mdDialog: ng.material.MDDialogService) => {
$scope['openDialog'] = () => {
$mdDialog.show({
template: '<md-dialog>Hello!</md-dialog>'
});
};
$scope['alertDialog'] = () => {
$mdDialog.show($mdDialog.alert().content('Alert!'));
};
$scope['confirmDialog'] = () => {
$mdDialog.show($mdDialog.confirm().content('Confirm!'));
};
$scope['hideDialog'] = $mdDialog.hide.bind($mdDialog, 'hide');
$scope['cancelDialog'] = $mdDialog.cancel.bind($mdDialog, 'cancel');
});
class IconDirective implements ng.IDirective {
private $mdIcon: ng.material.MDIcon;
constructor($mdIcon: ng.material.MDIcon) {
this.$mdIcon = $mdIcon;
}
public link($scope: ng.IScope, $elm: ng.IAugmentedJQuery) {
this.$mdIcon('android').then((iconEl: Element) => $elm.append(iconEl));
this.$mdIcon('work:chair').then((iconEl: Element) => $elm.append(iconEl));
// Load and cache the external SVG using a URL
this.$mdIcon('img/icons/android.svg').then((iconEl: Element) => {
$elm.append(iconEl);
});
}
}
myApp.directive('icon-directive', ($mdIcon: ng.material.MDIcon) => new IconDirective($mdIcon));
myApp.controller('MediaController', ($scope: ng.IScope, $mdMedia: ng.material.MDMedia) => {
$scope.$watch(() => $mdMedia('lg'), (big: boolean) => {
$scope['bigScreen'] = big;
});
$scope['screenIsSmall'] = $mdMedia('sm');
$scope['customQuery'] = $mdMedia('(min-width: 1234px)');
$scope['anotherCustom'] = $mdMedia('max-width: 300px');
});
myApp.controller('SidenavController', ($scope: ng.IScope, $mdSidenav: ng.material.MDSidenavService) => {
var componentId = 'left';
$scope['toggle'] = () => $mdSidenav(componentId).toggle();
$scope['open'] = () => $mdSidenav(componentId).open();
$scope['close'] = () => $mdSidenav(componentId).close();
$scope['isOpen'] = $mdSidenav(componentId).isOpen();
$scope['isLockedOpen'] = $mdSidenav(componentId).isLockedOpen();
});
myApp.controller('ToastController', ($scope: ng.IScope, $mdToast: ng.material.MDToastService) => {
$scope['openToast'] = () => $mdToast.show($mdToast.simple().content('Hello!'));
});
+195
View File
@@ -0,0 +1,195 @@
// Type definitions for Angular Material 0.8.3+ (ng.material module)
// Project: https://github.com/angular/material
// Definitions by: Matt Traynham <https://github.com/mtraynham>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts" />
declare module angular.material {
interface MDBottomSheetOptions {
templateUrl?: string;
template?: string;
controller?: any;
locals?: {[index: string]: any};
targetEvent?: any;
resolve?: {[index: string]: ng.IPromise<any>}
controllerAs?: string;
parent?: Element;
disableParentScroll?: boolean;
}
interface MDBottomSheetService {
show(options: MDBottomSheetOptions): ng.IPromise<any>;
hide(response?: any): void;
cancel(response?: any): void;
}
interface MDPresetDialog<T> {
title(title: string): T;
content(content: string): T;
ok(content: string): T;
theme(theme: string): T;
}
interface MDAlertDialog extends MDPresetDialog<MDAlertDialog> {
}
interface MDConfirmDialog extends MDPresetDialog<MDConfirmDialog> {
cancel(reason?: string): MDConfirmDialog;
}
interface MDDialogOptions {
templateUrl?: string;
template?: string;
domClickEvent?: any;
disableParentScroll?: boolean;
clickOutsideToClose?: boolean;
hasBackdrop?: boolean;
escapeToClose?: boolean;
controller?: any;
locals?: {[index: string]: any};
bindToController?: boolean;
resolve?: {[index: string]: ng.IPromise<any>}
controllerAs?: string;
parent?: Element;
onComplete?: Function;
}
interface MDDialogService {
show(dialog: MDDialogOptions|MDPresetDialog<any>): ng.IPromise<any>;
confirm(): MDConfirmDialog;
alert(): MDAlertDialog;
hide(response?: any): void;
cancel(response?: any): void;
}
interface MDIcon {
(path: string): ng.IPromise<Element>;
}
interface MDIconProvider {
icon(id: string, url: string, iconSize?: string): MDIconProvider;
iconSet(id: string, url: string, iconSize?: string): MDIconProvider;
defaultIconSet(url: string, iconSize?: string): MDIconProvider;
defaultIconSize(iconSize: string): MDIconProvider;
}
interface MDMedia {
(media: string): boolean;
}
interface MDSidenavObject {
toggle(): void;
open(): void;
close(): void;
isOpen(): boolean;
isLockedOpen(): boolean;
}
interface MDSidenavService {
(component: string): MDSidenavObject;
}
interface MDToastPreset<T> {
content(content: string): T;
action(action: string): T;
highlightAction(highlightAction: boolean): T;
capsule(capsule: boolean): T;
theme(theme: string): T;
hideDelay(delay: number): T;
}
interface MDSimpleToastPreset extends MDToastPreset<MDSimpleToastPreset> {
}
interface MDToastOptions {
templateUrl?: string;
template?: string;
hideDelay?: number;
position?: string;
controller?: any;
locals?: {[index: string]: any};
bindToController?: boolean;
resolve?: {[index: string]: ng.IPromise<any>}
controllerAs?: string;
parent?: Element;
}
interface MDToastService {
show(optionsOrPreset: MDToastOptions|MDToastPreset<any>): ng.IPromise<any>;
showSimple(): ng.IPromise<any>;
simple(): MDSimpleToastPreset;
build(): MDToastPreset<any>;
updateContent(): void;
hide(response?: any): void;
cancel(response?: any): void;
}
interface MDPalette {
0?: string;
50?: string;
100?: string;
200?: string;
300?: string;
400?: string;
500?: string;
600?: string;
700?: string;
800?: string;
900?: string;
A100?: string;
A200?: string;
A400?: string;
A700?: string;
contrastDefaultColor?: string;
contrastDarkColors?: string;
contrastStrongLightColors?: string;
}
interface MDThemeHues {
default?: string;
'hue-1'?: string;
'hue-2'?: string;
'hue-3'?: string;
}
interface MDThemePalette {
name: string;
hues: MDThemeHues;
}
interface MDThemeColors {
accent: MDThemePalette;
background: MDThemePalette;
primary: MDThemePalette;
warn: MDThemePalette;
}
interface MDThemeGrayScalePalette {
1: string;
2: string;
3: string;
4: string;
name: string;
}
interface MDTheme {
name: string;
colors: MDThemeColors;
foregroundPalette: MDThemeGrayScalePalette;
foregroundShadow: string;
accentPalette(name: string, hues?: MDThemeHues): MDTheme;
primaryPalette(name: string, hues?: MDThemeHues): MDTheme;
warnPalette(name: string, hues?: MDThemeHues): MDTheme;
backgroundPalette(name: string, hues?: MDThemeHues): MDTheme;
dark(isDark?: boolean): MDTheme;
}
interface MDThemingProvider {
theme(name: string, inheritFrom?: string): MDTheme;
definePalette(name: string, palette: MDPalette): MDThemingProvider;
extendPalette(name: string, palette: MDPalette): MDPalette;
setDefaultTheme(theme: string): void;
alwaysWatchTheme(alwaysWatch: boolean): void;
}
}
+2 -2
View File
@@ -5,7 +5,7 @@
///<reference path="../angularjs/angular.d.ts" />
declare module ng.cgNotify {
declare module angular.cgNotify {
interface INotifyService {
@@ -113,4 +113,4 @@ declare module ng.cgNotify {
*/
close():void;
}
}
}
+1 -1
View File
@@ -5,7 +5,7 @@
/// <reference path="../angularjs/angular.d.ts" />
declare module ng.translate {
declare module angular.translate {
interface ITranslatePartialLoaderService {
addPart(name: string): ITranslatePartialLoaderService;
+2 -2
View File
@@ -5,7 +5,7 @@
/// <reference path="../angularjs/angular.d.ts" />
declare module ng.ui.bootstrap {
declare module angular.ui.bootstrap {
interface IAccordionConfig {
/**
@@ -630,4 +630,4 @@ declare module ng.ui.bootstrap {
animation?: boolean;
}
}
}
+186
View File
@@ -0,0 +1,186 @@
// Type definitions for Angular JS 1.1.5+ (ui.router module)
// Project: https://github.com/angular-ui/ui-router
// Definitions by: Michel Salib <https://github.com/michelsalib>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts" />
declare module angular.ui {
interface IState {
name?: string;
/**
* String HTML content, or function that returns an HTML string
*/
template?: string | {(): string};
/**
* String URL path to template file OR Function, returns URL path string
*/
templateUrl?: string | {(): string};
/**
* Function, returns HTML content string
*/
templateProvider?: Function;
/**
* A controller paired to the state. Function OR name as String
*/
controller?: Function | string;
controllerAs?: string;
/**
* Function (injectable), returns the actual controller function or string.
*/
controllerProvider?: Function;
resolve?: {};
/**
* A url with optional parameters. When a state is navigated or transitioned to, the $stateParams service will be populated with any parameters that were passed.
*/
url?: string;
/**
* A map which optionally configures parameters declared in the url, or defines additional non-url parameters. Only use this within a state if you are not using url. Otherwise you can specify your parameters within the url. When a state is navigated or transitioned to, the $stateParams service will be populated with any parameters that were passed.
*/
params?: any;
/**
* Use the views property to set up multiple views. If you don't need multiple views within a single state this property is not needed. Tip: remember that often nested views are more useful and powerful than multiple sibling views.
*/
views?: {};
abstract?: boolean;
/**
* Callback functions for when a state is entered and exited. Good way to trigger an action or dispatch an event, such as opening a dialog.
*/
onEnter?: Function;
/**
* Callback functions for when a state is entered and exited. Good way to trigger an action or dispatch an event, such as opening a dialog.
*/
onExit?: Function;
/**
* Arbitrary data object, useful for custom configuration.
*/
data?: any;
/**
* Boolean (default true). If false will not retrigger the same state just because a search/query parameter has changed. Useful for when you'd like to modify $location.search() without triggering a reload.
*/
reloadOnSearch?: boolean;
}
interface IStateProvider extends IServiceProvider {
state(name:string, config:IState): IStateProvider;
state(config:IState): IStateProvider;
decorator(name?: string, decorator?: (state: IState, parent: Function) => any): any;
}
interface IUrlMatcher {
concat(pattern: string): IUrlMatcher;
exec(path: string, searchParams: {}): {};
parameters(): string[];
format(values: {}): string;
}
interface IUrlMatcherFactory {
compile(pattern: string): IUrlMatcher;
isMatcher(o: any): boolean;
type(name: string, definition: any, definitionFn?: any): any;
}
interface IUrlRouterProvider extends IServiceProvider {
when(whenPath: RegExp, handler: Function): IUrlRouterProvider;
when(whenPath: RegExp, handler: any[]): IUrlRouterProvider;
when(whenPath: RegExp, toPath: string): IUrlRouterProvider;
when(whenPath: IUrlMatcher, hanlder: Function): IUrlRouterProvider;
when(whenPath: IUrlMatcher, handler: any[]): IUrlRouterProvider;
when(whenPath: IUrlMatcher, toPath: string): IUrlRouterProvider;
when(whenPath: string, handler: Function): IUrlRouterProvider;
when(whenPath: string, handler: any[]): IUrlRouterProvider;
when(whenPath: string, toPath: string): IUrlRouterProvider;
otherwise(handler: Function): IUrlRouterProvider;
otherwise(handler: any[]): IUrlRouterProvider;
otherwise(path: string): IUrlRouterProvider;
rule(handler: Function): IUrlRouterProvider;
rule(handler: any[]): IUrlRouterProvider;
}
interface IStateOptions {
/**
* {boolean=true|string=} - If true will update the url in the location bar, if false will not. If string, must be "replace", which will update url and also replace last history record.
*/
location?: boolean | string;
/**
* {boolean=true}, If true will inherit url parameters from current url.
*/
inherit?: boolean;
/**
* {object=$state.$current}, When transitioning with relative path (e.g '^'), defines which state to be relative from.
*/
relative?: IState;
/**
* {boolean=true}, If true will broadcast $stateChangeStart and $stateChangeSuccess events.
*/
notify?: boolean;
/**
* {boolean=false}, If true will force transition even if the state or params have not changed, aka a reload of the same state. It differs from reloadOnSearch because you'd use this when you want to force a reload when everything is the same, including search params.
*/
reload?: boolean;
}
interface IHrefOptions {
lossy?: boolean;
inherit?: boolean;
relative?: IState;
absolute?: boolean;
}
interface IStateService {
/**
* Convenience method for transitioning to a new state. $state.go calls $state.transitionTo internally but automatically sets options to { location: true, inherit: true, relative: $state.$current, notify: true }. This allows you to easily use an absolute or relative to path and specify only the parameters you'd like to update (while letting unspecified parameters inherit from the currently active ancestor states).
*
* @param to Absolute state name or relative state path. Some examples:
*
* $state.go('contact.detail') - will go to the contact.detail state
* $state.go('^') - will go to a parent state
* $state.go('^.sibling') - will go to a sibling state
* $state.go('.child.grandchild') - will go to grandchild state
*
* @param params A map of the parameters that will be sent to the state, will populate $stateParams. Any parameters that are not specified will be inherited from currently defined parameters. This allows, for example, going to a sibling state that shares parameters specified in a parent state. Parameter inheritance only works between common ancestor states, I.e. transitioning to a sibling will get you the parameters for all parents, transitioning to a child will get you all current parameters, etc.
*
* @param options Options object.
*/
go(to: string, params?: {}, options?: IStateOptions): IPromise<any>;
transitionTo(state: string, params?: {}, updateLocation?: boolean): void;
transitionTo(state: string, params?: {}, options?: IStateOptions): void;
includes(state: string, params?: {}): boolean;
is(state:string, params?: {}): boolean;
is(state: IState, params?: {}): boolean;
href(state: IState, params?: {}, options?: IHrefOptions): string;
href(state: string, params?: {}, options?: IHrefOptions): string;
get(state: string): IState;
get(): IState[];
current: IState;
params: IStateParamsService;
reload(): void;
}
interface IStateParamsService {
[key: string]: any;
}
interface IUrlRouterService {
/*
* Triggers an update; the same update that happens when the address bar
* url changes, aka $locationChangeSuccess.
*
* This method is useful when you need to use preventDefault() on the
* $locationChangeSuccess event, perform some custom logic (route protection,
* auth, config, redirection, etc) and then finally proceed with the transition
* by calling $urlRouter.sync().
*
*/
sync(): void;
}
interface IUiViewScrollProvider {
/*
* Reverts back to using the core $anchorScroll service for scrolling
* based on the url anchor.
*/
useAnchorScroll(): void;
}
}
@@ -0,0 +1,143 @@
/// <reference path="../angularjs/angular.d.ts" />
/// <reference path="angular-ui-sortable.d.ts" />
var myApp = angular.module('testModule');
interface MySortableControllerScope extends ng.IScope {
items: SortableModelInfo[];
sortableOptions: ng.ui.UISortableOptions<SortableModelInfo>;
sortingLog: SortLogInfo[];
}
interface SortableModelInfo {
text: string;
value: number;
}
interface SortLogInfo {
ID: number;
Text: string;
}
myApp.controller('sortableController', function ($scope: MySortableControllerScope) {
$scope.sortableOptions = {
activate: function(e, ui) {
var jQueryEventObject: JQueryEventObject = e;
var uiSortableUIParams: ng.ui.UISortableUIParams<SortableModelInfo> = ui;
},
beforeStop: function(e, ui) {
var jQueryEventObject: JQueryEventObject = e;
var uiSortableUIParams: ng.ui.UISortableUIParams<SortableModelInfo> = ui;
},
change: function(e, ui) {
var jQueryEventObject: JQueryEventObject = e;
var uiSortableUIParams: ng.ui.UISortableUIParams<SortableModelInfo> = ui;
},
deactivate: function(e, ui) {
var jQueryEventObject: JQueryEventObject = e;
var uiSortableUIParams: ng.ui.UISortableUIParams<SortableModelInfo> = ui;
},
out: function(e, ui) {
var jQueryEventObject: JQueryEventObject = e;
var uiSortableUIParams: ng.ui.UISortableUIParams<SortableModelInfo> = ui;
},
over: function(e, ui) {
var jQueryEventObject: JQueryEventObject = e;
var uiSortableUIParams: ng.ui.UISortableUIParams<SortableModelInfo> = ui;
},
receive: function(e, ui) {
var jQueryEventObject: JQueryEventObject = e;
var uiSortableUIParams: ng.ui.UISortableUIParams<SortableModelInfo> = ui;
},
remove: function(e, ui) {
var jQueryEventObject: JQueryEventObject = e;
var uiSortableUIParams: ng.ui.UISortableUIParams<SortableModelInfo> = ui;
},
sort: function(e, ui) {
var jQueryEventObject: JQueryEventObject = e;
var uiSortableUIParams: ng.ui.UISortableUIParams<SortableModelInfo> = ui;
},
start: function(e, ui) {
var jQueryEventObject: JQueryEventObject = e;
var uiSortableUIParams: ng.ui.UISortableUIParams<SortableModelInfo> = ui;
},
stop: function(e, ui) {
var jQueryEventObject: JQueryEventObject = e;
var uiSortableUIParams: ng.ui.UISortableUIParams<SortableModelInfo> = ui;
var uiitem: ng.ui.UISortableUIItem<SortableModelInfo> = ui.item;
var uiitemscope: ng.IScope = uiitem.scope();
var uiitemsortable: ng.ui.UISortableProperties<SortableModelInfo> = uiitem.sortable;
var dropindex: number = uiitemsortable.dropindex;
var droptarget: number = uiitemsortable.droptarget;
var droptargetModel: SortableModelInfo[] = uiitemsortable.droptargetModel;
var index: number = uiitemsortable.index;
var model: SortableModelInfo = uiitemsortable.model;
var moved: SortableModelInfo = uiitemsortable.moved;
var received: Boolean = uiitemsortable.received;
var source: ng.IAugmentedJQuery = uiitemsortable.source;
var sourceModel: SortableModelInfo[] = uiitemsortable.sourceModel;
var logEntry = {
ID: $scope.sortingLog.length + 1,
Text: 'Moved element: ' + ui.item.sortable.model.text
};
$scope.sortingLog.push(logEntry);
},
update: function(e, ui) {
var jQueryEventObject: JQueryEventObject = e;
var uiSortableUIParams: ng.ui.UISortableUIParams<SortableModelInfo> = ui;
var voidcanceled: void = ui.item.sortable.cancel();
var isCanceled: Boolean = ui.item.sortable.isCanceled();
var isCustomHelperUsed: Boolean =ui.item.sortable.isCustomHelperUsed();
}
};
$scope.sortableOptions.appendTo = document.body;
$scope.sortableOptions.appendTo = angular.element(document.body);
$scope.sortableOptions.appendTo = 'body';
$scope.sortableOptions.axis = 'x';
$scope.sortableOptions.axis = 'y';
$scope.sortableOptions.axis = false;
$scope.sortableOptions.cancel = '.disabled';
$scope.sortableOptions.connectWith = '.connectedSortable';
$scope.sortableOptions.connectWith = false;
$scope.sortableOptions.containment = 'parent';
$scope.sortableOptions.containment = 'body';
$scope.sortableOptions.containment = document.body;
$scope.sortableOptions.containment = false;
$scope.sortableOptions.cursor = 'move';
$scope.sortableOptions.cursorAt = false;
$scope.sortableOptions.cursorAt = { left: 5 };
$scope.sortableOptions.delay = 300;
$scope.sortableOptions.disabled = true;
$scope.sortableOptions.distance = 5;
$scope.sortableOptions.dropOnEmpty = false;
$scope.sortableOptions.forceHelperSize = true;
$scope.sortableOptions.forcePlaceholderSize = true;
$scope.sortableOptions.grid = false;
$scope.sortableOptions.grid = [20, 10];
$scope.sortableOptions.handle = '.handle';
$scope.sortableOptions.helper = 'clone';
$scope.sortableOptions.helper = function(e: JQueryEventObject, item: ng.IAugmentedJQuery) {
return item.clone();
};
$scope.sortableOptions.items = '> li:not(.disabled)';
$scope.sortableOptions.opacity = false;
$scope.sortableOptions.opacity = 0.5;
$scope.sortableOptions.placeholder = false;
$scope.sortableOptions.placeholder = 'sortable-placeholder';
$scope.sortableOptions.revert = true;
$scope.sortableOptions.revert = 300;
$scope.sortableOptions.scroll = false;
$scope.sortableOptions.scrollSensitivity = 10;
$scope.sortableOptions.scrollSpeed = 40;
$scope.sortableOptions.tolerance = 'pointer';
$scope.sortableOptions.zIndex = 9999;
$scope.sortableOptions['ui-floating'] = undefined;
$scope.sortableOptions['ui-floating'] = null;
$scope.sortableOptions['ui-floating'] = false;
$scope.sortableOptions['ui-floating'] = true;
$scope.sortableOptions['ui-floating'] = "auto";
});
+210
View File
@@ -0,0 +1,210 @@
// Type definitions for angular.ui.sortable module v0.13+
// Project: https://github.com/angular-ui/ui-sortable
// Definitions by: Thodoris Greasidis <https://github.com/thgreasi>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts" />
declare module angular.ui {
interface UISortableOptions<T> extends SortableOptions<T> {
'ui-floating'?: string|boolean;
}
interface UISortableProperties<T> {
/**
* Holds the index of the drop target that the dragged item was dropped.
*/
dropindex: number;
/**
* Holds the ui-sortable element that the dragged item was dropped on.
*/
droptarget: number;
/**
* Holds the array that is specified by the `ng-model` attribute of the [`droptarget`](#droptarget) ui-sortable element.
*/
droptargetModel: Array<T>;
/**
* Holds the original index of the item dragged.
*/
index: number;
/**
* Holds the JavaScript object that is used as the model of the dragged item, as specified by the ng-repeat of the [`source`](#source) ui-sortable element and the item's [`index`](#index).
*/
model: T;
/**
* Holds the model of the dragged item only when a sorting happens between two connected ui-sortable elements.
* In other words: `'moved' in ui.item.sortable` will return false only when a sorting is withing the same ui-sortable element ([`source`](#source) equals to the [`droptarget`](#droptarget)).
*/
moved?: T;
/**
* When sorting between two connected sortables, it will be set to true inside the `update` callback of the [`droptarget`](#droptarget).
*/
received: Boolean;
/**
* Holds the ui-sortable element that the dragged item originated from.
*/
source: ng.IAugmentedJQuery
/**
* Holds the array that is specified by the `ng-model` of the [`source`](#source) ui-sortable element.
*/
sourceModel: Array<T>;
/**
* Can be called inside the `update` callback, in order to prevent/revert a sorting.
* Should be used instead of the [jquery-ui-sortable cancel()](http://api.jqueryui.com/sortable/#method-cancel) method.
*/
cancel(): void;
/**
* Returns whether the current sorting is marked as canceled, by an earlier call to [`ui.item.sortable.cancel()`](#cancel).
*/
isCanceled(): Boolean;
/**
* Returns whether the [`helper`](http://api.jqueryui.com/sortable/#option-helper) element used for the current sorting, is one of the original ui-sortable list elements.
*/
isCustomHelperUsed(): Boolean;
}
interface UISortableUIItem<T> extends ng.IAugmentedJQuery {
sortable: UISortableProperties<T>;
}
interface UISortableUIParams<T> extends SortableUIParams {
item: UISortableUIItem<T>;
}
// Base Sortable //////////////////////////////////////////////////
interface SortableCursorAtOptions {
top?: number;
left?: number;
right?: number;
bottom?: number;
}
interface SortableHelperFunctionOption {
(event: JQueryEventObject, ui: ng.IAugmentedJQuery): JQuery;
}
interface SortableOptions<T> extends SortableEvents<T> {
/**
* jQuery, Element, Selector or string
* Default: "parent"
*/
appendTo?: any;
/**
* "X", "Y" or false
* Default: false
*/
axis?: string|boolean;
/**
* Selector
* Default: "input,textarea,button,select,option"
*/
cancel?: string;
/**
* Selector or false
* Default: false
*/
connectWith?: string|boolean;
/**
* Element, Selector, string or false
* Default: false
*/
containment?: any;
cursor?: string;
/**
* Moves the sorting element or helper so the cursor always appears to drag from the same position. Coordinates can be given as a hash using a combination of one or two keys SortableCursorAtOptions: { top, left, right, bottom }
* Default: false
*/
cursorAt?: SortableCursorAtOptions|boolean;
delay?: number;
disabled?: boolean;
distance?: number;
dropOnEmpty?: boolean;
forceHelperSize?: boolean;
forcePlaceholderSize?: boolean;
/**
* Array of numbers or false
* Default: false
*/
grid?: number[]|boolean;
/**
* Selector or Element
*/
handle?: any;
/**
* "original", "clone" or Function()
* Default: "original"
*/
helper?: string|SortableHelperFunctionOption;
/**
* Selector
*/
items?: string;
/**
* Number or false
* Default: false
*/
opacity?: number|boolean;
/**
* string or false
* Default: false
*/
placeholder?: string|boolean;
/**
* boolean or number
* Default: false
*/
revert?: number|boolean;
scroll?: boolean;
scrollSensitivity?: number;
scrollSpeed?: number;
/**
* "intersect" or "pointer"
* Default: "intersect"
*/
tolerance?: string;
zIndex?: number;
}
interface SortableUIParams {
helper: ng.IAugmentedJQuery;
item: ng.IAugmentedJQuery;
offset: any;
position: any;
originalPosition: any;
sender: ng.IAugmentedJQuery;
placeholder: ng.IAugmentedJQuery;
}
interface SortableEvent<T> {
(event: JQueryEventObject, ui: UISortableUIParams<T>): void;
}
interface SortableEvents<T> {
activate?: SortableEvent<T>;
beforeStop?: SortableEvent<T>;
change?: SortableEvent<T>;
deactivate?: SortableEvent<T>;
out?: SortableEvent<T>;
over?: SortableEvent<T>;
receive?: SortableEvent<T>;
remove?: SortableEvent<T>;
sort?: SortableEvent<T>;
start?: SortableEvent<T>;
stop?: SortableEvent<T>;
update?: SortableEvent<T>;
}
}
-120
View File
@@ -1,120 +0,0 @@
// Type definitions for Angular JS 1.1.5+ (ui.router module)
// Project: https://github.com/angular-ui/ui-router
// Definitions by: Michel Salib <https://github.com/michelsalib>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts" />
declare module ng.ui {
interface IState {
name?: string;
template?: any;
templateUrl?: any;
templateProvider?: any;
controller?: any;
controllerAs?: string;
controllerProvider?: any;
resolve?: {};
url?: string;
params?: any;
views?: {};
abstract?: boolean;
onEnter?: any;
onExit?: any;
data?: any;
reloadOnSearch?: boolean;
}
interface IStateProvider extends IServiceProvider {
state(name:string, config:IState): IStateProvider;
state(config:IState): IStateProvider;
decorator(name?: string, decorator?: (state: IState, parent: Function) => any): any;
}
interface IUrlMatcher {
concat(pattern: string): IUrlMatcher;
exec(path: string, searchParams: {}): {};
parameters(): string[];
format(values: {}): string;
}
interface IUrlMatcherFactory {
compile(pattern: string): IUrlMatcher;
isMatcher(o: any): boolean;
type(name: string, definition: any, definitionFn?: any): any;
}
interface IUrlRouterProvider extends IServiceProvider {
when(whenPath: RegExp, handler: Function): IUrlRouterProvider;
when(whenPath: RegExp, handler: any[]): IUrlRouterProvider;
when(whenPath: RegExp, toPath: string): IUrlRouterProvider;
when(whenPath: IUrlMatcher, hanlder: Function): IUrlRouterProvider;
when(whenPath: IUrlMatcher, handler: any[]): IUrlRouterProvider;
when(whenPath: IUrlMatcher, toPath: string): IUrlRouterProvider;
when(whenPath: string, handler: Function): IUrlRouterProvider;
when(whenPath: string, handler: any[]): IUrlRouterProvider;
when(whenPath: string, toPath: string): IUrlRouterProvider;
otherwise(handler: Function): IUrlRouterProvider;
otherwise(handler: any[]): IUrlRouterProvider;
otherwise(path: string): IUrlRouterProvider;
rule(handler: Function): IUrlRouterProvider;
rule(handler: any[]): IUrlRouterProvider;
}
interface IStateOptions {
location?: any;
inherit?: boolean;
relative?: IState;
notify?: boolean;
}
interface IHrefOptions {
lossy?: boolean;
inherit?: boolean;
relative?: IState;
absolute?: boolean;
}
interface IStateService {
go(to: string, params?: {}, options?: IStateOptions): IPromise<any>;
transitionTo(state: string, params?: {}, updateLocation?: boolean): void;
transitionTo(state: string, params?: {}, options?: IStateOptions): void;
includes(state: string, params?: {}): boolean;
is(state:string, params?: {}): boolean;
is(state: IState, params?: {}): boolean;
href(state: IState, params?: {}, options?: IHrefOptions): string;
href(state: string, params?: {}, options?: IHrefOptions): string;
get(state: string): IState;
get(): IState[];
current: IState;
params: IStateParamsService;
reload(): void;
}
interface IStateParamsService {
[key: string]: any;
}
interface IUrlRouterService {
/*
* Triggers an update; the same update that happens when the address bar
* url changes, aka $locationChangeSuccess.
*
* This method is useful when you need to use preventDefault() on the
* $locationChangeSuccess event, perform some custom logic (route protection,
* auth, config, redirection, etc) and then finally proceed with the transition
* by calling $urlRouter.sync().
*
*/
sync(): void;
}
interface IUiViewScrollProvider {
/*
* Reverts back to using the core $anchorScroll service for scrolling
* based on the url anchor.
*/
useAnchorScroll(): void;
}
}
@@ -5,23 +5,21 @@ interface TestScope extends ng.IScope {
viewType: string;
}
module ng.LocalStorageTests {
export class TestController {
constructor(private $scope: TestScope, private storage: ng.localStorage.ILocalStorageService) {
storage.bind($scope, 'varName');
storage.bind($scope,'varName', { defaultValue: 'randomValue123', storeName: 'customStoreKey' });
$scope.viewType = 'ANYTHING';
storage.unbind($scope, 'viewType');
export class TestController {
constructor(private $scope: TestScope, private storage: ng.localStorage.ILocalStorageService) {
storage.bind($scope, 'varName');
storage.bind($scope,'varName', { defaultValue: 'randomValue123', storeName: 'customStoreKey' });
$scope.viewType = 'ANYTHING';
storage.unbind($scope, 'viewType');
storage.set('key', 'value');
storage.get('key');
storage.remove('key');
storage.set('key', 'value');
storage.get('key');
storage.remove('key');
storage.clearAll();
}
storage.clearAll();
}
}
var app = angular.module('angularLocalStorageTests', ['angularLocalStorage']);
app.controller('testCtrl', ['$scope', 'storage', ($scope: TestScope, storage: ng.localStorage.ILocalStorageService) => new ng.LocalStorageTests.TestController($scope, storage)]);
app.controller('testCtrl', ['$scope', 'storage', ($scope: TestScope, storage: ng.localStorage.ILocalStorageService) => new TestController($scope, storage)]);
+1 -1
View File
@@ -5,7 +5,7 @@
/// <reference path="../angularjs/angular.d.ts"/>
declare module ng.localStorage {
declare module angular.localStorage {
interface ILocalStorageService {
set(key: string, value: any): any;
get(key: string): any;
+7
View File
@@ -0,0 +1,7 @@
/// <reference path="angular.d.ts" />
import localName = require('angular');
var mod: localName.IModule = localName.module('mod', []);
// Remain compatible with the ambient version
var mod2: angular.IModule = mod;
+37 -7
View File
@@ -1,15 +1,19 @@
// Type definitions for Angular JS 1.3 (ngAnimate module)
// Project: http://angularjs.org
// Definitions by: Michel Salib <https://github.com/michelsalib>, Adi Dahiya <https://github.com/adidahiya>
// Definitions by: Michel Salib <https://github.com/michelsalib>, Adi Dahiya <https://github.com/adidahiya>, Raphael Schweizer <https://github.com/rasch>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="angular.d.ts" />
declare module "angular-animate" {
var _: string;
export = _;
}
///////////////////////////////////////////////////////////////////////////////
// ngAnimate module (angular-animate.js)
///////////////////////////////////////////////////////////////////////////////
declare module ng.animate {
declare module angular.animate {
///////////////////////////////////////////////////////////////////////////
// AnimateService
@@ -25,23 +29,37 @@ declare module ng.animate {
*/
enabled(value?: boolean, element?: JQuery): boolean;
/**
* Performs an inline animation on the element.
*
* @param element the element that will be the focus of the animation
* @param from a collection of CSS styles that will be applied to the element at the start of the animation
* @param to a collection of CSS styles that the element will animate towards
* @param className an optional CSS class that will be added to the element for the duration of the animation (the default class is 'ng-inline-animate')
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
* @returns the animation callback promise
*/
animate(element: JQuery, from: any, to: any, className?: string, options?: IAnimationOptions): ng.IPromise<void>;
/**
* Appends the element to the parentElement element that resides in the document and then runs the enter animation.
*
* @param element the element that will be the focus of the enter animation
* @param parentElement the parent element of the element that will be the focus of the enter animation
* @param afterElement the sibling element (which is the previous element) of the element that will be the focus of the enter animation
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
* @returns the animation callback promise
*/
enter(element: JQuery, parentElement: JQuery, afterElement?: JQuery): ng.IPromise<void>;
enter(element: JQuery, parentElement: JQuery, afterElement?: JQuery, options?: IAnimationOptions): ng.IPromise<void>;
/**
* Runs the leave animation operation and, upon completion, removes the element from the DOM.
*
* @param element the element that will be the focus of the leave animation
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
* @returns the animation callback promise
*/
leave(element: JQuery): ng.IPromise<void>;
leave(element: JQuery, options?: IAnimationOptions): ng.IPromise<void>;
/**
* Fires the move DOM operation. Just before the animation starts, the animate service will either append
@@ -61,9 +79,10 @@ declare module ng.animate {
*
* @param element the element that will be animated
* @param className the CSS class that will be added to the element and then animated
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
* @returns the animation callback promise
*/
addClass(element: JQuery, className: string): ng.IPromise<void>;
addClass(element: JQuery, className: string, options?: IAnimationOptions): ng.IPromise<void>;
/**
* Triggers a custom animation event based off the className variable and then removes the CSS class
@@ -71,9 +90,10 @@ declare module ng.animate {
*
* @param element the element that will be animated
* @param className the CSS class that will be animated and then removed from the element
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
* @returns the animation callback promise
*/
removeClass(element: JQuery, className: string): ng.IPromise<void>;
removeClass(element: JQuery, className: string, options?: IAnimationOptions): ng.IPromise<void>;
/**
* Adds and/or removes the given CSS classes to and from the element. Once complete, the done() callback
@@ -82,9 +102,10 @@ declare module ng.animate {
* @param element the element which will have its CSS classes changed removed from it
* @param add the CSS classes which will be added to the element
* @param remove the CSS class which will be removed from the element CSS classes have been set on the element
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
* @returns the animation callback promise
*/
setClass(element: JQuery, add: string, remove: string): ng.IPromise<void>;
setClass(element: JQuery, add: string, remove: string, options?: IAnimationOptions): ng.IPromise<void>;
/**
* Cancels the provided animation.
@@ -113,4 +134,13 @@ declare module ng.animate {
*/
classNameFilter(expression?: RegExp): RegExp;
}
///////////////////////////////////////////////////////////////////////////
// Angular Animation Options
// see https://docs.angularjs.org/api/ngAnimate/#applying-directive-specific-styles-to-an-animation
///////////////////////////////////////////////////////////////////////////
interface IAnimationOptions {
to?: Object;
from?: Object;
}
}
+6 -1
View File
@@ -6,10 +6,15 @@
/// <reference path="angular.d.ts" />
declare module "angular-cookies" {
var _: string;
export = _;
}
///////////////////////////////////////////////////////////////////////////////
// ngCookies module (angular-cookies.js)
///////////////////////////////////////////////////////////////////////////////
declare module ng.cookies {
declare module angular.cookies {
///////////////////////////////////////////////////////////////////////////
// CookieService
+12 -2
View File
@@ -5,6 +5,16 @@
/// <reference path="angular.d.ts" />
declare module "angular-mocks/ngMock" {
var _: string;
export = _;
}
declare module "angular-mocks/ngAnimateMock" {
var _: string;
export = _;
}
///////////////////////////////////////////////////////////////////////////////
// functions attached to global object (window)
///////////////////////////////////////////////////////////////////////////////
@@ -14,7 +24,7 @@ declare var inject: (...fns: Function[]) => any;
///////////////////////////////////////////////////////////////////////////////
// ngMock module (angular-mocks.js)
///////////////////////////////////////////////////////////////////////////////
declare module ng {
declare module angular {
///////////////////////////////////////////////////////////////////////////
// AngularStatic
@@ -59,7 +69,7 @@ declare module ng {
flushNext(expectedDelay?: number): void;
verifyNoPendingTasks(): void;
}
///////////////////////////////////////////////////////////////////////////
// IntervalService
// see http://docs.angularjs.org/api/ngMock.$interval
+2 -2
View File
@@ -9,7 +9,7 @@
///////////////////////////////////////////////////////////////////////////////
// ngResource module (angular-resource.js)
///////////////////////////////////////////////////////////////////////////////
declare module ng.resource {
declare module angular.resource {
/**
* Currently supported options for the $resource factory options argument.
@@ -146,7 +146,7 @@ declare module ng.resource {
}
/** extensions to base ng based on using angular-resource */
declare module ng {
declare module angular {
interface IModule {
/** creating a resource service factory */
+21 -17
View File
@@ -5,11 +5,15 @@
/// <reference path="angular.d.ts" />
declare module "angular-route" {
var _: string;
export = _;
}
///////////////////////////////////////////////////////////////////////////////
// ngRoute module (angular-route.js)
///////////////////////////////////////////////////////////////////////////////
declare module ng.route {
declare module angular.route {
///////////////////////////////////////////////////////////////////////////
// RouteParamsService
@@ -32,8 +36,8 @@ declare module ng.route {
// to a controller that was not initialized as a result of a route maching.
current?: ICurrentRoute;
}
/**
* see http://docs.angularjs.org/api/ngRoute/provider/$routeProvider#when for API documentation
*/
@@ -54,24 +58,24 @@ declare module ng.route {
/**
* {string=|function()=}
* Html template as a string or a function that returns an html template as a string which should be used by ngView or ngInclude directives. This property takes precedence over templateUrl.
*
*
* If template is a function, it will be called with the following parameters:
*
*
* {Array.<Object>} - route parameters extracted from the current $location.path() by applying the current route
*/
template?: string|{($routeParams?: ng.route.IRouteParamsService) : string;}
/**
* {string=|function()=}
* Path or function that returns a path to an html template that should be used by ngView.
*
*
* If templateUrl is a function, it will be called with the following parameters:
*
*
* {Array.<Object>} - route parameters extracted from the current $location.path() by applying the current route
*/
templateUrl?: string|{ ($routeParams?: ng.route.IRouteParamsService): string; }
/**
* {Object.<string, function>=} - An optional map of dependencies which should be injected into the controller. If any of these dependencies are promises, the router will wait for them all to be resolved or one to be rejected before the controller is instantiated. If all the promises are resolved successfully, the values of the resolved promises are injected and $routeChangeSuccess event is fired. If any of the promises are rejected the $routeChangeError event is fired. The map object is:
*
*
* - key - {string}: a name of a dependency to be injected into the controller.
* - factory - {string|function}: If string then it is an alias for a service. Otherwise if function, then it is injected and the return value is treated as the dependency. If the result is a promise, it is resolved before its value is injected into the controller. Be aware that ngRoute.$routeParams will still refer to the previous route within these resolve functions. Use $route.current.params to access the new route parameters, instead.
*/
@@ -79,9 +83,9 @@ declare module ng.route {
/**
* {(string|function())=}
* Value to update $location path with and trigger route redirection.
*
*
* If redirectTo is a function, it will be called with the following parameters:
*
*
* - {Object.<string>} - route parameters extracted from the current $location.path() by applying the current route templateUrl.
* - {string} - current $location.path()
* - {Object} - current $location.search()
@@ -89,14 +93,14 @@ declare module ng.route {
*/
redirectTo?: string|{($routeParams?: ng.route.IRouteParamsService, $locationPath?: string, $locationSearch?: any) : string};
/**
* Reload route when only $location.search() or $location.hash() changes.
*
* Reload route when only $location.search() or $location.hash() changes.
*
* This option defaults to true. If the option is set to false and url in the browser changes, then $routeUpdate event is broadcasted on the root scope.
*/
reloadOnSearch?: boolean;
/**
* Match routes without being case sensitive
*
*
* This option defaults to false. If the option is set to true, then the particular route can be matched without being case sensitive
*/
caseInsensitiveMatch?: boolean;
@@ -115,21 +119,21 @@ declare module ng.route {
interface IRouteProvider extends IServiceProvider {
/**
* Sets route definition that will be used on route change when no other route definition is matched.
*
*
* @params Mapping information to be assigned to $route.current.
*/
otherwise(params: IRoute): IRouteProvider;
/**
* Adds a new route definition to the $route service.
*
*
* @param path Route path (matched against $location.path). If $location.path contains redundant trailing slash or is missing one, the route will still match and the $location.path will be updated to add or drop the trailing slash to exactly match the route definition.
*
*
* - path can contain named groups starting with a colon: e.g. :name. All characters up to the next slash are matched and stored in $routeParams under the given name when the route matches.
* - path can contain named groups starting with a colon and ending with a star: e.g.:name*. All characters are eagerly stored in $routeParams under the given name when the route matches.
* - path can contain optional named groups with a question mark: e.g.:name?.
*
* For example, routes like /color/:color/largecode/:largecode*\/edit will match /color/brown/largecode/code/with/slashes/edit and extract: color: brown and largecode: code/with/slashes.
*
*
* @param route Mapping information to be assigned to $route.current on route match.
*/
when(path: string, route: IRoute): IRouteProvider;
+7 -2
View File
@@ -6,10 +6,15 @@
/// <reference path="angular.d.ts" />
declare module "angular-sanitize" {
var _: string;
export = _;
}
///////////////////////////////////////////////////////////////////////////////
// ngSanitize module (angular-sanitize.js)
///////////////////////////////////////////////////////////////////////////////
declare module ng.sanitize {
declare module angular.sanitize {
///////////////////////////////////////////////////////////////////////////
// SanitizeService
@@ -25,7 +30,7 @@ declare module ng.sanitize {
///////////////////////////////////////////////////////////////////////////
export module filter {
// Finds links in text input and turns them into html links.
// Finds links in text input and turns them into html links.
// Supports http/https/ftp/mailto and plain email address links.
// see http://code.angularjs.org/1.2.0/docs/api/ngSanitize.filter:linky
interface ILinky {
+21 -9
View File
@@ -6,13 +6,15 @@
/// <reference path="../jquery/jquery.d.ts" />
declare var angular: ng.IAngularStatic;
declare var angular: angular.IAngularStatic;
// Support for painless dependency injection
interface Function {
$inject?: string[];
}
// Collapse angular into ng
import ng = angular;
// Support AMD require
declare module 'angular' {
export = angular;
@@ -21,7 +23,7 @@ declare module 'angular' {
///////////////////////////////////////////////////////////////////////////////
// ng module (angular.js)
///////////////////////////////////////////////////////////////////////////////
declare module ng {
declare module angular {
// not directly implemented, but ensures that constructed class implements $get
interface IServiceProviderClass {
@@ -584,13 +586,13 @@ declare module ng {
}
interface IScope extends IRootScopeService { }
/**
* $scope for ngRepeat directive.
* see https://docs.angularjs.org/api/ng/directive/ngRepeat
*/
interface IRepeatScope extends IScope {
/**
* iterator offset of the repeated element (0..length-1).
*/
@@ -620,7 +622,7 @@ declare module ng {
* true if the iterator position $index is odd (otherwise false).
*/
$odd: boolean;
}
interface IAngularEvent {
@@ -889,6 +891,7 @@ declare module ng {
// implementation tests it as boolean, which makes more sense
// since this is a toggler
html5Mode(active: boolean): ILocationProvider;
html5Mode(mode: { enabled?: boolean; requireBase?: boolean; rewriteLinks?: boolean; }): ILocationProvider;
}
///////////////////////////////////////////////////////////////////////////
@@ -1024,7 +1027,7 @@ declare module ng {
// Not garanteed to have, since it's a non-mandatory option
//capacity: number;
};
put(key: string, value?: any): void;
put<T>(key: string, value?: T): T;
get(key: string): any;
remove(key: string): void;
removeAll(): void;
@@ -1152,6 +1155,15 @@ declare module ng {
*/
put<T>(url: string, data: any, config?: IRequestShortcutConfig): IHttpPromise<T>;
/**
* Shortcut method to perform PATCH request.
*
* @param url Relative or absolute URL specifying the destination of the request
* @param data Request content
* @param config Optional configuration object
*/
patch<T>(url: string, data: any, config?: IRequestShortcutConfig): IHttpPromise<T>;
/**
* Runtime equivalent of the $httpProvider.defaults property. Allows configuration of default headers, withCredentials as well as request and response transformations.
*/
@@ -1262,7 +1274,7 @@ declare module ng {
statusText?: string;
}
interface IHttpPromise<T> extends IPromise<T> {
interface IHttpPromise<T> extends IPromise<IHttpPromiseCallbackArg<T>> {
success(callback: IHttpPromiseCallback<T>): IHttpPromise<T>;
error(callback: IHttpPromiseCallback<any>): IHttpPromise<T>;
then<TResult>(successCallback: (response: IHttpPromiseCallbackArg<T>) => IPromise<TResult>|TResult, errorCallback?: (response: IHttpPromiseCallbackArg<any>) => any): IPromise<TResult>;
@@ -1448,7 +1460,7 @@ declare module ng {
controller?: any;
controllerAs?: string;
bindToController?: boolean;
link?: IDirectiveLinkFn;
link?: IDirectiveLinkFn | IDirectivePrePost;
name?: string;
priority?: number;
replace?: boolean;
@@ -1501,7 +1513,7 @@ declare module ng {
// see http://docs.angularjs.org/api/ng.$animate
///////////////////////////////////////////////////////////////////////
interface IAnimateService {
addClass(element: JQuery, className: string, done?: Function): void;
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;
+25
View File
@@ -0,0 +1,25 @@
/// <reference path="arcgis-js-api.d.ts" />
import esri = require("esri");
import Map = require("esri/map");
import Point = require("esri/geometry/Point");
export = MapController;
class MapController {
map: Map;
constructor(public mapDiv: string) {
}
start() {
var point = new Point(-122.45, 37.75); // long, lat
var mapOptions: esri.MapOptions = {};
mapOptions.basemap = "topo";
mapOptions.center = point;
mapOptions.zoom = 13;
this.map = new Map(this.mapDiv, mapOptions);
}
}
+16049
View File
File diff suppressed because it is too large Load Diff
+32
View File
@@ -0,0 +1,32 @@
/// <reference path="./archy.d.ts" />
import archy = require("archy");
var opts: archy.Options = {
};
var data: archy.Data = {
label: 'beep',
nodes: [
'ity',
{
label: 'boop',
nodes: [
{
label: 'o_O',
nodes: [
{
label: 'oh',
nodes: ['hello', 'puny']
},
'human'
]
},
'party\ntime!'
]
}
]
};
var str = archy(data);
console.log(str);
+21
View File
@@ -0,0 +1,21 @@
// Type definitions for archy
// Project: https://github.com/substack/node-archy
// Definitions by: vvakame <https://github.com/vvakame/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "archy" {
function archy(obj: archy.Data, prefix?: string, opts?: archy.Options): string;
function archy(obj: string, prefix?: string, opts?: archy.Options): string;
module archy {
interface Data {
label: string;
nodes?: (Data | string)[];
}
interface Options {
unicode?: boolean;
}
}
export = archy;
}
+44
View File
@@ -0,0 +1,44 @@
/// <reference path="async.d.ts" />
interface StringCallback { (err: Error, result: string): void; }
interface AsyncStringGetter { (callback: StringCallback): void; }
var taskArray: AsyncStringGetter[] = [
function (callback) {
setTimeout(function () {
callback(null, 'one');
}, 200);
},
function (callback) {
setTimeout(function () {
callback(null, 'two');
}, 100);
},
];
async.series(taskArray, function (err, results) { console.log(results[0].match(/o/)) });
async.parallel(taskArray, function (err, results) { console.log(results[0].match(/o/)) });
async.parallelLimit(taskArray, 3, function (err, results) { console.log(results[0].match(/o/)) });
interface Lookup<T> { [key: string]: T; }
interface NumberCallback { (err: Error, result: number): void; }
interface AsyncNumberGetter { (callback: NumberCallback): void; }
var taskDict: Lookup<AsyncNumberGetter> = {
one: function(callback){
setTimeout(function(){
callback(null, 1);
}, 200);
},
two: function(callback){
setTimeout(function(){
callback(null, 2);
}, 100);
}
}
async.series(taskDict, function(err, results) { console.log(results['one'].toFixed(1)) });
async.parallel(taskDict, function(err, results) { console.log(results['one'].toFixed(1)) });
async.parallelLimit(taskDict, 3, function(err, results) { console.log(results['one'].toFixed(1)) });
+64 -10
View File
@@ -67,6 +67,17 @@ async.series([
],
function (err, results) { });
async.series<string>([
function (callback) {
callback(null, 'one');
},
function (callback) {
callback(null, 'two');
},
],
function (err, results) { });
async.series({
one: function (callback) {
setTimeout(function () {
@@ -81,6 +92,21 @@ async.series({
},
function (err, results) { });
async.series<number>({
one: function (callback) {
setTimeout(function () {
callback(null, 1);
}, 200);
},
two: function (callback) {
setTimeout(function () {
callback(null, 2);
}, 100);
},
},
function (err, results) { });
async.parallel([
function (callback) {
setTimeout(function () {
@@ -95,6 +121,20 @@ async.parallel([
],
function (err, results) { });
async.parallel<string>([
function (callback) {
setTimeout(function () {
callback(null, 'one');
}, 200);
},
function (callback) {
setTimeout(function () {
callback(null, 'two');
}, 100);
},
],
function (err, results) { });
async.parallel({
one: function (callback) {
@@ -110,6 +150,20 @@ async.parallel({
},
function (err, results) { });
async.parallel<number>({
one: function (callback) {
setTimeout(function () {
callback(null, 1);
}, 200);
},
two: function (callback) {
setTimeout(function () {
callback(null, 2);
}, 100);
},
},
function (err, results) { });
var count = 0;
@@ -136,7 +190,7 @@ async.waterfall([
], function (err, result) { });
var q = async.queue(function (task: any, callback) {
var q = async.queue<any>(function (task: any, callback) {
console.log('hello ' + task.name);
callback();
}, 2);
@@ -189,29 +243,29 @@ q.resume();
q.kill();
// tests for strongly typed tasks
var q2 = async.queue(function (task: string, callback) {
var q2 = async.queue<string>(function (task: string, callback) {
console.log('Task: ' + task);
callback();
}, 1);
q2.push('task1');
q2.push('task2', function (error, results: string[]) {
console.log('Finished tasks: ' + results.join(', '));
q2.push('task2', function (error) {
console.log('Finished tasks');
});
q2.push(['task3', 'task4', 'task5'], function (error, results: string[]) {
console.log('Finished tasks: ' + results.join(', '));
q2.push(['task3', 'task4', 'task5'], function (error) {
console.log('Finished tasks');
});
q2.unshift('task1');
q2.unshift('task2', function (error, results: string[]) {
console.log('Finished tasks: ' + results.join(', '));
q2.unshift('task2', function (error) {
console.log('Finished tasks');
});
q2.unshift(['task3', 'task4', 'task5'], function (error, results: string[]) {
console.log('Finished tasks: ' + results.join(', '));
q2.unshift(['task3', 'task4', 'task5'], function (error) {
console.log('Finished tasks');
});
var filename = '';
+39 -33
View File
@@ -3,26 +3,32 @@
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface Dictionary<T> { [key: string]: T; }
interface ErrorCallback { (err?: Error): void; }
interface AsyncResultsCallback<T> { (err: Error, results: T[]): void; }
interface AsyncResultCallback<T> { (err: Error, result: T): void; }
interface AsyncTimesCallback<T> { (n: number, callback: AsyncResultsCallback<T>): void; }
interface AsyncResultArrayCallback<T> { (err: Error, results: T[]): void; }
interface AsyncResultObjectCallback<T> { (err: Error, results: Dictionary<T>): void; }
interface AsyncTimesCallback<T> { (n: number, callback: AsyncResultArrayCallback<T>): void; }
interface AsyncIterator<T> { (item: T, callback: ErrorCallback): void; }
interface AsyncResultIterator<T, R> { (item: T, callback: AsyncResultCallback<R>): void; }
interface AsyncMemoIterator<T, R> { (memo: R, item: T, callback: AsyncResultCallback<R>): void; }
interface AsyncWorker<T> { (task: T, callback: Function): void; }
interface AsyncWorker<T> { (task: T, callback: ErrorCallback): void; }
interface AsyncFunction<T> { (callback: AsyncResultCallback<T>): void; }
interface AsyncVoidFunction { (callback: ErrorCallback): void; }
interface AsyncQueue<T> {
length(): number;
concurrency: number;
started: boolean;
paused: boolean;
push(task: T, callback?: AsyncResultsCallback<T>): void;
push(task: T[], callback?: AsyncResultsCallback<T>): void;
unshift(task: T, callback?: AsyncResultsCallback<T>): void;
unshift(task: T[], callback?: AsyncResultsCallback<T>): void;
push(task: T, callback?: ErrorCallback): void;
push(task: T[], callback?: ErrorCallback): void;
unshift(task: T, callback?: ErrorCallback): void;
unshift(task: T[], callback?: ErrorCallback): void;
saturated: () => any;
empty: () => any;
drain: () => any;
@@ -38,8 +44,8 @@ interface AsyncPriorityQueue<T> {
concurrency: number;
started: boolean;
paused: boolean;
push(task: T, priority: number, callback?: AsyncResultsCallback<T>): void;
push(task: T[], priority: number, callback?: AsyncResultsCallback<T>): void;
push(task: T, priority: number, callback?: AsyncResultArrayCallback<T>): void;
push(task: T[], priority: number, callback?: AsyncResultArrayCallback<T>): void;
saturated: () => any;
empty: () => any;
drain: () => any;
@@ -56,9 +62,9 @@ interface Async {
each<T>(arr: T[], iterator: AsyncIterator<T>, callback: ErrorCallback): void;
eachSeries<T>(arr: T[], iterator: AsyncIterator<T>, callback: ErrorCallback): void;
eachLimit<T>(arr: T[], limit: number, iterator: AsyncIterator<T>, callback: ErrorCallback): void;
map<T, R>(arr: T[], iterator: AsyncResultIterator<T, R>, callback: AsyncResultsCallback<R>): any;
mapSeries<T, R>(arr: T[], iterator: AsyncResultIterator<T, R>, callback: AsyncResultsCallback<R>): any;
mapLimit<T, R>(arr: T[], limit: number, iterator: AsyncResultIterator<T, R>, callback: AsyncResultsCallback<R>): any;
map<T, R>(arr: T[], iterator: AsyncResultIterator<T, R>, callback: AsyncResultArrayCallback<R>): any;
mapSeries<T, R>(arr: T[], iterator: AsyncResultIterator<T, R>, callback: AsyncResultArrayCallback<R>): any;
mapLimit<T, R>(arr: T[], limit: number, iterator: AsyncResultIterator<T, R>, callback: AsyncResultArrayCallback<R>): any;
filter<T>(arr: T[], iterator: AsyncResultIterator<T, boolean>, callback: (results: T[]) => any): any;
select<T>(arr: T[], iterator: AsyncResultIterator<T, boolean>, callback: (results: T[]) => any): any;
filterSeries<T>(arr: T[], iterator: AsyncResultIterator<T, boolean>, callback: (results: T[]) => any): any;
@@ -70,34 +76,34 @@ interface Async {
foldl<T, R>(arr: T[], memo: R, iterator: AsyncMemoIterator<T, R>, callback: AsyncResultCallback<R>): any;
reduceRight<T, R>(arr: T[], memo: R, iterator: AsyncMemoIterator<T, R>, callback: AsyncResultCallback<R>): any;
foldr<T, R>(arr: T[], memo: R, iterator: AsyncMemoIterator<T, R>, callback: AsyncResultCallback<R>): any;
detect<T>(arr: T[], iterator: AsyncResultIterator<T, boolean>, callback: AsyncResultsCallback<T>): any;
detectSeries<T>(arr: T[], iterator: AsyncResultIterator<T, boolean>, callback: AsyncResultsCallback<T>): any;
sortBy<T, V>(arr: T[], iterator: AsyncResultIterator<T, V>, callback: AsyncResultsCallback<T>): any;
some<T>(arr: T[], iterator: AsyncResultIterator<T, boolean>, callback: AsyncResultsCallback<T>): any;
any<T>(arr: T[], iterator: AsyncResultIterator<T, boolean>, callback: AsyncResultsCallback<T>): any;
detect<T>(arr: T[], iterator: AsyncResultIterator<T, boolean>, callback: AsyncResultArrayCallback<T>): any;
detectSeries<T>(arr: T[], iterator: AsyncResultIterator<T, boolean>, callback: AsyncResultArrayCallback<T>): any;
sortBy<T, V>(arr: T[], iterator: AsyncResultIterator<T, V>, callback: AsyncResultArrayCallback<T>): any;
some<T>(arr: T[], iterator: AsyncResultIterator<T, boolean>, callback: AsyncResultArrayCallback<T>): any;
any<T>(arr: T[], iterator: AsyncResultIterator<T, boolean>, callback: AsyncResultArrayCallback<T>): any;
every<T>(arr: T[], iterator: AsyncResultIterator<T, boolean>, callback: (result: boolean) => any): any;
all<T>(arr: T[], iterator: AsyncResultIterator<T, boolean>, callback: (result: boolean) => any): any;
concat<T, R>(arr: T[], iterator: AsyncResultIterator<T, R[]>, callback: AsyncResultsCallback<R>): any;
concatSeries<T, R>(arr: T[], iterator: AsyncResultIterator<T, R[]>, callback: AsyncResultsCallback<R>): any;
concat<T, R>(arr: T[], iterator: AsyncResultIterator<T, R[]>, callback: AsyncResultArrayCallback<R>): any;
concatSeries<T, R>(arr: T[], iterator: AsyncResultIterator<T, R[]>, callback: AsyncResultArrayCallback<R>): any;
// Control Flow
series<T>(tasks: T[], callback?: AsyncResultsCallback<T>): void;
series<T>(tasks: T, callback?: AsyncResultsCallback<T>): void;
parallel<T>(tasks: T[], callback?: AsyncResultsCallback<T>): void;
parallel<T>(tasks: T, callback?: AsyncResultsCallback<T>): void;
parallelLimit<T>(tasks: T[], limit: number, callback?: AsyncResultsCallback<T>): void;
parallelLimit<T>(tasks: T, limit: number, callback?: AsyncResultsCallback<T>): void;
whilst(test: Function, fn: Function, callback: Function): void;
until(test: Function, fn: Function, callback: Function): void;
waterfall<T>(tasks: T[], callback?: AsyncResultsCallback<T>): void;
waterfall<T>(tasks: T, callback?: AsyncResultsCallback<T>): void;
series<T>(tasks: Array<AsyncFunction<T>>, callback?: AsyncResultArrayCallback<T>): void;
series<T>(tasks: Dictionary<AsyncFunction<T>>, callback?: AsyncResultObjectCallback<T>): void;
parallel<T>(tasks: Array<AsyncFunction<T>>, callback?: AsyncResultArrayCallback<T>): void;
parallel<T>(tasks: Dictionary<AsyncFunction<T>>, callback?: AsyncResultObjectCallback<T>): void;
parallelLimit<T>(tasks: Array<AsyncFunction<T>>, limit: number, callback?: AsyncResultArrayCallback<T>): void;
parallelLimit<T>(tasks: Dictionary<AsyncFunction<T>>, limit: number, callback?: AsyncResultObjectCallback<T>): void;
whilst(test: () => boolean, fn: AsyncVoidFunction, callback: (err: any) => void): void;
doWhilst(fn: AsyncVoidFunction, test: () => boolean, callback: (err: any) => void): void;
until(test: () => boolean, fn: AsyncVoidFunction, callback: (err: any) => void): void;
doUntil(fn: AsyncVoidFunction, test: () => boolean, callback: (err: any) => void): void;
waterfall(tasks: Function[], callback?: AsyncResultArrayCallback<any>): void;
queue<T>(worker: AsyncWorker<T>, concurrency: number): AsyncQueue<T>;
priorityQueue<T>(worker: AsyncWorker<T>, concurrency: number): AsyncPriorityQueue<T>;
// auto(tasks: any[], callback?: AsyncResultsCallback<T>): void;
auto(tasks: any, callback?: AsyncResultsCallback<any>): void;
auto(tasks: any, callback?: AsyncResultArrayCallback<any>): void;
iterator(tasks: Function[]): Function;
apply(fn: Function, ...arguments: any[]): void;
nextTick<T>(callback: Function): void;
apply(fn: Function, ...arguments: any[]): AsyncFunction<any>;
nextTick(callback: Function): void;
times<T> (n: number, callback: AsyncTimesCallback<T>): void;
timesSeries<T> (n: number, callback: AsyncTimesCallback<T>): void;
+23
View File
@@ -0,0 +1,23 @@
/// <reference path="axios.d.ts" />
interface InputBody {
random: number;
}
interface Repository {
id: number;
name: string;
}
function convenientGet () {
axios.get<Repository, InputBody>("https://api.github.com/repos/mzabriskie/axios")
.then(r => console.log(r.config.data.random));
}
function get() {
axios<Repository, any>({
url: "https://api.github.com/repos/mzabriskie/axios",
method: Axios.HTTPMethod.GET,
headers: {},
}).then(r => console.log("ID:" + r.data.id + " Name: " + r.data.name));
}
+163
View File
@@ -0,0 +1,163 @@
// Type definitions for axios 0.5.2
// Project: https://github.com/mzabriskie/axios
// Definitions by: Marcel Buesing <https://github.com/marcelbuesing>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../es6-promise/es6-promise.d.ts"/>
declare module Axios {
export enum HTTPMethod { GET, PUT, POST, DELETE, CONNECT, HEAD, OPTIONS, TRACE, PATCH }
export enum ResponseType { arraybuffer, blob, document, json, text }
/**
* <T> - request body data type
*/
interface AxiosXHRConfigBase<T> {
/**
* Change the request data before it is sent to the server.
* This is only applicable for request methods 'PUT', 'POST', and 'PATCH'
* The last function in the array must return a string or an ArrayBuffer
*/
transformRequest?: <U>(data:T) => U;
/**
* change the response data to be made before it is passed to then/catch
*/
transformResponse?: <U>(data:T) => U;
/**
* custom headers to be sent
*/
headers?: Object;
/**
* URL parameters to be sent with the request
*/
params?: Object;
/**
* indicates whether or not cross-site Access-Control requests
* should be made using credentials
*/
withCredentials?: boolean;
/**
* indicates the type of data that the server will respond with
* options are 'arraybuffer', 'blob', 'document', 'json', 'text'
*/
responseType?: Axios.ResponseType;
/**
* name of the cookie to use as a value for xsrf token
*/
xsrfCookieName?: string;
/**
* name of the http header that carries the xsrf token value
*/
xsrfHeaderName?: string;
}
/**
* <T> - request body data type
*/
interface AxiosXHRConfig<T> extends AxiosXHRConfigBase<T> {
/**
* server URL that will be used for the request
*/
url: string;
/**
* request method to be used when making the request
*/
method?: Axios.HTTPMethod;
/**
* data to be sent as the request body
* Only applicable for request methods 'PUT', 'POST', and 'PATCH'
* When no `transformRequest` is set, must be a string, an ArrayBuffer or a hash
*/
data?: T;
}
/**
* <T> - expected response type,
* <U> - request body data type
*/
interface AxiosXHR<T, U> {
/**
* Response that was provided by the server
*/
data: T;
/**
* HTTP status code from the server response
*/
status: number;
/**
* HTTP status message from the server response
*/
statusText: string;
/**
* headers that the server responded with
*/
headers: Object;
/**
* config that was provided to `axios` for the request
*/
config: AxiosXHRConfig<U>;
}
/**
* <T> - expected response type,
* <U> - request body data type
*/
interface AxiosStatic {
<T, U>(config: AxiosXHRConfig<U>): Promise<AxiosXHR<T, U>>;
new <T, U>(config: AxiosXHRConfig<U>): Promise<AxiosXHR<T, U>>;
/**
* convenience alias, method = GET
*/
get<T, U>(url: string, config?: AxiosXHRConfigBase<U>): Promise<AxiosXHR<T, U>>;
/**
* convenience alias, method = DELETE
*/
delete<T, U>(url: string, config?: AxiosXHRConfigBase<U>): Promise<AxiosXHR<T, U>>;
/**
* convenience alias, method = HEAD
*/
head<T, U>(url: string, config?: AxiosXHRConfigBase<U>): Promise<AxiosXHR<T, U>>;
/**
* convenience alias, method = POST
*/
post<T, U>(url: string, data?: any, config?: AxiosXHRConfigBase<U>): Promise<AxiosXHR<T, U>>;
/**
* convenience alias, method = PUT
*/
put<T, U>(url: string, data?: any, config?: AxiosXHRConfigBase<U>): Promise<AxiosXHR<T, U>>;
/**
* convenience alias, method = PATCH
*/
patch<T, U>(url: string, data?: any, config?: AxiosXHRConfigBase<U>): Promise<AxiosXHR<T, U>>;
}
}
declare var axios: Axios.AxiosStatic;
declare module "axios" {
export = axios;
}
@@ -0,0 +1,305 @@
/// <reference path="../jquery/jquery.d.ts" />
/// <reference path="../backbone/backbone.d.ts" />
/// <reference path="backbone.paginator.d.ts" />
module BackbonePaginatorTests {
class TestModel extends Backbone.Model{};
var makeFetchOptions = <TCol extends Backbone.PageableCollection<TestModel>>() => {
return {
reset: true,
url: 'example.com',
beforeSend: (jqxhr: JQueryXHR) => {},
success: (model: TestModel, response: any, options: any) => {},
error: (collection: TCol, jqxhr: JQueryXHR, options: any) => {},
parse: '',
};
};
module InitializingWithNoOption {
class TestCollection extends Backbone.PageableCollection<TestModel> {
constructor(){
super();
}
}
var testCollection = new TestCollection();
}
module InitializingWithOptions {
class TestCollection extends Backbone.PageableCollection<TestModel> {
constructor(models?: TestModel[],
options?: Backbone.PageableInitialOptions){
super();
}
}
var testCollection1 = new TestCollection();
var testCollection2 = new TestCollection([
new TestModel(),
new TestModel()
]);
var testCollection3 = new TestCollection([], {});
var testCollection4 = new TestCollection([],{
comparator: ()=>1,
full: true,
state: {},
queryParam: {},
});
var testCollection5 = new TestCollection([],{
state: {
firstPage: 0,
lastPage: 0,
currentPage: 0,
pageSize: 1,
totalPages: 1,
totalRecords: 1,
sortKey: 'id',
order: 1,
},
queryParam: {
currentPage: 'current_page',
pageSize: 'page_size',
totalPages: 'total_pages',
totalRecords: 'total_records',
sortKey: 'sort_key',
order: 'order',
directions: '',
},
});
var testCollection6 = new TestCollection([
<TestModel>{},
<TestModel>{},
]);
}
module Fetching {
class TestCollection extends Backbone.PageableCollection<TestModel> {
constructor(models?: TestModel[],
options?: Backbone.PageableInitialOptions){
super();
}
}
var testCollection = new TestCollection();
var result:JQueryXHR = testCollection.fetch();
testCollection.fetch({});
testCollection.fetch(makeFetchOptions<TestCollection>());
}
module Paging {
class TestCollection extends Backbone.PageableCollection<TestModel> {
constructor(models?: TestModel[],
options?: Backbone.PageableInitialOptions){
super();
}
}
var options = makeFetchOptions<TestCollection>();
var testCollection = new TestCollection();
var result:JQueryXHR|TestCollection = testCollection.getFirstPage();
testCollection.getFirstPage(options);
// 'silent's type is boolean. (structural subtyping)
testCollection.getFirstPage({silent: 'aa'});
// 'url's type is string. (structural subtyping)
testCollection.getFirstPage({url: true});
result = testCollection.getLastPage();
testCollection.getLastPage(options);
// 'silent's type is boolean. (structural subtyping)
testCollection.getLastPage({silent: 'aa'});
// 'url's type is string. (structural subtyping)
testCollection.getLastPage({url: true});
result = testCollection.getNextPage();
testCollection.getNextPage(options);
// 'silent's type is boolean. (structural subtyping)
testCollection.getNextPage({silent: 'aa'});
// 'url's type is string. (structural subtyping)
testCollection.getNextPage({url: true});
result = testCollection.getPage(1);
testCollection.getPage("1", options);
// 'silent's type is boolean. (structural subtyping)
testCollection.getPage(1, {silent: 'aa'});
// 'url's type is string. (structural subtyping)
testCollection.getPage(1, {url: true});
result = testCollection.getPageByOffset(1);
testCollection.getPageByOffset(1, options);
// 'silent's type is boolean. (structural subtyping)
testCollection.getPageByOffset(1, {silent: 'aa'});
// 'url's type is string. (structural subtyping)
testCollection.getPageByOffset(1, {url: true});
result = testCollection.getPreviousPage();
testCollection.getPreviousPage(options);
// 'silent's type is boolean. (structural subtyping)
testCollection.getPreviousPage({silent: 'aa'});
// 'url's type is string. (structural subtyping)
testCollection.getPreviousPage({url: true});
var hasPage:boolean = testCollection.hasNextPage();
hasPage = testCollection.hasPreviousPage();
}
module Parse {
class TestCollection extends Backbone.PageableCollection<TestModel> {
constructor(models?: TestModel[],
options?: Backbone.PageableInitialOptions){
super();
}
}
var testCollection = new TestCollection();
var result:any[] = testCollection.parse({}, {});
var resultLinks:any = testCollection.parseLinks({}, {});
resultLinks = testCollection.parseLinks({}, { xhr: $.ajax({}) } );
result = testCollection.parseRecords({}, {});
var resultState: Backbone.PageableState = testCollection.parseState(
{},
{
currentPage: 'current_page',
pageSize: 'page_size',
totalPages: 'total_pages',
totalRecords: 'total_records',
sortKey: 'sort_key',
order: 'order',
directions: '',
},
{
firstPage: 0,
lastPage: 0,
currentPage: 0,
pageSize: 1,
totalPages: 1,
totalRecords: 1,
sortKey: 'id',
order: 1,
},
{});
}
module Setting {
class TestCollection extends Backbone.PageableCollection<TestModel> {
constructor(models?: TestModel[],
options?: Backbone.PageableInitialOptions){
super();
}
}
var testCollection = new TestCollection();
var options = makeFetchOptions<TestCollection>();
var result1:JQueryXHR|TestCollection
= testCollection.setPageSize(1, options);
var result2:TestCollection
= testCollection.setSorting('id', 1, options);
result1 = testCollection.switchMode(
'server',
{fetch: true, resetState: true}
);
}
module Syncing {
class TestCollection extends Backbone.PageableCollection<TestModel> {
constructor(models?: TestModel[],
options?: Backbone.PageableInitialOptions){
super();
}
}
var testCollection = new TestCollection();
var result:JQueryXHR = testCollection.sync('server', new TestModel(), {});
result = testCollection.sync('server', testCollection, {});
}
module Confllict {
var result:typeof Backbone.PageableCollection
= Backbone.PageableCollection.noConflict();
}
}
+116
View File
@@ -0,0 +1,116 @@
// Type definitions for backbone.paginator 2.0.2
// Project: https://github.com/backbone-paginator/backbone.paginator
// Definitions by: Nyamazing <https://github.com/Nyamazing/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../backbone/backbone.d.ts" />
declare module Backbone {
interface PageableState {
firstPage?: number;
lastPage?: number;
currentPage?: number;
pageSize?: number;
totalPages?: number;
totalRecords?: number;
sortKey?: string;
order?: number;
}
interface PageableQueryParams {
currentPage?: string;
pageSize?: string;
totalPages?: string;
totalRecords?: string;
sortKey?: string;
order?: string;
directions?: any;
}
interface PageableInitialOptions {
comparator?: (...options: any[]) => number;
full?: boolean;
state?: PageableState;
queryParam?: PageableQueryParams;
}
interface PageableParseLinksOptions {
xhr?: JQueryXHR;
}
interface PageableSetSortingOptions<TModel extends Model> {
side?: string;
full?: boolean;
sortValue?: (model: TModel, sortKey: string) => any | string;
}
interface PageableSwitchModeOptions {
fetch?: boolean;
resetState?: boolean;
}
type PageableGetPageOptions = CollectionFetchOptions|Silenceable;
class PageableCollection<TModel extends Model> extends Collection<Model>{
fullCollection: Collection<TModel>;
mode: string;
queryParams: PageableQueryParams;
state: PageableState;
constructor(models?: TModel[], options?: PageableInitialOptions);
fetch(options?: CollectionFetchOptions): JQueryXHR;
getFirstPage(options?: PageableGetPageOptions):
JQueryXHR|PageableCollection<TModel>;
getLastPage(options?: PageableGetPageOptions):
JQueryXHR|PageableCollection<TModel>;
getNextPage(options?: PageableGetPageOptions):
JQueryXHR|PageableCollection<TModel>;
getPage(index: number|string, options?: PageableGetPageOptions):
JQueryXHR|PageableCollection<TModel>;
getPageByOffset(offset: number, options?: PageableGetPageOptions):
JQueryXHR|PageableCollection<TModel>;
getPreviousPage(options?: PageableGetPageOptions):
JQueryXHR|PageableCollection<TModel>;
hasNextPage(): boolean;
hasPreviousPage(): boolean;
parse(resp: any, options?: any): any[];
parseLinks(resp: any, options?: PageableParseLinksOptions): any;
parseRecords(resp: any, options?: any): any[];
parseState(resp: any, queryParams: PageableQueryParams,
state: PageableState, options?: any): PageableState;
setPageSize(pageSize: number,
options?: CollectionFetchOptions):
JQueryXHR|PageableCollection<TModel>;
setSorting(sortKey: string, order?: number,
options?: PageableSetSortingOptions<TModel>):
PageableCollection<TModel>;
switchMode(mode?: string, options?: PageableSwitchModeOptions):
JQueryXHR|PageableCollection<TModel>;
sync(method: string,
model: TModel|Collection<TModel>,
options?: any): JQueryXHR;
static noConflict(): typeof PageableCollection;
}
}
+1 -1
View File
@@ -1 +1 @@
--target es5
+11 -11
View File
@@ -390,11 +390,10 @@ declare module Microsoft.Maps {
}
export interface PolylineOptions {
strokeColor: Color;
strokeDashArray: string;
strokeThickness: number;
visible: boolean;
strokeColor?: Color;
strokeDashArray?: string;
strokeThickness?: number;
visible?: boolean;
}
export class Polygon implements Entity {
@@ -422,11 +421,12 @@ declare module Microsoft.Maps {
}
export interface PolygonOptions {
strokeColor: Color;
strokeDashArray: string;
strokeThickness: number;
visible: boolean;
fillColor?: Color;
infoBox?: Infobox;
strokeColor?: Color;
strokeDashArray?: string;
strokeThickness?: number;
visible?: boolean;
}
export class Pushpin implements Entity {
@@ -570,4 +570,4 @@ declare module Microsoft.Maps {
export function loadModule(moduleKey: string, options: ModuleOptions): void;
export function moduleLoaded(moduleKey: string): void;
export function registerModule(moduleKey: string, scriptUrl: string, options?: ModuleOptions): void;
}
}
+11
View File
@@ -0,0 +1,11 @@
/// <reference path="bitwise-xor.d.ts" />
"use strict";
import xor = require("bitwise-xor");
var b: Buffer;
b = xor("a", "b");
b = xor(new Buffer("a"), new Buffer("b"));
+17
View File
@@ -0,0 +1,17 @@
// Type definitions for bitwise-xor 0.0.0
// Project: https://github.com/czzarr/node-bitwise-xor
// Definitions by: Rogier Schouten <https://github.com/rogierschouten>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module "bitwise-xor" {
/**
* Bitwise XOR between two Buffers or Strings, returns a Buffer
*/
function xor(b1: Buffer, b2: Buffer): Buffer;
function xor(s1: string, s2: string): Buffer;
export = xor;
}
+6 -1
View File
@@ -404,7 +404,12 @@ declare class Promise<R> implements Promise.Thenable<R>, Promise.Inspection<R> {
*
* If you pass a `receiver`, the `nodeFunction` will be called as a method on the `receiver`.
*/
// TODO how to model promisify?
static promisify<T>(func: (callback: (err:any, result: T) => void) => void, receiver?: any): () => Promise<T>;
static promisify<T, A1>(func: (arg1: A1, callback: (err: any, result: T) => void) => void, receiver?: any): (arg1: A1) => Promise<T>;
static promisify<T, A1, A2>(func: (arg1: A1, arg2: A2, callback: (err: any, result: T) => void) => void, receiver?: any): (arg1: A1, arg2: A2) => Promise<T>;
static promisify<T, A1, A2, A3>(func: (arg1: A1, arg2: A2, arg3: A3, callback: (err: any, result: T) => void) => void, receiver?: any): (arg1: A1, arg2: A2, arg3: A3) => Promise<T>;
static promisify<T, A1, A2, A3, A4>(func: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: (err: any, result: T) => void) => void, receiver?: any): (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Promise<T>;
static promisify<T, A1, A2, A3, A4, A5>(func: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: (err: any, result: T) => void) => void, receiver?: any): (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Promise<T>;
static promisify(nodeFunction: Function, receiver?: any): Function;
/**
+7
View File
@@ -0,0 +1,7 @@
/// <reference path='./blueimp-md5.d.ts' />
import blueimp = require('blueimp-md5');
function hash(): boolean {
return blueimp.md5('hello world') === '5eb63bbbe01eeed093cb22bb8f5acdc3';
}
+7
View File
@@ -0,0 +1,7 @@
// Type definitions for blueimp-md5 v1.1.0
// Project: https://github.com/blueimp/JavaScript-MD5
// Definitions by: Ray Martone <https://github.com/rmartone>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module 'blueimp-md5' {
export function md5(value: string, key?: string, raw?: boolean): string;
}
+26
View File
@@ -24,7 +24,33 @@ declare module Boom {
export function wrap(error: Error, statusCode?: number, message?: string): BoomError;
export function create(statusCode: number, message?: string, data?: any): BoomError;
// 4xx
export function badRequest(message?: string, data?: any): BoomError;
export function unauthorized(message?: string, scheme?: any, attributes?: any): BoomError;
export function forbidden(message?: string, data?: any): BoomError;
export function notFound(message?: string, data?: any): BoomError;
export function methodNotAllowed(message?: string, data?: any): BoomError;
export function notAcceptable(message?: string, data?: any): BoomError;
export function proxyAuthRequired(message?: string, data?: any): BoomError;
export function clientTimeout(message?: string, data?: any): BoomError;
export function conflict(message?: string, data?: any): BoomError;
export function resourceGone(message?: string, data?: any): BoomError;
export function lengthRequired(message?: string, data?: any): BoomError;
export function preconditionFailed(message?: string, data?: any): BoomError;
export function entityTooLarge(message?: string, data?: any): BoomError;
export function uriTooLong(message?: string, data?: any): BoomError;
export function unsupportedMediaType(message?: string, data?: any): BoomError;
export function rangeNotSatisfiable(message?: string, data?: any): BoomError;
export function expectationFailed(message?: string, data?: any): BoomError;
export function badData(message?: string, data?: any): BoomError;
export function tooManyRequests(message?: string, data?: any): BoomError;
// 5xx
export function notImplemented(message?: string, data?: any): BoomError;
export function badGateway(message?: string, data?: any): BoomError;
export function serverTimeout(message?: string, data?: any): BoomError;
export function gatewayTimeout(message?: string, data?: any): BoomError;
export function badImplementation(message?: string, data?: any): BoomError;
}
declare module "boom" {
+5
View File
@@ -405,6 +405,11 @@ function test_entityQuery() {
.where("toUpper(substring(CompanyName, 1, 2))", breeze.FilterQueryOp.Equals, "OM");
var q2 = query.toType("foo").orderBy("foo2");
var pred = new breeze.Predicate('items', 'any', 'serialNumber', 'contains', '12345');
var pred = new breeze.Predicate('items', breeze.FilterQueryOp.Any, 'serialNumber', breeze.FilterQueryOp.Contains, '12345');
var pred = breeze.Predicate.create('items', 'any', 'serialNumber', 'contains', '12345');
var pred = breeze.Predicate.create('items', breeze.FilterQueryOp.Any, 'serialNumber', breeze.FilterQueryOp.Contains, '12345');
var json = query.toJSON();
}
+6 -1
View File
@@ -1,4 +1,4 @@
// Type definitions for Breeze 1.4
// Type definitions for Breeze 1.5.x
// Project: http://www.breezejs.com/
// Definitions by: Boris Yankov <https://github.com/borisyankov/>, IdeaBlade <https://github.com/IdeaBlade/Breeze/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -10,6 +10,7 @@
// Updated Aug 22 2014 for Breeze 1.4.17 and removing Q dependency - Steve Schmitt ( www.ideablade.com)
// Updated Jan 16 2015 for Breeze 1.4.17 to add support for noimplicitany - Kevin Wilson ( www.kwilson.me.uk )
// Updated Jan 20 2015 for Breeze 1.5.2 and merging changes from DefinitelyTyped
// Updated Feb 28 2015 add any/all clause on Predicate
declare module breeze.core {
@@ -770,6 +771,8 @@ declare module breeze {
constructor(property: string, operator: FilterQueryOpSymbol, value: any);
constructor(property: string, operator: string, value: { value: any; isLiteral?: boolean; dataType?: breeze.DataType });
constructor(property: string, operator: FilterQueryOpSymbol, value: { value: any; isLiteral?: boolean; dataType?: breeze.DataType });
constructor(property: string, filterop: FilterQueryOpSymbol, property2: string, filterop2: FilterQueryOpSymbol, value: any); // for any/all clauses
constructor(property: string, filterop: string, property2: string, filterop2: string, value: any); // for any/all clauses
/** Create predicate from an expression tree */
constructor(tree: Object);
@@ -798,6 +801,8 @@ declare module breeze {
(...predicates: Predicate[]): Predicate;
(property: string, operator: string, value: any, valueIsLiteral?: boolean): Predicate;
(property: string, operator: FilterQueryOpSymbol, value: any, valueIsLiteral?: boolean): Predicate;
(property: string, filterop: FilterQueryOpSymbol, property2: string, filterop2: FilterQueryOpSymbol, value: any): Predicate; // for any/all clauses
(property: string, filterop: string, property2: string, filterop2: string, value: any): Predicate; // for any/all clauses
}
class QueryOptions {
@@ -0,0 +1,4 @@
/// <reference path="bunyan-prettystream.d.ts" />
import PrettyStream = require("bunyan-prettystream");
var stream = new PrettyStream();
+14
View File
@@ -0,0 +1,14 @@
// Type definitions for bunyan-prettystream
// Project: https://www.npmjs.com/package/bunyan-prettystream
// Definitions by: Jason Swearingen <https://github.com/jasonswearingen/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module "bunyan-prettystream" {
import stream = require("stream");
class PrettyStream extends stream.Writable {
public pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean; }): T;
}
export = PrettyStream;
}
+2 -2
View File
@@ -9,7 +9,7 @@ declare module "byline" {
import stream = require("stream");
export interface LineStreamOptions extends stream.TransformOptions {
keepEmptyLines: boolean;
keepEmptyLines?: boolean;
}
export interface LineStream extends stream.Transform {
@@ -35,4 +35,4 @@ declare module "byline" {
export function createStream(stream:NodeJS.ReadableStream, options?:LineStreamOptions):LineStream;
export var LineStream:LineStreamCreatable;
}
}
+2 -1
View File
@@ -1,4 +1,4 @@
// Type definitions for chai 1.7.2
// Type definitions for chai 2.0.0
// Project: http://chaijs.com/
// Definitions by: Jed Hunsaker <https://github.com/jedhunsaker/>, Bart van der Schoor <https://github.com/Bartvds>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -92,6 +92,7 @@ declare module chai {
been: Expect;
is: Expect;
that: Expect;
which: Expect;
and: Expect;
have: Expect;
has: Expect;
+36
View File
@@ -0,0 +1,36 @@
/// <reference path="chance.d.ts" />
// Instantiation
var globalInstance: Chance.Chance = chance;
var createYourOwn = new Chance(Math.random);
// Basic usage
var randBool: boolean = chance.bool();
var birthday: Date = chance.birthday();
var birthdayStr: Date|string = chance.birthday({ string: true });
var strArr: string[] = chance.n(chance.string, 42);
var uniqInts: number[] = chance.unique(chance.integer, 99);
var currencyPair = chance.currency_pair();
var firstCurrency = currencyPair[0];
var secondCurrency = currencyPair[1];
// Mixins can be used with on-the-fly type declaration
declare module Chance {
interface Chance {
time(): string;
}
}
chance.mixin({
time: function () {
var h = chance.hour({ twentyfour: true }),
m = chance.minute();
return `${h}:${m}`;
}
});
var timeString: string = chance.time();
+213
View File
@@ -0,0 +1,213 @@
// Type definitions for Chance 0.7.3
// Project: http://chancejs.com
// Definitions by: Chris Bowdon <https://github.com/cbowdon/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module Chance {
interface ChanceStatic {
Chance(): Chance;
new(): Chance;
new(seed: number): Chance;
new(generator: () => any): Chance;
}
interface Chance {
// Basics
bool(opts?: Options): boolean;
character(opts?: Options): string;
floating(opts?: Options): number;
integer(opts?: Options): number;
natural(opts?: Options): number;
string(opts?: Options): string;
// Text
paragraph(opts?: Options): string;
sentence(opts?: Options): string;
syllable(opts?: Options): string;
word(opts?: Options): string;
// Person
age(opts?: Options): number;
birthday(): Date;
birthday(opts?: Options): Date|string;
cpf(): string;
first(opts?: Options): string;
last(opts?: Options): string;
name(opts?: Options): string;
name_prefix(opts?: Options): string;
name_suffix(opts?: Options): string;
prefix(opts?: Options): string;
ssn(opts?: Options): string;
suffix(opts?: Options): string;
// Mobile
android_id(): string;
apple_token(): string;
bb_pin(): string;
wp7_anid(): string;
wp8_anid2(): string;
// Web
color(opts?: Options): string;
domain(opts?: Options): string;
email(opts?: Options): string;
fbid(): string;
google_analytics(): string;
hashtag(): string;
ip(): string;
ipv6(): string;
klout(): string;
tld(): string;
twitter(): string;
url(opts?: Options): string;
// Location
address(opts?: Options): string;
altitude(opts?: Options): number;
areacode(): string;
city(): string;
coordinates(opts?: Options): string;
country(opts?: Options): string;
depth(opts?: Options): number;
geohash(opts?: Options): string;
latitude(opts?: Options): number;
longitude(opts?: Options): number;
phone(opts?: Options): string;
postal(): string;
province(opts?: Options): string;
state(opts?: Options): string;
street(opts?: Options): string;
zip(opts?: Options): string;
// Time
ampm(): string;
date(): Date;
date(opts: DateOptions): Date|string;
hammertime(): number;
hour(opts?: Options): number;
millisecond(): number;
minute(): number;
month(): string;
month(opts: Options): Month;
second(): number;
timestamp(): number;
year(opts?: Options): string;
// Finance
cc(opts?: Options): string;
cc_type(): string;
cc_type(opts: Options): string|CreditCardType;
currency(): Currency;
currency_pair(): [ Currency, Currency ];
dollar(opts?: Options): string;
exp(): string;
exp(opts: Options): string|CreditCardExpiration;
exp_month(opts?: Options): string;
exp_year(opts?: Options): string;
// Helpers
capitalize(str: string): string;
mixin(desc: MixinDescriptor): any;
pad(num: number, width: number, padChar?: string): string;
pick<T>(arr: T[]): T;
pick<T>(arr: T[], count: number): T[];
set: Setter;
shuffle<T>(arr: T[]): T[];
// Miscellaneous
d4(): number;
d6(): number;
d8(): number;
d10(): number;
d12(): number;
d20(): number;
d30(): number;
d100(): number;
guid(): string;
hash(opts?: Options): string;
n<T>(generator: () => T, count: number, opts?: Options): T[];
normal(opts?: Options): string;
radio(opts?: Options): string;
rpg(dice: string): number[];
rpg(dice: string, opts?: Options): number[]|number;
tv(opts?: Options): string;
unique<T>(generator: () => T, count: number, opts?: Options): T[];
weighted<T>(values: T[], weights: number[]): T;
// "Hidden"
cc_types(): CreditCardType[];
mersenne_twister(seed?: number): any; // API return type not defined in docs
months(): Month[];
name_prefixes(): Name[];
provinces(): Name[];
states(): Name[];
street_suffix(): Name;
street_suffixes(): Name[];
}
// A more rigorous approach might be to produce
// the correct options interfaces for each method
interface Options { [id: string]: any; }
interface DateOptions {
string?: boolean;
american?: boolean;
year?: number;
month?: number;
day?: number;
}
interface Month {
name: string;
short_name: string;
numeric: string;
}
interface CreditCardType {
name: string;
short_name: string;
prefix: string;
length: number;
}
interface Currency {
code: string;
name: string;
}
interface CreditCardExpiration {
month: string;
year: string;
}
interface MixinDescriptor { [id: string]: () => any; }
interface Setter {
(key: 'firstNames', values: string[]): any;
(key: 'lastNames', values: string[]): any;
(key: 'provinces', values: string[]): any;
(key: 'us_states_and_dc', values: string[]): any;
(key: 'territories', values: string[]): any;
(key: 'armed_forces', values: string[]): any;
(key: 'street_suffixes', values: string[]): any;
(key: 'months', values: string[]): any;
(key: 'cc_types', values: string[]): any;
(key: 'currency_types', values: string[]): any;
<T>(key: string, values: T[]): any;
}
interface Name {
name: string;
abbreviation: string;
}
}
// window.chance
declare var chance: Chance.Chance;
declare var Chance: Chance.ChanceStatic;
// import Chance = require('chance');
declare module 'chance' {
export = Chance;
}
+2 -2
View File
@@ -28,8 +28,8 @@ interface LinearChartData {
interface CircularChartData {
value: number;
color: string;
highlight: string;
label: string;
highlight?: string;
label?: string;
}
interface ChartSettings {
+41
View File
@@ -0,0 +1,41 @@
/// <reference path="chokidar.d.ts" />
import fs = require('fs');
import chokidar = require('chokidar');
var watcher = chokidar.watch('file, dir, or glob', {
ignored: /[\/\\]\./, persistent: true
});
var log = console.log.bind(console);
watcher
.on('add', function(path:string) { log('File', path, 'has been added'); })
.on('addDir', function(path:string) { log('Directory', path, 'has been added'); })
.on('change', function(path:string) { log('File', path, 'has been changed'); })
.on('unlink', function(path:string) { log('File', path, 'has been removed'); })
.on('unlinkDir', function(path:string) { log('Directory', path, 'has been removed'); })
.on('error', function(error:any) { log('Error happened', error); })
.on('ready', function() { log('Initial scan complete. Ready for changes.'); })
.on('raw', function(event:Event, path:string, details:any) { log('Raw event info:', event, path, details); })
// 'add', 'addDir' and 'change' events also receive stat() results as second
// argument when available: http://nodejs.org/api/fs.html#fs_class_fs_stats
watcher.on('change', function(path:string, stats:fs.Stats) {
if (stats) console.log('File', path, 'changed size to', stats.size);
});
// Watch new files.
watcher.add('new-file');
watcher.add(['new-file-2', 'new-file-3', '**/other-file*']);
// Un-watch some files.
watcher.unwatch('new-file*');
// Only needed if watching is `persistent: true`.
watcher.close();
// One-liner
require('chokidar').watch('.', {ignored: /[\/\\]\./}).on('all', function(event:string, path:string) {
console.log(event, path);
});
+42
View File
@@ -0,0 +1,42 @@
// Type definitions for chokidar 1.0.0
// Project: https://github.com/paulmillr/chokidar
// Definitions by: Stefan Steinhart <https://github.com/reppners/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module "fs"
{
interface FSWatcher
{
add(fileDirOrGlob:string):void;
add(filesDirsOrGlobs:Array<string>):void;
unwatch(fileDirOrGlob:string):void;
unwatch(filesDirsOrGlobs:Array<string>):void;
}
}
declare module "chokidar"
{
interface WatchOptions
{
persistent?:boolean;
ignored?:any;
ignoreInitial?:boolean;
followSymlinks?:boolean;
cwd?:string;
usePolling?:boolean;
useFsEvents?:boolean;
alwaysStat?:boolean;
depth?:number;
interval?:number;
binaryInterval?:number;
ignorePermissionErrors?:boolean;
atomic?:boolean;
}
import fs = require("fs");
function watch( fileDirOrGlob:string, options?:WatchOptions ):fs.FSWatcher;
function watch( filesDirsOrGlobs:Array<string>, options?:WatchOptions ):fs.FSWatcher;
}
File diff suppressed because it is too large Load Diff
+25 -10
View File
@@ -5,6 +5,13 @@
/// <reference path='../webrtc/MediaStream.d.ts'/>
////////////////////
// Global object
////////////////////
interface Window {
chrome: typeof chrome;
}
////////////////////
// Alarms
////////////////////
@@ -1524,8 +1531,11 @@ declare module chrome.runtime {
}
interface MessageSender {
id: string;
id?: string;
tab?: chrome.tabs.Tab;
frameId?: number;
url?: string;
tlsChannelId?: string;
}
interface PlatformInfo {
@@ -1535,10 +1545,11 @@ declare module chrome.runtime {
}
interface Port {
postMessage: Function;
postMessage: (message: Object) => void;
disconnect: () => void;
sender?: MessageSender;
onDisconnect: chrome.events.Event;
onMessage: chrome.events.Event;
onMessage: PortMessageEvent;
name: string;
}
@@ -1550,6 +1561,10 @@ declare module chrome.runtime {
version: string;
}
interface PortMessageEvent extends chrome.events.Event {
addListener(callback: (message: Object, port: Port) => void): void;
}
interface ExtensionMessageEvent extends chrome.events.Event {
addListener(callback: (message: any, sender: MessageSender, sendResponse: Function) => void): void;
}
@@ -2236,7 +2251,7 @@ declare module chrome.webRequest {
}
interface UploadData {
bytes?: any[];
bytes?: ArrayBuffer;
file?: string;
}
@@ -2253,20 +2268,20 @@ declare module chrome.webRequest {
interface OnCompletedDetails extends CallbackDetails {
ip?: string;
statusLine?: string;
statusLine: string;
responseHeaders?: HttpHeader[];
fromCache: boolean;
statusCode: number;
}
interface OnHeadersReceivedDetails extends CallbackDetails {
statusLine?: string;
statusLine: string;
responseHeaders?: HttpHeader[];
}
interface OnBeforeRedirectDetails extends CallbackDetails {
ip?: string;
statusLine?: string;
statusLine: string;
responseHeaders?: HttpHeader[];
fromCache: boolean;
redirectUrl: string;
@@ -2279,7 +2294,7 @@ declare module chrome.webRequest {
}
interface OnAuthRequiredDetails extends CallbackDetails {
statusLine?: string;
statusLine: string;
challenger: Challenger;
responseHeaders?: HttpHeader[];
isProxy: boolean;
@@ -2299,7 +2314,7 @@ declare module chrome.webRequest {
interface OnResponseStartedDetails extends CallbackDetails {
ip?: string;
statusLine?: string;
statusLine: string;
responseHeaders?: HttpHeader[];
fromCache: boolean;
statusCode: number;
@@ -2314,7 +2329,7 @@ declare module chrome.webRequest {
}
interface RequestBody {
raw?: UploadData;
raw?: UploadData[];
error?: string;
formData?: FormData;
}
+90
View File
@@ -544,6 +544,9 @@ declare module CodeMirror {
insertLeft?: boolean;
}): CodeMirror.TextMarker;
/** Returns an array of all the bookmarks and marked ranges found between the given positions. */
findMarks(from: CodeMirror.Position, to: CodeMirror.Position): TextMarker[];
/** Returns an array of all the bookmarks and marked ranges present at the given position. */
findMarksAt(pos: CodeMirror.Position): TextMarker[];
@@ -916,4 +919,91 @@ declare module CodeMirror {
*/
current(): string;
}
/**
* A Mode is, in the simplest case, a lexer (tokenizer) for your language — a function that takes a character stream as input,
* advances it past a token, and returns a style for that token. More advanced modes can also handle indentation for the language.
*/
interface Mode<T> {
/**
* This function should read one token from the stream it is given as an argument, optionally update its state,
* and return a style string, or null for tokens that do not have to be styled. Multiple styles can be returned, separated by spaces.
*/
token(stream: StringStream, state: T): string;
/**
* A function that produces a state object to be used at the start of a document.
*/
startState?: () => T;
/**
* For languages that have significant blank lines, you can define a blankLine(state) method on your mode that will get called
* whenever a blank line is passed over, so that it can update the parser state.
*/
blankLine?: (state: T) => void;
/**
* Given a state returns a safe copy of that state.
*/
copyState?: (state: T) => T;
/**
* The indentation method should inspect the given state object, and optionally the textAfter string, which contains the text on
* the line that is being indented, and return an integer, the amount of spaces to indent.
*/
indent?: (state: T, textAfter: string) => number;
/** The four below strings are used for working with the commenting addon. */
/**
* String that starts a line comment.
*/
lineComment?: string;
/**
* String that starts a block comment.
*/
blockCommentStart?: string;
/**
* String that ends a block comment.
*/
blockCommentEnd?: string;
/**
* String to put at the start of continued lines in a block comment.
*/
blockCommentLead?: string;
/**
* Trigger a reindent whenever one of the characters in the string is typed.
*/
electricChars?: string
/**
* Trigger a reindent whenever the regex matches the part of the line before the cursor.
*/
electricinput?: RegExp
}
/**
* A function that, given a CodeMirror configuration object and an optional mode configuration object, returns a mode object.
*/
interface ModeFactory<T> {
(config: CodeMirror.EditorConfiguration, modeOptions?: any): Mode<T>
}
/**
* id will be the id for the defined mode. Typically, you should use this second argument to defineMode as your module scope function
* (modes should not leak anything into the global scope!), i.e. write your whole mode inside this function.
*/
function defineMode(id: string, modefactory: ModeFactory<any>): void;
/**
* The first argument is a configuration object as passed to the mode constructor function, and the second argument
* is a mode specification as in the EditorConfiguration mode option.
*/
function getMode<T>(config: CodeMirror.EditorConfiguration, mode: any): Mode<T>;
/**
* Utility function from the overlay.js addon that allows modes to be combined. The mode given as the base argument takes care of
* most of the normal mode functionality, but a second (typically simple) mode is used, which can override the style of text.
* Both modes get to parse all of the text, but when both assign a non-null style to a piece of code, the overlay wins, unless
* the combine argument was true and not overridden, or state.overlay.combineTokens was true, in which case the styles are combined.
*/
function overlayMode<T, S>(base: Mode<T>, overlay: Mode<S>, combine?: boolean): Mode<any>
}
+4
View File
@@ -153,3 +153,7 @@ declare module CrossroadsJs {
}
declare var crossroads: CrossroadsJs.CrossRoadsStatic;
declare module 'crossroads'{
export = crossroads;
}
+23
View File
@@ -0,0 +1,23 @@
/// <reference path="crypto-js.d.ts" />
import CryptoJS = require('crypto-js');
var str: string;
str = CryptoJS.MD5('some message');
str = CryptoJS.MD5('some message', 'some key');
str = CryptoJS.SHA1('some message');
str = CryptoJS.SHA1('some message', 'some key', { any: true });
str = CryptoJS.format.OpenSSL('some message');
str = CryptoJS.format.OpenSSL('some message', 'some key');
str = CryptoJS.enc.Utf8('some message');
str = CryptoJS.enc.Utf8('some message', 'some key');
str = CryptoJS.mode.OFB('some message');
str = CryptoJS.mode.OFB('some message', 'some key');
str = CryptoJS.pad.Ansix923('some message');
str = CryptoJS.pad.Ansix923('some message', 'some key');
+67
View File
@@ -0,0 +1,67 @@
// Type definitions for crypto-js v3.1.3
// Project: https://github.com/evanvosberg/crypto-js
// Definitions by: Michael Zabka <https://github.com/misak113/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module CryptoJS {
type Hash = (message: string, key?: string, ...options: any[]) => string;
export interface Hashes {
MD5: Hash;
SHA1: Hash;
SHA256: Hash;
SHA224: Hash;
SHA512: Hash;
SHA384: Hash;
SHA3: Hash;
RIPEMD160: Hash;
HmacMD5: Hash;
HmacSHA1: Hash;
HmacSHA256: Hash;
HmacSHA224: Hash;
HmacSHA512: Hash;
HmacSHA384: Hash;
HmacSHA3: Hash;
HmacRIPEMD160: Hash;
PBKDF2: Hash;
AES: Hash;
TripleDES: Hash;
RC4: Hash;
Rabbit: Hash;
RabbitLegacy: Hash;
EvpKDF: Hash;
format: {
OpenSSL: Hash;
Hex: Hash;
};
enc: {
Latin1: Hash;
Utf8: Hash;
Hex: Hash;
Utf16: Hash;
Base64: Hash;
};
mode: {
CFB: Hash;
CTR: Hash;
CTRGladman: Hash;
OFB: Hash;
ECB: Hash;
};
pad: {
Pkcs7: Hash;
Ansix923: Hash;
Iso10126: Hash;
Iso97971: Hash;
ZeroPadding: Hash;
NoPadding: Hash;
};
}
export var hashes: Hashes;
}
declare module 'crypto-js' {
import hashes = CryptoJS.hashes;
export = hashes;
}
+22
View File
@@ -0,0 +1,22 @@
/// <reference path="csv-stringify.d.ts" />
import stringify = require("csv-stringify");
stringify([["1", "2", "3"], ["4", "5", "6"]], (error: Error, output: string): void => {
// nothing
});
stringify([["1", "2", "3"], ["4", "5", "6"]], {
delimiter: ","
}, (error: Error, output: string): void => {
// nothing
});
var s = stringify({ delimiter: "," });
s.write(["1", "2", "3"]);
+83
View File
@@ -0,0 +1,83 @@
// Type definitions for csv-stringify 0.0.6
// Project: https://github.com/wdavidw/node-csv-stringify
// Definitions by: Rogier Schouten <https://github.com/rogierschouten>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module "csv-stringify" {
module stringify {
interface StringifyOpts {
/**
* List of fields, applied when transform returns an object, order matters, read the transformer documentation for additionnal information, columns are auto discovered when the user write object, see the "header" option on how to print columns names on the first line.
*/
columns?: string[];
/**
* Set the field delimiter, one character only, defaults to a comma.
*/
delimiter?: string;
/**
* Add the value of "options.rowDelimiter" on the last line, default to true.
*/
eof?: boolean;
/**
* Defaults to the escape read option.
*/
escape?: boolean;
/**
* Display the column names on the first line if the columns option is provided or discovered.
*/
header?: boolean;
/**
* String used to delimit record rows or a special value; special values are 'auto', 'unix', 'mac', 'windows', 'unicode'; defaults to 'auto' (discovered in source or 'unix' if no source is specified).
*/
lineBreaks?: string;
/**
* Defaults to the quote read option.
*/
quote?: string;
/**
* Boolean, default to false, quote all the non-empty fields even if not required.
*/
quoted?: boolean;
/**
* Boolean, no default, quote empty fields? If specified, overrides quotedString for empty strings.
*/
quotedEmpty?: boolean;
/**
* Boolean, default to false, quote all fields of type string even if not required.
*/
quotedString?: boolean;
/**
* String used to delimit record rows or a special value; special values are 'auto', 'unix', 'mac', 'windows', 'unicode'; defaults to 'auto' (discovered in source or 'unix' if no source is specified).
*/
rowDelimiter?: string;
}
interface Stringifier extends NodeJS.ReadWriteStream {
// Stringifier stream takes array of strings
write(line: string[]): boolean;
// repeat declarations from NodeJS.WritableStream to avoid compile error
write(buffer: Buffer, cb?: Function): boolean;
write(str: string, cb?: Function): boolean;
write(str: string, encoding?: string, cb?: Function): boolean;
}
}
/**
* Callback version: string in --> callback with string out
*/
function stringify(input: any[][], opts: stringify.StringifyOpts, callback: (error: Error, output: string) => void): void;
function stringify(input: any[][], callback: (error: Error, output: string) => void): void;
/**
* Streaming stringifier
*/
function stringify(opts: stringify.StringifyOpts): stringify.Stringifier;
export = stringify;
}
+31
View File
@@ -47,6 +47,37 @@ function testPieChart() {
});
}
function testMapConstructor() {
//No arg constructor
var emptyMap: D3.Map<any> = d3.map();
//Object constructor
var object:{[key: string]: number } = {a: 1, b: 2, c: 3};
var objectMap: D3.Map<number> = d3.map<number>(object);
//Array constructor
var numberArray: number[] = [1, 2, 3]
var numberArrayMap: D3.Map<number> = d3.map<number>(numberArray);
//Array with keyFn constructor
var objectArray: {key: string}[] = [{key: "v1"}, {key: "v2"}, {key: "v3"}];
var indexes: number[] = [];
//keyFn with index
var objectArrayMap1: D3.Map<{key: string}>
= d3.map<{key: string}>(objectArray, (o: {key: string}, index: number) => {
indexes.push(index);
return o.key;
});
//keyFn without index
var objectArrayMap2: D3.Map<{key: string}>
= d3.map<{key: string}>(objectArray, (o: {key: string}) => {
return o.key;
});
//Map constructor
var duplicateMap: D3.Map<number> = d3.map(numberArrayMap);
}
//Example from http://bl.ocks.org/3887051
interface GroupedData {
State: string;
Vendored
+88 -35
View File
@@ -549,10 +549,17 @@ declare module D3 {
functor<R,T>(value: (p : R) => T): (p : R) => T;
functor<T>(value: T): (p : any) => T;
map(): Map<any>;
set(): Set<any>;
map<T>(object: {[key: string]: T; }): Map<T>;
set<T>(array: T[]): Set<T>;
map: {
(): Map<any>;
<T>(object: {[key: string]: T; }): Map<T>;
<T>(map: Map<T>): Map<T>;
<T>(array: T[]): Map<T>;
<T>(array: T[], keyFn: (object: T, index?: number) => string): Map<T>;
};
set: {
(): Set<any>;
<T>(array: T[]): Set<T>;
};
dispatch(...types: string[]): Dispatch;
rebind(target: any, source: any, ...names: any[]): any;
requote(str: string): string;
@@ -702,8 +709,9 @@ declare module D3 {
* Parse a delimited string into objects using the header row.
*
* @param string delimited formatted string to parse
* @param accessor to modify properties of each row
*/
parse(string: string): any[];
parse(string: string, accessor?: (row: any, index?: number) => any): any[];
/**
* Parse a delimited string into tuples, ignoring the header row.
*
@@ -727,7 +735,7 @@ declare module D3 {
};
classed: {
(name: string): string;
(name: string): boolean;
(name: string, value: any): Selection;
(name: string, valueFunction: (data: any, index: number) => any): Selection;
(classValueMap: Object): Selection;
@@ -771,14 +779,39 @@ declare module D3 {
};
datum: {
/**
* Sets the element's bound data to the return value of the specified function evaluated
* for each selected element.
* Unlike the D3.Selection.data method, this method does not compute a join (and thus
* does not compute enter and exit selections).
* @param values The function to be evaluated for each selected element, being passed the
* previous datum d and the current index i, with the this context as the current DOM
* element. The function is then used to set each element's data. A null value will
* delete the bound data. This operator has no effect on the index.
*/
(values: (data: any, index: number) => any): UpdateSelection;
/**
* Sets the element's bound data to the specified value on all selected elements.
* Unlike the D3.Selection.data method, this method does not compute a join (and thus
* does not compute enter and exit selections).
* @param values The same data to be given to all elements.
*/
(values: any): UpdateSelection;
() : any;
/**
* Returns the bound datum for the first non-null element in the selection.
* This is generally useful only if you know the selection contains exactly one element.
*/
(): any;
/**
* Returns the bound datum for the first non-null element in the selection.
* This is generally useful only if you know the selection contains exactly one element.
*/
<T>(): T;
};
filter: {
(filter: (data: any, index: number) => boolean, thisArg?: any): UpdateSelection;
//(filter: string): UpdateSelection;
(filter: string): UpdateSelection;
};
call(callback: (selection: Selection, ...args: any[]) => void, ...args: any[]): Selection;
@@ -849,7 +882,7 @@ declare module D3 {
sortKeys(comparator: (d1: any, d2: any) => number): Nest;
sortValues(comparator: (d1: any, d2: any) => number): Nest;
rollup(rollupFunction: (data: any, index: number) => any): Nest;
map(values: any[]): any;
map(values: any[], mapType?: any): any;
entries(values: any[]): NestKeyValue[];
}
@@ -962,7 +995,29 @@ declare module D3 {
*/
(elements: EventTarget[]): Transition;
}
each: (type?: string, eachFunction?: (data: any, index: number) => any) => Transition;
each: {
/**
* Immediately invokes the specified function for each element in the current
* transition, passing in the current datum and index, with the this context
* of the current DOM element. Similar to D3.Selection.each.
*
* @param eachFunction The function to be invoked for each element in the
* current transition, passing in the current datum and index, with the this
* context of the current DOM element.
*/
(eachFunction: (data: any, index: number) => any): Transition;
/**
* Adds a listener for transition events, supporting "start", "end" and
* "interrupt" events. The listener will be invoked for each individual
* element in the transition.
*
* @param type Type of transition event. Supported values are "start", "end"
* and "interrupt".
* @param listener The listener to be invoked for each individual element in
* the transition.
*/
(type: string, listener: (data: any, index: number) => any): Transition;
}
transition: () => Transition;
ease: (value: string, ...arrs: any[]) => Transition;
attrTween(name: string, tween: (d: any, i: number, a: any) => BaseInterpolate): Transition;
@@ -1235,24 +1290,24 @@ declare module D3 {
}
export interface GraphNode {
id: number;
index: number;
name: string;
px: number;
py: number;
size: number;
weight: number;
x: number;
y: number;
subindex: number;
startAngle: number;
endAngle: number;
value: number;
fixed: boolean;
children: GraphNode[];
_children: GraphNode[];
parent: GraphNode;
depth: number;
id?: number;
index?: number;
name?: string;
px?: number;
py?: number;
size?: number;
weight?: number;
x?: number;
y?: number;
subindex?: number;
startAngle?: number;
endAngle?: number;
value?: number;
fixed?: boolean;
children?: GraphNode[];
_children?: GraphNode[];
parent?: GraphNode;
depth?: number;
}
export interface GraphLink {
@@ -1278,10 +1333,8 @@ declare module D3 {
export interface ForceLayout {
(): ForceLayout;
size: {
(): number;
(): number[];
(mysize: number[]): ForceLayout;
(accessor: (d: any, index: number) => {}): ForceLayout;
};
linkDistance: {
(): number;
@@ -1672,8 +1725,8 @@ declare module D3 {
}
export interface Symbol {
type: (string:string) => Symbol;
size: (number:number) => Symbol;
type: (symbolType: string | ((datum: any, index: number) => string)) => Symbol;
size: (size: number | ((datum: any, index: number) => number)) => Symbol;
(datum:any, index:number): string;
}
@@ -1751,7 +1804,7 @@ declare module D3 {
export interface Axis {
(selection: Selection): void;
(transition: Transition.Transition): void;
scale: {
(): any;
(scale: any): Axis;
@@ -1789,7 +1842,7 @@ declare module D3 {
(): number;
(value: number): Axis;
}
tickFormat(formatter: (value: any) => string): Axis;
tickFormat(formatter: (value: any, index?: number) => string): Axis;
nice(count?: number): Axis;
}
+19
View File
@@ -0,0 +1,19 @@
/// <reference path="dagre-d3.d.ts"/>
module DagreD3Tests {
var gDagre = new dagreD3.graphlib.Graph();
var graph = gDagre.graph();
// has graph methods from dagre.d.ts
graph.setNode("a", {});
var num: number = 251 + graph.height + graph.width;
var predecessors: { [vertex:string]: string[] } = {};
var successors: { [vertex:string]: string[] } = {};
predecessors["a"] = graph.predecessors("a");
successors["a"] = graph.successors("a");
var render = new dagreD3.render();
var svg = d3.select("svg");
render(svg, graph);
}
+31
View File
@@ -0,0 +1,31 @@
// Type definitions for dagre-d3.core.js
// Project: https://github.com/cpettitt/dagre-d3
// Definitions by: Mark Wong Siang Kai <https://github.com/markwongsk>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../d3/d3.d.ts"/>
/// <reference path="../dagre/dagre.d.ts"/>
declare module Dagre {
interface DagreD3Factory extends Dagre.DagreFactory {
render: Render;
}
// coupled with dagre.d.ts' Graph
// a lot of these methods come from graphlib.core.js
interface Graph {
graph(): Graph;
height: number;
predecessors(id: string): string[];
successors(id: string): string[];
width: number;
}
interface Render {
new (): Render;
(selection: D3.Selection, g: Dagre.Graph): void;
}
}
declare var dagreD3: Dagre.DagreD3Factory;
+4 -7
View File
@@ -1,13 +1,10 @@
/// <reference path="dagre.d.ts"/>
module DagreTests {
var gDagre = new dagre.graphlib.Graph();
gDagre.setGraph({});
gDagre.setDefaultEdgeLabel(function(){
return ;
});
gDagre.setNode("a", {});
gDagre.setEdge("b", "c");
gDagre.setGraph({})
.setDefaultEdgeLabel(function(){ return ; })
.setNode("a", {})
.setEdge("b", "c");
dagre.layout(gDagre);
}
+5 -5
View File
@@ -14,14 +14,14 @@ declare module Dagre{
edge(id: string): any;
nodes(): string[];
node(id: string): any;
setDefaultEdgeLabel(callback: () => void): void;
setEdge(sourceId: string, targetId: string): void;
setGraph(options: { [key: string]: any }): void;
setNode(id: string, node: { [key: string]: any }): void;
setDefaultEdgeLabel(callback: () => void): Graph;
setEdge(sourceId: string, targetId: string): Graph;
setGraph(options: { [key: string]: any }): Graph;
setNode(id: string, node: { [key: string]: any }): Graph;
}
interface GraphLib {
Graph: Graph
Graph: Graph;
}
}
+199
View File
@@ -0,0 +1,199 @@
// Type definitions for DCJS
// Project: https://github.com/dc-js
// Definitions by: hans windhoff <https://github.com/hansrwindhoff>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// this makes only sense together with d3 and crossfilter so you need the d3.d.ts and crossfilter.d.ts files
///<reference path="../d3/d3.d.ts" />
///<reference path="../crossfilter/crossfilter.d.ts" />
declare module dc {
// helper for get/set situation
interface IGetSet<T, V> {
(): T;
(t:T): V;
}
export interface ILegendwidget {
x: IGetSet<number, number>;
y: IGetSet<number, number>;
gap: IGetSet<number, number>;
itemHeight: IGetSet<number, number>;
horizontal: IGetSet<boolean, boolean>;
legendWidth: IGetSet<number, number>;
itemWidth: IGetSet<number, number>;
}
export interface IBaseChart<T> {
width: IGetSet<number, T>;
height: IGetSet<number, T>;
minWidth: IGetSet<number, T>;
minHeight: IGetSet<number, T>;
dimension: IGetSet<any, T>;
group: IGetSet<any, T>; // not sure here
transitionDuration: IGetSet<number, T>;
colors: IGetSet<string[], T>;
keyAccessor: IGetSet<(d:any) => number, T>;
valueAccessor: IGetSet<(d:any) => number, T>;
label: IGetSet<(l:any) => string, T>;
renderLabel: IGetSet<boolean, T>;
renderlet: (fnctn: (t:T) => void) => T;
title: IGetSet<(t:string) => string, T>;
filter: IGetSet<any, T>;
filterAll: () => void;
expireCache: () => void;
legend: (l:ILegendwidget) => T;
chartID: () => number;
options: (o:Object)=>void ;
select: (selector: D3.Selection) => D3.Selection;
selectAll: (selector: D3.Selection) => D3.Selection;
}
export interface IEvents {
trigger(fnctn: () => void, delay?: number):void;
}
export var events: IEvents;
export interface IListener<T> {
on: (eventName: string, fnctn: (c:T) => void) => T;
}
export interface ImarginObj {
top: number;
right: number;
bottom: number;
left: number;
}
export interface IMarginable<T> {
margins: IGetSet<ImarginObj, T>;
}
// abstract interfaces
export interface IAbstractColorChart<T> {
colorDomain: IGetSet<number[], T>;
}
export interface IAbstractStackableChart<T> {
stack: (group: IChartGroup, name?:string, retriever?: (d:Object)=>number) => T;
}
export interface IAbstractCoordinateGridChart<T> {
x: IGetSet<any, T>;
y: IGetSet<any, T>;
elasticY: IGetSet<boolean, T>;
xAxis: IGetSet<D3.Svg.Axis, T>;
yAxis: IGetSet<D3.Svg.Axis, T>;
yAxisPadding: IGetSet<number, T>;
xAxisPadding: IGetSet<number, T>;
renderHorizontalGridLines: IGetSet<boolean, T>;
}
export interface IAbstractBubblechart<T> {
r: IGetSet<any, T>;
radiusValueAccessor: IGetSet<(d:any) => number, T>;
}
// function interfaces
export interface columnFunction {
(rowinfo:any): string;
}
export interface sortbyFunction {
(rowinfo:any): any;
}
export interface orderFunction {
<T>(a: T, b: T): number;
}
// chart interfaces
export interface IBubblechart extends
IBaseChart<IBubblechart>,
IAbstractColorChart<IBubblechart>,
IAbstractBubblechart<IBubblechart>,
IAbstractCoordinateGridChart<IBubblechart>,
IMarginable<IBubblechart>,
IListener<IBubblechart> {
}
export interface IPiechart extends
IBaseChart<IPiechart>,
IAbstractColorChart<IPiechart>,
IAbstractBubblechart<IPiechart>,
IAbstractCoordinateGridChart<IPiechart>,
IMarginable<IPiechart>,
IListener<IPiechart> {
radius: IGetSet<number, IPiechart>;
minAngleForLabel: IGetSet<number, IPiechart>;
}
export interface IBarchart extends
IBaseChart<IBarchart>,
IAbstractStackableChart<IBarchart>,
IAbstractCoordinateGridChart<IBarchart>,
IMarginable<IBarchart>,
IListener<IBarchart> {
centerBar: (b:boolean) => IBarchart;
gap: (gapBetweenBars: number) => IBarchart;
}
export interface ILinechart extends
IBaseChart<ILinechart>,
IAbstractStackableChart<ILinechart>,
IAbstractCoordinateGridChart<ILinechart>,
IMarginable<ILinechart>,
IListener<ILinechart> {
}
export interface IDatachart extends
IBaseChart<IDatachart>,
IAbstractStackableChart<IDatachart>,
IAbstractCoordinateGridChart<IDatachart>,
IMarginable<IDatachart>,
IListener<IDatachart> {
size: IGetSet<number, IDatachart>;
columns: IGetSet<columnFunction[], IDatachart>;
sortBy: IGetSet<sortbyFunction, IDatachart>;
order: IGetSet<orderFunction, IDatachart>;
}
export interface IRowchart extends
IBaseChart<IRowchart>,
IAbstractColorChart<IRowchart>,
IAbstractStackableChart<IRowchart>,
IAbstractCoordinateGridChart<IRowchart>,
IMarginable<IRowchart>,
IListener<IRowchart> {
}
// utilities
export interface IChartGroup { }
export function filterAll(chartGroup?: IChartGroup): void;
export function renderAll(chartGroup?: IChartGroup): void;
export function redrawAll(chartGroup?: IChartGroup): void;
export function bubbleChart(cssSel: string): IBubblechart;
export function pieChart(cssSel: string): IPiechart;
export function barChart(cssSel: string): IBarchart;
export function lineChart(cssSel: string): ILinechart;
export function dataTable(cssSel: string): IDatachart;
export function rowChart(cssSel: string): IRowchart;
}
+196 -215
View File
@@ -3,240 +3,221 @@
///<reference path="dc.d.ts" />
interface IYelpData {
city: string;
review_count: number;
name: string;
neighborhoods: string[];
type: string;
business_id: string;
full_address: string;
state: string;
longitude: number;
stars: number;
latitude: number;
open: boolean;
categories: string[]
city: string;
review_count: number;
name: string;
neighborhoods: string[];
type: string;
business_id: string;
full_address: string;
state: string;
longitude: number;
stars: number;
latitude: number;
open: boolean;
categories: string[]
}
interface IYelpDataExtended {
count: number;
review_sum: number;
star_sum: number;
review_avg: number;
star_avg: number;
count: number;
review_sum: number;
star_sum: number;
review_avg: number;
star_avg: number;
}
/********************************************************
* *
* dj.js example using Yelp Kaggle Test Dataset *
* Eamonn O'Loughlin 9th May 2013 *
* *
********************************************************/
* *
* dj.js example using Yelp Kaggle Test Dataset *
* Eamonn O'Loughlin 9th May 2013 *
* *
********************************************************/
/********************************************************
* *
* Step0: Load data from json file *
* *
********************************************************/
d3.json("data/yelp_test_set_business.json", function (yelp_data:IYelpData[]) {
/********************************************************
* *
* Step1: Create the dc.js chart objects & ling to div *
* *
********************************************************/
var bubbleChart = dc.bubbleChart("#dc-bubble-graph");
var pieChart = dc.pieChart("#dc-pie-graph");
var volumeChart = dc.barChart("#dc-volume-chart");
var lineChart = dc.lineChart("#dc-line-chart");
var dataTable = dc.dataTable("#dc-table-graph");
var rowChart = dc.rowChart("#dc-row-graph");
* *
* Step0: Load data from json file *
* *
********************************************************/
d3.json("data/yelp_test_set_business.json", (yelp_data:IYelpData[]) => {
/********************************************************
* *
* Step2: Run data through crossfilter *
* *
********************************************************/
var ndx = crossfilter(yelp_data);
/********************************************************
* *
* Step3: Create Dimension that we'll need *
* *
********************************************************/
/********************************************************
* *
* Step1: Create the dc.js chart objects & ling to div *
* *
********************************************************/
var bubbleChart: DC.BubbleChart = dc.bubbleChart("#dc-bubble-graph");
var pieChart: DC.PieChart = dc.pieChart("#dc-pie-graph");
var volumeChart: DC.BarChart = dc.barChart("#dc-volume-chart");
var lineChart: DC.LineChart = dc.lineChart("#dc-line-chart");
var dataTable: DC.DataTableWidget = dc.dataTable("#dc-table-graph");
var rowChart: DC.RowChart = dc.rowChart("#dc-row-graph");
// for volumechart
var cityDimension = ndx.dimension(function (d) { return d.city; });
var cityGroup = cityDimension.group();
var cityDimensionGroup = cityDimension.group().reduce(
//add
function(p: IYelpDataExtended,v:IYelpData){
++p.count;
p.review_sum += v.review_count;
p.star_sum += v.stars;
p.review_avg = p.review_sum / p.count;
p.star_avg = p.star_sum / p.count;
return p;
},
//remove
function(p: IYelpDataExtended,v:IYelpData){
--p.count;
p.review_sum -= v.review_count;
p.star_sum -= v.stars;
p.review_avg = p.review_sum / p.count;
p.star_avg = p.star_sum / p.count;
return p;
},
//init
function(){
return {count:0, review_sum: 0, star_sum: 0, review_avg: 0, star_avg: 0};
}
);
/********************************************************
* *
* Step2: Run data through crossfilter *
* *
********************************************************/
var ndx: CrossFilter.CrossFilter<IYelpData> = crossfilter(yelp_data);
// for pieChart
var startValue = ndx.dimension(function (d) {
return d.stars*1.0;
});
var startValueGroup = startValue.group();
/********************************************************
* *
* Step3: Create Dimension that we'll need *
* *
********************************************************/
// For datatable
var businessDimension = ndx.dimension(function (d) { return d.business_id; });
/********************************************************
* *
* Step4: Create the Visualisations *
* *
********************************************************/
bubbleChart.width(650)
.height(300)
.dimension(cityDimension)
.group(cityDimensionGroup)
.transitionDuration(1500)
.colors(["#a60000","#ff0000", "#ff4040","#ff7373","#67e667","#39e639","#00cc00"])
.colorDomain([-12000, 12000])
.x(d3.scale.linear().domain([0, 5.5]))
.y(d3.scale.linear().domain([0, 5.5]))
.r(d3.scale.linear().domain([0, 2500]))
.keyAccessor(function (p) {
return p.value.star_avg;
})
.valueAccessor(function (p) {
return p.value.review_avg;
})
.radiusValueAccessor(function (p) {
return p.value.count;
})
.transitionDuration(1500)
.elasticY(true)
.yAxisPadding(1)
.xAxisPadding(1)
.label(function (p) {
return p.key;
})
.renderLabel(true)
.renderlet(function (chart) {
rowChart.filter(chart.filter());
})
.on("postRedraw", function (chart) {
dc.events.trigger(function () {
rowChart.filter(chart.filter());
});
});
;
// for volumechart
var cityDimension: CrossFilter.Dimension<IYelpData, string> = ndx.dimension((d: IYelpData) => d.city);
var cityGroup: CrossFilter.Group<IYelpData, string, string> = cityDimension.group();
var cityDimensionGroup: CrossFilter.Group<IYelpData, string, IYelpDataExtended> = cityDimension.group().reduce(
//add
(p: IYelpDataExtended, v:IYelpData) => {
++p.count;
p.review_sum += v.review_count;
p.star_sum += v.stars;
p.review_avg = p.review_sum / p.count;
p.star_avg = p.star_sum / p.count;
return p;
},
//remove
(p: IYelpDataExtended, v:IYelpData) => {
--p.count;
p.review_sum -= v.review_count;
p.star_sum -= v.stars;
p.review_avg = p.review_sum / p.count;
p.star_avg = p.star_sum / p.count;
return p;
},
//init
() => {
return {count: 0, review_sum: 0, star_sum: 0, review_avg: 0, star_avg: 0};
}
);
// for pieChart
var startValue: CrossFilter.Dimension<IYelpData, number> = ndx.dimension((d: IYelpData) => d.stars * 1.0);
var startValueGroup: CrossFilter.Group<IYelpData, number, number> = startValue.group();
pieChart.width(200)
.height(200)
.transitionDuration(1500)
.dimension(startValue)
.group(startValueGroup)
.radius(90)
.minAngleForLabel(0)
.label(function(d) { return d.data.key; })
.on("filtered", function (chart) {
dc.events.trigger(function () {
if(chart.filter()) {
console.log(chart.filter());
volumeChart.filter([chart.filter()-.25,chart.filter()-(-0.25)]);
}
else volumeChart.filterAll();
});
});
// For datatable
var businessDimension: CrossFilter.Dimension<IYelpData, string> = ndx.dimension((d: IYelpData) => d.business_id);
/********************************************************
* *
* Step4: Create the Visualisations *
* *
********************************************************/
volumeChart.width(230)
.height(200)
.dimension(startValue)
.group(startValueGroup)
.transitionDuration(1500)
.centerBar(true)
.gap(17)
.x(d3.scale.linear().domain([0.5, 5.5]))
.elasticY(true)
.on("filtered", function (chart) {
dc.events.trigger(function () {
if(chart.filter()) {
console.log(chart.filter());
lineChart.filter(chart.filter());
}
else
{lineChart.filterAll()}
});
})
.xAxis().tickFormat(function(v) {return v;});
bubbleChart
.width(650)
.height(300)
.dimension(cityDimension)
.group(cityDimensionGroup)
.transitionDuration(1500)
.colors(["#a60000","#ff0000", "#ff4040","#ff7373","#67e667","#39e639","#00cc00"])
.colorDomain([-12000, 12000])
.x(d3.scale.linear().domain([0, 5.5]))
.y(d3.scale.linear().domain([0, 5.5]))
.r(d3.scale.linear().domain([0, 2500]))
.keyAccessor((p: any) => p.value.star_avg)
.valueAccessor((p: any) => p.value.review_avg)
.radiusValueAccessor((p: any) => p.value.count)
.transitionDuration(1500)
.elasticY(true)
.yAxisPadding(1)
.xAxisPadding(1)
.label((p: any) => p.key)
.renderLabel(true)
.renderlet((chart: DC.BubbleChart) => rowChart.filter(chart.filter()))
.on("postRedraw", (chart: DC.BubbleChart) => dc.events.trigger(() => rowChart.filter(chart.filter())));
console.log(startValueGroup.top(1)[0].value);
pieChart
.width(200)
.height(200)
.transitionDuration(1500)
.dimension(startValue)
.group(startValueGroup)
.radius(90)
.minAngleForLabel(0)
.label((d: any) => d.data.key)
.on("filtered", (chart: DC.PieChart) =>
dc.events.trigger(() => {
if (chart.filter()) {
console.log(chart.filter());
volumeChart.filter([chart.filter()-.25,chart.filter()-(-0.25)]);
}
else volumeChart.filterAll();
}));
lineChart.width(230)
.height(200)
.dimension(startValue)
.group(startValueGroup)
.x(d3.scale.linear().domain([0.5, 5.5]))
.valueAccessor(function(d) {
return d.value;
})
.renderHorizontalGridLines(true)
.elasticY(true)
.xAxis().tickFormat(function(v) {return v;}); ;
volumeChart
.width(230)
.height(200)
.dimension(startValue)
.group(startValueGroup)
.transitionDuration(1500)
.centerBar(true)
.gap(17)
.x(d3.scale.linear().domain([0.5, 5.5]))
.elasticY(true)
.on("filtered", (chart: DC.BarChart) =>
dc.events.trigger(() => {
if(chart.filter()) {
console.log(chart.filter());
lineChart.filter(chart.filter());
}
else {
lineChart.filterAll()
}
}))
.xAxis()
.tickFormat((v: string) => v);
rowChart.width(340)
.height(850)
.dimension(cityDimension)
.group(cityGroup)
.renderLabel(true)
.colors(["#a60000","#ff0000", "#ff4040","#ff7373","#67e667","#39e639","#00cc00"])
.colorDomain([0, 0])
.renderlet(function (chart) {
bubbleChart.filter(chart.filter());
})
.on("filtered", function (chart) {
dc.events.trigger(function () {
bubbleChart.filter(chart.filter());
});
});
console.log(startValueGroup.top(1)[0].value);
lineChart
.width(230)
.height(200)
.dimension(startValue)
.group(startValueGroup)
.x(d3.scale.linear().domain([0.5, 5.5]))
.valueAccessor((d: any) => d.value)
.renderHorizontalGridLines(true)
.elasticY(true)
.xAxis()
.tickFormat((v: string) => v);
dataTable.width(800).height(800)
.dimension(businessDimension)
.group(function(d:Object) { return "List of all Selected Businesses"
})
.size(100)
.columns([
function(d) { return d.name; },
function(d) { return d.city; },
function(d) { return d.stars; },
function(d) { return d.review_count; },
function(d) { return '<a href=\"http://maps.google.com/maps?z=12&t=m&q=loc:' + d.latitude + '+' + d.longitude +"\" target=\"_blank\">Map</a>"}
])
.sortBy(function(d){ return d.stars; })
// (optional) sort order, :default ascending
.order(d3.ascending);
/********************************************************
* *
* Step6: Render the Charts *
* *
********************************************************/
dc.renderAll();
rowChart
.width(340)
.height(850)
.dimension(cityDimension)
.group(cityGroup)
.renderLabel(true)
.colors(["#a60000","#ff0000", "#ff4040","#ff7373","#67e667","#39e639","#00cc00"])
.colorDomain([0, 0])
.renderlet((chart: DC.RowChart) => bubbleChart.filter(chart.filter()))
.on("filtered", (chart: DC.RowChart) =>
dc.events.trigger(() =>
bubbleChart.filter(chart.filter())));
dataTable
.width(800)
.height(800)
.dimension(businessDimension)
.group((d: any) => "List of all Selected Businesses")
.size(100)
.columns([
(d: IYelpData) => d.name,
(d: IYelpData) => d.city,
(d: IYelpData) => d.stars,
(d: IYelpData) => d.review_count,
(d: IYelpData) => '<a href=\"http://maps.google.com/maps?z=12&t=m&q=loc:' + d.latitude + '+' + d.longitude +"\" target=\"_blank\">Map</a>"
])
.sortBy((d: IYelpData) => d.stars)
// (optional) sort order, :default ascending
.order(d3.ascending);
/********************************************************
* *
* Step6: Render the Charts *
* *
********************************************************/
dc.renderAll();
});
+390 -156
View File
@@ -1,6 +1,6 @@
// Type definitions for DCJS
// Project: https://github.com/dc-js
// Definitions by: hans windhoff <https://github.com/hansrwindhoff>
// Project: https://github.com/dc-js/dc.js
// Definitions by: hans windhoff <https://github.com/hansrwindhoff>, matt traynham <https://github.com/mtraynham>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// this makes only sense together with d3 and crossfilter so you need the d3.d.ts and crossfilter.d.ts files
@@ -8,192 +8,426 @@
///<reference path="../d3/d3.d.ts" />
///<reference path="../crossfilter/crossfilter.d.ts" />
declare module DC {
// helper for get/set situation
export interface IGetSet<T, V> {
(): T;
(t: T): V;
}
export interface IBiGetSet<T, R, V> {
(): T;
(t: T, r?: R): V;
}
declare module dc {
export interface Accessor<T, V> {
(datum: T, index?: number): V;
}
// helper for get/set situation
interface IGetSet<T, V> {
(): T;
(t:T): V;
}
export interface ILegendwidget {
x: IGetSet<number, number>;
y: IGetSet<number, number>;
gap: IGetSet<number, number>;
itemHeight: IGetSet<number, number>;
horizontal: IGetSet<boolean, boolean>;
legendWidth: IGetSet<number, number>;
itemWidth: IGetSet<number, number>;
}
export interface IBaseChart<T> {
width: IGetSet<number, T>;
height: IGetSet<number, T>;
minWidth: IGetSet<number, T>;
minHeight: IGetSet<number, T>;
dimension: IGetSet<any, T>;
group: IGetSet<any, T>; // not sure here
transitionDuration: IGetSet<number, T>;
colors: IGetSet<string[], T>;
keyAccessor: IGetSet<(d:any) => number, T>;
valueAccessor: IGetSet<(d:any) => number, T>;
label: IGetSet<(l:any) => string, T>;
renderLabel: IGetSet<boolean, T>;
renderlet: (fnctn: (t:T) => void) => T;
title: IGetSet<(t:string) => string, T>;
filter: IGetSet<any, T>;
filterAll: () => void;
expireCache: () => void;
legend: (l:ILegendwidget) => T;
chartID: () => number;
options: (o:Object)=>void ;
select: (selector: D3.Selection) => D3.Selection;
selectAll: (selector: D3.Selection) => D3.Selection;
}
export interface UnitFunction {
(start: number, end: number, domain?: Array<any>): number|Array<any>;
}
export interface IEvents {
trigger(fnctn: () => void, delay?: number):void;
}
export interface FloatPointUnits {
precision(precision: number): UnitFunction;
}
export var events: IEvents;
export interface Units {
integers: UnitFunction;
ordinal: UnitFunction;
fp: FloatPointUnits;
}
export interface IListener<T> {
on: (eventName: string, fnctn: (c:T) => void) => T;
}
export interface Events {
trigger(fn: () => void, delay?: number): void;
}
export interface ImarginObj {
top: number;
right: number;
bottom: number;
left: number;
}
export interface Errors {
Exception(msg: string): void;
InvalidStateException(msg: string): void;
}
export interface IMarginable<T> {
margins: IGetSet<ImarginObj, T>;
}
export interface Filter {
isFiltered(value: any): boolean;
}
// abstract interfaces
export interface IAbstractColorChart<T> {
colorDomain: IGetSet<number[], T>;
}
export interface IAbstractStackableChart<T> {
stack: (group: IChartGroup, name?:string, retriever?: (d:Object)=>number) => T;
}
export interface Filters {
RangedFilter(low: any, high: any): Filter;
TwoDimensionalFilter(arr: Array<any>): Filter;
RangedTwoDimensionalFilter(arr: Array<any>): Filter;
}
export interface IAbstractCoordinateGridChart<T> {
x: IGetSet<any, T>;
y: IGetSet<any, T>;
elasticY: IGetSet<boolean, T>;
xAxis: IGetSet<D3.Svg.Axis, T>;
yAxis: IGetSet<D3.Svg.Axis, T>;
yAxisPadding: IGetSet<number, T>;
xAxisPadding: IGetSet<number, T>;
renderHorizontalGridLines: IGetSet<boolean, T>;
}
export interface Logger {
enableDebugLog: boolean;
warn(msg: string): void;
debug(msg: string): void;
deprecate(fn: Function, msg: string): void;
}
export interface IAbstractBubblechart<T> {
r: IGetSet<any, T>;
radiusValueAccessor: IGetSet<(d:any) => number, T>;
}
export interface Printers {
filters(filters: Array<any>): string;
filter(filter: any): string;
}
export interface Round {
floor(n: number): number;
ceil(n: number): number;
round(n: number): number;
}
export interface Utils {
printSingleValue(filter: any): string;
add(l: any, r: any): any;
subtract(l: any, r: any): any;
isNumber(n: any): boolean;
isFloat(n: any): boolean;
isInteger(n: any): boolean;
isNegligible(n: any): boolean;
clamp(n: number, min: number, max: number): number;
uniqueId(): number;
nameToId(name: string): string;
appendOrSelect(parent: D3.Selection, selector: string, tag: any): D3.Selection;
safeNumber(n: any): number;
}
// function interfaces
export interface columnFunction {
(rowinfo:any): string;
}
export interface sortbyFunction {
(rowinfo:any): any;
}
export interface orderFunction {
<T>(a: T, b: T): number;
}
export interface Legend {
x: IGetSet<number, number>;
y: IGetSet<number, number>;
gap: IGetSet<number, number>;
itemHeight: IGetSet<number, number>;
horizontal: IGetSet<boolean, boolean>;
legendWidth: IGetSet<number, number>;
itemWidth: IGetSet<number, number>;
autoItemWidth: IGetSet<boolean, boolean>;
render: () => void;
}
export interface BaseMixin<T> {
width: IGetSet<number, T>;
height: IGetSet<number, T>;
minWidth: IGetSet<number, T>;
minHeight: IGetSet<number, T>;
dimension: IGetSet<any, T>;
data: IGetSet<(group: any) => Array<any>, T>;
group: IGetSet<any, T>;
ordering: IGetSet<Accessor<any, any>, T>;
filterAll(): void;
select(selector: D3.Selection|string): D3.Selection;
selectAll(selector: D3.Selection|string): D3.Selection;
anchor(anchor: BaseMixin<any>|D3.Selection|string, chartGroup?: string): D3.Selection;
anchorName(): string;
svg: IGetSet<D3.Selection, D3.Selection>;
resetSvg(): void;
filterPrinter: IGetSet<(filters: Array<any>) => string, T>;
turnOnControls(): void;
turnOffControls(): void;
transitionDuration: IGetSet<number, T>;
render(): void;
redraw(): void;
redrawGroup(): void;
hasFilterHandler: IGetSet<(filters: Array<any>, filter: any) => boolean, T>;
hasFilter(filter?: any): boolean;
removeFilterHandler: IGetSet<(filters: Array<any>) => Array<any>, T>;
addFilterHandler: IGetSet<(filters: Array<any>) => Array<any>, T>;
resetFilterHandler: IGetSet<(filters: Array<any>) => Array<any>, T>;
filter: IGetSet<any, T>;
filters(): Array<any>;
onClick(datum: any): void;
filterHandler: IGetSet<(dimension: any, filter: any) => any, T>;
keyAccessor: IGetSet<Accessor<any, any>, T>;
valueAccessor: IGetSet<Accessor<any, any>, T>;
label: IGetSet<Accessor<any, string>, T>;
renderLabel: IGetSet<boolean, T>;
title: IGetSet<Accessor<any, string>, T>;
renderTitle: IGetSet<boolean, T>;
chartGroup: IGetSet<string, T>;
expireCache(): T;
legend: IGetSet<Legend, T>;
options(optionsObject: any): T;
renderlet(fn: (chart: T) => any): T;
on(event: string, fn: (chart: T) => any): T;
}
// chart interfaces
export interface Margins {
left: number;
top: number;
right: number;
bottom: number;
}
export interface IBubblechart extends
IBaseChart<IBubblechart>,
IAbstractColorChart<IBubblechart>,
IAbstractBubblechart<IBubblechart>,
IAbstractCoordinateGridChart<IBubblechart>,
IMarginable<IBubblechart>,
IListener<IBubblechart> {
}
export interface MarginMixin<T> {
margins: IGetSet<Margins, T>
}
export interface IPiechart extends
IBaseChart<IPiechart>,
IAbstractColorChart<IPiechart>,
IAbstractBubblechart<IPiechart>,
IAbstractCoordinateGridChart<IPiechart>,
IMarginable<IPiechart>,
IListener<IPiechart> {
radius: IGetSet<number, IPiechart>;
minAngleForLabel: IGetSet<number, IPiechart>;
export interface ColorMixin<T> {
colors: IGetSet<D3.Scale.GenericScale<any>|Array<string>, T>;
ordinalColors(r: Array<string>): void;
linearColors(r: Array<number>): void;
colorAccessor: IGetSet<Accessor<any, string>, T>;
colorDomain: IGetSet<Array<any>, T>;
calculateColorDomain(): void;
getColor(datum: any, index?: number): string;
colorCalculator: IGetSet<Accessor<any, string>, T>;
}
}
export interface CoordinateGridMixin<T> extends BaseMixin<T>, MarginMixin<T>, BaseMixin<T> {
rangeChart: IGetSet<BaseMixin<any>, T>;
zoomScale: IGetSet<Array<any>, T>;
zoomOutRestrict: IGetSet<boolean, T>;
g: IGetSet<D3.Selection, T>;
mouseZoomable: IGetSet<boolean, T>;
chartBodyG(): D3.Selection;
x: IGetSet<D3.Scale.GenericScale<any>, T>;
xUnits: IGetSet<UnitFunction, T>;
xAxis: IGetSet<D3.Svg.Axis, T>;
elasticX: IGetSet<boolean, T>;
xAxisPadding: IGetSet<number, T>;
xUnitCount(): number;
useRightYAxis: IGetSet<boolean, T>;
isOrdinal(): boolean;
xAxisLabel: IBiGetSet<string, number, T>;
yAxisLabel: IBiGetSet<string, number, T>;
y: IGetSet<D3.Scale.GenericQuantitativeScale<any>, T>;
yAxis: IGetSet<D3.Svg.Axis, T>;
elasticY: IGetSet<boolean, T>;
renderHorizontalGridLines: IGetSet<boolean, T>;
renderVerticalGridLines: IGetSet<boolean, T>;
xAxisMin(): any;
xAxisMax(): any;
yAxisMin(): any;
yAxisMax(): any;
yAxisPadding: IGetSet<number, T>;
round: IGetSet<(value: any) => any, T>;
clipPadding: IGetSet<number, T>;
focus(range?: Array<any>): void;
brushOn: IGetSet<boolean, T>;
}
export interface IBarchart extends
IBaseChart<IBarchart>,
IAbstractStackableChart<IBarchart>,
IAbstractCoordinateGridChart<IBarchart>,
IMarginable<IBarchart>,
IListener<IBarchart> {
centerBar: (b:boolean) => IBarchart;
gap: (gapBetweenBars: number) => IBarchart;
}
export interface StackMixin<T> {
stack(group: any, name?: string, accessor?: Accessor<any, any>): void;
hidableStacks: IGetSet<boolean, T>;
hideStack(name: string): void;
showStack(name: string): void;
// title(stackName: string, titleFn: Accessor<any, T>);
stackLayout: IGetSet<D3.Layout.StackLayout, T>;
}
export interface ILinechart extends
IBaseChart<ILinechart>,
IAbstractStackableChart<ILinechart>,
IAbstractCoordinateGridChart<ILinechart>,
IMarginable<ILinechart>,
IListener<ILinechart> {
}
export interface CapMixin<T> {
cap: IGetSet<number, T>;
othersLabel: IGetSet<string, T>;
othersGrouper: IGetSet<(data: Array<any>) => Array<any>, T>;
}
export interface BubbleMixin<T> extends ColorMixin<T> {
r: IGetSet<D3.Scale.GenericQuantitativeScale<any>, T>;
radiusValueAccessor: IGetSet<Accessor<any, number>, T>;
minRadiusWithLabel: IGetSet<number, T>;
maxBubbleRelativeSize: IGetSet<number, T>;
}
export interface IDatachart extends
IBaseChart<IDatachart>,
IAbstractStackableChart<IDatachart>,
IAbstractCoordinateGridChart<IDatachart>,
IMarginable<IDatachart>,
IListener<IDatachart> {
size: IGetSet<number, IDatachart>;
columns: IGetSet<columnFunction[], IDatachart>;
sortBy: IGetSet<sortbyFunction, IDatachart>;
order: IGetSet<orderFunction, IDatachart>;
}
export interface PieChart extends CapMixin<PieChart>, ColorMixin<PieChart>, BaseMixin<PieChart> {
slicesCap: IGetSet<number, PieChart>;
innerRadius: IGetSet<number, PieChart>;
radius: IGetSet<number, PieChart>;
cx: IGetSet<number, PieChart>;
cy: IGetSet<number, PieChart>;
minAngleForLabel: IGetSet<number, PieChart>;
}
export interface BarChart extends StackMixin<BarChart>, CoordinateGridMixin<BarChart> {
centerBar: IGetSet<boolean, BarChart>;
barPadding: IGetSet<number, BarChart>;
outerPadding: IGetSet<number, BarChart>;
gap: IGetSet<number, BarChart>;
alwaysUseRounding: IGetSet<boolean, BarChart>;
}
export interface IRowchart extends
IBaseChart<IRowchart>,
IAbstractColorChart<IRowchart>,
IAbstractStackableChart<IRowchart>,
IAbstractCoordinateGridChart<IRowchart>,
IMarginable<IRowchart>,
IListener<IRowchart> {
}
export interface RenderDataPointOptions {
fillOpacity: number;
strokeOpacity: number;
radius: number;
}
export interface LineChart extends StackMixin<BarChart>, CoordinateGridMixin<BarChart> {
interpolate: IGetSet<string, LineChart>;
tension: IGetSet<number, LineChart>;
defined: IGetSet<Accessor<any, boolean>, LineChart>;
dashStyle: IGetSet<Array<number>, LineChart>;
renderArea: IGetSet<boolean, LineChart>;
dotRadius: IGetSet<number, LineChart>;
renderDataPoints: IGetSet<RenderDataPointOptions|any, LineChart>;
}
export interface DataCountWidgetHTML {
all: string;
some: string;
}
export interface DataCountWidget extends BaseMixin<DataCountWidget> {
html: IGetSet<DataCountWidgetHTML, DataCountWidget>;
formatNumber: IGetSet<Accessor<number, string>, DataCountWidget>;
}
// utilities
export interface IChartGroup { }
export interface DataTableWidget extends BaseMixin<DataTableWidget> {
size: IGetSet<number, DataTableWidget>;
columns: IGetSet<Array<Accessor<any, any>|string|Array<Accessor<any, any>|string>>, DataTableWidget>;
sortBy: IGetSet<Accessor<any, any>, DataTableWidget>;
order: IGetSet<(a: any, b: any) => number, DataTableWidget>;
}
export function filterAll(chartGroup?: IChartGroup): void;
export function renderAll(chartGroup?: IChartGroup): void;
export function redrawAll(chartGroup?: IChartGroup): void;
export interface DataGridWidget extends BaseMixin<DataGridWidget> {
size: IGetSet<number, DataTableWidget>;
html: IGetSet<Accessor<any, string>, DataTableWidget>;
htmlGroup: IGetSet<Accessor<any, string>, DataTableWidget>;
sortBy: IGetSet<Accessor<any, any>, DataTableWidget>;
order: IGetSet<(a: any, b: any) => number, DataTableWidget>;
}
export interface BubbleChart extends BubbleMixin<BubbleChart>, CoordinateGridMixin<BubbleChart> {
elasticRadius: IGetSet<boolean, BubbleChart>;
}
export function bubbleChart(cssSel: string): IBubblechart;
export function pieChart(cssSel: string): IPiechart;
export function barChart(cssSel: string): IBarchart;
export function lineChart(cssSel: string): ILinechart;
export function dataTable(cssSel: string): IDatachart;
export function rowChart(cssSel: string): IRowchart;
export interface CompositeChart extends CoordinateGridMixin<CompositeChart> {
useRightAxisGridLines: IGetSet<boolean, CompositeChart>;
childOptions: IGetSet<any, CompositeChart>;
rightYAxisLabel: IGetSet<string, CompositeChart>;
compose: IGetSet<Array<BaseMixin<any>>, CompositeChart>;
children(): Array<BaseMixin<any>>;
shareColors: IGetSet<boolean, CompositeChart>;
shareTitle: IGetSet<boolean, CompositeChart>;
rightY: IGetSet<D3.Scale.GenericQuantitativeScale<any>, CompositeChart>;
rightYAxis: IGetSet<D3.Svg.Axis, CompositeChart>;
}
export interface SeriesChart extends CompositeChart {
chart: IGetSet<(c: any) => BaseMixin<any>, SeriesChart>;
seriesAccessor: IGetSet<Accessor<any, any>, SeriesChart>;
seriesSort: IGetSet<(a: any, b: any) => number, SeriesChart>;
valueSort: IGetSet<(a: any, b: any) => number, SeriesChart>;
}
export interface GeoChoroplethLayer {
name: string;
keyAccessor: Accessor<any, any>;
data: any;
}
export interface GeoChoroplethChart extends ColorMixin<GeoChoroplethChart>, BaseMixin<GeoChoroplethChart> {
overlayGeoJson(json: any, name: string, keyAccessor: Accessor<any, any>): void;
projection: IGetSet<D3.Geo.Projection, GeoChoroplethChart>;
geoJsons(): Array<GeoChoroplethLayer>;
geoPath(): D3.Geo.Path;
removeGeoJson(name: string): void;
}
export interface BubbleOverlayChart extends BubbleMixin<BubbleOverlayChart>, BaseMixin<BubbleOverlayChart> {
point(name: string, x: number, y: number): void;
}
export interface RowChart extends CapMixin<RowChart>, MarginMixin<RowChart>, ColorMixin<RowChart>, BaseMixin<RowChart> {
x: IGetSet<D3.Scale.GenericQuantitativeScale<any>, RowChart>;
renderTitleLabel: IGetSet<boolean, RowChart>;
xAxis: IGetSet<D3.Svg.Axis, RowChart>;
fixedBarHeight: IGetSet<number, RowChart>;
gap: IGetSet<number, RowChart>;
elasticX: IGetSet<boolean, RowChart>;
labelOffsetX: IGetSet<number, RowChart>;
labelOffsetY: IGetSet<number, RowChart>;
titleLabelOffsetX: IGetSet<number, RowChart>;
}
export interface ScatterPlot extends CoordinateGridMixin<ScatterPlot> {
existenceAccessor: IGetSet<Accessor<any, boolean>, ScatterPlot>;
symbol: IGetSet<D3.Svg.Symbol, ScatterPlot>;
symbolSize: IGetSet<number, ScatterPlot>;
highlightedSize: IGetSet<number, ScatterPlot>;
hiddenSize: IGetSet<number, ScatterPlot>;
}
export interface NumberDisplayWidgetHTML {
one: string;
some: string;
none: string;
}
export interface NumberDisplayWidget extends BaseMixin<NumberDisplayWidget> {
html: IGetSet<NumberDisplayWidgetHTML, NumberDisplayWidget>;
value(): string;
formatNumber: IGetSet<Accessor<number, string>, NumberDisplayWidget>;
}
export interface HeatMap extends ColorMixin<HeatMap>, MarginMixin<HeatMap>, BaseMixin<HeatMap> {
colsLabel: IGetSet<Accessor<any, string>, HeatMap>;
rowsLabel: IGetSet<Accessor<any, string>, HeatMap>;
rows: IGetSet<Array<any>, HeatMap>;
cols: IGetSet<Array<any>, HeatMap>;
boxOnClick: IGetSet<(d: any) => void, HeatMap>;
xAxisOnClick: IGetSet<(d: any) => void, HeatMap>;
yAxisOnClick: IGetSet<(d: any) => void, HeatMap>;
}
export interface BoxPlot extends CoordinateGridMixin<BoxPlot> {
boxPadding: IGetSet<number, BoxPlot>;
outerPadding: IGetSet<number, BoxPlot>;
boxWidth: IGetSet<number, BoxPlot>;
tickFormat: IGetSet<Accessor<number, string>, BoxPlot>;
}
export interface ChartRegistry {
has(chart: BaseMixin<any>): boolean;
register(chart: BaseMixin<any>, group?: string): void;
deregister(chart: BaseMixin<any>, group?: string): void;
clear(group?: string): void;
list(group?: string): Array<BaseMixin<any>>;
}
export interface Base {
chartRegistry: ChartRegistry;
registerChart(chart: BaseMixin<any>, group?: string): void;
deregisterChart(chart: BaseMixin<any>, group?: string): void;
hasChart(chart: BaseMixin<any>): boolean;
deregisterAllCharts(group?: string): void;
filterAll(group?: string): void;
refocusAll(group?: string): void;
renderAll(group?: string): void;
redrawAll(group?: string): void;
disableTransitions: boolean;
transition(selections: D3.Selection, duration: number, callback: (s: D3.Selection) => void): void;
units: Units;
events: Events;
errors: Errors;
instanceOfChart(object: any): boolean;
logger: Logger;
override(object: any, fnName: string, newFn: Function): void;
printers: Printers;
pluck(n: string, f?: Accessor<any, any>): Accessor<any, any>;
round: Round;
utils: Utils;
legend(): Legend;
pieChart(parent: string, chartGroup?: string): PieChart;
barChart(parent: string, chartGroup?: string): BarChart;
lineChart(parent: string, chartGroup?: string): LineChart;
dataCount(parent: string, chartGroup?: string): DataCountWidget;
dataTable(parent: string, chartGroup?: string): DataTableWidget;
dataGrid(parent: string, chartGroup?: string): DataGridWidget;
bubbleChart(parent: string, chartGroup?: string): BubbleChart;
compositeChart(parent: string, chartGroup?: string): CompositeChart;
seriesChart(parent: string, chartGroup?: string): SeriesChart;
geoChoroplethChart(parent: string, chartGroup?: string): GeoChoroplethChart;
bubbleOverlayChart(parent: string, chartGroup?: string): BubbleOverlayChart;
rowChart(parent: string, chartGroup?: string): RowChart;
scatterPlot(parent: string, chartGroup?: string): ScatterPlot;
numberDisplay(parent: string, chartGroup?: string): NumberDisplayWidget;
heatMap(parent: string, chartGroup?: string): HeatMap;
boxPlot(parent: string, chartGroup?: string): BoxPlot;
}
}
declare var dc: DC.Base;
declare module 'dc' {
export = dc;
}
-1
View File
@@ -1 +0,0 @@
--noImplicitAny
+3 -3
View File
@@ -9754,7 +9754,7 @@ declare module dojo {
* </div>
* </div>
* </div>
* </div><a href="https://docs.google.com/spreadsheet/viewform?hl=en_US&amp;formkey=dFlDcHEyaHMwbEd4MFBObkNrX0E1MFE6MQ&amp;entry_0=/api/1.9/dojo/_base/kernel.back" class="feedback">Error in the documentation? Cant find what you are looking for? Let us know!</a>
* </div><a href="https://docs.google.com/spreadsheet/viewform?hl=en_US&amp;formkey=dFlDcHEyaHMwbEd4MFBObkNrX0E1MFE6MQ&amp;entry_0=/api/1.9/dojo/_base/kernel.back" class="feedback">Error in the documentation? Can't find what you are looking for? Let us know!</a>
*/
init(): void;
}
@@ -18375,7 +18375,7 @@ declare module dojo {
* </div>
* </div>
* </div>
* </div><a href="https://docs.google.com/spreadsheet/viewform?hl=en_US&amp;formkey=dFlDcHEyaHMwbEd4MFBObkNrX0E1MFE6MQ&amp;entry_0=/api/1.9/dojo/back" class="feedback">Error in the documentation? Cant find what you are looking for? Let us know!</a>
* </div><a href="https://docs.google.com/spreadsheet/viewform?hl=en_US&amp;formkey=dFlDcHEyaHMwbEd4MFBObkNrX0E1MFE6MQ&amp;entry_0=/api/1.9/dojo/back" class="feedback">Error in the documentation? Can't find what you are looking for? Let us know!</a>
*/
init(): void;
}
@@ -25085,7 +25085,7 @@ declare module dojo {
* </div>
* </div>
* </div>
* </div><a href="https://docs.google.com/spreadsheet/viewform?hl=en_US&amp;formkey=dFlDcHEyaHMwbEd4MFBObkNrX0E1MFE6MQ&amp;entry_0=/api/1.9/dojo/main.back" class="feedback">Error in the documentation? Cant find what you are looking for? Let us know!</a>
* </div><a href="https://docs.google.com/spreadsheet/viewform?hl=en_US&amp;formkey=dFlDcHEyaHMwbEd4MFBObkNrX0E1MFE6MQ&amp;entry_0=/api/1.9/dojo/main.back" class="feedback">Error in the documentation? Can't find what you are looking for? Let us know!</a>
*/
init(): void;
}
+28
View File
@@ -0,0 +1,28 @@
///<reference path="../tether/tether.d.ts" />
///<reference path="drop.d.ts" />
var yellowBox = document.querySelector(".yellow");
var greenBox = document.querySelector(".green");
var d = new Drop({
position: "bottom left",
openOn: "click",
constrainToWindow: true,
constrainToScrollParent: true,
classes: "",
tetherOptions: {}
});
d.open();
d.close();
d.remove();
d.toggle();
d.position();
d.destroy();
d.on("open", () => null);
d.on("close", () => null);
d.once("close", () => null);
d.off("close", () => null);
d.off("open");
+48
View File
@@ -0,0 +1,48 @@
// Type definitions for Drop v0.5
// Project: http://github.hubspot.com/drop/
// Definitions by: Adi Dahiya <https://github.com/adidahiya>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///<reference path="../tether/tether.d.ts" />
declare module drop {
interface DropStatic {
new(options: IDropOptions): Drop;
}
interface IDropOptions {
target?: Element;
content?: Element | string | (() => string);
position?: string;
openOn?: string;
constrainToWindow?: boolean;
constrainToScrollParent?: boolean;
remove?: boolean;
tetherOptions?: tether.ITetherOptions;
}
interface Drop {
content: HTMLElement;
open(): void;
close(): void;
remove(): void;
toggle(): void;
position(): void;
destroy(): void;
/*
* Drop instances fire "open" and "close" events.
*/
on(event: string, handler: Function, context?: any): void;
once(event: string, handler: Function, context?: any): void;
off(event: string, handler?: Function): void;
}
}
declare module "drop" {
export = drop;
}
declare var Drop: drop.DropStatic;
+8 -8
View File
@@ -2,9 +2,9 @@
/// <reference path="../handlebars/handlebars.d.ts" />
var App;
var App : any;
App = Em.Application.create();
App = Em.Application.create<Em.Application>();
App.president = Em.Object.create({
name: 'Barack Obama'
@@ -27,7 +27,7 @@ declare class MyPerson extends Em.Object {
}
var Person1 = Em.Object.extend<typeof MyPerson>({
say: (thing) => {
say: (thing: string) => {
alert(thing);
}
});
@@ -119,7 +119,7 @@ App.AlertView = Em.View.extend({
App.ListingView = Em.View.extend({
templateName: 'listing',
edit: (event) => {
edit: (event: any) => {
event.view.set('isEditing', true);
}
});
@@ -133,7 +133,7 @@ App.userController = Em.Object.create({
})
});
Handlebars.registerHelper('highlight', function(property, options) {
Handlebars.registerHelper('highlight', function(property: string, options: any) {
var value = Em.Handlebars.get(this, property, options);
return new Handlebars.SafeString('<span class="highlight">' + value + '</span>');
});
@@ -195,7 +195,7 @@ people2.everyProperty('isHappy', true);
people2.someProperty('isHappy', true);
// Examples taken from http://emberjs.com/api/classes/Ember.RSVP.Promise.html
var promise = new Ember.RSVP.Promise(function(resolve, reject) {
var promise = new Ember.RSVP.Promise(function(resolve: Function, reject: Function) {
// on success
resolve('ok!');
@@ -203,8 +203,8 @@ var promise = new Ember.RSVP.Promise(function(resolve, reject) {
reject('no-k!');
});
promise.then(function(value) {
promise.then(function(value: any) {
// on fulfillment
}, function(reason) {
}, function(reason: any) {
// on rejection
});
-1
View File
@@ -1 +0,0 @@
+469 -64
View File
@@ -11,15 +11,147 @@ declare var Handlebars: HandlebarsStatic;
declare module EmberStates {
interface Transition {
abort(): void;
addInitialStates(): void;
matchContextsToStates(contexts: any[]): void;
normalize(manager: Ember.StateManager, contexts: any[]): void;
removeUnchangedContexts(manager: Ember.StateManager): void;
retry(): void;
sendEvents(eventName: string, sendRecursiveArguments: boolean, isUnhandledPass: boolean): void;
sendRecursively(event: string, currentState: Ember.State, isUnhandledPass: boolean): void;
targetName: string;
urlMethod: string;
intent: any;
params: {}|any;
pivotHandler: any;
resolveIndex: number;
handlerInfos: any;
resolvedModels: {}|any;
isActive: boolean;
state: any;
queryParams: {}|any;
queryParamsOnly: boolean;
isTransition: boolean;
/**
The Transition's internal promise. Calling `.then` on this property
is that same as calling `.then` on the Transition object itself, but
this property is exposed for when you want to pass around a
Transition's promise, but not the Transition object itself, since
Transition object can be externally `abort`ed, while the promise
cannot.
*/
promise: Ember.RSVP.Promise;
/**
Custom state can be stored on a Transition's `data` object.
This can be useful for decorating a Transition within an earlier
hook and shared with a later hook. Properties set on `data` will
be copied to new transitions generated by calling `retry` on this
transition.
*/
data: any;
/**
A standard promise hook that resolves if the transition
succeeds and rejects if it fails/redirects/aborts.
Forwards to the internal `promise` property which you can
use in situations where you want to pass around a thennable,
but not the Transition itself.
@arg {Function} onFulfilled
@arg {Function} onRejected
@arg {String} label optional string for labeling the promise. Useful for tooling.
@return {Promise}
*/
then(onFulfilled: Function, onRejected: Function, label?: string): Ember.RSVP.Promise;
/**
Forwards to the internal `promise` property which you can
use in situations where you want to pass around a thennable,
but not the Transition itself.
@method catch
@arg {Function} onRejection
@arg {String} label optional string for labeling the promise.
Useful for tooling.
@return {Promise}
*/
catch(onRejection: Function, label?: string): Ember.RSVP.Promise;
/**
Forwards to the internal `promise` property which you can
use in situations where you want to pass around a thennable,
but not the Transition itself.
@method finally
@arg {Function} callback
@arg {String} label optional string for labeling the promise.
Useful for tooling.
@return {Promise}
*/
finally(callback: Function, label?: string): Ember.RSVP.Promise;
/**
Aborts the Transition. Note you can also implicitly abort a transition
by initiating another transition while a previous one is underway.
*/
abort(): EmberStates.Transition;
normalize(manager: Ember.StateManager, contexts: any[]): void;
/**
Retries a previously-aborted transition (making sure to abort the
transition if it's still active). Returns a new transition that
represents the new attempt to transition.
*/
retry(): EmberStates.Transition;
/**
Sets the URL-changing method to be employed at the end of a
successful transition. By default, a new Transition will just
use `updateURL`, but passing 'replace' to this method will
cause the URL to update using 'replaceWith' instead. Omitting
a parameter will disable the URL change, allowing for transitions
that don't update the URL at completion (this is also used for
handleURL, since the URL has already changed before the
transition took place).
@arg {String} method the type of URL-changing method to use
at the end of a transition. Accepted values are 'replace',
falsy values, or any other non-falsy value (which is
interpreted as an updateURL transition).
@return {Transition} this transition
*/
method(method: string): EmberStates.Transition;
/**
Fires an event on the current list of resolved/resolving
handlers within this transition. Useful for firing events
on route hierarchies that haven't fully been entered yet.
Note: This method is also aliased as `send`
@arg {Boolean} [ignoreFailure=false] a boolean specifying whether unhandled events throw an error
@arg {String} name the name of the event to fire
*/
trigger(ignoreFailure:boolean, eventName: string): void;
/**
Fires an event on the current list of resolved/resolving
handlers within this transition. Useful for firing events
on route hierarchies that haven't fully been entered yet.
Note: This method is also aliased as `send`
@arg {String} name the name of the event to fire
*/
trigger(eventName: string): void;
/**
Transitions are aborted and their promises rejected
when redirects occur; this method returns a promise
that will follow any redirects that occur and fulfill
with the value fulfilled by any redirecting transitions
that occur.
@return {Promise} a promise that fulfills with the same
value that the final redirecting transition fulfills with
*/
followRedirects(): Ember.RSVP.Promise;
}
}
@@ -61,7 +193,7 @@ interface String {
}
interface Array<T> {
constructor(arr: any[]);
constructor(arr: any[]): void;
activate(): void;
addArrayObserver(target: any, opts?: EnumerableConfigurationOptions): any[];
addEnumerableObserver(target: any, opts: EnumerableConfigurationOptions): any[];
@@ -88,16 +220,40 @@ interface Array<T> {
every(callback: Function, target?: any): boolean;
everyBy(key: string, value?: string): boolean;
everyProperty(key: string, value?: any): boolean;
filter(callback: Function, target: any): any[];
filter(callback: Function, target?: any): any[];
filterBy(key: string, value?: string): any[];
find(callback: Function, target: any): any;
/**
Returns the first item in the array for which the callback returns true.
This method works similar to the `filter()` method defined in JavaScript 1.6
except that it will stop working on the array once a match is found.
The callback method you provide should have the following signature (all
parameters are optional):
```javascript
function(item, index, enumerable);
```
- `item` is the current item in the iteration.
- `index` is the current index in the iteration.
- `enumerable` is the enumerable object itself.
It should return the `true` to include the item in the results, `false`
otherwise.
Note that in addition to a callback, you can also pass an optional target
object that will be set as `this` on the context. This is a good way
to give your iterator function access to the current object.
@function find
@arg callback The callback to execute
@arg {Object} [target] The target object to use
@return {Object} Found item or `undefined`.
*/
find(callback: Function, target?: any): any;
findBy(key: string, value?: string): any;
forEach(callback: Function, target?: any): any;
getEach(key: string): any[];
indexOf(object: any, startAt: number): number;
indexOf(object: any, startAt?: number): number;
insertAt(idx: number, object: any): any[];
invoke(methodName: string, ...args: any[]): any[];
lastIndexOf(object: any, startAt: number): number;
lastIndexOf(object: any, startAt?: number): number;
map(callback: Function, target?: any): any[];
mapBy(key: string): any[];
nextObject(index: number, previousObject: any, context: any): any;
objectAt(idx: number): any;
@@ -111,7 +267,7 @@ interface Array<T> {
removeArrayObserver(target: any, opts: EnumerableConfigurationOptions): any[];
removeAt(start: number, len: number): any;
removeEnumerableObserver(target: any, opts: EnumerableConfigurationOptions): any[];
replace(idx: number, amt: number, objects: any[]);
replace(idx: number, amt: number, objects: any[]): void;
reverseObjects(): any[];
setEach(key: string, value?: any): any;
setObjects(objects: any[]): any[];
@@ -154,6 +310,9 @@ interface Array<T> {
toggleProperty(keyName: string): any;
copy(deep: boolean): any[];
frozenCopy(): any[];
// 1.3
isAny(key: string, value?: string): boolean;
isEvery(key: string, value?: string): boolean;
}
interface ApplicationCreateArguments {
@@ -175,7 +334,7 @@ interface ApplicationInitializerArguments {
}
interface ApplicationInitializerFunction {
(container: Ember.Container, application: Ember.Application);
(container: Ember.Container, application: Ember.Application): void;
}
interface CoreObjectArguments {
@@ -202,11 +361,11 @@ interface ItemIndexEnumerableCallbackTarget {
}
interface ItemIndexEnumerableCallback {
(item: any, index: number, enumerable: Ember.Enumerable);
(item: any, index: number, enumerable: Ember.Enumerable): void;
}
interface ReduceCallback {
(previousValue: any, item: any, index: number, enumerable: Ember.Enumerable);
(previousValue: any, item: any, index: number, enumerable: Ember.Enumerable): void;
}
interface TransitionsHash {
@@ -233,10 +392,10 @@ interface RenderOptions {
}
interface ModifyObserver {
(obj: any, path: string, target: any, method?: Function);
(obj: any, path: string, target: any, method?: string);
(obj: any, path: string, func: Function, method?: Function);
(obj: any, path: string, func: Function, method?: string);
(obj: any, path: string, target: any, method?: Function): void;
(obj: any, path: string, target: any, method?: string): void;
(obj: any, path: string, func: Function, method?: Function): void;
(obj: any, path: string, func: Function, method?: string): void;
}
declare module Ember {
@@ -399,7 +558,7 @@ declare module Ember {
everyProperty(key: string, value?: string): boolean;
filter(callback: Function, target: any): any[];
filterBy(key: string, value?: string): any[];
find(callback: Function, target: any): any;
find(callback: Function, target?: any): any;
findBy(key: string, value?: string): any;
forEach(callback: Function, target?: any): any;
getEach(key: string): any[];
@@ -495,7 +654,7 @@ declare module Ember {
static isClass: boolean;
static isMethod: boolean;
addArrayObserver(target: any, opts?: EnumerableConfigurationOptions): any[];
addEnumerableObserver(target: any, opts: EnumerableConfigurationOptions): any[];
addEnumerableObserver(target: any, opts: EnumerableConfigurationOptions): Enumerable;
any(callback: Function, target?: any): boolean;
anyBy(key: string, value?: string): boolean;
arrayContentDidChange(startIdx: number, removeAmt: number, addAmt: number): any[];
@@ -512,10 +671,10 @@ declare module Ember {
enumerableContentDidChange(removing: Enumerable, adding: number): any;
enumerableContentDidChange(removing: number, adding: Enumerable): any;
enumerableContentDidChange(removing: Enumerable, adding: Enumerable): any;
enumerableContentWillChange(removing: number, adding: number): any[];
enumerableContentWillChange(removing: Enumerable, adding: number): any[];
enumerableContentWillChange(removing: number, adding: Enumerable): any[];
enumerableContentWillChange(removing: Enumerable, adding: Enumerable): any[];
enumerableContentWillChange(removing: number, adding: number): Enumerable;
enumerableContentWillChange(removing: Enumerable, adding: number): Enumerable;
enumerableContentWillChange(removing: number, adding: Enumerable): Enumerable;
enumerableContentWillChange(removing: Enumerable, adding: Enumerable): Enumerable;
every(callback: Function, target?: any): boolean;
everyBy(key: string, value?: string): boolean;
everyProperty(key: string, value?: string): boolean;
@@ -543,7 +702,7 @@ declare module Ember {
rejectBy(key: string, value?: string): any[];
removeArrayObserver(target: any, opts: EnumerableConfigurationOptions): any[];
removeAt(start: number, len: number): any;
removeEnumerableObserver(target: any, opts: EnumerableConfigurationOptions): any[];
removeEnumerableObserver(target: any, opts: EnumerableConfigurationOptions): Enumerable;
replace(idx: number, amt: number, objects: any[]): any;
replaceContent(idx: number, amt: number, objects: any[]): void;
reverseObjects(): any[];
@@ -553,10 +712,10 @@ declare module Ember {
slice(beginIndex?: number, endIndex?: number): any[];
some(callback: Function, target?: any): boolean;
toArray(): any[];
uniq(): any[];
uniq(): Enumerable;
unshiftObject(object: any): any;
unshiftObjects(objects: any[]): any[];
without(value: any): any[];
without(value: any): Enumerable;
'[]': any[];
'@each': EachProxy;
Boolean: boolean;
@@ -565,9 +724,9 @@ declare module Ember {
lastObject: any;
length: number;
addObject(object: any): any;
addObjects(objects: Enumerable): any[];
addObjects(objects: Enumerable): MutableEnumberable;
removeObject(object: any): any;
removeObjects(objects: Enumerable): any[];
removeObjects(objects: Enumerable): MutableEnumberable;
}
var BOOTED: boolean;
/**
@@ -958,8 +1117,9 @@ declare module Ember {
/**
A subclass of the JavaScript Error object for use in Ember.
**/
// Restore this to 'typeof Error' when https://github.com/Microsoft/TypeScript/issues/983 is resolved
// ReSharper disable once DuplicatingLocalDeclaration
var Error: typeof Error;
var Error: any; // typeof Error;
/**
Handles delegating browser events to their corresponding Ember.Views. For example, when you click on
a view, Ember.EventDispatcher ensures that that view's mouseDown method gets called.
@@ -1001,8 +1161,8 @@ declare module Ember {
module Handlebars {
function compile(string: string): Function;
function get(root: any, path: string, options?: {}): any;
function helper(name: string, func: Function, dependentKeys: string): void;
function helper(name: string, view: View, dependentKeys: string): void;
function helper(name: string, func: Function, dependentKeys?: string): void;
function helper(name: string, view: View, dependentKeys?: string): void;
class helpers {
action(actionName: string, context: any, options?: {}): void;
bindAttr(options?: {}): string;
@@ -1307,7 +1467,7 @@ declare module Ember {
constructor(arr: any[]);
static activate(): void;
addArrayObserver(target: any, opts?: EnumerableConfigurationOptions): any[];
addEnumerableObserver(target: any, opts: EnumerableConfigurationOptions): any[];
addEnumerableObserver(target: any, opts: EnumerableConfigurationOptions): Enumerable;
any(callback: Function, target?: any): boolean;
anyBy(key: string, value?: string): boolean;
arrayContentDidChange(startIdx: number, removeAmt: number, addAmt: number): any[];
@@ -1324,10 +1484,10 @@ declare module Ember {
enumerableContentDidChange(removing: Enumerable, adding: number): any;
enumerableContentDidChange(removing: number, adding: Enumerable): any;
enumerableContentDidChange(removing: Enumerable, adding: Enumerable): any;
enumerableContentWillChange(removing: number, adding: number): any[];
enumerableContentWillChange(removing: Enumerable, adding: number): any[];
enumerableContentWillChange(removing: number, adding: Enumerable): any[];
enumerableContentWillChange(removing: Enumerable, adding: Enumerable): any[];
enumerableContentWillChange(removing: number, adding: number): Enumerable;
enumerableContentWillChange(removing: Enumerable, adding: number): Enumerable;
enumerableContentWillChange(removing: number, adding: Enumerable): Enumerable;
enumerableContentWillChange(removing: Enumerable, adding: Enumerable): Enumerable;
every(callback: Function, target?: any): boolean;
everyBy(key: string, value?: string): boolean;
everyProperty(key: string, value?: any): boolean;
@@ -1354,7 +1514,7 @@ declare module Ember {
rejectBy(key: string, value?: string): any[];
removeArrayObserver(target: any, opts: EnumerableConfigurationOptions): any[];
removeAt(start: number, len: number): any;
removeEnumerableObserver(target: any, opts: EnumerableConfigurationOptions): any[];
removeEnumerableObserver(target: any, opts: EnumerableConfigurationOptions): Enumerable;
replace(idx: number, amt: number, objects: any[]): any;
reverseObjects(): any[];
setEach(key: string, value?: any): any;
@@ -1363,10 +1523,10 @@ declare module Ember {
slice(beginIndex?: number, endIndex?: number): any[];
some(callback: Function, target?: any): boolean;
toArray(): any[];
uniq(): any[];
uniq(): Enumerable;
unshiftObject(object: any): any;
unshiftObjects(objects: any[]): any[];
without(value: any): any[];
without(value: any): Enumerable;
'[]': any[];
'@each': EachProxy;
Boolean: boolean;
@@ -1375,30 +1535,30 @@ declare module Ember {
lastObject: any;
length: number;
addObject(object: any): any;
addObjects(objects: Enumerable): any[];
addObjects(objects: Enumerable): MutableEnumberable;
removeObject(object: any): any;
removeObjects(objects: Enumerable): any[];
removeObjects(objects: Enumerable): MutableEnumberable;
addObserver: ModifyObserver;
beginPropertyChanges(): any[];
beginPropertyChanges(): Observable;
cacheFor(keyName: string): any;
decrementProperty(keyName: string, decrement?: number): number;
endPropertyChanges(): any[];
endPropertyChanges(): Observable;
get(keyName: string): any;
getProperties(...args: string[]): {};
getProperties(keys: string[]): {};
getWithDefault(keyName: string, defaultValue: any): any;
hasObserverFor(key: string): boolean;
incrementProperty(keyName: string, increment?: number): number;
notifyPropertyChange(keyName: string): any[];
propertyDidChange(keyName: string): any[];
propertyWillChange(keyName: string): any[];
removeObserver(key: string, target: any, method: string): Observable;
removeObserver(key: string, target: any, method: Function): Observable;
set(keyName: string, value: any): any[];
setProperties(hash: {}): any[];
notifyPropertyChange(keyName: string): Observable;
propertyDidChange(keyName: string): Observable;
propertyWillChange(keyName: string): Observable;
removeObserver(key: string, target: any, method: string): void;
removeObserver(key: string, target: any, method: Function): void;
set(keyName: string, value: any): Observable;
setProperties(hash: {}): Observable;
toggleProperty(keyName: string): any;
copy(deep: boolean): any[];
frozenCopy(): any[];
copy(deep: boolean): Copyable;
frozenCopy(): Copyable;
}
class NoneLocation extends Object {
static detect(obj: any): boolean;
@@ -1422,6 +1582,7 @@ declare module Ember {
Creates a subclass of the Object class.
**/
static extend<T>(arguments?: CoreObjectArguments): T;
static extend<T>(mixins? : Mixin, arguments?: CoreObjectArguments): T;
/**
Creates an instance of the class.
@param arguments A hash containing values with which to initialize the newly instantiated object.
@@ -1522,11 +1683,14 @@ declare module Ember {
notifyPropertyChange(keyName: string): Observable;
propertyDidChange(keyName: string): Observable;
propertyWillChange(keyName: string): Observable;
removeObserver(key: string, target: {}, method: string): Observable;
removeObserver(key: string, target: {}, method: Function): Observable;
removeObserver(key: string, target: {}, method: string): void;
removeObserver(key: string, target: {}, method: Function): void;
set(keyName: string, value: any): Observable;
setProperties(hash: {}): Observable;
toggleProperty(keyName: string): any;
/**
Set the value of a boolean property to the opposite of its current value.
*/
toggleProperty(keyName: string): boolean;
}
class OrderedSet {
add(obj: any): void;
@@ -1596,7 +1760,7 @@ declare module Ember {
serialize(model: {}, params: string[]): string;
setupController(controller: Controller, model: {}): void;
// ReSharper disable once InconsistentNaming
transitionTo(name: string, ...object: any[]): void;
transitionTo(name: string, ...object: any[]): EmberStates.Transition;
actions: ActionsHash;
}
class Router extends Object {
@@ -2363,9 +2527,9 @@ declare module Em {
var copy: typeof Ember.copy;
var create: typeof Ember.create;
var debug: typeof Ember.debug;
var defineProperty: typeof defineProperty;
var deprecate: typeof deprecate;
var deprecateFunc: typeof deprecateFunc;
var defineProperty: typeof Ember.defineProperty;
var deprecate: typeof Ember.deprecate;
var deprecateFunc: typeof Ember.deprecateFunc;
var destroy: typeof Ember.destroy;
var empty: typeof deprecateFunc;
var endPropertyChanges: typeof Ember.endPropertyChanges;
@@ -2382,7 +2546,248 @@ declare module Em {
var handleErrors: typeof Ember.handleErrors;
var hasListeners: typeof Ember.hasListeners;
var hasOwnProperty: typeof Ember.hasOwnProperty;
var immediateObserver: typeof immediateObserver;
var immediateObserver: typeof Ember.immediateObserver;
var imports: typeof Ember.imports;
var inspect: typeof Ember.inspect;
var instrument: typeof Ember.instrument;
var isArray: typeof Ember.isArray;
var isEmpty: typeof Ember.isEmpty;
var isEqual: typeof Ember.isEqual;
var isGlobalPath: typeof Ember.isGlobalPath;
var isNamespace: typeof Ember.isNamespace;
var isNone: typeof Ember.isNone;
var isPrototypeOf: typeof Ember.isPrototypeOf;
var isWatching: typeof Ember.isWatching;
var keys: typeof Ember.keys;
var listenersDiff: typeof Ember.listenersDiff;
var listenersFor: typeof Ember.listenersFor;
var listenersUnion: typeof Ember.listenersUnion;
var lookup: typeof Ember.lookup;
var makeArray: typeof Ember.makeArray;
var merge: typeof Ember.merge;
var meta: typeof Ember.meta;
var metaPath: typeof Ember.metaPath;
var mixin: typeof Ember.mixin;
var none: typeof Ember.none;
var normalizeTuple: typeof Ember.normalizeTuple;
var observer: typeof Ember.observer;
var observersFor: typeof Ember.observersFor;
var onLoad: typeof Ember.onLoad;
var oneWay: typeof Ember.oneWay;
var onError: typeof Ember.onError;
var overrideChains: typeof Ember.overrideChains;
var platform: typeof Ember.platform;
var propertyDidChange: typeof Ember.propertyDidChange;
var propertyIsEnumerable: typeof Ember.propertyIsEnumerable;
var propertyWillChange: typeof Ember.propertyWillChange;
var removeBeforeObserver: typeof Ember.removeBeforeObserver;
var removeChainWatcher: typeof Ember.removeChainWatcher;
var removeListener: typeof Ember.removeListener;
var removeObserver: typeof Ember.removeObserver;
var required: typeof Ember.required;
var rewatch: typeof Ember.rewatch;
var run: typeof Ember.run;
var runLoadHooks: typeof Ember.runLoadHooks;
var sendEvent: typeof Ember.sendEvent;
var set: typeof Ember.set;
var setMeta: typeof Ember.setMeta;
var setPath: typeof Ember.setPath;
var setProperties: typeof Ember.setProperties;
var subscribe: typeof Ember.subscribe;
var toLocaleString: typeof Ember.toLocaleString;
var toString: typeof Ember.toString;
var tryCatchFinally: typeof Ember.tryCatchFinally;
var tryFinally: typeof Ember.tryFinally;
var tryInvoke: typeof Ember.tryInvoke;
var trySet: typeof Ember.trySet;
var trySetPath: typeof Ember.trySetPath;
var typeOf: typeof Ember.typeOf;
var unwatch: typeof Ember.unwatch;
var unwatchKey: typeof Ember.unwatchKey;
var unwatchPath: typeof Ember.unwatchPath;
var uuid: typeof Ember.uuid;
var valueOf: typeof Ember.valueOf;
var warn: typeof Ember.warn;
var watch: typeof Ember.watch;
var watchKey: typeof Ember.watchKey;
var watchPath: typeof Ember.watchPath;
var watchedEvents: typeof Ember.watchedEvents;
var wrap: typeof Ember.wrap;
}
/**
* External ambient module - to allow "import Ember = require('Ember');" to work correctly
*/
declare module "Ember" {
var $: typeof Ember.$;
var A: typeof Ember.A;
class ActionHandlerMixin extends Ember.ActionHandlerMixin { }
class Application extends Ember.Application { }
class Array extends Ember.Array { }
class ArrayController extends Ember.ArrayController { }
var ArrayPolyfills: typeof Ember.ArrayPolyfills;
class ArrayProxy extends Ember.ArrayProxy { }
var BOOTED: typeof Ember.BOOTED;
class Binding extends Ember.Binding { }
class Button extends Ember.Button { }
class Checkbox extends Ember.Checkbox { }
class CollectionView extends Ember.CollectionView { }
class Comparable extends Ember.Comparable { }
class Component extends Ember.Component { }
class ComputedProperty extends Ember.ComputedProperty { }
class Container extends Ember.Container { }
class ContainerView extends Ember.ContainerView { }
class Controller extends Ember.Controller { }
class ControllerMixin extends Ember.ControllerMixin { }
class Copyable extends Ember.Copyable { }
class CoreObject extends Ember.CoreObject { }
class CoreView extends Ember.CoreView { }
class DAG extends Ember.DAG { }
var DEFAULT_GETTER_FUNCTION: typeof Ember.DEFAULT_GETTER_FUNCTION;
class DefaultResolver extends Ember.DefaultResolver { }
class Deffered extends Ember.Deferred { }
class DeferredMixin extends Ember.DeferredMixin { }
class Descriptor extends Ember.Descriptor { }
var EMPTY_META: typeof Ember.EMPTY_META;
var ENV: typeof Ember.ENV;
var EXTEND_PROTOTYPES: typeof Ember.EXTEND_PROTOTYPES;
class EachProxy extends Ember.EachProxy { }
class Enumerable extends Ember.Enumerable { }
var EnumerableUtils: typeof Ember.EnumerableUtils;
var Error: typeof Ember.Error;
class EventDispatcher extends Ember.EventDispatcher { }
class Evented extends Ember.Evented { }
var FROZEN_ERROR: typeof Ember.FROZEN_ERROR;
class Freezable extends Ember.Freezable { }
var GUID_KEY: typeof Ember.GUID_KEY;
module Handlebars {
var compile: typeof Ember.Handlebars.compile;
var get: typeof Ember.Handlebars.get;
var helper: typeof Ember.Handlebars.helper;
class helpers extends Ember.Handlebars.helpers { }
var precompile: typeof Ember.Handlebars.precompile;
var registerBoundHelper: typeof Ember.Handlebars.registerBoundHelper;
class Compiler extends Ember.Handlebars.Compiler { }
class JavaScriptCompiler extends Ember.Handlebars.JavaScriptCompiler { }
var registerHelper: typeof Ember.Handlebars.registerHelper;
var registerPartial: typeof Ember.Handlebars.registerPartial;
var K: typeof Ember.Handlebars.K;
var createFrame: typeof Ember.Handlebars.createFrame;
var Exception: typeof Ember.Handlebars.Exception;
class SafeString extends Ember.Handlebars.SafeString { }
var parse: typeof Ember.Handlebars.parse;
var print: typeof Ember.Handlebars.print;
var logger: typeof Ember.Handlebars.logger;
var log: typeof Ember.Handlebars.log;
}
class HashLocation extends Ember.HashLocation { }
class HistoryLocation extends Ember.HistoryLocation { }
var IS_BINDING: typeof Ember.IS_BINDING;
class Instrumentation extends Ember.Instrumentation { }
var K: typeof Ember.K;
var LOG_BINDINGS: typeof Ember.LOG_BINDINGS;
var LOG_STACKTRACE_ON_DEPRECATION: typeof Ember.LOG_STACKTRACE_ON_DEPRECATION;
var LOG_VERSION: typeof Ember.LOG_VERSION;
class LinkView extends Ember.LinkView { }
class Location extends Ember.Location { }
var Logger: typeof Ember.Logger;
var MANDATORY_SETTER_FUNCTION: typeof Ember.MANDATORY_SETTER_FUNCTION;
var META_KEY: typeof Ember.META_KEY;
class Map extends Ember.Map { }
class MapWithDefault extends Ember.MapWithDefault { }
class Mixin extends Ember.Mixin { }
class MutableArray extends Ember.MutableArray { }
class MutableEnumerable extends Ember.MutableEnumberable { }
var NAME_KEY: typeof Ember.NAME_KEY;
class Namespace extends Ember.Namespace { }
class NativeArray extends Ember.NativeArray { }
class NoneLocation extends Ember.NoneLocation { }
var ORDER_DEFINITION: typeof Ember.ORDER_DEFINITION;
class Object extends Ember.Object { }
class ObjectController extends Ember.ObjectController { }
class ObjectProxy extends Ember.ObjectProxy { }
class Observable extends Ember.Observable { }
class OrderedSet extends Ember.OrderedSet { }
module RSVP {
class Promise extends Ember.RSVP.Promise { }
}
class RenderBuffer extends Ember.RenderBuffer { }
class Route extends Ember.Route { }
class Router extends Ember.Router { }
class RouterDSL extends Ember.RouterDSL { }
var SHIM_ES5: typeof Ember.SHIM_ES5;
var STRINGS: typeof Ember.STRINGS;
class Select extends Ember.Select { }
class SelectOption extends Ember.SelectOption { }
class Set extends Ember.Set { }
class SortableMixin extends Ember.SortableMixin { }
class State extends Ember.State { }
class StateManager extends Ember.StateManager { }
module String {
var camelize: typeof Ember.String.camelize;
var capitalize: typeof Ember.String.capitalize;
var classify: typeof Ember.String.classify;
var dasherize: typeof Ember.String.dasherize;
var decamelize: typeof Ember.String.decamelize;
var fmt: typeof Ember.String.fmt;
var htmlSafe: typeof Ember.String.htmlSafe;
var loc: typeof Ember.String.loc;
var underscore: typeof Ember.String.underscore;
var w: typeof Ember.String.w;
}
var TEMPLATES: typeof Ember.TEMPLATES;
class TargetActionSupport extends Ember.TargetActionSupport { }
class Test extends Ember.Test { }
class TextArea extends Ember.TextArea { }
class TextField extends Ember.TextField { }
class TextSupport extends Ember.TextSupport { }
var VERSION: typeof Ember.VERSION;
class View extends Ember.View { }
class ViewTargetActionSupport extends Ember.ViewTargetActionSupport { }
var ViewUtils: typeof Ember.ViewUtils;
var addBeforeObserver: typeof Ember.addBeforeObserver;
var addListener: typeof Ember.addListener;
var addObserver: typeof Ember.addObserver;
var alias: typeof Ember.alias;
var aliasMethod: typeof Ember.aliasMethod;
var anyUnprocessedMixins: typeof Ember.anyUnprocessedMixins;
var assert: typeof Ember.assert;
var beforeObserver: typeof Ember.beforeObserver;
var beforeObserversFor: typeof Ember.beforeObserversFor;
var beginPropertyChanges: typeof Ember.beginPropertyChanges;
var bind: typeof Ember.bind;
var cacheFor: typeof Ember.cacheFor;
var canInvoke: typeof Ember.canInvoke;
var changeProperties: typeof Ember.changeProperties;
var compare: typeof Ember.compare;
var computed: typeof Ember.computed;
var config: typeof Ember.config;
var controllerFor: typeof Ember.controllerFor;
var copy: typeof Ember.copy;
var create: typeof Ember.create;
var debug: typeof Ember.debug;
var defineProperty: typeof Ember.defineProperty;
var deprecate: typeof Ember.deprecate;
var deprecateFunc: typeof Ember.deprecateFunc;
var destroy: typeof Ember.destroy;
var empty: typeof Ember.deprecateFunc;
var endPropertyChanges: typeof Ember.endPropertyChanges;
var exports: typeof Ember.exports;
var finishChains: typeof Ember.finishChains;
var flushPendingChains: typeof Ember.flushPendingChains;
var generateController: typeof Ember.generateController;
var generateGuid: typeof Ember.generateGuid;
var get: typeof Ember.get;
var getMeta: typeof Ember.getMeta;
var getPath: typeof Ember.getPath;
var getWithDefault: typeof Ember.getWithDefault;
var guidFor: typeof Ember.guidFor;
var handleErrors: typeof Ember.handleErrors;
var hasListeners: typeof Ember.hasListeners;
var hasOwnProperty: typeof Ember.hasOwnProperty;
var immediateObserver: typeof Ember.immediateObserver;
var imports: typeof Ember.imports;
var inspect: typeof Ember.inspect;
var instrument: typeof Ember.instrument;
-1
View File
@@ -1 +0,0 @@
+2 -2
View File
@@ -54,12 +54,12 @@ declare module Promise {
* the array passed to all can be a mixture of promise-like objects and other objects.
* The fulfillment value is an array (in order) of fulfillment values. The rejection value is the first rejection value.
*/
function all<R>(promises: Promise<R>[]): Promise<R[]>;
function all<R>(promises: (R | Thenable<R>)[]): Promise<R[]>;
/**
* Make a Promise that fulfills when any item fulfills, and rejects if any item rejects.
*/
function race<R>(promises: Promise<R>[]): Promise<R>;
function race<R>(promises: (R | Thenable<R>)[]): Promise<R>;
}
declare module 'es6-promise' {
+5
View File
@@ -0,0 +1,5 @@
/// <reference path="escape-latex.d.ts" />
import lescape = require('escape-latex');
lescape("String to be escaped here #yolo");
+9
View File
@@ -0,0 +1,9 @@
// Type definitions for escape-latex 0.1.2
// Project: https://github.com/dangmai/escape-latex
// Definitions by: Oliver Schneider <https://github.com/olsio>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module 'escape-latex' {
function lescape(texString: string): string;
export = lescape;
}
+1 -1
View File
@@ -55,7 +55,7 @@ declare class EventEmitter2 {
* Removes the listener that will be fired when any event is emitted.
* @param listener
*/
offAny(listener: Function): EventEmitter2;
offAny(listener?: Function): EventEmitter2;
/**
* Adds a one time listener for the event.
+65
View File
@@ -0,0 +1,65 @@
///<reference path='eventemitter3.d.ts' />
'use strict';
import EventEmitter = require('eventemitter3');
class EventEmitterTest {
v: EventEmitter;
constructor() {
this.v = new EventEmitter();
this.v = new EventEmitter.EventEmitter();
this.v = new EventEmitter.EventEmitter2();
this.v = new EventEmitter.EventEmitter3();
}
listeners() {
var v1: Function[] = this.v.listeners('click');
}
emit() {
var v1: boolean = this.v.emit('click');
var v2: boolean = this.v.emit('click', 1);
var v3: boolean = this.v.emit('click', 1, '1');
var v4: boolean = this.v.emit('click', 1, '1', true);
var v5: boolean = this.v.emit('click', 1, '1', true, new Date());
}
on() {
var fn = () => console.log(1);
var v1: EventEmitter = this.v.on('click', fn);
var v2: EventEmitter = this.v.on('click', fn, this);
}
once() {
var fn = () => console.log(1);
var v1: EventEmitter = this.v.once('click', fn);
var v2: EventEmitter = this.v.once('click', fn, this);
}
removeListener() {
var fn = () => console.log(1);
var v1: EventEmitter = this.v.removeListener('click', fn);
var v2: EventEmitter = this.v.removeListener('click', fn, true);
}
removeAllListeners() {
var v1: EventEmitter = this.v.removeAllListeners('click');
}
off() {
var fn = () => console.log(1);
var v1: EventEmitter = this.v.off('click', fn);
var v2: EventEmitter = this.v.off('click', fn, true);
}
addListener() {
var fn = () => console.log(1);
var v1: EventEmitter = this.v.addListener('click', fn);
var v2: EventEmitter = this.v.addListener('click', fn, this);
}
setMaxListeners() {
var v1: EventEmitter = this.v.setMaxListeners();
}
}
+100
View File
@@ -0,0 +1,100 @@
// Type definitions for EventEmitter3 0.1.6
// Project: https://github.com/primus/eventemitter3
// Definitions by: Yuichi Murata <https://github.com/mrk21>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module EventEmitter3 {
export class EventEmitter {
/**
* Minimal EventEmitter interface that is molded against the Node.js
* EventEmitter interface.
*
* @constructor
* @api public
*/
constructor();
/**
* Return a list of assigned event listeners.
*
* @param {String} event The events that should be listed.
* @returns {Array}
* @api public
*/
listeners(event: string): Function[];
/**
* Emit an event to all registered event listeners.
*
* @param {String} event The name of the event.
* @returns {Boolean} Indication if we've emitted an event.
* @api public
*/
emit(event: string, ...args: any[]): boolean;
/**
* Register a new EventListener for the given event.
*
* @param {String} event Name of the event.
* @param {Functon} fn Callback function.
* @param {Mixed} context The context of the function.
* @api public
*/
on(event: string, fn: Function, context?: any): EventEmitter;
/**
* Add an EventListener that's only called once.
*
* @param {String} event Name of the event.
* @param {Function} fn Callback function.
* @param {Mixed} context The context of the function.
* @api public
*/
once(event: string, fn: Function, context?: any): EventEmitter;
/**
* Remove event listeners.
*
* @param {String} event The event we want to remove.
* @param {Function} fn The listener that we need to find.
* @param {Boolean} once Only remove once listeners.
* @api public
*/
removeListener(event: string, fn: Function, once?: boolean): EventEmitter;
/**
* Remove all listeners or only the listeners for the specified event.
*
* @param {String} event The event want to remove all listeners for.
* @api public
*/
removeAllListeners(event: string): EventEmitter;
//
// Alias methods names because people roll like that.
//
off(event: string, fn: Function, once?: boolean): EventEmitter;
addListener(event: string, fn: Function, context?: any): EventEmitter;
//
// This function doesn't apply anymore.
//
setMaxListeners(): EventEmitter;
}
export module EventEmitter {
//
// Expose the module.
//
export class EventEmitter extends EventEmitter3.EventEmitter {}
export class EventEmitter2 extends EventEmitter3.EventEmitter {}
export class EventEmitter3 extends EventEmitter3.EventEmitter {}
}
}
declare module 'eventemitter3' {
//
// Expose the module.
//
class EventEmitter extends EventEmitter3.EventEmitter {}
export = EventEmitter;
}
+123
View File
@@ -0,0 +1,123 @@
/// <reference path="expect.js.d.ts" />
import expect = require("expect.js");
function test_expect() {
expect();
expect(1);
expect(true);
expect({});
expect(0);
}
function test_expect_properties() {
expect(0).be.an;
expect(0).have.own;
expect(0).not.be.an;
expect(0).not.have.own;
expect(0).not.include;
expect(0).not.only.have.own;
expect(0).not.to.be;
expect(0).not.to.have.own;
expect(0).not.to.include;
expect(0).not.to.only.have.own;
expect(0).only.have.own;
expect(0).to.be.an;
expect(0).to.have.own;
expect(0).to.include;
expect(0).to.not.be.an;
expect(0).to.not.have.own;
expect(0).to.not.include;
expect(0).to.not.only.have.own;
expect(0).to.only.have.own;
expect(0).be;
}
function test_ok() {
expect(true).to.be.ok();
}
function test_be() {
expect(1).to.be(1);
}
function test_equal() {
expect(1).to.equal(1);
}
function test_eql() {
expect({ a: 'b' }).to.eql({ a: 'b' });
}
function test_a() {
// string
expect(5).to.be.a('number');
expect([]).to.be.an('array');
// constructors
expect(5).to.be.a(Number);
expect([]).to.be.an(Array);
}
function test_match() {
expect('1.2.3').to.match(/[0-9]+\.[0-9]+\.[0-9]+/);
}
function test_contain() {
// string
expect('hello world').to.contain('world');
expect('hello world').to.string('world');
// any
expect([1, 2]).to.contain(1);
expect([1, 2]).to.string(1);
}
function test_length() {
expect([1,2,3]).to.have.length(3);
}
function test_empty() {
expect([]).to.be.empty();
}
function test_property() {
expect(window).to.have.property('expect');
expect(window).to.have.property('expect', expect);
}
function test_key() {
expect({ a: 'b' }).to.have.key('a');
expect({ a: 'b' }).to.include.key('a');
expect({ a: 'b', c: 'd' }).to.only.have.keys('a', 'c');
expect({ a: 'b', c: 'd' }).to.only.have.keys(['a', 'c']);
expect({ a: 'b', c: 'd' }).to.not.only.have.key('a');
}
function test_throwException() {
var fn = () => {};
expect(fn).to.throwError();
expect(fn).to.throwException(function (e) {
expect(e).to.be.a(SyntaxError);
});
expect(fn).to.throwException(/matches the exception message/);
expect(fn).to.not.throwException();
}
function test_within() {
expect(1).to.be.within(0, Infinity);
}
function test_greaterThan() {
expect(5).to.be.greaterThan(3);
expect(3).to.be.above(0);
}
function test_lessThan() {
expect(1).to.be.lessThan(3);
expect(0).to.be.below(3);
}
function test_fail() {
expect().fail();
expect().fail('Custom failure message');
}
+2 -2
View File
@@ -28,7 +28,7 @@ function test_expect_properties() {
expect(0).to.not.include;
expect(0).to.not.only.have.own;
expect(0).to.only.have.own;
expect(0).be
expect(0).be;
}
function test_ok() {
@@ -118,4 +118,4 @@ function test_lessThan() {
function test_fail() {
expect().fail();
expect().fail('Custom failure message');
}
}

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