Merge pull request #2 from borisyankov/master

pulling upstream.
This commit is contained in:
Jason Swearingen
2015-04-03 14:10:25 -07:00
246 changed files with 23659 additions and 4776 deletions
+60 -9
View File
@@ -13,13 +13,14 @@ 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)
@@ -31,6 +32,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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,10 @@ 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)
@@ -53,11 +57,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](atpl/atpl.d.ts) [atpl](https://github.com/soywiz/atpl.js) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](auth0/auth0.d.ts) [Auth0.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
* [:link:](auth0.widget/auth0.widget.d.ts) [Auth0Widget.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
* [:link:](autobahn/autobahn.d.ts) [AutobahnJS](http://autobahn.ws/js) by [Elad Zelingher](https://github.com/darkl)
* [:link:](aws-sdk/aws-sdk.d.ts) [aws-sdk](https://github.com/aws/aws-sdk-js) by [midknight41](https://github.com/midknight41)
* [:link:](axios/axios.d.ts) [axios](https://github.com/mzabriskie/axios) by [Marcel Buesing](https://github.com/marcelbuesing)
* [:link:](node-azure/azure.d.ts) [Azure SDK for Node](https://github.com/WindowsAzure/azure-sdk-for-node) by [Andrew Gaspar](https://github.com/AndrewGaspar), [Anti Veeranna](https://github.com/antiveeranna), [Maxime LUCE](https://github.com/SomaticIT)
* [: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)
@@ -68,6 +75,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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,8 +84,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](bootstrap-notify/bootstrap-notify.d.ts) [bootstrap-notify](https://github.com/Nijikokun/bootstrap-notify) by [Blake Niemyjski](https://github.com/niemyjski)
* [:link:](bootstrap.datepicker/bootstrap.datepicker.d.ts) [bootstrap.datepicker](https://github.com/eternicode/bootstrap-datepicker) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](bootstrap.paginator/bootstrap.paginator.d.ts) [bootstrap.paginator](https://github.com/lyonlai/bootstrap-paginator) by [derikwhittaker](https://github.com/derikwhittaker)
* [:link:](bootstrap.timepicker/bootstrap.timepicker.d.ts) [bootstrap.timepicker](https://github.com/jdewit/bootstrap-timepicker) by [derikwhittaker](https://github.com/derikwhittaker)
* [:link:](box2d/box2dweb.d.ts) [bootstrap.timepicker](http://code.google.com/p/box2dweb) by [jbaldwin](https://github.com/jbaldwin)
* [:link:](bootstrap.timepicker/bootstrap.timepicker.d.ts) [bootstrap.timepicker](https://github.com/jdewit/bootstrap-timepicker) by [derikwhittaker](https://github.com/derikwhittaker)
* [:link:](breeze/breeze.d.ts) [Breeze 1.5.x](http://www.breezejs.com) by [Boris Yankov](https://github.com/borisyankov), [IdeaBlade](https://github.com/IdeaBlade/Breeze)
* [:link:](browser-harness/browser-harness.d.ts) [Browser Harness](https://github.com/scriby/browser-harness) by [Chris Scribner](https://github.com/scriby)
* [:link:](browser-sync/browser-sync.d.ts) [browser-sync](http://www.browsersync.io) by [Asana](https://asana.com)
@@ -130,13 +138,16 @@ 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)
@@ -195,12 +206,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)
@@ -224,7 +237,11 @@ 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:](ftp/ftp.d.ts) [ftp](https://github.com/mscdex/node-ftp) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](ftpd/ftpd.d.ts) [ftpd](https://github.com/sstur/nodeftpd) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](fullCalendar/fullCalendar.d.ts) [FullCalendar](http://arshaw.com/fullcalendar) by [Neil Stalker](https://github.com/nestalk)
* [:link:](fuse/fuse.d.ts) [Fuse.js](https://github.com/krisk/Fuse) by [Greg Smith](https://github.com/smrq)
* [:link:](jquery-galleria/jquery-galleria.d.ts) [galleria.js](https://github.com/aino/galleria) by [Robert Imig](https://github.com/rimig)
@@ -257,8 +274,8 @@ 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/Ease.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gsap/Core.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gsap/Ease.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gsap/TweenLite.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gulp/gulp.d.ts) [Gulp v3.8.x](http://gulpjs.com) by [Drew Noakes](https://drewnoakes.com)
* [:link:](gulp-autoprefixer/gulp-autoprefixer.d.ts) [gulp-autoprefixer](https://github.com/sindresorhus/gulp-autoprefixer) by [Asana](https://asana.com)
@@ -282,7 +299,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -295,6 +313,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)
@@ -305,6 +324,7 @@ 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)
@@ -329,6 +349,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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), [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)
@@ -419,16 +440,19 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
* [:link:](keypress/keypress.d.ts) [Keypress](https://github.com/dmauro/Keypress) by [Roger Chen](https://github.com/rcchen)
* [:link:](kineticjs/kineticjs.d.ts) [KineticJS](http://kineticjs.com) by [Basarat Ali Syed](http://www.github.com/basarat), [Ralph de Ruijter](http://www.superdopey.nl/techblog)
* [:link:](knex/knex.d.ts) [Knex.js](https://github.com/tgriesser/knex) by [Qubo](https://github.com/tkQubo)
* [:link:](knockback/knockback.d.ts) [Knockback.js](http://kmalakoff.github.io/knockback) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](knockout/knockout.d.ts) [Knockout](http://knockoutjs.com) by [Boris Yankov](https://github.com/borisyankov), [Igor Oleinikov](https://github.com/Igorbek), [Clément Bourgeois](https://github.com/moonpyk)
* [:link:](knockout.deferred.updates/knockout.deferred.updates.d.ts) [Knockout Deferred Updates](https://github.com/mbest/knockout-deferred-updates) by [Sebastián Galiano](https://github.com/sgaliano)
@@ -468,7 +492,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](log4javascript/log4javascript.d.ts) [log4javascript](http://log4javascript.org) by [Markus Wagner](https://github.com/Ritzlgrmft)
* [:link:](log4js/log4js.d.ts) [log4js](https://github.com/nomiddlename/log4js-node) by [Kentaro Okuno](http://github.com/armorik83)
* [:link:](logg/logg.d.ts) [logg](https://github.com/dpup/node-logg) by [Bret Little](https://github.com/blittle)
* [:link:](loggly/loggly.d.ts) [loggly](https://github.com/nodejitsu/node-loggly) by [Ray Martone](https://github.com/rmartone)
* [:link:](logrotate-stream/logrotate-stream.d.ts) [logrotate-stream](https://github.com/dstokes/logrotate-stream) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](lolex/lolex.d.ts) [lolex](https://github.com/sinonjs/lolex) by [Wim Looman](https://github.com/Nemo157)
* [:link:](long/long.d.ts) [Long.js](https://github.com/dcodeIO/Long.js) by [Toshihide Hara](https://github.com/kerug)
* [: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)
@@ -477,6 +503,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -510,6 +537,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)
@@ -526,6 +554,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)
@@ -561,6 +590,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)
@@ -568,12 +600,15 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](nodeunit/nodeunit.d.ts) [nodeunit](https://github.com/caolan/nodeunit) by [Jeff Goddard](https://github.com/jedigo)
* [:link:](nomnom/nomnom.d.ts) [nomnom](https://github.com/harthur/nomnom) by [Paul Vick](https://github.com/panopticoncentral)
* [:link:](nopt/nopt.d.ts) [nopt](https://github.com/npm/nopt) by [jbondc](https://github.com/jbondc)
* [:link:](notify/notify.d.ts) [Notify.js](https://github.com/jpillora/notifyjs) by [Xiaohan Zhang](https://github.com/hellochar)
* [:link:](notifyjs/notifyjs.d.ts) [notify.js](https://github.com/alexgibson/notify.js) by [soundTricker](https://github.com/soundTricker)
* [:link:](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)
@@ -588,7 +623,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)
@@ -605,8 +642,12 @@ 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)
@@ -627,12 +668,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)
@@ -641,6 +685,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)
@@ -665,6 +710,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)
@@ -676,6 +722,8 @@ 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)
@@ -710,6 +758,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](sprintf/sprintf.d.ts) [sprintff](https://github.com/maritz/node-sprintff) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](sharepoint/SharePoint.d.ts) [sptypescript](http://sptypescript.codeplex.com) by [Stanislav Vyshchepan](http://gandjustas.blogspot.ru), [Andrey Markeev](http://markeev.com)
* [:link:](sqlite3/sqlite3.d.ts) [sqlite3](https://github.com/mapbox/node-sqlite3) by [Nick Malaguti](https://github.com/nmalaguti)
* [:link:](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)
@@ -774,6 +823,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](type-detect/type-detect.d.ts) [type-detect](https://github.com/chaijs/type-detect) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](typeahead/typeahead.d.ts) [typeahead.js](http://twitter.github.io/typeahead.js) by [Ivaylo Gochkov](https://github.com/igochkov), [Gidon Junge](https://github.com/gjunge)
* [:link:](typescript/typescript.d.ts) [TypeScript API](http://www.typescriptlang.org) by [Microsoft TypeScript](http://typescriptlang.org)
* [:link:](typescript-deferred/typescript-deferred.d.ts) [typescript-deferred](https://github.com/DirtyHairy/typescript-deferred) by [Christian Speckner](https://github.com/DirtyHairy)
* [:link:](typescript-services/typescriptServices.d.ts) [TypeScript-Services](https://www.npmjs.org/package/typescript-services) by [Basarat Ali Syed](http://github.com/basarat)
* [:link:](unity-webapi/unity-webapi.d.ts) [Ubuntu Unity Web API](https://launchpad.net/libunity-webapps) by [John Vrbanac](jhttps://github.com/jmvrbanac)
* [:link:](underscore/underscore.d.ts) [Underscore](http://underscorejs.org) by [Boris Yankov](https://github.com/borisyankov), [Josh Baldwin](https://github.com/jbaldwin)
@@ -804,6 +854,7 @@ 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)
-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 {
+1 -1
View File
@@ -5,7 +5,7 @@
/// <reference path="../angularjs/angular.d.ts" />
declare module ng.hotkeys {
declare module angular.hotkeys {
interface HotkeysProvider {
template: string;
+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;
+2 -2
View File
@@ -5,7 +5,7 @@
/// <reference path="../angularjs/angular.d.ts" />
declare module ng.idle {
declare module angular.idle {
/**
* Used to configure the $keepalive service.
@@ -131,4 +131,4 @@ declare module ng.idle {
*/
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;
+6 -6
View File
@@ -5,7 +5,7 @@
/// <reference path="../angularjs/angular.d.ts" />
declare module ng.ui.bootstrap {
declare module angular.ui.bootstrap {
interface IAccordionConfig {
/**
@@ -190,15 +190,15 @@ declare module ng.ui.bootstrap {
/**
* a promise that is resolved when a modal is closed and rejected when a modal is dismissed
*/
result: ng.IPromise<any>;
result: angular.IPromise<any>;
/**
* a promise that is resolved when a modal gets opened after downloading content's template and resolving all variables
*/
opened: ng.IPromise<any>;
opened: angular.IPromise<any>;
}
interface IModalScope extends ng.IScope {
interface IModalScope extends angular.IScope {
/**
* Those methods make it easy to close a modal window without a need to create a dedicated controller
*/
@@ -623,11 +623,11 @@ declare module ng.ui.bootstrap {
*
* @return A promise that is resolved when the transition finishes.
*/
(element: ng.IAugmentedJQuery, trigger: any, options?: ITransitionServiceOptions): ng.IPromise<ng.IAugmentedJQuery>;
(element: angular.IAugmentedJQuery, trigger: any, options?: ITransitionServiceOptions): angular.IPromise<angular.IAugmentedJQuery>;
}
interface ITransitionServiceOptions {
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;
}
}
@@ -5,7 +5,7 @@
/// <reference path="../angularjs/angular.d.ts" />
declare module ng.ui {
declare module angular.ui {
interface UISortableOptions<T> extends SortableOptions<T> {
'ui-floating'?: string|boolean;
-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;
+27 -8
View File
@@ -5,11 +5,15 @@
/// <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
@@ -27,14 +31,15 @@ declare module ng.animate {
/**
* 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): ng.IPromise<void>;
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.
@@ -42,17 +47,19 @@ declare module ng.animate {
* @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
@@ -72,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
@@ -82,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
@@ -93,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.
@@ -124,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 {
+38 -18
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 {
@@ -450,9 +452,9 @@ declare module ng {
$invalid: boolean;
$submitted: boolean;
$error: any;
$addControl(control: ng.INgModelController): void;
$removeControl(control: ng.INgModelController): void;
$setValidity(validationErrorKey: string, isValid: boolean, control: ng.INgModelController): void;
$addControl(control: INgModelController): void;
$removeControl(control: INgModelController): void;
$setValidity(validationErrorKey: string, isValid: boolean, control: INgModelController): void;
$setDirty(): void;
$setPristine(): void;
$commitViewValue(): void;
@@ -507,7 +509,7 @@ declare module ng {
}
interface IAsyncModelValidators {
[index: string]: (...args: any[]) => ng.IPromise<boolean>;
[index: string]: (...args: any[]) => IPromise<boolean>;
}
interface IModelParser {
@@ -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;
}
///////////////////////////////////////////////////////////////////////////
@@ -928,11 +931,19 @@ declare module ng {
/**
* Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
*
* Returns a single promise that will be resolved with an array/hash of values, each value corresponding to the promise at the same index/key in the promises array/hash. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
* Returns a single promise that will be resolved with an array of values, each value corresponding to the promise at the same index in the promises array. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
*
* @param promises An array or hash of promises.
* @param promises An array of promises.
*/
all(promises: IPromise<any>[]|{ [id: string]: IPromise<any>; }): IPromise<any[]>;
all(promises: IPromise<any>[]): IPromise<any[]>;
/**
* Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
*
* Returns a single promise that will be resolved with a hash of values, each value corresponding to the promise at the same key in the promises hash. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
*
* @param promises A hash of promises.
*/
all(promises: { [id: string]: IPromise<any>; }): IPromise<{ [id: string]: any; }>;
/**
* Creates a Deferred object which represents a task which will finish in the future.
*/
@@ -1152,6 +1163,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.
*/
@@ -1561,12 +1581,12 @@ declare module ng {
* $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.
*/
decorator(name: string, inlineAnnotatedFunction: any[]): void;
factory(name: string, serviceFactoryFunction: Function): ng.IServiceProvider;
factory(name: string, inlineAnnotatedFunction: any[]): ng.IServiceProvider;
provider(name: string, provider: ng.IServiceProvider): ng.IServiceProvider;
provider(name: string, serviceProviderConstructor: Function): ng.IServiceProvider;
service(name: string, constructor: Function): ng.IServiceProvider;
value(name: string, value: any): ng.IServiceProvider;
factory(name: string, serviceFactoryFunction: Function): IServiceProvider;
factory(name: string, inlineAnnotatedFunction: any[]): IServiceProvider;
provider(name: string, provider: IServiceProvider): IServiceProvider;
provider(name: string, serviceProviderConstructor: Function): IServiceProvider;
service(name: string, constructor: Function): IServiceProvider;
value(name: string, value: any): IServiceProvider;
}
}
@@ -1 +0,0 @@
--noImplicitAny --module amd
-1
View File
@@ -1 +0,0 @@
--noImplicitAny
+13
View File
@@ -0,0 +1,13 @@
/// <reference path="../auth0/auth0.d.ts" />
/// <reference path="auth0.lock.d.ts" />
var lock: Auth0LockStatic = new Auth0Lock("dsa7d77dsa7d7", "mine.auth0.com");
lock.showSignin({
connections: ["facebook", "google-oauth2", "twitter", "Username-Password-Authentication"],
icon: "https://contoso.com/logo-32.png",
socialBigButtons: true
},
() => {
// The Auth0 Widget is now loaded.
});
+80
View File
@@ -0,0 +1,80 @@
// Type definitions for Auth0Widget.js
// Project: http://auth0.com
// Definitions by: Robert McLaws <https://github.com/advancedrei>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../auth0/auth0.d.ts" />
interface Auth0LockPopupOptions {
width: number;
height: number;
left: number;
top: number;
}
interface Auth0LockOptions {
authParams?: any;
callbackURL?: string;
connections?: string[];
container?: string;
closable?: boolean;
dict?: any;
defaultUserPasswordConnection?: string;
defaultADUsernameFromEmailPrefix?: boolean;
disableResetAction?: boolean;
disableSignupAction?: boolean;
focusInput?: boolean;
forceJSONP?: boolean;
gravatar?: boolean;
integratedWindowsLogin?: boolean;
loginAfterSignup?: boolean;
popup?: boolean;
popupOptions?: Auth0LockPopupOptions;
rememberLastLogin?: boolean;
resetLink?: string;
responseType?: string;
signupLink?: string;
socialBigButtons?: boolean;
sso?: boolean;
theme?: string;
usernameStyle?: any;
}
interface Auth0LockConstructorOptions {
cdn?: string;
assetsUrl?: string;
useCordovaSocialPlugins?: boolean;
}
interface Auth0LockStatic {
new (clientId: string, domain: string, options?: Auth0LockConstructorOptions): Auth0LockStatic;
show(): void;
show(options: Auth0LockOptions): void;
show(callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void) : void;
show(options: Auth0LockOptions, callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void) : void;
showSignin(): void;
showSignin(options: Auth0LockOptions): void;
showSignin(callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void) : void;
showSignin(options: Auth0LockOptions, callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void) : void;
showSignup(): void;
showSignup(options: Auth0LockOptions): void;
showSignup(callback: (error?: Auth0Error) => void) : void;
showSignup(options: Auth0LockOptions, callback: (error?: Auth0Error) => void) : void;
showReset(): void;
showReset(options: Auth0LockOptions): void;
showReset(callback: (error?: Auth0Error) => void) : void;
showReset(options: Auth0LockOptions, callback: (error?: Auth0Error) => void) : void;
hide(callback: () => void): void;
logout(callback: () => void): void;
}
declare var Auth0Lock: Auth0LockStatic;
declare module "Auth0Lock" {
export = Auth0Lock;
}
+47
View File
@@ -0,0 +1,47 @@
/// <reference path="autobahn.d.ts"/>
class MyClass {
add2Count: number = 0;
session: autobahn.Session;
constructor(session: autobahn.Session) {
this.session = session;
}
add2(args: Array<number>): number {
this.add2Count++;
return args[0] + args[1];
}
onEvent(args: Array<any>): void {
console.log("Event:", args[0]);
}
}
function test_client() {
var options: autobahn.IConnectionOptions =
{ url: 'ws://127.0.0.1:8080/ws', realm: 'realm1' };
var connection = new autobahn.Connection(options);
connection.onopen = session => {
var myInstance = new MyClass(session);
// 1) subscribe to a topic
session.subscribe('com.myapp.hello', myInstance.onEvent);
// 2) publish an event
session.publish('com.myapp.hello', ['Hello, world!']);
// 3) register a procedure for remoting
session.register('com.myapp.add2', myInstance.add2);
// 4) call a remote procedure
session.call<number>('com.myapp.add2', [2, 3]).then(
res => {
console.log("Result:", res);
});
};
connection.open();
}
+195
View File
@@ -0,0 +1,195 @@
// Type definitions for AutobahnJS v0.9.6
// Project: http://autobahn.ws/js/
// Definitions by: Elad Zelingher <https://github.com/darkl/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../when/when.d.ts" />
declare module autobahn {
export class Session {
id: number;
realm: string;
isOpen: boolean;
features: any;
caller_disclose_me: boolean;
publisher_disclose_me: boolean;
subscriptions: ISubscription[][];
registrations: IRegistration[];
constructor(transport: ITransport, defer: DeferFactory, challenge: OnChallengeHandler);
join(realm: string, authmethods: string[], authid: string): void;
leave(reason: string, message: string): void;
call<TResult>(procedure: string, args?: any[], kwargs?: any, options?: ICallOptions): When.Promise<TResult>;
publish(topic: string, args?: any[], kwargs?: any, options?: IPublishOptions): When.Promise<IPublication>;
subscribe(topic: string, handler: SubscribeHandler, options?: ISubscribeOptions): When.Promise<ISubscription>;
register(procedure: string, endpoint: RegisterEndpoint, options?: IRegisterOptions): When.Promise<IRegistration>;
unsubscribe(subscription: ISubscription): When.Promise<any>;
unregister(registration: IRegistration): When.Promise<any>;
prefix(prefix: string, uri: string): void;
resolve(curie: string): string;
onjoin: (roleFeatures: any) => void;
onleave: (reason: string, details: any) => void;
}
interface IInvocation {
caller?: number;
progress?: boolean;
procedure: string;
}
interface IEvent {
publication: number;
publisher?: number;
topic: string;
}
interface IResult {
args: any[];
kwargs: any;
}
interface IError {
error: string;
args: any[];
kwargs: any;
}
type SubscribeHandler = (args?: any[], kwargs?: any, details?: IEvent) => void;
interface ISubscription {
topic: string;
handler: SubscribeHandler;
options: ISubscribeOptions;
session: Session;
id: number;
active: boolean;
unsubscribe(): When.Promise<any>;
}
type RegisterEndpoint = (args?: any[], kwargs?: any, details?: IInvocation) => void;
interface IRegistration {
procedure: string;
endpoint: RegisterEndpoint;
options: IRegisterOptions;
session: Session;
id: number;
active: boolean;
unregister(): When.Promise<any>;
}
interface IPublication {
id: number;
}
interface ICallOptions {
timeout?: number;
receive_progress?: boolean;
disclose_me?: boolean;
}
interface IPublishOptions {
exclude?: number[];
eligible?: number[];
disclose_me? : Boolean;
}
interface ISubscribeOptions {
match? : string;
}
interface IRegisterOptions {
disclose_caller?: boolean;
}
export class Connection {
constructor(options?: IConnectionOptions);
open(): void;
close(reason: string, message: string): void;
onopen: (session: Session, details: any) => void;
onclose: (reason: string, details: any) => boolean;
}
interface ITransportDefinition {
url?: string;
protocols?: string[];
type: string;
}
type DeferFactory = () => any;
type OnChallengeHandler = (session: Session, method: string, extra: any) => When.Promise<string>;
interface IConnectionOptions {
use_es6_promises?: boolean;
// use explicit deferred factory, e.g. jQuery.Deferred or Q.defer
use_deferred?: DeferFactory;
transports?: ITransportDefinition[];
retry_if_unreachable?: boolean;
max_retries?: number;
initial_retry_delay?: number;
max_retry_delay?: number;
retry_delay_growth?: number;
retry_delay_jitter?: number;
url?: string;
protocols?: string[];
onchallenge?: (session: Session, method: string, extra: any) => OnChallengeHandler;
realm?: string;
authmethods?: string[];
authid?: string;
}
interface ICloseEventDetails {
wasClean: boolean;
reason: string;
code: number;
}
interface ITransport {
onopen: () => void;
onmessage: (message: any[]) => void;
onclose: (details: ICloseEventDetails) => void;
send(message: any[]): void;
close(errorCode: number, reason?: string): void;
}
interface ITransportFactory {
//constructor(options: any);
type: string;
create(): ITransport;
}
interface ITransports {
register(name: string, factory: any): void;
isRegistered(name: string): boolean;
get(name: string): any;
list(): any[];
}
interface ILog {
debug(...args: any[]): void;
}
interface IUtil {
assert(condition: boolean, message: string): void;
}
var util: IUtil;
var log: ILog;
var transports: ITransports;
}
+18
View File
@@ -0,0 +1,18 @@
/// <reference path="axios.d.ts" />
enum HttpMethod { GET, PUT, POST, DELETE, CONNECT, HEAD, OPTIONS, TRACE, PATCH }
enum ResponseType { arraybuffer, blob, document, json, text }
interface Repository {
id: number;
name: string;
}
axios.get<Repository>("https://api.github.com/repos/mzabriskie/axios")
.then(r => console.log(r.config.method));
axios<Repository>({
url: "https://api.github.com/repos/mzabriskie/axios",
method: HttpMethod[HttpMethod.GET],
headers: {},
}).then(r => console.log("ID:" + r.data.id + " Name: " + r.data.name));
+162
View File
@@ -0,0 +1,162 @@
// 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 {
/**
* <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?: string;
/**
* 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, options are:
* GET, PUT, POST, DELETE, CONNECT, HEAD, OPTIONS, TRACE, PATCH
*/
url: string;
/**
* request method to be used when making the request
*/
method?: string;
/**
* 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> {
/**
* 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<T>;
}
/**
* <T> - expected response type,
* <U> - request body data type
*/
interface AxiosStatic {
<T>(config: AxiosXHRConfig<T>): Promise<AxiosXHR<T>>;
new <T>(config: AxiosXHRConfig<T>): Promise<AxiosXHR<T>>;
/**
* convenience alias, method = GET
*/
get<T>(url: string, config?: AxiosXHRConfigBase<T>): Promise<AxiosXHR<T>>;
/**
* convenience alias, method = DELETE
*/
delete<T>(url: string, config?: AxiosXHRConfigBase<T>): Promise<AxiosXHR<T>>;
/**
* convenience alias, method = HEAD
*/
head<T>(url: string, config?: AxiosXHRConfigBase<T>): Promise<AxiosXHR<T>>;
/**
* convenience alias, method = POST
*/
post<T>(url: string, data?: any, config?: AxiosXHRConfigBase<T>): Promise<AxiosXHR<T>>;
/**
* convenience alias, method = PUT
*/
put<T>(url: string, data?: any, config?: AxiosXHRConfigBase<T>): Promise<AxiosXHR<T>>;
/**
* convenience alias, method = PATCH
*/
patch<T>(url: string, data?: any, config?: AxiosXHRConfigBase<T>): Promise<AxiosXHR<T>>;
}
}
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
+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" {
+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;
+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 {
+2 -2
View File
@@ -2251,7 +2251,7 @@ declare module chrome.webRequest {
}
interface UploadData {
bytes?: any[];
bytes?: ArrayBuffer;
file?: string;
}
@@ -2329,7 +2329,7 @@ declare module chrome.webRequest {
}
interface RequestBody {
raw?: UploadData;
raw?: UploadData[];
error?: string;
formData?: FormData;
}
+87
View File
@@ -919,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>
}
+1 -5
View File
@@ -5,10 +5,6 @@
/// <reference path="./plugins/keyboard.d.ts" />
interface Cordova {
plugins:Plugins;
}
interface Plugins {
interface CordovaPlugins {
Keyboard:Ionic.Keyboard;
}
@@ -0,0 +1,19 @@
/// <reference path="../cordova/cordova.d.ts" />
/// <reference path="./cordova-plugin-email-composer.d.ts" />
cordova.plugins.email.isAvailable((isAvailable) => {}, {});
cordova.plugins.email.open({
to: ['foo@bar.com'],
body: 'foo bar'
});
cordova.plugins.email.open();
cordova.plugins.email.open({}, () => {});
cordova.plugins.email.open({}, () => {}, {});
cordova.plugins.email.openDraft({
to: ['foo@bar.com'],
body: 'foo bar'
});
cordova.plugins.email.openDraft();
cordova.plugins.email.openDraft({}, () => {});
cordova.plugins.email.openDraft({}, () => {}, {});
@@ -0,0 +1,33 @@
// Type definitions for Apache Cordova Email Composer plugin
// Project: https://github.com/katzer/cordova-plugin-email-composer
// Definitions by: Dave Taylor <http://davetayls.me>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/**
* The plugin provides access to the standard interface that manages the
* editing and sending an email message
*/
interface CordovaPluginEmailComposer {
/** Determine if the device is capable to send emails */
isAvailable(callback:(isAvailable:boolean) => void, scope?:any):void;
/** Open a pre-filled email draft */
open(options?:ICordovaPluginEmailComposerOpenOptions, callback?:() => void, scope?:any):void;
openDraft(options?:ICordovaPluginEmailComposerOpenOptions, callback?:() => void, scope?:any):void;
}
interface ICordovaPluginEmailComposerOpenOptions {
/** An configured email account is required to send emails */
to?:string[];
body?:string;
cc?:string[];
bcc?:string[];
/** Attachments can be either base64 encoded datas, files from the the device storage or assets from within the www folder */
attachments?:any[];
subject?:string;
/** The default value for isHTML is true */
isHtml?:boolean;
}
interface CordovaPlugins {
email:CordovaPluginEmailComposer;
}
+4
View File
@@ -43,8 +43,12 @@ interface Cordova {
define(moduleName: string, factory: (require: any, exports: any, module: any) => any): void;
/** Access a Cordova module by name. */
require(moduleName: string): any;
/** Namespace for Cordova plugin functionality */
plugins:CordovaPlugins;
}
interface CordovaPlugins {}
interface Document {
addEventListener(type: "deviceready", listener: (ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
+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;
}
+34 -3
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;
@@ -445,7 +476,7 @@ function callenderView() {
.style("text-anchor", "middle")
.text(function (d) { return d; });
var rect = svg.selectAll(".day")
var rect: D3.UpdateSelection = svg.selectAll(".day")
.data(function (d) { return d3.time.days(new Date(d, 0, 1), new Date(d + 1, 0, 1)); })
.enter().append("rect")
.attr("class", "day")
@@ -929,7 +960,7 @@ function forcedBasedLabelPlacemant() {
var anchorLink = vis.selectAll("line.anchorLink").data(labelAnchorLinks)//.enter().append("svg:line").attr("class", "anchorLink").style("stroke", "#999");
var anchorNode = vis.selectAll("g.anchorNode").data(force2.nodes()).enter().append("svg:g").attr("class", "anchorNode");
var anchorNode: D3.Selection = vis.selectAll("g.anchorNode").data(force2.nodes()).enter().append("svg:g").attr("class", "anchorNode");
anchorNode.append("svg:circle").attr("r", 0).style("fill", "#FFF");
anchorNode.append("svg:text").text(function (d, i) {
return i % 2 == 0 ? "" : d.node.label
@@ -1373,7 +1404,7 @@ function quadtree() {
.attr("width", function (d) { return d.width; } )
.attr("height", function (d) { return d.height; } );
var point = svg.selectAll(".point")
var point: D3.Selection = svg.selectAll(".point")
.data(data)
.enter().append("circle")
.attr("class", "point")
Vendored
+140 -80
View File
@@ -12,19 +12,19 @@ declare module D3 {
/**
* Returns the empty selection
*/
(): Selection;
(): _Selection<any>;
/**
* Selects the first element that matches the specified selector string
*
* @param selector Selection String to match
*/
(selector: string): Selection;
(selector: string): _Selection<any>;
/**
* Selects the specified node
*
* @param element Node element to select
*/
(element: EventTarget): Selection;
(element: EventTarget): _Selection<any>;
};
/**
@@ -36,13 +36,13 @@ declare module D3 {
*
* @param selector Selection String to match
*/
(selector: string): Selection;
(selector: string): _Selection<any>;
/**
* Selects the specified array of elements
*
* @param elements Array of node elements to select
*/
(elements: EventTarget[]): Selection;
(elements: EventTarget[]): _Selection<any>;
};
}
@@ -458,7 +458,7 @@ declare module D3 {
/**
* Returns the root selection
*/
selection(): Selection;
selection(): _Selection<any>;
ns: {
/**
* The map of registered namespace prefixes
@@ -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;
@@ -719,74 +726,94 @@ declare module D3 {
format(rows: any[]): string;
}
export interface Selection extends Selectors, Array<any> {
export interface _Selection<T> extends Selectors, Array<any> {
attr: {
(name: string): string;
(name: string, value: any): Selection;
(name: string, valueFunction: (data: any, index: number) => any): Selection;
(attrValueMap : Object): Selection;
(name: string, value: any): _Selection<T>;
(name: string, valueFunction: (data: T, index: number) => any): _Selection<T>;
(attrValueMap: Object): _Selection<T>;
};
classed: {
(name: string): boolean;
(name: string, value: any): Selection;
(name: string, valueFunction: (data: any, index: number) => any): Selection;
(classValueMap: Object): Selection;
(name: string, value: any): _Selection<T>;
(name: string, valueFunction: (data: T, index: number) => any): _Selection<T>;
(classValueMap: Object): _Selection<T>;
};
style: {
(name: string): string;
(name: string, value: any, priority?: string): Selection;
(name: string, valueFunction: (data: any, index: number) => any, priority?: string): Selection;
(styleValueMap : Object): Selection;
(name: string, value: any, priority?: string): _Selection<T>;
(name: string, valueFunction: (data: T, index: number) => any, priority?: string): _Selection<T>;
(styleValueMap: Object): _Selection<T>;
};
property: {
(name: string): void;
(name: string, value: any): Selection;
(name: string, valueFunction: (data: any, index: number) => any): Selection;
(propertyValueMap : Object): Selection;
(name: string, value: any): _Selection<T>;
(name: string, valueFunction: (data: T, index: number) => any): _Selection<T>;
(propertyValueMap: Object): _Selection<T>;
};
text: {
(): string;
(value: any): Selection;
(valueFunction: (data: any, index: number) => any): Selection;
(value: any): _Selection<T>;
(valueFunction: (data: T, index: number) => any): _Selection<T>;
};
html: {
(): string;
(value: any): Selection;
(valueFunction: (data: any, index: number) => any): Selection;
(value: any): _Selection<T>;
(valueFunction: (data: T, index: number) => any): _Selection<T>;
};
append: (name: string) => Selection;
insert: (name: string, before: string) => Selection;
remove: () => Selection;
append: (name: string) => _Selection<T>;
insert: (name: string, before: string) => _Selection<T>;
remove: () => _Selection<T>;
empty: () => boolean;
data: {
(values: (data: any, index?: number) => any[], key?: (data: any, index?: number) => any): UpdateSelection;
(values: any[], key?: (data: any, index?: number) => any): UpdateSelection;
(): any[];
<U>(values: (data: T, index?: number) => U[], key?: (data: U, index?: number) => any): _UpdateSelection<U>;
<U>(values: U[], key?: (data: U, index?: number) => any): _UpdateSelection<U>;
(): T[];
};
datum: {
(values: (data: any, index: number) => any): UpdateSelection;
(values: any): UpdateSelection;
() : any;
/**
* 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.
*/
<U>(values: (data: U, index: number) => any): _UpdateSelection<U>;
/**
* 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.
*/
<U>(values: U): _UpdateSelection<U>;
/**
* 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;
};
filter: {
(filter: (data: any, index: number) => boolean, thisArg?: any): UpdateSelection;
(filter: string): UpdateSelection;
(filter: (data: T, index: number) => boolean, thisArg?: any): _UpdateSelection<T>;
(filter: string): _UpdateSelection<T>;
};
call(callback: (selection: Selection, ...args: any[]) => void, ...args: any[]): Selection;
each(eachFunction: (data: any, index: number) => any): Selection;
call(callback: (selection: _Selection<T>, ...args: any[]) => void, ...args: any[]): _Selection<T>;
each(eachFunction: (data: T, index: number) => any): _Selection<T>;
on: {
(type: string): (data: any, index: number) => any;
(type: string, listener: (data: any, index: number) => any, capture?: boolean): Selection;
(type: string, listener: (data: any, index: number) => any, capture?: boolean): _Selection<T>;
};
/**
@@ -808,38 +835,44 @@ declare module D3 {
* to compare, and should return either a negative, positive, or zero value to indicate
* their relative order.
*/
sort<T>(comparator?: (a: T, b: T) => number): Selection;
sort(comparator?: (a: T, b: T) => number): _Selection<T>;
/**
* Re-inserts elements into the document such that the document order matches the selection
* order. This is equivalent to calling sort() if the data is already sorted, but much
* faster.
*/
order: () => Selection;
order: () => _Selection<T>;
/**
* Returns the first non-null element in the current selection. If the selection is empty,
* returns null.
*/
node: <T extends Element>() => T;
node: <E extends Element>() => E;
}
export interface EnterSelection {
append: (name: string) => Selection;
insert: (name: string, before?: string) => Selection;
select: (selector: string) => Selection;
export interface Selection extends _Selection<any> { }
export interface _EnterSelection<T> {
append: (name: string) => _Selection<T>;
insert: (name: string, before?: string) => _Selection<T>;
select: (selector: string) => _Selection<T>;
empty: () => boolean;
node: () => Element;
call: (callback: (selection: EnterSelection) => void) => EnterSelection;
call: (callback: (selection: _EnterSelection<T>) => void) => _EnterSelection<T>;
size: () => number;
}
export interface UpdateSelection extends Selection {
enter: () => EnterSelection;
update: () => Selection;
exit: () => Selection;
export interface EnterSelection extends _EnterSelection<any> { }
export interface _UpdateSelection<T> extends _Selection<T> {
enter: () => _EnterSelection<T>;
update: () => _Selection<T>;
exit: () => _Selection<T>;
}
export interface UpdateSelection extends _UpdateSelection<any> { }
export interface NestKeyValue {
key: string;
values: any;
@@ -963,7 +996,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;
@@ -1225,6 +1280,13 @@ declare module D3 {
(angle: (d : any) => number): PieLayout
(angle: (d : any, i: number) => number): PieLayout;
};
padAngle: {
(): number;
(angle: number): PieLayout;
(angle: () => number): PieLayout;
(angle: (d : any) => number): PieLayout
(angle: (d : any, i: number) => number): PieLayout;
};
}
export interface ArcDescriptor {
@@ -1236,24 +1298,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 {
@@ -1279,10 +1341,8 @@ declare module D3 {
export interface ForceLayout {
(): ForceLayout;
size: {
(): number;
(): number[];
(mysize: number[]): ForceLayout;
(accessor: (d: any, index: number) => {}): ForceLayout;
};
linkDistance: {
(): number;
@@ -1675,14 +1735,14 @@ declare module D3 {
export interface Symbol {
type: (symbolType: string | ((datum: any, index: number) => string)) => Symbol;
size: (size: number | ((datum: any, index: number) => number)) => Symbol;
(datum:any, index:number): string;
(datum?: any, index?: number): string;
}
export interface Brush {
/**
* Draws or redraws this brush into the specified selection of elements
*/
(selection: Selection): void;
(selection: _Selection<any>): void;
/**
* Gets or sets the x-scale associated with the brush
*/
@@ -1750,7 +1810,7 @@ declare module D3 {
}
export interface Axis {
(selection: Selection): void;
(selection: _Selection<any>): void;
(transition: Transition.Transition): void;
scale: {
@@ -1790,7 +1850,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;
}
@@ -2723,7 +2783,7 @@ declare module D3 {
* registering the necessary event listeners to support
* panning and zooming.
*/
(selection: Selection): void;
(selection: _Selection<any>): void;
/**
* Registers a listener to receive events
+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;
}
}
-1
View File
@@ -1 +0,0 @@
--noImplicitAny
+6
View File
@@ -9,6 +9,12 @@ declare module drop {
interface DropStatic {
new(options: IDropOptions): Drop;
createContext(options: IDropContextOptions): DropStatic;
}
interface IDropContextOptions {
classPrefix?: string;
defaults?: IDropOptions;
}
interface IDropOptions {
-1
View File
@@ -1 +0,0 @@
-1
View File
@@ -1 +0,0 @@
+2 -2
View File
@@ -7,6 +7,6 @@
declare module "errorhandler" {
import express = require('express');
function e(): express.ErrorRequestHandler;
function e(options?: {log?: any}): express.ErrorRequestHandler;
export = e;
}
}
+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.
+6 -6
View File
@@ -424,22 +424,22 @@ declare module "express" {
* @param code
*/
status(code: number): Response;
/**
* Set the response HTTP status code to `statusCode` and send its string representation as the response body.
* @link http://expressjs.com/4x/api.html#res.sendStatus
*
*
* Examples:
*
*
* res.sendStatus(200); // equivalent to res.status(200).send('OK')
* res.sendStatus(403); // equivalent to res.status(403).send('Forbidden')
* res.sendStatus(404); // equivalent to res.status(404).send('Not Found')
* res.sendStatus(500); // equivalent to res.status(500).send('Internal Server Error')
*
*
* @param code
*/
sendStatus(code: number): Response;
/**
* Set Link header field with the given `links`.
*
@@ -796,7 +796,7 @@ declare module "express" {
(req: Request, res: Response, next: Function): any;
}
interface Handler extends RequestHandler {}
interface Handler extends RequestHandler {}
interface RequestParamHandler {
(req: Request, res: Response, next: Function, param: any): any;
+14
View File
@@ -881,5 +881,19 @@ declare module fabric {
toArray(arrayLike): any[];
toFixed(number, fractionDigits);
wrapElement(element: HTMLElement, wrapper, attributes);
rotatePoint(point: IPoint, origin: IPoint, radians: number);
transformPoint(p: IPoint, t: any[], ignoreOffset: boolean);
invertTransform(t: any[]);
parseUnit(value: number|string, fontSize?: number);
getKlass(type: string, namespace: string);
resolveNamespace(namespace: string);
enlivenObjects(objects: any[], callback: Function, namespace: string, reviver: Function);
drawDashedLine(ctx: CanvasRenderingContext2D, x: number, y: number, x2: number, y2: number, da: any[]);
createCanvasElement(canvasEl?: HTMLElement);
createImage();
createAccessors(klass: Object);
clipContext(receiver: IObject, ctx: CanvasRenderingContext2D);
isTransparent(ctx: CanvasRenderingContext2D, x: number, y: number, tolerance: number);
}
}
+16 -4
View File
@@ -16,7 +16,7 @@ declare module jquery.flot {
xaxes?: axisOptions[];
yaxes?: axisOptions[];
grid?: gridOptions;
interfaction?: interaction;
interaction?: interaction;
hooks?: hooks;
}
@@ -198,9 +198,16 @@ declare module jquery.flot {
c2p(canvasPoint: canvasPoint):point;
}
interface plugin {
init(options: plotOptions): any;
options?: any;
name?: string;
version?: string;
}
interface plot {
highlight(series: dataSeries, datapoint: item): void;
unhightlight(): void;
unhighlight(): void;
unhighlight(series: dataSeries, datapoint: item): void;
setData(data: any): void;
setupGrid(): void;
@@ -221,9 +228,14 @@ declare module jquery.flot {
getPlotOffset(): canvasPoint;
getOptions(): plotOptions;
}
interface plotStatic {
(placeholder: JQuery, data: dataSeries[], options?: plotOptions): plot;
(placeholder: JQuery, data: any[], options?: plotOptions): plot;
plugins: plugin[];
}
}
interface JQueryStatic {
plot(placeholder: JQuery, data: jquery.flot.dataSeries[], options?: jquery.flot.plotOptions): jquery.flot.plot;
plot(placeholder: JQuery, data: any[], options?: jquery.flot.plotOptions): jquery.flot.plot;
plot: jquery.flot.plotStatic;
}
-1
View File
@@ -1 +0,0 @@
+1 -1
View File
@@ -3,7 +3,7 @@
// Definitions by: Yuichi Murata <https://github.com/mrk21>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///<reference path='../react/react.d.ts' />
///<reference path='../react/legacy/react-0.12.d.ts' />
///<reference path='../eventemitter3/eventemitter3.d.ts' />
declare module Fluxxor {
+1 -1
View File
@@ -25,7 +25,7 @@ declare module "formidable" {
onPart: (part: Part) => void;
handlePart(part: Part): void;
parse(req: http.ServerRequest, callback?: (err: any, fields: Fields, files: Files) => any): void;
parse(req: http.IncomingMessage, callback?: (err: any, fields: Fields, files: Files) => any): void;
}
export interface Fields {
+87
View File
@@ -0,0 +1,87 @@
/// <reference path="fs-finder.d.ts" />
import finder = require('fs-finder');
// static
var a: FsFinder.Finder = finder.in('./*');
var b: FsFinder.Finder = finder.from('./*');
var c: FsFinder.Finder = finder.find('./*');
finder.find('./*', (paths: string[]) => {});
var d: FsFinder.Finder = finder.findFiles('./*');
finder.findFiles('./*', (paths: string[]) => {});
var e: FsFinder.Finder = finder.findDirectories('./*');
finder.findDirectories('./*', (paths: string[]) => {});
var f: FsFinder.Finder = finder.findFile('./*');
finder.findFile('./*', (paths: string[]) => {});
var g: FsFinder.Finder = finder.findDirectory('./*');
finder.findDirectory('./*', (paths: string[]) => {});
// instance
var instance = finder.in('./any*');
var j: string[] = instance.find('./*');
instance.find('./*', (paths: string[]) => {});
var k: string[] = instance.findFiles('./*');
instance.findFiles('./*', (paths: string[]) => {});
var l: string[] = instance.findDirectories('./*');
instance.findDirectories('./*', (paths: string[]) => {});
var m: string[] = instance.findFile('./*');
instance.findFile('./*', (paths: string[]) => {});
var n: string[] = instance.findDirectory('./*');
instance.findDirectory('./*', (paths: string[]) => {});
var paths: string[];
paths = instance.find();
paths = instance.findFiles();
paths = instance.findDirectories();
paths = instance.findFile();
paths = instance.findDirectory();
// Base
instance = instance.recursively();
instance = instance.recursively(false);
instance = instance.exclude('b');
instance = instance.exclude(['b']);
instance = instance.exclude('a', true);
instance = instance.showSystemFiles();
instance = instance.showSystemFiles(false);
instance = instance.lookUp();
instance = instance.lookUp(false);
instance = instance.findFirst();
instance = instance.findFirst(true);
instance = instance.filter((path: string) => {
return false;
});
paths = instance.getPathsSync('all', './*', './dir');
instance.getPathsAsync((paths: string[]) => {}, 'all', './*', './dir');
paths = instance.getPathsSync('directories', './*', './dir');
instance.getPathsAsync((paths: string[]) => {}, 'directories', './*', './dir');
paths = instance.getPathsSync('files', './*', './dir');
instance.getPathsAsync((paths: string[]) => {}, 'files', './*', './dir');
var is: boolean;
is = instance.checkExcludes('a');
is = instance.checkSystemFiles('b');
is = instance.checkFilters('c', {});
var numeric: number;
numeric = instance.checkFile('d', {}, './*.ts', 'all');
numeric = instance.checkFile('d', {}, './*.ts', 'directories');
numeric = instance.checkFile('d', {}, './*.ts', 'files');
paths = instance.getPathsFromParentsSync('a', 'all');
instance.getPathsFromParentsAsync((paths: string[]) => {}, '*.ts', 'all');
+55
View File
@@ -0,0 +1,55 @@
// Type definitions for fs-finder v1.8.0
// Project: https://github.com/sakren/node-fs-finder
// Definitions by: Michael Zabka <https://github.com/misak113/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module FsFinder {
type AsyncFunction = (paths: string|string[]) => void;
type Type = string; // 'all'|'directories'|'files'
type Mask = string;
type Directory = string;
export class Finder extends Base {
static TIME_FORMAT: string;
static in(path: string): Finder;
static from(path: string): Finder;
static find(path: string, fn?: AsyncFunction, type?: Type): Finder;
static findFiles(path?: string, fn?: AsyncFunction): Finder;
static findDirectories(path?: string, fn?: AsyncFunction): Finder;
static findFile(path?: string, fn?: AsyncFunction): Finder;
static findDirectory(path?: string, fn?: AsyncFunction): Finder;
find(mask?: Mask, fn?: AsyncFunction, type?: Type): string[];
findFiles(mask?: Mask, fn?: AsyncFunction): string[];
findDirectories(mask?: Mask, fn?: AsyncFunction): string[];
findFile(mask?: Mask, fn?: AsyncFunction): string[];
findDirectory(mask?: Mask, fn?: AsyncFunction): string[];
size(operation?: any, value?: any): Finder;
date(operation?: any, value?: any): Finder;
}
export class Base {
recursively(recursive?: boolean): Finder;
exclude(excludes: string|string[], exactly?: boolean): Finder;
showSystemFiles(systemFiles?: boolean): Finder;
lookUp(up?: boolean): Finder;
findFirst(findFirst?: boolean): Finder;
filter(fn: Function): Finder;
getPathsSync(type?: Type, mask?: Mask, dir?: Directory): string[];
getPathsAsync(fn: AsyncFunction, type?: Type, mask?: Mask, dir?: Directory): void;
checkExcludes(path: string): boolean;
checkSystemFiles(path: string): boolean;
checkFilters(path: string, stats: any): boolean;
checkFile(path: string, stats: any, mask: Mask, type: Type): number;
getPathsFromParentsSync(mask?: Mask, type?: Type): string[];
getPathsFromParentsAsync(fn: AsyncFunction, mask?: Mask, type?: Type): void;
}
}
declare module "fs-finder" {
import Finder = FsFinder.Finder;
export = Finder;
}
+23
View File
@@ -0,0 +1,23 @@
/// <reference path="fs-mock.d.ts" />
import FS = require("fs-mock");
var fs: FS = new FS({
'Users': {
'David': {
'password.txt': 'my super password'
}
}
}, {
windows: true
});
var fsopts: FS.Opts = {
windows: true,
drives: ["A", "B"],
root: "/"
};
fs.rename("/a/b.txt", "/a/c/txt", (err?: Error): void => {
// nothing
});
+144
View File
@@ -0,0 +1,144 @@
// Type definitions for fs-mock 1.1.3
// Project: https://github.com/sakren/node-fs-mock
// Definitions by: Rogier Schouten <https://github.com/rogierschouten>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module "fs-mock" {
import stream = require("stream");
import events = require("events");
import fs = require("fs");
module FS {
export interface Opts {
windows?: boolean;
drives?: string[];
root?: string;
}
}
class FS {
constructor(content: any, opts?: FS.Opts)
rename(oldPath: string, newPath: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
renameSync(oldPath: string, newPath: string): void;
truncate(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
truncate(path: string, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
truncateSync(path: string, len?: number): void;
ftruncate(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
ftruncate(fd: number, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
ftruncateSync(fd: number, len?: number): void;
chown(path: string, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
chownSync(path: string, uid: number, gid: number): void;
fchown(fd: number, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
fchownSync(fd: number, uid: number, gid: number): void;
lchown(path: string, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
lchownSync(path: string, uid: number, gid: number): void;
chmod(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
chmod(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
chmodSync(path: string, mode: number): void;
chmodSync(path: string, mode: string): void;
fchmod(fd: number, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
fchmod(fd: number, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
fchmodSync(fd: number, mode: number): void;
fchmodSync(fd: number, mode: string): void;
lchmod(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
lchmod(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
lchmodSync(path: string, mode: number): void;
lchmodSync(path: string, mode: string): void;
stat(path: string, callback?: (err: NodeJS.ErrnoException, stats: fs.Stats) => any): void;
lstat(path: string, callback?: (err: NodeJS.ErrnoException, stats: fs.Stats) => any): void;
fstat(fd: number, callback?: (err: NodeJS.ErrnoException, stats: fs.Stats) => any): void;
statSync(path: string): fs.Stats;
lstatSync(path: string): fs.Stats;
fstatSync(fd: number): fs.Stats;
link(srcpath: string, dstpath: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
linkSync(srcpath: string, dstpath: string): void;
symlink(srcpath: string, dstpath: string, type?: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
symlinkSync(srcpath: string, dstpath: string, type?: string): void;
readlink(path: string, callback?: (err: NodeJS.ErrnoException, linkString: string) => any): void;
readlinkSync(path: string): string;
realpath(path: string, callback?: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void;
realpath(path: string, cache: {[path: string]: string}, callback: (err: NodeJS.ErrnoException, resolvedPath: string) =>any): void;
realpathSync(path: string, cache?: {[path: string]: string}): string;
unlink(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
unlinkSync(path: string): void;
rmdir(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
rmdirSync(path: string): void;
mkdir(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
mkdir(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
mkdir(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
mkdirSync(path: string, mode?: number): void;
mkdirSync(path: string, mode?: string): void;
readdir(path: string, callback?: (err: NodeJS.ErrnoException, files: string[]) => void): void;
readdirSync(path: string): string[];
close(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
closeSync(fd: number): void;
open(path: string, flags: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void;
open(path: string, flags: string, mode: number, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void;
open(path: string, flags: string, mode: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void;
openSync(path: string, flags: string, mode?: number): number;
openSync(path: string, flags: string, mode?: string): number;
utimes(path: string, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
utimes(path: string, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void;
utimesSync(path: string, atime: number, mtime: number): void;
utimesSync(path: string, atime: Date, mtime: Date): void;
futimes(fd: number, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
futimes(fd: number, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void;
futimesSync(fd: number, atime: number, mtime: number): void;
futimesSync(fd: number, atime: Date, mtime: Date): void;
fsync(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
fsyncSync(fd: number): void;
write(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void;
writeSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number;
read(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, bytesRead: number, buffer: Buffer) => void): void;
readSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number;
readFile(filename: string, encoding: string, callback: (err: NodeJS.ErrnoException, data: string) => void): void;
readFile(filename: string, options: { encoding: string; flag?: string; }, callback: (err: NodeJS.ErrnoException, data: string) => void): void;
readFile(filename: string, options: { flag?: string; }, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
readFile(filename: string, callback: (err: NodeJS.ErrnoException, data: Buffer) => void ): void;
readFileSync(filename: string, encoding: string): string;
readFileSync(filename: string, options: { encoding: string; flag?: string; }): string;
readFileSync(filename: string, options?: { flag?: string; }): Buffer;
writeFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void;
writeFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
writeFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void;
writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void;
appendFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
appendFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
appendFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void;
appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void;
appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void;
watchFile(filename: string, listener: (curr: fs.Stats, prev: fs.Stats) => void): void;
watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: (curr: fs.Stats, prev: fs.Stats) => void): void;
unwatchFile(filename: string, listener?: (curr: fs.Stats, prev: fs.Stats) => void): void;
watch(filename: string, listener?: (event: string, filename: string) => any): fs.FSWatcher;
watch(filename: string, options: { persistent?: boolean; }, listener?: (event: string, filename: string) => any): fs.FSWatcher;
exists(path: string, callback?: (exists: boolean) => void): void;
existsSync(path: string): boolean;
createReadStream(path: string, options?: {
flags?: string;
encoding?: string;
fd?: string;
mode?: number;
bufferSize?: number;
}): fs.ReadStream;
createReadStream(path: string, options?: {
flags?: string;
encoding?: string;
fd?: string;
mode?: string;
bufferSize?: number;
}): fs.ReadStream;
createWriteStream(path: string, options?: {
flags?: string;
encoding?: string;
string?: string;
}): fs.WriteStream;
}
export = FS;
}
+28
View File
@@ -0,0 +1,28 @@
/// <reference path="ftp.d.ts" />
/// <reference path="../node/node.d.ts" />
import Client = require("ftp");
import fs = require("fs");
var c = new Client();
c.on('ready', (): void => {
c.get('foo.txt', function(err: Error, stream: NodeJS.ReadableStream): void {
if (err) throw err;
stream.once('close', function(): void {
c.end();
});
stream.pipe(fs.createWriteStream('foo.local-copy.txt'));
});
});
// connect to localhost:21 as anonymous
c.connect();
c.connect({
host: "127.0.0.1",
port: 21,
username: "Boo",
password: "secret"
});
+294
View File
@@ -0,0 +1,294 @@
// Type definitions for ftp 0.3.8
// Project: https://github.com/mscdex/node-ftp
// Definitions by: Rogier Schouten <https://github.com/rogierschouten>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module "ftp" {
import events = require("events");
import tls = require("tls");
module Client {
/**
* Options for Client#connect()
*/
export interface Options {
/**
* The hostname or IP address of the FTP server. Default: 'localhost'
*/
host?: string;
/**
* The port of the FTP server. Default: 21
*/
port?: number;
/**
* Set to true for both control and data connection encryption, 'control' for control connection encryption only, or 'implicit' for
* implicitly encrypted control connection (this mode is deprecated in modern times, but usually uses port 990) Default: false
*/
secure?: string|boolean;
/**
* Additional options to be passed to tls.connect(). Default: (none)
*/
secureOptions?: tls.ConnectionOptions;
/**
* Username for authentication. Default: 'anonymous'
*/
user?: string;
/**
* Password for authentication. Default: 'anonymous@'
*/
password?: string;
/**
* How long (in milliseconds) to wait for the control connection to be established. Default: 10000
*/
connTimeout?: number;
/**
* How long (in milliseconds) to wait for a PASV data connection to be established. Default: 10000
*/
pasvTimeout?: number;
/**
* How often (in milliseconds) to send a 'dummy' (NOOP) command to keep the connection alive. Default: 10000
*/
keepalive?: number;
}
/**
* Element returned by Client#list()
*/
export interface ListingElement {
/**
* A single character denoting the entry type: 'd' for directory, '-' for file (or 'l' for symlink on **\*NIX only**).
*/
"type": string;
/**
* The name of the entry
*/
name: string;
/**
* The size of the entry in bytes
*/
size: string;
/**
* The last modified date of the entry
*/
date: Date;
/**
* The various permissions for this entry **(*NIX only)**
*/
rights?: {
/**
* An empty string or any combination of 'r', 'w', 'x'.
*/
user: string;
/**
* An empty string or any combination of 'r', 'w', 'x'.
*/
group: string;
/**
* An empty string or any combination of 'r', 'w', 'x'.
*/
other: string;
};
/**
* The user name or ID that this entry belongs to **(*NIX only)**.
*/
owner?: string;
/**
* The group name or ID that this entry belongs to **(*NIX only)**.
*/
group?: string;
/**
* For symlink entries, this is the symlink's target **(*NIX only)**.
*/
target?: string;
/**
* True if the sticky bit is set for this entry **(*NIX only)**.
*/
sticky?: boolean;
}
}
/**
* FTP client.
*
* Events:
* @event greeting(< string >msg) - Emitted after connection. msg is the text the server sent upon connection.
* @event ready() - Emitted when connection and authentication were sucessful.
* @event close(< boolean >hadErr) - Emitted when the connection has fully closed.
* @event end() - Emitted when the connection has ended.
* @event error(< Error >err) - Emitted when an error occurs. In case of protocol-level errors, err contains
* a 'code' property that references the related 3-digit FTP response code.
*/
class Client extends events.EventEmitter {
/**
* Creates and returns a new FTP client instance.
*/
constructor();
/**
* Connects to an FTP server.
*/
connect(config?: Client.Options): void;
/**
* Closes the connection to the server after any/all enqueued commands have been executed.
*/
end(): void;
/**
* Closes the connection to the server immediately.
*/
destroy(): void;
/**
* Retrieves the directory listing of path.
* @param path defaults to the current working directory.
* @param useCompression defaults to false.
*/
list(path: string, useCompression: boolean, callback: (error: Error, listing: Client.ListingElement[]) => void): void;
list(path: string, callback: (error: Error, listing: Client.ListingElement[]) => void): void;
list(useCompression: boolean, callback: (error: Error, listing: Client.ListingElement[]) => void): void;
list(callback: (error: Error, listing: Client.ListingElement[]) => void): void;
/**
* Retrieves a file at path from the server. useCompression defaults to false
*/
get(path: string, callback: (error: Error, stream: NodeJS.ReadableStream) => void): void;
get(path: string, useCompression: boolean, callback: (error: Error, stream: NodeJS.ReadableStream) => void): void;
/**
* Sends data to the server to be stored as destPath.
* @param input can be a ReadableStream, a Buffer, or a path to a local file.
* @param destPath
* @param useCompression defaults to false.
*/
put(input: NodeJS.ReadableStream|Buffer|string, destPath: string, useCompression: boolean, callback: (error: Error) => void): void;
put(input: NodeJS.ReadableStream|Buffer|string, destPath: string, callback: (error: Error) => void): void;
/**
* Same as put(), except if destPath already exists, it will be appended to instead of overwritten.
* @param input can be a ReadableStream, a Buffer, or a path to a local file.
* @param destPath
* @param useCompression defaults to false.
*/
append(input: NodeJS.ReadableStream|Buffer|string, destPath: string, useCompression: boolean, callback: (error: Error) => void): void;
append(input: NodeJS.ReadableStream|Buffer|string, destPath: string, callback: (error: Error) => void): void;
/**
* Renames oldPath to newPath on the server
*/
rename(oldPath: string, newPath: string, callback: (error: Error) => void): void;
/**
* Logout the user from the server.
*/
logout(callback: (error: Error) => void): void;
/**
* Delete a file on the server
*/
delete(path: string, callback: (error: Error) => void): void;
/**
* Changes the current working directory to path. callback has 2 parameters: < Error >err, < string >currentDir.
* Note: currentDir is only given if the server replies with the path in the response text.
*/
cwd(path: string, callback: (error: Error, currentDir?: string) => void): void;
/**
* Aborts the current data transfer (e.g. from get(), put(), or list())
*/
abort(callback: (error: Error) => void): void;
/**
* Sends command (e.g. 'CHMOD 755 foo', 'QUOTA') using SITE. callback has 3 parameters:
* < Error >err, < _string >responseText, < integer >responseCode.
*/
site(command: string, callback: (error: Error, responseText: string, responseCode: number) => void): void;
/**
* Retrieves human-readable information about the server's status.
*/
status(callback: (error: Error, status: string) => void): void;
/**
* Sets the transfer data type to ASCII.
*/
ascii(callback: (error: Error) => void): void;
/**
* Sets the transfer data type to binary (default at time of connection).
*/
binary(callback: (error: Error) => void): void;
/**
* Optional "standard" commands (RFC 959)
* Creates a new directory, path, on the server. recursive is for enabling a 'mkdir -p' algorithm and defaults to false
*/
mkdir(path: string, recursive: boolean, callback: (error: Error) => void): void;
mkdir(path: string, callback: (error: Error) => void): void;
/**
* Optional "standard" commands (RFC 959)
* Removes a directory, path, on the server. If recursive, this call will delete the contents of the directory if it is not empty
*/
rmdir(path: string, recursive: boolean, callback: (error: Error) => void): void;
rmdir(path: string, callback: (error: Error) => void): void;
/**
* Optional "standard" commands (RFC 959)
* Changes the working directory to the parent of the current directory
*/
cdup(callback: (error: Error) => void): void;
/**
* Optional "standard" commands (RFC 959)
* Retrieves the current working directory
*/
pwd(callback: (error: Error, path: string) => void): void;
/**
* Optional "standard" commands (RFC 959)
* Retrieves the server's operating system.
*/
system(callback: (error: Error, OS: string) => void): void;
/**
* Optional "standard" commands (RFC 959)
* Similar to list(), except the directory is temporarily changed to path to retrieve the directory listing.
* This is useful for servers that do not handle characters like spaces and quotes in directory names well for the LIST command.
* This function is "optional" because it relies on pwd() being available.
*/
listSafe(path: string, useCompression: boolean, callback: (error: Error, listing: Client.ListingElement[]) => void): void;
listSafe(path: string, callback: (error: Error, listing: Client.ListingElement[]) => void): void;
listSafe(useCompression: boolean, callback: (error: Error, listing: Client.ListingElement[]) => void): void;
listSafe(callback: (error: Error, listing: Client.ListingElement[]) => void): void;
/**
* Extended commands (RFC 3659)
* Retrieves the size of path
*/
size(path: string, callback: (error: Error, size: number) => void): void;
/**
* Extended commands (RFC 3659)
* Retrieves the last modified date and time for path
*/
lastMod(path: string, callback: (error: Error, lastMod: Date) => void): void;
/**
* Extended commands (RFC 3659)
* Sets the file byte offset for the next file transfer action (get/put) to byteOffset
*/
restart(byteOffset: number, callback: (error: Error) => void): void;
}
export = Client;
}
+32
View File
@@ -0,0 +1,32 @@
/// <reference path="ftpd.d.ts" />
import ftpd = require("ftpd");
var options: ftpd.FtpServerOptions = {
pasvPortRangeStart: 4000,
pasvPortRangeEnd: 5000,
getInitialCwd: function(connection: ftpd.FtpConnection, callback: (error: Error, path: string) => void): void {
callback(null, "boo");
},
getRoot: function(connection: ftpd.FtpConnection): string {
return '/';
}
};
var host: string = '10.0.0.42';
var server = new ftpd.FtpServer(host, options);
server.on('client:connected', function(conn: ftpd.FtpConnection): void {
conn.on('command:user', function(user: string, success: () => void, failure: () => void): void {
success();
});
conn.on('command:pass', function(
pass: string,
success: (username: string, fs?: ftpd.FtpFileSystem) => void,
failure: () => void) {
success("Rogier");
});
});
server.listen(21);
+202
View File
@@ -0,0 +1,202 @@
// Type definitions for ftpd 0.2.11
// Project: https://github.com/sstur/nodeftpd
// Definitions by: Rogier Schouten <https://github.com/rogierschouten>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module "ftpd" {
import events = require("events");
import fs = require("fs");
import net = require("net");
import tls = require("tls");
/**
* Options for FtpServer constructor
*/
export interface FtpServerOptions {
/**
* Gets the initial working directory for the user. Called after user is authenticated
* Typical cases where you would want/need the callback involve retrieving configurations from external datasources and suchlike.
*/
getInitialCwd: (connection: FtpConnection, callback?: (error: Error, path: string) => void) => void|string;
/**
* Gets the root directory for the user relative to the CWD. Called after getInitialCwd. The user is not able to escape this directory.
* Typical cases where you would want/need the callback involve retrieving configurations from external datasources and suchlike.
*/
getRoot: (connection: FtpConnection, callback?: (error: Error, path: string) => void) => void|string;
/**
* If set to true, then files which the client uploads are buffered in memory and then written to disk using writeFile.
* If false, files are written using writeStream.
*/
useWriteFile?: boolean;
/**
* If set to true, then files which the client uploads are slurped using 'readFile'.
* If false, files are read using readStream.
*/
useReadFile?: boolean;
/**
* Determines the maximum file size (in bytes) for which uploads are buffered in memory before being written to disk.
* Has an effect only if useWriteFile is set to true.
* If uploadMaxSlurpSize is not set, then there is no limit on buffer size.
*/
uploadMaxSlurpSize?: number;
/**
* The maximum number of concurrent calls to fs.stat which will be made when processing a LIST request. Default 5.
*/
maxStatsAtOnce?: number;
/**
* A function which can be used as the argument of an array's sort method. Used to sort filenames for directory listings.
* See [https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/sort] for more info.
*/
filenameSortFunc?: (a: string, b: string) => number;
/**
* A function which is applied to each filename before sorting.
* If set to false, filenames are unaltered.
*/
filenameSortMap?: ((a: string) => string) | boolean;
/**
* If this is set, then filenames are not sorted in responses to the LIST and NLST commands.
*/
dontSortFilenames?: boolean;
/**
* If set to true, then LIST and NLST treat the characters ? and * as literals instead of as wildcards.
*/
noWildcards?: boolean;
/**
* If this is set, the server will allow explicit TLS authentication. Value should be a dictionary which is suitable as the options argument of tls.createServer.
*/
tlsOptions?: tls.TlsOptions;
/**
* If this is set to true, and tlsOptions is also set, then the server will not allow logins over non-secure connections.
* Default false
*/
tlsOnly?: boolean;
/**
* I obviously set this to true when tlsOnly is on -someone needs to update this.
*/
allowUnauthorizedTls?: boolean;
/**
* Integer, specifies the lower-bound port (min port) for creating PASV connections
*/
pasvPortRangeStart?: number;
/**
* Integer, specifies the upper-bound port (max port) for creating PASV connections
*/
pasvPortRangeEnd?: number;
}
/**
* Represents one Ftp connection. Incomplete type definition.
*
* @event command:user (username: string, success: () => void, failure: () => void)
* @event command:pass (password: string, success: (username: string, fs?: FtpFileSystem) => void, failure: () => void)
* The server raises a command:pass event which is given pass, success and failure arguments.
* On successful login, success should be called with a username argument. It may also optionally
* be given a second argument, which should be an object providing an implementation of the API for Node's fs module.
*/
export class FtpConnection extends events.EventEmitter {
server: FtpServer;
socket: net.Socket;
pasv: net.Server;
dataSocket: net.Socket; // the actual data socket
mode: string;
username: string;
cwd: string;
root: string;
hasQuit: boolean;
// State for handling TLS upgrades.
secure: boolean;
pbszReceived: boolean;
}
/**
* Optional mock fs implementation to set in the command:pass event of FtpConnection
*/
export interface FtpFileSystem {
unlink: (path: string, callback?: (err?: NodeJS.ErrnoException) => void) => void;
readdir: (path: string, callback?: (err: NodeJS.ErrnoException, files: string[]) => void) => void;
mkdir: ((path: string, callback?: (err?: NodeJS.ErrnoException) => void) => void)
| ((path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void) => void)
| ((path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void) => void);
open: ((path: string, flags: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any) => void)
| ((path: string, flags: string, mode: number, callback?: (err: NodeJS.ErrnoException, fd: number) => any) => void)
| ((path: string, flags: string, mode: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any) => void);
close: (fd: number, callback?: (err?: NodeJS.ErrnoException) => void) => void;
rmdir: (path: string, callback?: (err?: NodeJS.ErrnoException) => void) => void;
rename: (oldPath: string, newPath: string, callback?: (err?: NodeJS.ErrnoException) => void) => void;
/**
* specific object properties: { mode, isDirectory(), size, mtime }
*/
stat: (path: string, callback?: (err: NodeJS.ErrnoException, stats: fs.Stats) => any) => void;
/**
* if useReadFile option is not set or is false
*/
createReadStream?: (path: string, options?: {
flags?: string;
encoding?: string;
fd?: string;
mode?: string;
bufferSize?: number;
}) => fs.ReadStream;
/**
* if useWriteFile option is not set or is false
*/
createWriteStream?: (path: string, options?: {
flags?: string;
encoding?: string;
string?: string;
}) => fs.WriteStream;
/**
* if useReadFile option is set to 'true'
*/
readFile?:
((filename: string, encoding: string, callback: (err: NodeJS.ErrnoException, data: string) => void) => void)
| ((filename: string, options: { encoding: string; flag?: string; }, callback: (err: NodeJS.ErrnoException, data: string) => void) => void)
| ((filename: string, options: { flag?: string; }, callback: (err: NodeJS.ErrnoException, data: Buffer) => void) => void)
| ((filename: string, callback: (err: NodeJS.ErrnoException, data: Buffer) => void ) => void);
/**
* if useWriteFile option is set to 'true'
*/
writeFile?:
((filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void) => void)
| ((filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void) => void)
| ((filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void) => void);
}
/**
* FTP server
*
* Events:
* @event close net.Server close event
* @event error net.Server error event
* @event client:connected (connection: FtpConnection)
*/
export class FtpServer extends events.EventEmitter {
/**
* @param host host is a string representation of the IP address clients use to connect to the FTP server.
* It's imperative that this actually reflects the remote IP the clients use to access the server,
* as this IP will be used in the establishment of PASV data connections. If this IP is not the one clients use to connect,
* you will see some strange behavior from the client side (hangs).
* @param options See test.js for a simple example.
*/
constructor(host: string, options: FtpServerOptions);
/**
* Start listening, see net.Server.listen()
*/
public listen(port: number, host?: string, backlog?: number, listeningListener?: () => void): void;
/**
* Stop listening
*/
public close(callback?: () => void): void;
}
}
+6
View File
@@ -33,6 +33,12 @@ gulp.task('invalid-custom', function(){
.pipe(tslint.report(testReporter));
});
gulp.task('invalid-custom', function () {
gulp.src('invalid.ts')
.pipe(tslint())
.pipe(tslint.report(testReporter, { emitError: false }));
});
gulp.task('tslint-json', function(){
gulp.src('invalid.ts')
.pipe(tslint({
+2 -3
View File
@@ -32,10 +32,9 @@ declare module "gulp-tslint" {
ruleName: string;
}
export function report(reporter?: string): NodeJS.ReadWriteStream;
export function report(reporter: string, options?: Options): NodeJS.ReadWriteStream;
type Reporter = string|((output: Output[], file: vinyl, options: Options) => any);
export function report(reporter?: Reporter, options?: Options): NodeJS.ReadWriteStream;
export function report(options?: Options): NodeJS.ReadWriteStream;
export function report(reporter?: (output: Output[], file: vinyl, options: Options) => any): NodeJS.ReadWriteStream;
}
+6 -1
View File
@@ -37,4 +37,9 @@ gulp.task('scripts', function() {
});
gulp.task('watch', ['scripts'], function() {
gulp.watch('lib/*.ts', ['scripts']);
});
});
gulp.task('scripts', function () {
return gulp.src('lib/*.ts')
.pipe(typescript(tsProject, undefined, typescript.reporter.fullReporter()));
});
+11 -1
View File
@@ -6,7 +6,7 @@
/// <reference path="../node/node.d.ts"/>
declare module "gulp-typescript" {
function GulpTypescript(params: GulpTypescript.Params, filters?: GulpTypescript.FilterSettings): GulpTypescript.CompilationStream;
function GulpTypescript(params: GulpTypescript.Params, filters?: GulpTypescript.FilterSettings, reporter?: GulpTypescript.Reporter): GulpTypescript.CompilationStream;
module GulpTypescript {
export function createProject(params: Params): Params;
@@ -28,10 +28,20 @@ declare module "gulp-typescript" {
referencedFrom?: string[];
}
interface Reporter {
error(error: any): void;
}
interface CompilationStream extends NodeJS.ReadWriteStream {
dts: NodeJS.ReadWriteStream;
js: NodeJS.ReadWriteStream;
}
module reporter {
function nullReporter(): Reporter;
function defaultReporter(): Reporter;
function fullReporter(showFullFilename?: boolean): Reporter;
}
}
export = GulpTypescript;
+4 -4
View File
@@ -38,13 +38,13 @@ interface HandlebarsStatic extends HandlebarsCommon {
compile(input: any, options?: any): HandlebarsTemplateDelegate;
}
interface HandlebarsTemplates {
[index: string]: HandlebarsTemplateDelegate;
interface HandlebarsTemplates {
[index: string]: HandlebarsTemplateDelegate;
}
interface HandlebarsRuntimeStatic extends HandlebarsCommon {
interface HandlebarsRuntimeStatic extends HandlebarsCommon {
// Handlebars.templates is the default template namespace in precompiler.
templates: HandlebarsTemplates;
templates: HandlebarsTemplates;
}
declare module hbs {
+14
View File
@@ -0,0 +1,14 @@
/// <reference path="hasher.d.ts" />
//handle hash changes
function handleChanges(newHash: any, oldHash: any) {
console.log(newHash);
}
hasher.changed.add(handleChanges); //add hash change listener
hasher.initialized.add(handleChanges); //add initialized listener (to grab initial value in case it is already set)
hasher.init(); //initialize hasher (start listening for history changes)
hasher.setHash('foo'); //change hash value (generates new history record)
hasher.prependHash = '!'; //default value is "/"
+116
View File
@@ -0,0 +1,116 @@
// Type definitions for Hasher.js
// Project: https://github.com/millermedeiros/hasher/
// Definitions by: flyfishMT <https://github.com/flyfishMT/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../js-signals/js-signals.d.ts" />
declare module HasherJs {
export interface HasherStatic {
// {string} hasher.appendHash
// String that should always be added to the end of Hash value.
appendHash(): string;
// default value: '';
// will be automatically removed from `hasher.getHash()`
// avoid conflicts with elements that contain ID equal to hash value;
// <static> {signals.Signal} hasher.changed
// Signal dispatched when hash value changes. - pass current hash as 1st parameter to listeners and previous hash value as 2nd parameter.
changed: Signal;
// <static> {signals.Signal} hasher.initialized
// Signal dispatched when hasher is initialized. - pass current hash as first parameter to listeners.
initialized: Signal;
// <static> {string} hasher.prependHash
// String that should always be added to the beginning of Hash value.
prependHash: string;
// default value: '/';
// will be automatically removed from `hasher.getHash()`
// avoid conflicts with elements that contain ID equal to hash value;
// <static> {string} hasher.separator
// String used to split hash paths; used by hasher.getHashAsArray() to split paths.
separator: string;
// default value: '/';
// <static> {signals.Signal} hasher.stopped
// Signal dispatched when hasher is stopped. - pass current hash as first parameter to listeners
stopped: Signal;
// <static> <constant> {string} hasher.VERSION
// hasher Version Number
VERSION: string;
// Method Detail
// <static> hasher.dispose()
// Removes all event listeners, stops hasher and destroy hasher object. - IMPORTANT: hasher won't work after calling this method, hasher Object will be deleted.
dispose(): void;
// <static> {string} hasher.getBaseURL()
// Returns:
// {string} Retrieve URL without query string and hash.
getBaseURL(): string;
// <static> {string} hasher.getHash()
// Returns:
// {string} Hash value without '#', `hasher.appendHash` and `hasher.prependHash`.
getHash(): string;
// <static> {Array.} hasher.getHashAsArray()
// Returns:
// {Array.} Hash value split into an Array.
getHashAsArray(): string[];
// <static> {string} hasher.getURL()
// Returns:
// {string} Full URL.
getURL(): string;
// <static> hasher.init()
// Start listening/dispatching changes in the hash/history.
init(): void;
// hasher won't dispatch CHANGE events by manually typing a new value or pressing the back/forward buttons before calling this method.
// <static> {boolean} hasher.isActive()
// Returns:
// {boolean} If hasher is listening to changes on the browser history and/or hash value.
isActive(): boolean;
// <static> hasher.replaceHash(path)
// Set Hash value without keeping previous hash on the history record. Similar to calling window.location.replace("#/hash") but will also work on IE6-7.
// hasher.replaceHash('lorem', 'ipsum', 'dolor') -> '#/lorem/ipsum/dolor'
// Parameters:
// {...string} path
// Hash value without '#'. Hasher will join path segments using `hasher.separator` and prepend/append hash value with `hasher.appendHash` and `hasher.prependHash`
replaceHash(...path: string[]): void;
// <static> hasher.setHash(path)
// Set Hash value, generating a new history record.
// hasher.setHash('lorem', 'ipsum', 'dolor') -> '#/lorem/ipsum/dolor'
// Parameters:
// {...string} path
// Hash value without '#'. Hasher will join path segments using `hasher.separator` and prepend/append hash value with `hasher.appendHash` and `hasher.prependHash`
setHash(...path: string[]): void;
// <static> hasher.stop()
// Stop listening/dispatching changes in the hash/history.
// hasher won't dispatch CHANGE events by manually typing a new value or pressing the back/forward buttons after calling this method, unless you call hasher.init() again.
// hasher will still dispatch changes made programatically by calling hasher.setHash();
stop(): void;
// <static> {string} hasher.toString()
// Returns:
// {string} A string representation of the object.
toString(): string;
}
}
declare var hasher: HasherJs.HasherStatic;
// AMD
declare module 'hasher'{
export = hasher;
}
+91
View File
@@ -0,0 +1,91 @@
/// <reference path="http-status.d.ts" />
import httpStatus = require('http-status');
var str: string;
var nmr: number;
str = httpStatus[100];
str = httpStatus[101];
str = httpStatus[200];
str = httpStatus[201];
str = httpStatus[202];
str = httpStatus[203];
str = httpStatus[204];
str = httpStatus[205];
str = httpStatus[206];
str = httpStatus[300];
str = httpStatus[301];
str = httpStatus[302];
str = httpStatus[303];
str = httpStatus[304];
str = httpStatus[305];
str = httpStatus[307];
str = httpStatus[400];
str = httpStatus[401];
str = httpStatus[402];
str = httpStatus[403];
str = httpStatus[404];
str = httpStatus[405];
str = httpStatus[406];
str = httpStatus[407];
str = httpStatus[408];
str = httpStatus[409];
str = httpStatus[410];
str = httpStatus[411];
str = httpStatus[412];
str = httpStatus[413];
str = httpStatus[414];
str = httpStatus[415];
str = httpStatus[416];
str = httpStatus[417];
str = httpStatus[429];
str = httpStatus[500];
str = httpStatus[501];
str = httpStatus[502];
str = httpStatus[503];
str = httpStatus[504];
str = httpStatus[505];
nmr = httpStatus.CONTINUE;
nmr = httpStatus.SWITCHING_PROTOCOLS;
nmr = httpStatus.OK;
nmr = httpStatus.CREATED;
nmr = httpStatus.ACCEPTED;
nmr = httpStatus.NON_AUTHORITATIVE_INFORMATION;
nmr = httpStatus.NO_CONTENT;
nmr = httpStatus.RESET_CONTENT;
nmr = httpStatus.PARTIAL_CONTENT;
nmr = httpStatus.MULTIPLE_CHOICES;
nmr = httpStatus.MOVED_PERMANENTLY;
nmr = httpStatus.FOUND;
nmr = httpStatus.SEE_OTHER;
nmr = httpStatus.NOT_MODIFIED;
nmr = httpStatus.USE_PROXY;
nmr = httpStatus.TEMPORARY_REDIRECT;
nmr = httpStatus.BAD_REQUEST;
nmr = httpStatus.UNAUTHORIZED;
nmr = httpStatus.PAYMENT_REQUIRED;
nmr = httpStatus.FORBIDDEN;
nmr = httpStatus.NOT_FOUND;
nmr = httpStatus.METHOD_NOT_ALLOWED;
nmr = httpStatus.NOT_ACCEPTABLE;
nmr = httpStatus.PROXY_AUTHENTICATION_REQUIRED;
nmr = httpStatus.REQUEST_TIMEOUT;
nmr = httpStatus.CONFLICT;
nmr = httpStatus.GONE;
nmr = httpStatus.LENGTH_REQUIRED;
nmr = httpStatus.PRECONDITION_FAILED;
nmr = httpStatus.REQUEST_ENTITY_TOO_LARGE;
nmr = httpStatus.REQUEST_URI_TOO_LONG;
nmr = httpStatus.UNSUPPORTED_MEDIA_TYPE;
nmr = httpStatus.REQUESTED_RANGE_NOT_SATISFIABLE;
nmr = httpStatus.EXPECTATION_FAILED;
nmr = httpStatus.TOO_MANY_REQUESTS;
nmr = httpStatus.INTERNAL_SERVER_ERROR;
nmr = httpStatus.NOT_IMPLEMENTED;
nmr = httpStatus.BAD_GATEWAY;
nmr = httpStatus.SERVICE_UNAVAILABLE;
nmr = httpStatus.GATEWAY_TIMEOUT;
nmr = httpStatus.HTTP_VERSION_NOT_SUPPORTED;
+95
View File
@@ -0,0 +1,95 @@
// Type definitions for http-status v0.1.8
// Project: https://github.com/wdavidw/node-http-status
// Definitions by: Michael Zabka <https://github.com/misak113/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface HttpStatus {
100: string;
101: string;
200: string;
201: string;
202: string;
203: string;
204: string;
205: string;
206: string;
300: string;
301: string;
302: string;
303: string;
304: string;
305: string;
307: string;
400: string;
401: string;
402: string;
403: string;
404: string;
405: string;
406: string;
407: string;
408: string;
409: string;
410: string;
411: string;
412: string;
413: string;
414: string;
415: string;
416: string;
417: string;
429: string;
500: string;
501: string;
502: string;
503: string;
504: string;
505: string;
CONTINUE: number;
SWITCHING_PROTOCOLS: number;
OK: number;
CREATED: number;
ACCEPTED: number;
NON_AUTHORITATIVE_INFORMATION: number;
NO_CONTENT: number;
RESET_CONTENT: number;
PARTIAL_CONTENT: number;
MULTIPLE_CHOICES: number;
MOVED_PERMANENTLY: number;
FOUND: number;
SEE_OTHER: number;
NOT_MODIFIED: number;
USE_PROXY: number;
TEMPORARY_REDIRECT: number;
BAD_REQUEST: number;
UNAUTHORIZED: number;
PAYMENT_REQUIRED: number;
FORBIDDEN: number;
NOT_FOUND: number;
METHOD_NOT_ALLOWED: number;
NOT_ACCEPTABLE: number;
PROXY_AUTHENTICATION_REQUIRED: number;
REQUEST_TIMEOUT: number;
CONFLICT: number;
GONE: number;
LENGTH_REQUIRED: number;
PRECONDITION_FAILED: number;
REQUEST_ENTITY_TOO_LARGE: number;
REQUEST_URI_TOO_LONG: number;
UNSUPPORTED_MEDIA_TYPE: number;
REQUESTED_RANGE_NOT_SATISFIABLE: number;
EXPECTATION_FAILED: number;
TOO_MANY_REQUESTS: number;
INTERNAL_SERVER_ERROR: number;
NOT_IMPLEMENTED: number;
BAD_GATEWAY: number;
SERVICE_UNAVAILABLE: number;
GATEWAY_TIMEOUT: number;
HTTP_VERSION_NOT_SUPPORTED: number
}
declare var httpStatus: HttpStatus;
declare module 'http-status' {
export = httpStatus;
}
+103
View File
@@ -0,0 +1,103 @@
/// <reference path="imgur-rest-api.d.ts" />
function testAccount(account: ImgurRestApi.Account) : ImgurRestApi.Account {
return account;
}
function testAccountSettings(accountSettings: ImgurRestApi.AccountSettings) : ImgurRestApi.AccountSettings {
return accountSettings;
}
function testAlbum(album: ImgurRestApi.Album) : ImgurRestApi.Album {
return album;
}
function testAlbumImages(album: ImgurRestApi.Album) : ImgurRestApi.Image {
return album.images[0];
}
function testComment(comment: ImgurRestApi.Comment) : ImgurRestApi.Comment {
return comment;
}
function testConversation(conversation: ImgurRestApi.Conversation) : ImgurRestApi.Conversation {
return conversation;
}
function testCustomGallery(customGallery: ImgurRestApi.CustomGallery) : ImgurRestApi.CustomGallery {
return customGallery;
}
function testGalleryItem(galleryItem: ImgurRestApi.GalleryItem) : ImgurRestApi.GalleryItem {
return galleryItem;
}
function testGalleryAlbum(galleryItem: ImgurRestApi.GalleryItem) : ImgurRestApi.GalleryAlbum {
if(galleryItem.is_album) {
var galleryAlbum = <ImgurRestApi.GalleryAlbum> galleryItem;
return galleryAlbum;
}
return null;
}
function testGalleryImage(galleryItem: ImgurRestApi.GalleryItem) : ImgurRestApi.GalleryImage {
if(!galleryItem.is_album) {
var galleryImage = <ImgurRestApi.GalleryImage> galleryItem;
return galleryImage;
}
return null;
}
function testGalleryProfile(galleryProfile: ImgurRestApi.GalleryProfile) : ImgurRestApi.GalleryProfile {
return galleryProfile;
}
function testImage(image: ImgurRestApi.Image) : ImgurRestApi.Image {
return image;
}
function testMemeMeta(meta: ImgurRestApi.MemeMetadata) : ImgurRestApi.MemeMetadata {
return meta;
}
function testMessage(message: ImgurRestApi.Message) : ImgurRestApi.Message {
return message;
}
function testAccountNotificationsReply(accountNotif: ImgurRestApi.AccountNotifications) : ImgurRestApi.Notification<ImgurRestApi.Comment> {
return accountNotif.replies[0];
}
function testAccountNotificationsMessage(accountNotif: ImgurRestApi.AccountNotifications) : ImgurRestApi.Notification<ImgurRestApi.Conversation> {
return accountNotif.messages[0];
}
function testTag(tag: ImgurRestApi.Tag) : ImgurRestApi.Tag {
return tag;
}
function testTagVote(tagVote: ImgurRestApi.TagVote) : ImgurRestApi.TagVote {
return tagVote;
}
function testTopic(topic: ImgurRestApi.Topic) : ImgurRestApi.Topic {
return topic;
}
function testVote(vote: ImgurRestApi.Vote) : ImgurRestApi.Vote {
return vote;
}
function testResponseWithError(response: ImgurRestApi.Response<ImgurRestApi.GalleryProfile>) : ImgurRestApi.Error {
if(response.success === false) {
return <ImgurRestApi.Error> response.data;
}
return null;
}
function testResponseWithValue(response: ImgurRestApi.Response<ImgurRestApi.GalleryProfile>) : ImgurRestApi.GalleryProfile {
if(response.success === true) {
return <ImgurRestApi.GalleryProfile> response.data;
}
return null;
}
+252
View File
@@ -0,0 +1,252 @@
// Type definitions for Imgur REST API v3
// Project: https://api.imgur.com/
// Definitions by: Luke William Westby <http://github.com/lukewestby>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module ImgurRestApi {
interface Response<T> {
data: any; //T|Error;
status: number;
success: boolean;
}
interface Account {
id: number;
url: string;
bio: string;
reputation: number;
created: number;
pro_expiration: any; //number|boolean;
}
interface AccountSettings {
email: string;
high_quality: boolean;
public_images: boolean;
album_privacy: string;
pro_expiration: any; //number|boolean;
accepted_gallery_terms: boolean;
active_emails: Array<string>;
messaging_enabled: boolean;
blocked_users: Array<BlockedUser>;
}
interface Album {
id: string;
title: string;
description: string;
datetime: number;
cover: string;
cover_width: number;
cover_height: number;
account_url?: string;
account_id?: number;
privacy: string;
layout: string;
views: number;
link: string;
favorite: boolean;
nsfw?: boolean;
section: string;
order: number;
deletehash?: string;
images_count: number;
images: Array<Image>;
}
interface BlockedUser {
blocked_id: number;
blocked_url: string;
}
interface Comment {
id: number;
image_id: string;
comment: string;
author: string;
author_id: number;
on_album: boolean;
album_cover: string;
ups: number;
downs: number;
points: number;
datetime: number;
parent_id: number;
deleted: boolean;
vote?: string;
children: Array<Comment>
}
interface Conversation {
id: number;
last_message_preview: string;
datetime: number;
with_account_id: number;
with_account: string;
message_count: number;
messages?: Array<Message>;
done?: boolean;
page?: number;
}
interface CustomGallery {
account_url: string;
link: string;
tags: Array<string>
item_count: number;
items: Array<GalleryItem>;
}
interface GalleryItem {
id: string;
title: string;
description: string;
datetime: number;
account_url?: string;
account_id?: number;
ups: number;
downs: number;
score: number;
is_album: boolean;
views: number;
link: string;
vote?: string;
favorite: boolean;
nsfw?: boolean;
comment_count: number;
topic: string;
topic_id: number;
}
interface GalleryAlbum extends GalleryItem {
cover: string;
cover_width: number;
cover_height: number;
privacy: string;
layout: string;
images_count: number;
images: Array<Image>;
}
interface GalleryImage extends GalleryItem {
type: string;
animated: boolean;
width: number;
height: number;
size: number;
bandwidth: number;
deletehash?: string;
gifv?: string;
mp4?: string;
webm?: string;
looping?: boolean;
section: string;
}
interface GalleryProfile {
total_gallery_comments: number;
total_gallery_favorites: number;
total_gallery_submissions: number;
trophies: Array<Trophy>;
}
interface Trophy {
id: number;
name: string;
name_clean: string;
description: string;
data: string;
data_link: string;
datetime: number;
image: string;
}
interface Image {
id: string;
title: string;
description: string;
datetime: number;
type: string;
animated: boolean;
width: number;
height: number;
size: number;
views: number;
bandwidth: number;
deletehash?: string;
name?: string;
section: string;
link: string;
gifv?: string;
mp4?: string;
webm?: string;
looping?: boolean;
vote?: string;
favorite: boolean;
nsfw?: boolean;
account_url?: string;
account_id?: number;
}
interface MemeMetadata {
meme_name: string;
top_text: string;
bottom_text: string;
bg_image: string;
}
interface Message {
id: number;
from: string;
account_id: number;
sender_id: number;
body: string;
conversation_id: number;
datetime: number;
}
interface Notification<T> {
id: number;
account_id: number;
viewed: boolean;
content: T;
}
interface AccountNotifications {
replies: Array<Notification<Comment>>;
messages: Array<Notification<Conversation>>;
}
interface Tag {
name: string;
followers: number;
total_items: number;
following?: boolean;
items: Array<GalleryItem>
}
interface TagVote {
ups: number;
downs: number;
name: string;
author: string;
}
interface Topic {
id: number;
name: string;
description: string;
}
interface Vote {
ups: number;
downs: number;
}
interface Error {
error: string;
request: string;
method: string;
}
}
+2
View File
@@ -17,4 +17,6 @@ function test_intercom_static() {
console.log(onceListenerInvokedTimes === 1);
instance.emit("eventWithoutAMessage");
instance.off("test", detect);
}
+6
View File
@@ -17,6 +17,12 @@ declare module intercom {
* @param fn The listener method to invoke.
*/
on(name: string, fn: Function): void;
/**
* Remove a registered event listener
* @param name The string event listener name.
* @param fn The listener method to remove.
*/
off(name: string, fn: Function): void;
/**
* Given a unique key to represent the function, fn will be invoked in only one window. The ttl argument represents the number of seconds before the function can be called again.
* @param key The unique function identifier key

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