Merge branch 'request-promise' of https://github.com/joeskeen/DefinitelyTyped; branch 'master' of https://github.com/borisyankov/DefinitelyTyped into request-promise

* 'request-promise' of https://github.com/joeskeen/DefinitelyTyped:

# By Ilya Mochalov (83) and others
# Via Masahiro Wakame (243) and others
* 'master' of https://github.com/borisyankov/DefinitelyTyped: (473 commits)
  provide the explicit types in geolocation-tests to make the build happy
  in ng-cordova files correct the conventions for multiple authors
  add the ngCordova type definitions for network,deviceOrientation,deviceMotion, appAvailability,geolocation,emailComposer and dialogs
  lodash: signatures of the method _.forEach have been changed
  lodash: signatures of the method _.some have been changed
  lodash: signatures of the method _.compact have been changed
  lodash: signatures of the method _.startsWith have been changed
  lodash: signatures of the method _.callback have been changed
  Add delegate and undelegate methods to View
  Updated net.connect, combined url.Url and url.UrlOptions.
  fix angularjs/angular-resource.d.ts
  Added definition for inline-css
  rename the folder from ngCordova to follow the convention similar to bower & npm
  lodash: signatures of the method _.map changed
  added missing declaration for optional dynamicHash property on DurandalRelativeRouteSettings to support TypeScript 1.6 tightened compilation rules
  lodash: signatures of the method _.padLeft have been changed
  lodash: signatures of the method _.snakeCase have been changed
  lodash: signatures of the method _.propertyOf have been changed
  lodash: signatures of the method _.parseInt have been changed
  lodash: signatures of the method _.matchesProperty have been changed
  ...

Conflicts:
	request-promise/request-promise.d.ts
	request/request.d.ts
This commit is contained in:
Joe Skeen
2015-11-04 10:43:58 -07:00
380 changed files with 69200 additions and 40813 deletions

View File

@@ -16,9 +16,6 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](amplify-deferred/amplify-deferred.d.ts) [AmplifyJs 1.1.0 using JQuery Deferred](http://amplifyjs.com) by [Jonas Eriksson](https://github.com/joeriks), [Laurentiu Stamate](https://github.com/laurentiustamate94)
* [:link:](amqp-rpc/amqp-rpc.d.ts) [amqp-rpc](https://github.com/demchenkoe/node-amqp-rpc) by [Wonshik Kim](https://github.com/wokim)
* [:link:](amqplib/amqplib.d.ts) [amqplib 0.3.x](https://github.com/squaremo/amqp.node) by [Michael Nahkies](https://github.com/mnahkies)
* [:link:](angular2/angular2.d.ts) [Angular](http://angular.io) by [angular team](https://github.com/angular)
* [:link:](angular2/http.d.ts) [Angular](http://angular.io) by [angular team](https://github.com/angular)
* [:link:](angular2/router.d.ts) [Angular](http://angular.io) by [angular team](https://github.com/angular)
* [:link:](ng-file-upload/ng-file-upload.d.ts) [Angular File Upload](https://github.com/danialfarid/ng-file-upload) by [John Reilly](https://github.com/johnnyreilly)
* [:link:](angular-file-upload/angular-file-upload.d.ts) [Angular File Upload](https://github.com/danialfarid/ng-file-upload) by [John Reilly](https://github.com/johnnyreilly)
* [:link:](angular-growl-v2/angular-growl-v2.d.ts) [Angular Growl 2 v.0.7.3](http://janstevens.github.io/angular-growl-2) by [Tadeusz Hucal](https://github.com/mkp05)
@@ -38,6 +35,10 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](angular-toasty/angular-toasty.d.ts) [Angular Toasty](https://github.com/invertase/angular-toasty) by [Dominik Muench](https://github.com/muenchdo)
* [:link:](angular-translate/angular-translate.d.ts) [Angular Translate (pascalprecht.translate module)](https://github.com/PascalPrecht/angular-translate) by [Michel Salib](https://github.com/michelsalib)
* [:link:](angular-ui-bootstrap/angular-ui-bootstrap.d.ts) [Angular UI Bootstrap](https://github.com/angular-ui/bootstrap) by [Brian Surowiec](https://github.com/xt0rted)
* [:link:](angular2/router.d.ts) [Angular v2.0.0-39](http://angular.io) by [angular team](https://github.com/angular)
* [:link:](angular2/angular2.d.ts) [Angular v2.0.0-39](http://angular.io) by [angular team](https://github.com/angular)
* [:link:](angular2/http.d.ts) [Angular v2.0.0-local_sha.7d5c3eb](http://angular.io) by [angular team](https://github.com/angular)
* [:link:](angular2/test_lib.d.ts) [Angular v2.0.0-local_sha.7d5c3eb](http://angular.io) by [angular team](https://github.com/angular)
* [:link:](angular-wizard/angular-wizard.d.ts) [Angular Wizard](https://github.com/mgonto/angular-wizard) by [Marko Jurisic](https://github.com/mjurisic)
* [:link:](angular-bootstrap-lightbox/angular-bootstrap-lightbox.d.ts) [angular-bootstrap-lightbox](https://github.com/compact/angular-bootstrap-lightbox) by [Roland Zwaga](https://github.com/rolandzwaga)
* [:link:](angular-dynamic-locale/angular-dynamic-locale.d.ts) [angular-dynamic-locale](https://github.com/lgalfaso/angular-dynamic-locale) by [Stephen Lautier](https://github.com/stephenlautier)
@@ -107,6 +108,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](backgrid/backgrid.d.ts) [Backgrid](http://backgridjs.com) by [Jeremy Lujan](https://github.com/jlujan)
* [:link:](baconjs/baconjs.d.ts) [Bacon.js](https://baconjs.github.io) by [Alexander Matsievsky](https://github.com/alexander-matsievsky)
* [:link:](bardjs/bardjs.d.ts) [bardjs](https://github.com/wardbell/bardjs) by [Andrew Archibald](https://github.com/TepigMC)
* [:link:](basic-auth/basic-auth.d.ts) [basic-auth](https://github.com/jshttp/basic-auth) by [Clément Bourgeois](https://github.com/moonpyk)
* [:link:](batch-stream/batch-stream.d.ts) [batch-stream](https://github.com/segmentio/batch-stream) by [Nicholas Penree](http://github.com/drudge)
* [:link:](bcrypt/bcrypt.d.ts) [bcrypt](https://www.npmjs.org/package/bcrypt) by [Peter Harris](https://github.com/codeanimal)
* [:link:](better-curry/better-curry.d.ts) [better-curry](https://github.com/pocesar/js-bettercurry) by [Paulo Cesar](https://github.com/pocesar)
@@ -130,8 +132,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](bootstrap-slider/bootstrap-slider.d.ts) [bootstrap-slider.js](https://github.com/seiyria/bootstrap-slider) by [Daniel Beckwith](https://github.com/dbeckwith)
* [:link:](bootstrap.datepicker/bootstrap.datepicker.d.ts) [bootstrap.datepicker](https://github.com/eternicode/bootstrap-datepicker) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](bootstrap.paginator/bootstrap.paginator.d.ts) [bootstrap.paginator](https://github.com/lyonlai/bootstrap-paginator) by [derikwhittaker](https://github.com/derikwhittaker)
* [:link:](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:](bowser/bowser.d.ts) [Bowser 1.x](https://github.com/ded/bowser) by [Paulo Cesar](https://github.com/pocesar)
* [:link:](breeze/breeze.d.ts) [Breeze 1.5.x](http://www.breezejs.com) by [Boris Yankov](https://github.com/borisyankov), [IdeaBlade](https://github.com/IdeaBlade/Breeze)
* [:link:](browser-harness/browser-harness.d.ts) [Browser Harness](https://github.com/scriby/browser-harness) by [Chris Scribner](https://github.com/scriby)
@@ -178,10 +180,10 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](classnames/classnames.d.ts) [classnames](https://github.com/JedWatson/classnames) by [Dave Keen](http://www.keendevelopment.ch), [Adi Dahiya](https://github.com/adidahiya), [Jason Killian](https://github.com/JKillian)
* [:link:](cli-color/cli-color.d.ts) [cli-color](https://github.com/medikoo/cli-color) by [Joel Spadin](https://github.com/ChaosinaCan)
* [:link:](clone/clone.d.ts) [clone](https://github.com/pvorb/node-clone) by [Kieran Simpson](https://github.com/kierans/DefinitelyTyped)
* [:link:](codemirror/codemirror.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [mihailik](https://github.com/mihailik)
* [:link:](codemirror/searchcursor.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [jacqt](https://github.com/jacqt)
* [:link:](codemirror/codemirror-matchbrackets.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [Sixin Li](https://github.com/sixinli)
* [:link:](codemirror/codemirror-showhint.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [jacqt](https://github.com/jacqt), [basarat](https://github.com/basarat)
* [:link:](codemirror/codemirror.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [mihailik](https://github.com/mihailik)
* [:link:](codemirror/searchcursor.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [jacqt](https://github.com/jacqt)
* [:link:](coffeeify/coffeeify.d.ts) [coffeeify](https://github.com/jnordberg/coffeeify) by [Qubo](https://github.com/tkQubo)
* [:link:](colorbrewer/colorbrewer.d.ts) [colorbrewer](https://github.com/jeanlauliac/colorbrewer) by [Matt Traynham](https://github.com/mtraynham)
* [:link:](colors/colors.d.ts) [Colors.js 0.6.0-1](https://github.com/Marak/colors.js) by [Bart van der Schoor](https://github.com/Bartvds)
@@ -192,6 +194,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](configstore/configstore.d.ts) [configstore](https://github.com/yeoman/configstore) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](connect-flash/connect-flash.d.ts) [connect-flash](https://github.com/jaredhanson/connect-flash) by [Andreas Gassmann](https://github.com/AndreasGassmann)
* [:link:](connect-modrewrite/connect-modrewrite.d.ts) [connect-modrewrite](https://github.com/tinganho/connect-modrewrite) by [Tingan Ho](https://github.com/tinganho)
* [:link:](connect-mongo/connect-mongo.d.ts) [connect-mongo](https://github.com/kcbanner/connect-mongo) by [Mizuki Yamamoto](https://github.com/Syati)
* [:link:](connect-slashes/connect-slashes.d.ts) [connect-slashes](https://github.com/avinoamr/connect-slashes) by [Sam Herrmann](https://github.com/samherrmann)
* [:link:](consolidate/consolidate.d.ts) [consolidate](https://github.com/visionmedia/consolidate.js) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](constant-case/constant-case.d.ts) [constant-case](https://github.com/blakeembrey/constant-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
@@ -204,6 +207,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](cordova-ionic/plugins/keyboard.d.ts) [Cordova Keyboard plugin](https://github.com/driftyco/ionic-plugins-keyboard) by [Hendrik Maus](https://github.com/hendrikmaus)
* [:link:](cordova-plugin-app-version/cordova-plugin-app-version.d.ts) [cordova-plugin-app-version](https://github.com/whiteoctober/cordova-plugin-app-version) by [Markus Wagner](https://github.com/Ritzlgrmft)
* [:link:](cordova-plugin-ibeacon/cordova-plugin-ibeacon.d.ts) [cordova-plugin-ibeacon](https://github.com/petermetz/cordova-plugin-ibeacon) by [Markus Wagner](https://github.com/Ritzlgrmft)
* [:link:](cordova-plugin-ouralabs/cordova-plugin-ouralabs.d.ts) [cordova-plugin-ouralabs](https://github.com/Justin-Credible/cordova-plugin-ouralabs) by [Justin Unterreiner](https://github.com/Justin-Credible)
* [:link:](cordovarduino/cordovarduino.d.ts) [Cordovarduino plugin](https://github.com/stereolux/cordovarduino) by [Hendrik Maus](https://github.com/hendrikmaus)
* [:link:](core-decorators/core-decorators.d.ts) [core-decorators.js](https://github.com/jayphelps/core-decorators.js) by [Qubo](https://github.com/tkqubo)
* [:link:](core-js/core-js.d.ts) [core-js](https://github.com/zloirock/core-js) by [Ron Buckton](http://github.com/rbuckton)
@@ -260,6 +264,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](dotdotdot/dotdotdot.d.ts) [dotdotdot](http://dotdotdot.frebsite.nl) by [Milan Jaros](https://github.com/milanjaros)
* [:link:](doublearray/doublearray.d.ts) [doublearray](https://github.com/takuyaa/doublearray) by [MIZUSHIMA Junki](https://github.com/mzsm)
* [:link:](dragula/dragula.d.ts) [dragula](http://bevacqua.github.io/dragula) by [Paul Welter](https://github.com/pwelter34)
* [:link:](hystrixjs/hystrixjs.d.ts) [dragula](https://bitbucket.org/igor_sechyn/hystrixjs) by [Igor Sechyn](https://github.com/igorsechyn)
* [:link:](drop/drop.d.ts) [Drop](http://github.hubspot.com/drop) by [Adi Dahiya](https://github.com/adidahiya)
* [:link:](dropboxjs/dropboxjs.d.ts) [dropbox-js](https://github.com/dropbox/dropbox-js) by [Steve Fenton](https://github.com/Steve-Fenton), [Pedro Casaubon](https://github.com/xperiments)
* [:link:](dropzone/dropzone.d.ts) [Dropzone](http://www.dropzonejs.com) by [Natan Vivo](https://github.com/nvivo), [Andy Hawkins](https://github.com/a904guy/,http://a904guy.com/,http://www.bmbsqd.com), [Vasya Aksyonov](https://github.com/outring)
@@ -272,8 +277,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](easy-jsend/easy-jsend.d.ts) [easy-jsend](https://github.com/DeadAlready/easy-jsend) by [Karl Düüna](https://github.com/DeadAlready)
* [:link:](easy-session/easy-session.d.ts) [easy-session](https://github.com/DeadAlready/node-easy-session) by [Karl Düüna](https://github.com/DeadAlready)
* [:link:](easy-table/easy-table.d.ts) [easy-table](https://github.com/eldargab/easy-table) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](easy-x-headers/easy-x-headers.d.ts) [easy-x-headers](https://github.com/DeadAlready/easy-x-headers) by [Karl Düüna](https://github.com/DeadAlready)
* [:link:](easy-xapi-supertest/easy-xapi-supertest.d.ts) [easy-x-headers](https://github.com/DeadAlready/easy-x-headers) by [Karl Düüna](https://github.com/DeadAlready)
* [:link:](easy-x-headers/easy-x-headers.d.ts) [easy-x-headers](https://github.com/DeadAlready/easy-x-headers) by [Karl Düüna](https://github.com/DeadAlready)
* [:link:](easy-xapi/easy-xapi.d.ts) [easy-xapi](https://github.com/DeadAlready/easy-xapi) by [Karl Düüna](https://github.com/DeadAlready)
* [:link:](easy-xapi-utils/easy-xapi-utils.d.ts) [easy-xapi-utils](https://github.com/DeadAlready/easy-xapi-utils) by [Karl Düüna](https://github.com/DeadAlready)
* [:link:](easystarjs/easystarjs.d.ts) [EasyStar.js](http://easystarjs.com) by [Magnus Gustafsson](https://github.com/borundin)
@@ -314,6 +319,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](express-less/express-less.d.ts) [express-less](https://www.npmjs.com/package/express-less) by [xyb](https://github.com/xieyubo)
* [:link:](express-myconnection/express-myconnection.d.ts) [express-myconnection](https://www.npmjs.org/package/express-myconnection) by [Michael Ferris](https://github.com/Cellule)
* [:link:](express-partials/express-partials.d.ts) [express-partials](https://github.com/publicclass/express-partials) by [jt000](https://github.com/jt000)
* [:link:](express-route-fs/express-route-fs.d.ts) [express-route-fs](https://github.com/kripod/express-route-fs) by [Kristóf Poduszló](https://github.com/kripod)
* [: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)
@@ -344,6 +350,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](firebase-client/firebase-client.d.ts) [Firebase Client](https://www.github.com/jpstevens/firebase-client) by [Andrew Breen](https://github.com/fpsscarecrow)
* [:link:](firebase/firebase-simplelogin.d.ts) [Firebase Simple Login](https://www.firebase.com/docs/security/simple-login-overview.html) by [Wilker Lucio](http://github.com/wilkerlucio)
* [:link:](first-mate/first-mate.d.ts) [first-mate](https://github.com/atom/first-mate) by [Vadim Macagon](https://github.com/enlight)
* [:link:](flake-idgen/flake-idgen.d.ts) [flakge-idgen](https://github.com/T-PWK/flake-idgen) by [Yuce Tekol](http://yuce.me)
* [:link:](flexSlider/flexSlider.d.ts) [FlexSlider 2 jquery plugin](https://github.com/woothemes/FlexSlider) by [Diullei Gomes](https://github.com/diullei)
* [:link:](flight/flight.d.ts) [Flight](http://flightjs.github.com/flight) by [Jonathan Hedrén](https://github.com/jonathanhedren)
* [:link:](flipsnap/flipsnap.d.ts) [flipsnap.js](http://pxgrid.github.io/js-flipsnap) by [kubosho](https://github.com/kubosho), [gsino](https://github.com/gsino), [Mayuki Sawatari](https://github.com/mayuki)
@@ -358,9 +365,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](formidable/formidable.d.ts) [Formidable](https://github.com/felixge/node-formidable) by [Wim Looman](https://github.com/Nemo157)
* [:link:](foundation/foundation.d.ts) [Foundation](http://foundation.zurb.com) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](fpsmeter/FPSMeter.d.ts) [FPSmeter](http://darsa.in/fpsmeter) by [Aaron Lampros](http://github.com/alampros)
* [:link:](freedom/freedom.d.ts) [freedom](https://github.com/freedomjs/freedom) by [Jonathan Pevarnek](https://github.com/jpevarnek)
* [:link:](freedom/freedom-module-env.d.ts) [freedom](https://github.com/freedomjs/freedom) by [Jonathan Pevarnek](https://github.com/jpevarnek)
* [:link:](freedom/freedom-core-env.d.ts) [freedom](https://github.com/freedomjs/freedom) by [Jonathan Pevarnek](https://github.com/jpevarnek)
* [:link:](freedom/freedom-module-env.d.ts) [freedom](https://github.com/freedomjs/freedom) by [Jonathan Pevarnek](https://github.com/jpevarnek)
* [:link:](freedom/freedom.d.ts) [freedom](https://github.com/freedomjs/freedom) by [Jonathan Pevarnek](https://github.com/jpevarnek)
* [:link:](from/from.d.ts) [from](https://github.com/dominictarr/from) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](fs-ext/fs-ext.d.ts) [fs-ext](https://github.com/baudehlo/node-fs-ext) by [Oguzhan Ergin](https://github.com/OguzhanE)
* [:link:](fs-extra/fs-extra.d.ts) [fs-extra](https://github.com/jprichardson/node-fs-extra) by [midknight41](https://github.com/midknight41)
@@ -409,9 +416,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](gridfs-stream/gridfs-stream.d.ts) [gridfs-stream](https://github.com/aheckmann/gridfs-stream) by [Lior Mualem](https://github.com/liorm)
* [:link:](gridstack/gridstack.d.ts) [Gridstack](http://troolee.github.io/gridstack.js) by [Pascal Senn](https://github.com/PascalSenn)
* [:link:](gruntjs/gruntjs.d.ts) [Grunt 0.4.x](http://gruntjs.com) by [Jeff May](https://github.com/jeffmay), [Basarat Ali Syed](https://github.com/basarat)
* [:link:](gsap/Core.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gsap/TweenLite.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gsap/Ease.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gsap/Core.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gulp/gulp.d.ts) [Gulp v3.8.x](http://gulpjs.com) by [Drew Noakes](https://drewnoakes.com)
* [:link:](gulp-autoprefixer/gulp-autoprefixer.d.ts) [gulp-autoprefixer](https://github.com/sindresorhus/gulp-autoprefixer) by [Asana](https://asana.com)
* [:link:](gulp-cached/gulp-cached.d.ts) [gulp-cached](https://github.com/wearefractal/gulp-cached) by [Thomas Corbière](https://github.com/tomc974)
@@ -420,8 +427,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](gulp-coffeeify/gulp-coffeeify.d.ts) [gulp-coffeeify](https://github.com/nariyu/gulp-coffeeify) by [Qubo](https://github.com/tkQubo)
* [:link:](gulp-coffeelint/gulp-coffeelint.d.ts) [gulp-coffeelint](https://github.com/janraasch/gulp-coffeelint) by [Qubo](https://github.com/tkQubo)
* [:link:](gulp-concat/gulp-concat.d.ts) [gulp-concat](http://github.com/wearefractal/gulp-concat) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](gulp-rev/gulp-rev.d.ts) [gulp-csso](https://github.com/sindresorhus/gulp-rev) by [Tanguy Krotoff](https://github.com/tkrotoff)
* [:link:](gulp-csso/gulp-csso.d.ts) [gulp-csso](https://github.com/ben-eb/gulp-csso) by [Tanguy Krotoff](https://github.com/tkrotoff)
* [:link:](gulp-rev/gulp-rev.d.ts) [gulp-csso](https://github.com/sindresorhus/gulp-rev) by [Tanguy Krotoff](https://github.com/tkrotoff)
* [:link:](gulp-debug/gulp-debug.d.ts) [gulp-debug](https://github.com/sindresorhus/gulp-debug) by [Tanguy Krotoff](https://github.com/tkrotoff)
* [:link:](gulp-dtsm/gulp-dtsm.d.ts) [gulp-dtsm](https://github.com/9joneg/gulp-dtsm) by [Aya Morisawa](https://github.com/AyaMorisawa)
* [:link:](gulp-espower/gulp-espower.d.ts) [gulp-espower](https://github.com/power-assert-js/gulp-espower) by [Qubo](https://github.com/tkQubo)
@@ -493,8 +500,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](humane/humane.d.ts) [Humane](http://wavded.github.com/humane-js) by [jmvrbanac](https://github.com/jmvrbanac)
* [:link:](hypertext-application-language/hypertext-application-language.d.ts) [Hypertext Application Language Draft 6](https://tools.ietf.org/html/draft-kelly-json-hal-06) by [Maks3w](https://github.com/maks3w)
* [:link:](i18n-node/i18n-node.d.ts) [i18n-node](https://github.com/mashpie/i18n-node) by [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](i18next/i18next.d.ts) [i18next](http://i18next.com) by [Maarten Docter](https://github.com/mdocter)
* [:link:](ng-i18next/ng-i18next.d.ts) [i18next](https://github.com/i18next/ng-i18next) by [Cyril Schumacher](https://github.com/cyrilschumacher)
* [:link:](i18next/i18next.d.ts) [i18next](http://i18next.com) by [Maarten Docter](https://github.com/mdocter)
* [:link:](iban/iban.d.ts) [iban.js](https://github.com/arhs/iban.js) by [Cyril Schumacher](https://github.com/cyrilschumacher)
* [:link:](icheck/icheck.d.ts) [iCheck](http://damirfoy.com/iCheck) by [Dániel Tar](https://github.com/qcz)
* [:link:](imagemagick/imagemagick.d.ts) [imagemagick](http://github.com/rsms/node-imagemagick) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
@@ -524,6 +531,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](iso8601-localizer/iso8601-localizer.d.ts) [ISO8601-Localizer](https://github.com/avielfedida/ISO8601-Localizer) by [Aviel Fedida](https://github.com/avielfedida)
* [:link:](ix.js/ix.d.ts) [IxJS 1.0.6 / ix.js](https://github.com/Reactive-Extensions/IxJS) by [Igor Oleinikov](https://github.com/Igorbek)
* [:link:](ix.js/l2o.d.ts) [IxJS 1.0.6 / l2o.js](https://github.com/Reactive-Extensions/IxJS) by [Igor Oleinikov](https://github.com/Igorbek)
* [:link:](jade/jade.d.ts) [jade](https://github.com/jadejs/jade) by [Panu Horsmalahti](https://github.com/panuhorsmalahti)
* [:link:](jake/jake.d.ts) [jake](https://github.com/mde/jake) by [Kon](http://phyzkit.net)
* [:link:](jasmine/jasmine.d.ts) [Jasmine](http://jasmine.github.io) by [Boris Yankov](https://github.com/borisyankov), [Theodore Brown](https://github.com/theodorejb), [David Pärsson](https://github.com/davidparsson)
* [:link:](jasmine-data_driven_tests/jasmine-data_driven_tests.d.ts) [Jasmine Data Driven Tests](https://github.com/gburghardt/jasmine-data_driven_tests) by [Anthony MacKinnon](https://github.com/AnthonyMacKinnon)
@@ -544,7 +552,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](jjve/jjve.d.ts) [JJVE](https://github.com/silas/jjve) by [Wim Looman](https://github.com/Nemo157)
* [:link:](joData/joData.d.ts) [joData](https://github.com/mccow002/joData) by [Chris Wrench](https://github.com/cgwrench)
* [: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), [Laurence Dougal Myers](https://github.com/laurence-myers)
* [:link:](joi/joi.d.ts) [joi](https://github.com/spumko/joi) by [Bart van der Schoor](https://github.com/Bartvds), [Laurence Dougal Myers](https://github.com/laurence-myers), [Christopher Glantschnig](https://github.com/cglantschnig)
* [:link:](jointjs/jointjs.d.ts) [Joint JS](http://www.jointjs.com) by [Aidan Reel](http://github.com/areel), [David Durman](http://github.com/DavidDurman), [Ewout Van Gossum](https://github.com/DenEwout)
* [:link:](jqrangeslider/jqrangeslider.d.ts) [jQRangeSlider](http://ghusse.github.com/jQRangeSlider) by [Dániel Tar](https://github.com/qcz)
* [:link:](jquery/jquery.d.ts) [jQuery 1.10.x / 2.0.x](http://jquery.com) by [Boris Yankov](https://github.com/borisyankov), [Christian Hoffmeister](https://github.com/choffmeister), [Steve Fenton](https://github.com/Steve-Fenton), [Diullei Gomes](https://github.com/Diullei), [Tass Iliopoulos](https://github.com/tasoili), [Jason Swearingen](https://github.com/jasons-novaleaf), [Sean Hill](https://github.com/seanski), [Guus Goossens](https://github.com/Guuz), [Kelly Summerlin](https://github.com/ksummerlin), [Basarat Ali Syed](https://github.com/basarat), [Nicholas Wolverson](https://github.com/nwolverson), [Derek Cicerone](https://github.com/derekcicerone), [Andrew Gaspar](https://github.com/AndrewGaspar), [James Harrison Fisher](https://github.com/jameshfisher), [Seikichi Kondo](https://github.com/seikichi), [Benjamin Jackman](https://github.com/benjaminjackman), [Poul Sorensen](https://github.com/s093294), [Josh Strobl](https://github.com/JoshStrobl), [John Reilly](https://github.com/johnnyreilly), [Dick van den Brink](https://github.com/DickvdBrink)
@@ -553,6 +561,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](jquery.colorpicker/jquery.colorpicker.d.ts) [jQuery Colorpicker Plugin](https://github.com/vanderlee/colorpicker) by [Jeffery Grajkowski](https://github.com/pushplay)
* [:link:](jquery.contextMenu/jquery.contextMenu.d.ts) [jQuery contextMenu](http://medialize.github.com/jQuery-contextMenu) by [Natan Vivo](https://github.com/nvivo)
* [:link:](jquery.cookie/jquery.cookie.d.ts) [jQuery Cookie Plugin](https://github.com/carhartl/jquery-cookie) by [Roy Goode](https://github.com/RoyGoode), [Ben Lorantfy](https://github.com/BenLorantfy)
* [:link:](jquery-cropbox/jquery-cropbox.d.ts) [jQuery cropbox](https://github.com/acornejo/jquery-cropbox) by [Per Kastman](https://github.com/PerKastman)
* [:link:](jquery.cycle2/jquery.cycle2.d.ts) [jQuery Cycle2 version (build 20140216)](http://jquery.malsup.com/cycle2) by [Donny Nadolny](https://github.com/dnadolny)
* [:link:](jquery.dataTables/jquery.dataTables.d.ts) [JQuery DataTables](http://www.datatables.net) by [Kiarash Ghiaseddin](https://github.com/Silver-Connection/DefinitelyTyped), [Omid Rad](https://github.com/omidkrad), [Armin Sander](https://github.com/pragmatrix)
* [:link:](jquery.fileupload/jquery.fileupload.d.ts) [jQuery File Upload Plugin](https://github.com/blueimp/jQuery-File-Upload) by [Rob Alarcon](https://github.com/rob-alarcon)
@@ -581,6 +590,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](jquery-handsontable/jquery-handsontable.d.ts) [jquery-handsontable](http://handsontable.com) by [Ted John](https://github.com/intelorca)
* [:link:](jquery.menuaim/jquery.menuaim.d.ts) [jQuery-menu-aim](https://github.com/kamens/jQuery-menu-aim) by [Robert Fonseca-Ensor](http://www.robfe.com)
* [:link:](jquery.pjax/jquery.pjax.d.ts) [jquery-pjax](https://github.com/defunkt/jquery-pjax) by [Junle Li](https://github.com/lijunle)
* [:link:](jquery-timeentry/jquery-timeentry.d.ts) [jQuery-timeentry.js](https://github.com/kbwood/timeentry) by [Mark Nadig](https://github.com/marknadig)
* [:link:](jquery-urlparam/jquery-urlparam.d.ts) [jquery-urlparam](https://gist.github.com/stpettersens/e1f4478f299b6f4905c1) by [Sam Saint-Pettersen](https://github.com/stpettersens)
* [:link:](jquery.address/jquery.address.d.ts) [jQuery.Address](https://github.com/asual/jquery-address) by [Martin Duparc](https://github.com/martinduparc), [Tim Klingeleers](https://github.com/mardaneus86)
* [:link:](jquery.ajaxfile/jquery.ajaxFile.d.ts) [jquery.ajaxfile](https://github.com/fpellet/jquery.ajaxFile) by [Florent PELLET](https://github.com/fpellet)
@@ -609,6 +619,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](jquery.scrollTo/jquery.scrollTo.d.ts) [jQuery.scrollTo.js](https://github.com/flesler/jquery.scrollTo) by [Neil Stalker](https://github.com/nestalk)
* [:link:](jquery.simulate/jquery.simulate.d.ts) [jquery.simulate.js](https://github.com/jquery/jquery-simulate) by [Derek Cicerone](https://github.com/derekcicerone)
* [:link:](jquery.slimScroll/jquery.slimScroll.d.ts) [jQuery.slimScroll](https://github.com/rochal/jQuery-slimScroll) by [Chintan Shah](https://github.com/Promact)
* [:link:](jquery.soap/jquery.soap.d.ts) [jQuery.SOAP](https://github.com/doedje/jquery.soap) by [Roland Greim](https://github.com/tigerxy)
* [:link:](jquery.sortElements/jquery.sortElement.d.ts) [jQuery.sortElements](http://james.padolsey.com/javascript/sorting-elements-with-jquery) by [Tim Bureck](https://github.com/tbureck)
* [:link:](jquery.superLink/jquery.superLink.d.ts) [jquery.superLink](http://james.padolsey.com/demos/plugins/jQuery/superLink/superlink.jquery.js) by [Blake Niemyjski](https://github.com/niemyjski)
* [:link:](jquery.tile/jquery.tile.d.ts) [jquery.tile.js](https://github.com/urin/jquery.tile.js) by [Shunsuke Ohtani](https://github.com/zaneli)
@@ -624,6 +635,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](js-cookie/js-cookie.d.ts) [js-cookie](https://github.com/js-cookie/js-cookie) by [Theodore Brown](https://github.com/theodorejb)
* [:link:](js-fixtures/fixtures.d.ts) [js-fixtures](https://github.com/badunk/js-fixtures) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid)
* [:link:](js-git/js-git.d.ts) [js-git](https://github.com/creationix/js-git) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](js-md5/md5.d.ts) [js-md5](https://github.com/emn178/js-md5) by [Roland Greim](https://github.com/tigerxy)
* [:link:](js-signals/js-signals.d.ts) [JS-Signals](http://millermedeiros.github.io/js-signals) by [Diullei Gomes](https://github.com/diullei)
* [:link:](js-yaml/js-yaml.d.ts) [js-yaml](https://github.com/nodeca/js-yaml) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](blocks/blocks.d.ts) [jsblocks](http://jsblocks.com) by [Krzysztof Śmigiel](https://github.com/ksmigiel)
@@ -712,6 +724,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](jquery.livestampjs/jquery.livestampjs.d.ts) [Livestamp.js](http://mattbradley.github.com/livestampjs) by [Vincent Bortone](https://github.com/vbortone)
* [:link:](lodash/lodash.d.ts) [Lo-Dash](http://lodash.com) by [Brian Zengel](https://github.com/bczengel), [Ilya Mochalov](https://github.com/chrootsu)
* [:link:](lockfile/lockfile.d.ts) [lockfile](https://github.com/isaacs/lockfile) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](lodash-decorators/lodash-decorators.d.ts) [lodash-decorators](https://github.com/steelsojka/lodash-decorators) by [Qubo](https://github.com/tkqubo)
* [: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)
@@ -745,12 +758,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](markerclustererplus/markerclustererplus.d.ts) [MarkerClustererPlus for Google Maps V3](http://github.com/mahnunchik/markerclustererplus) by [Mathias Rodriguez](http://github.com/enanox)
* [:link:](markitup/markitup.d.ts) [markitup 1.x](https://github.com/markitup/1.x) by [drillbits](https://github.com/drillbits)
* [:link:](maskedinput/maskedinput.d.ts) [Masked Input plugin for jQuery](http://digitalbush.com/projects/masked-input-plugin) by [Lokesh Peta](https://github.com/lokeshpeta)
* [:link:](material-ui/material-ui.d.ts) [material-ui](https://github.com/callemall/material-ui) by [Nathan Brown](https://github.com/ngbrown)
* [:link:](mathjax/mathjax.d.ts) [MathJax](https://github.com/mathjax/MathJax) by [Roland Zwaga](https://github.com/rolandzwaga)
* [:link:](matter-js/matter-js.d.ts) [Matter.js](https://github.com/liabru/matter-js) by [Ivane Gegia](https://twitter.com/ivanegegia)
* [:link:](mCustomScrollbar/mCustomScrollbar.d.ts) [mCustomScrollbar](https://github.com/malihu/malihu-custom-scrollbar-plugin) by [Sarah Williams](https://github.com/flurg)
* [:link:](memory-cache/memory-cache.d.ts) [memory-cache](http://github.com/ptarjan/node-cache) by [Jeff Goddard](https://github.com/jedigo)
* [:link:](mendixmodelsdk/mendixmodelsdk.d.ts) [mendixmodelsdk](http://www.mendix.com) by [Mendix](https://github.com/mendix)
* [:link:](merge-stream/merge-stream.d.ts) [merge-stream](https://github.com/grncdr/merge-stream) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](merge2/merge2.d.ts) [merge2](https://github.com/teambition/merge2) by [Tanguy Krotoff](https://github.com/tkrotoff)
* [:link:](meshblu/meshblu.d.ts) [meshblu.js](https://github.com/octoblu/meshblu-npm) by [Felipe Nipo](https://github.com/fnipo)
@@ -787,16 +802,16 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](mobile-detect/mobile-detect.d.ts) [mobile-detect](http://hgoebl.github.io/mobile-detect.js) by [Martin McWhorter](https://github.com/martinmcwhorter)
* [:link:](mobservable/mobservable.d.ts) [mobservable](https://mweststrate.github.io/mobservable) by [Michel Weststrate](https://github.com/mweststrate)
* [:link:](mobservable-react/mobservable-react.d.ts) [mobservable](https://github.com/mweststrate/mobservable-react) by [Michel Weststrate](https://github.com/mweststrate)
* [:link:](mocha/mocha-node.d.ts) [mocha](http://mochajs.org) by [Vadim Macagon](https://github.com/enlight), [vvakame](https://github.com/vvakame)
* [:link:](mocha/mocha.d.ts) [mocha](http://mochajs.org) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid), [otiai10](https://github.com/otiai10), [jt000](https://github.com/jt000), [Vadim Macagon](https://github.com/enlight)
* [:link:](mocha/mocha-node.d.ts) [mocha](http://mochajs.org) by [Vadim Macagon](https://github.com/enlight), [vvakame](https://github.com/vvakame)
* [:link:](mocha-phantomjs/mocha-phantomjs.d.ts) [mocha-phantomjs](http://metaskills.net/mocha-phantomjs) by [Erik Schierboom](https://github.com/ErikSchierboom)
* [:link:](mock-fs/mock-fs.d.ts) [mock-fs](https://github.com/tschaub/mock-fs) by [Wim Looman](https://github.com/Nemo157)
* [:link:](mockery/mockery.d.ts) [mockery](https://github.com/mfncooper/mockery) by [jt000](https://github.com/jt000)
* [:link:](modernizr/modernizr.d.ts) [Modernizr](http://modernizr.com) by [Boris Yankov](https://github.com/borisyankov), [Theodore Brown](https://github.com/theodorejb)
* [:link:](moment-timezone/moment-timezone.d.ts) [moment-timezone.js](http://momentjs.com/timezone) by [Michel Salib](https://github.com/michelsalib)
* [:link:](moment/moment-node.d.ts) [Moment.js](https://github.com/timrwood/moment) by [Michael Lakerveld](https://github.com/Lakerfield), [Aaron King](https://github.com/kingdango), [Hiroki Horiuchi](https://github.com/horiuchi), [Dick van den Brink](https://github.com/DickvdBrink), [Adi Dahiya](https://github.com/adidahiya), [Matt Brooks](https://github.com/EnableSoftware)
* [:link:](moment/moment.d.ts) [Moment.js](https://github.com/timrwood/moment) by [Michael Lakerveld](https://github.com/Lakerfield), [Aaron King](https://github.com/kingdango), [Hiroki Horiuchi](https://github.com/horiuchi), [Dick van den Brink](https://github.com/DickvdBrink), [Adi Dahiya](https://github.com/adidahiya), [Matt Brooks](https://github.com/EnableSoftware)
* [:link:](moment-range/moment-range.d.ts) [Moment.js](https://github.com/gf3/moment-range) by [Bart van den Burg](https://github.com/Burgov), [Wilgert Velinga](https://github.com/wilgert)
* [:link:](moment/moment-node.d.ts) [Moment.js](https://github.com/timrwood/moment) by [Michael Lakerveld](https://github.com/Lakerfield), [Aaron King](https://github.com/kingdango), [Hiroki Horiuchi](https://github.com/horiuchi), [Dick van den Brink](https://github.com/DickvdBrink), [Adi Dahiya](https://github.com/adidahiya), [Matt Brooks](https://github.com/EnableSoftware)
* [:link:](mongodb/mongodb.d.ts) [MongoDB](https://github.com/mongodb/node-mongodb-native) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](mongoose/mongoose.d.ts) [Mongoose](http://mongoosejs.com) by [horiuchi](https://github.com/horiuchi)
* [:link:](mongoose-mock/mongoose-mock.d.ts) [mongoose-mock](https://github.com/JohanObrink/mongoose-mock) by [jt000](https://github.com/jt000)
@@ -845,6 +860,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](node-cache/node-cache.d.ts) [node-cache](https://github.com/tcs-de/nodecache) by [Ilya Mochalov](https://github.com/chrootsu)
* [:link:](node-calendar/node-calendar.d.ts) [node-calendar](https://www.npmjs.com/package/node-calendar) by [Luzian Zagadinow](https://github.com/luzianz)
* [:link:](config/config.d.ts) [node-config](https://github.com/lorenwest/node-config) by [Roman Korneev](https://github.com/RWander)
* [:link:](node-config-manager/node-config-manager.d.ts) [node-config-manager](https://www.npmjs.com/package/node-config-manager) by [TANAKA Koichi](https://gitnub.com/mugeso)
* [:link:](convict/convict.d.ts) [node-convict](https://github.com/mozilla/node-convict) by [Wim Looman](https://github.com/Nemo157)
* [:link:](node-ffi/node-ffi.d.ts) [node-ffi](https://github.com/rbranson/node-ffi) by [Paul Loyd](https://github.com/loyd)
* [:link:](node-fibers/node-fibers.d.ts) [node-fibers](https://github.com/laverdet/node-fibers) by [Cary Haynie](https://github.com/caryhaynie)
@@ -866,7 +882,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](node-schedule/node-schedule.d.ts) [node-schedule](https://github.com/tejasmanohar/node-schedule) by [Cyril Schumacher](https://github.com/cyrilschumacher)
* [:link:](node-slack/node-slack.d.ts) [node-slack](https://github.com/xoxco/node-slack) by [Qubo](https://github.com/tkQubo)
* [:link:](stack-trace/stack-trace.d.ts) [node-stack-trace](https://github.com/felixge/node-stack-trace) by [Exceptionless](https://github.com/exceptionless)
* [:link:](node-uuid/node-uuid-global.d.ts) [node-uuid.js](https://github.com/broofa/node-uuid) by [Jeff May](https://github.com/jeffmay)
* [:link:](node-uuid/node-uuid.d.ts) [node-uuid.js](https://github.com/broofa/node-uuid) by [Jeff May](https://github.com/jeffmay)
* [:link:](node-uuid/node-uuid-base.d.ts) [node-uuid.js](https://github.com/broofa/node-uuid) by [Jeff May](https://github.com/jeffmay)
* [:link:](node-uuid/node-uuid-cjs.d.ts) [node-uuid.js](https://github.com/broofa/node-uuid) by [Jeff May](https://github.com/jeffmay)
* [:link:](node-validator/node-validator.d.ts) [node-validator](https://www.npmjs.com/package/node-validator) by [Ken Gorab](https://github.com/kengorab)
* [:link:](node-webkit/node-webkit.d.ts) [node-webkit](https://github.com/rogerwang/node-webkit) by [Pedro Casaubon](https://github.com/xperiments)
* [: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)
@@ -884,13 +904,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](nopt/nopt.d.ts) [nopt](https://github.com/npm/nopt) by [jbondc](https://github.com/jbondc)
* [:link:](notifyjs/notifyjs.d.ts) [notify.js](https://github.com/alexgibson/notify.js) by [soundTricker](https://github.com/soundTricker)
* [:link:](notify/notify.d.ts) [Notify.js](https://github.com/jpillora/notifyjs) by [Xiaohan Zhang](https://github.com/hellochar)
* [:link:](nouislider/nouislider.d.ts) [nouislider](https://github.com/leongersen/noUiSlider) by [Patrick Davies](https://github.com/bleuarg)
* [:link:](wnumb/wnumb.d.ts) [nouislider](https://github.com/leongersen/wnumb) by [Corey Jepperson](https://github.com/acoreyj)
* [:link:](nouislider/nouislider.d.ts) [nouislider](https://github.com/leongersen/noUiSlider) by [Patrick Davies](https://github.com/bleuarg)
* [:link:](noVNC/noVNC.d.ts) [noVNC](https://github.com/kanaka/noVNC) by [Ken Smith](https://github.com/smithkl42)
* [:link:](npm/npm.d.ts) [npm](https://github.com/npm/npm) by [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](nprogress/NProgress.d.ts) [NProgress](https://github.com/rstacruz/nprogress) by [Judah Gabriel Himango](http://debuggerdotbreak.wordpress.com)
* [:link:](numbro/numbro.d.ts) [Numbro.js](https://github.com/foretagsplatsen/numbro) by [Vincent Bortone](https://github.com/vbortone)
* [:link:](numeraljs/numeraljs.d.ts) [Numeral.js](https://github.com/adamwdraper/Numeral-js) by [Vincent Bortone](https://github.com/vbortone)
* [:link:](obelisk.js/obelisk.js.d.ts) [obelisk.js](https://github.com/nosir/obelisk.js) by [Brian Drupieski](https://github.com/bdrupieski)
* [:link:](object-assign/object-assign.d.ts) [object-assign](https://github.com/sindresorhus/object-assign) by [Christopher Brown](https://github.com/chbrown)
* [:link:](object-hash/object-hash.d.ts) [object-hash](https://github.com/puleos/object-hash) by [Michael Zabka](https://github.com/misak113)
* [:link:](object-path/object-path.d.ts) [objectPath v0.9.x](https://github.com/mariocasciaro/object-path) by [Paulo Cesar](https://github.com/pocesar)
@@ -904,6 +925,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](onsenui/onsenui.d.ts) [Onsen UI](http://onsen.io) by [Fran Dios](https://github.com/frankdiox)
* [:link:](open/open.d.ts) [open](https://github.com/jjrdn/node-open) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](openlayers/openlayers.d.ts) [OpenLayers](http://openlayers.org) by [Wouter Goedhart](https://github.com/woutergd)
* [:link:](openpgp/openpgp.d.ts) [openpgpjs](http://openpgpjs.org) by [Guillaume Lacasa](https://blog.lacasa.fr)
* [:link:](opn/opn.d.ts) [opn](https://github.com/sindresorhus/opn) by [Shinnosuke Watanabe](https://github.com/shinnn)
* [:link:](optimist/optimist.d.ts) [optimist](https://github.com/substack/node-optimist) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](orchestrator/orchestrator.d.ts) [Orchestrator](https://github.com/orchestrator/orchestrator) by [Qubo](https://github.com/tkQubo)
@@ -919,9 +941,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](pascal-case/pascal-case.d.ts) [pascal-case](https://github.com/blakeembrey/pascal-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
* [:link:](passport/passport.d.ts) [Passport](http://passportjs.org) by [Horiuchi_H](https://github.com/horiuchi)
* [:link:](passport-strategy/passport-strategy.d.ts) [Passport Strategy module](https://github.com/jaredhanson/passport-strategy) by [Lior Mualem](https://github.com/liorm)
* [:link:](passport-facebook/passport-facebook.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
* [:link:](passport-google-oauth/passport-google-oauth.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
* [:link:](passport-twitter/passport-twitter.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
* [:link:](passport-google-oauth/passport-google-oauth.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
* [:link:](passport-facebook/passport-facebook.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
* [:link:](passport-facebook-token/passport-facebook-token.d.ts) [passport-facebook-token](https://github.com/drudge/passport-facebook-token) by [Ray Martone](https://github.com/rmartone)
* [:link:](passport-local/passport-local.d.ts) [passport-local](https://github.com/jaredhanson/passport-local) by [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](path-case/path-case.d.ts) [path-case](https://github.com/blakeembrey/path-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
@@ -942,6 +964,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](phonegap/phonegap.d.ts) [PhoneGap](http://phonegap.com) by [Boris Yankov](https://github.com/borisyankov), [Dick van den Brink](https://github.com/DickvdBrink)
* [:link:](phonegap-facebook-plugin/phonegap-facebook-plugin.d.ts) [phonegap-facebook-plugin](https://github.com/Wizcorp/phonegap-facebook-plugin) by [Justin Unterreiner](https://github.com/Justin-Credible)
* [:link:](phonegap-plugin-push/phonegap-plugin-push.d.ts) [phonegap-plugin-push](https://github.com/phonegap/phonegap-plugin-push) by [Frederico Galvão](https://github.com/fredgalvao)
* [:link:](urbanairship-cordova/urbanairship-cordova.d.ts) [phonegap-ua-push](https://github.com/urbanairship/phonegap-ua-push) by [Justin Unterreiner](https://github.com/Justin-Credible)
* [:link:](photonui/photonui.d.ts) [PhotonUI](https://github.com/wanadev/PhotonUI) by [Florent Poujol](https://github.com/florentpoujol)
* [:link:](photoswipe/photoswipe.d.ts) [PhotoSwipe](http://photoswipe.com) by [Xiaohan Zhang](https://github.com/hellochar)
* [:link:](physijs/physijs.d.ts) [Physijs](http://chandlerprall.github.io/Physijs) by [Satoru Kimura](https://github.com/gyohk)
@@ -1000,6 +1023,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](react/react-global.d.ts) [React (namespace)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com)
* [:link:](react-dnd/react-dnd.d.ts) [React DnD](https://github.com/gaearon/react-dnd) by [Asana](https://asana.com)
* [:link:](react-router/react-router.d.ts) [React Router](https://github.com/rackt/react-router) by [Yuichi Murata](https://github.com/mrk21), [Václav Ostrožlík](https://github.com/vasek17)
* [:link:](react-bootstrap/react-bootstrap.d.ts) [react-bootstrap](https://github.com/react-bootstrap/react-bootstrap) by [Walker Burgin](https://github.com/walkerburgin)
* [:link:](react-mixin/react-mixin.d.ts) [react-mixin](https://github.com/brigand/react-mixin) by [Qubo](https://github.com/tkqubo)
* [:link:](react-props-decorators/react-props-decorators.d.ts) [react-props-decorators](https://github.com/popkirby/react-props-decorators) by [Qubo](https://github.com/tkqubo)
* [:link:](react-redux/react-redux.d.ts) [react-redux](https://github.com/rackt/react-redux) by [Qubo](https://github.com/tkqubo)
@@ -1014,6 +1038,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](redux-actions/redux-actions.d.ts) [redux-actions](https://github.com/acdlite/redux-actions) by [Jack Hsu](https://github.com/jaysoo)
* [:link:](redux-devtools/redux-devtools.d.ts) [redux-devtools](https://github.com/gaearon/redux-devtools) by [Qubo](https://github.com/tkqubo)
* [:link:](redux-logger/redux-logger.d.ts) [redux-logger](https://github.com/fcomb/redux-logger) by [Alexander Rusakov](https://github.com/arusakov)
* [:link:](redux-thunk/redux-thunk.d.ts) [redux-thunk](https://github.com/gaearon/redux-thunk) by [Qubo](https://github.com/tkqubo)
* [:link:](ref/ref.d.ts) [ref](https://github.com/TooTallNate/ref) by [Paul Loyd](https://github.com/loyd)
* [:link:](ref-array/ref-array.d.ts) [ref-array](https://github.com/TooTallNate/ref-array) by [Paul Loyd](https://github.com/loyd)
* [:link:](ref-struct/ref-struct.d.ts) [ref-struct](https://github.com/TooTallNate/ref-struct) by [Paul Loyd](https://github.com/loyd)
@@ -1035,6 +1060,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](riotjs/riotjs.d.ts) [riot.js](https://github.com/moot/riotjs) by [vvakame](https://github.com/vvakame)
* [:link:](riotcontrol/riotcontrol.d.ts) [RiotControl](https://github.com/jimsparkman/RiotControl) by [Ilya Mochalov](https://github.com/chrootsu)
* [:link:](rivets/rivets.d.ts) [rivets](http://rivetsjs.com) by [Trevor Baron](https://github.com/TrevorDev)
* [:link:](rosie/rosie.d.ts) [rosie](https://github.com/rosiejs/rosie) by [Abner Oliveira](https://github.com/abner)
* [:link:](route-recognizer/route-recognizer.d.ts) [route-recognizer](https://github.com/tildeio/route-recognizer) by [Dave Keen](http://www.keendevelopment.ch)
* [:link:](routie/routie.d.ts) [routie](https://github.com/jgallen23/routie) by [Adilson](https://github.com/Adilson)
* [:link:](rsmq/rsmq.d.ts) [rsmq](http://smrchy.github.io/rsmq) by [Qubo](https://github.com/MugeSo)
@@ -1060,11 +1086,13 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
* [:link:](sanitizer/sanitizer.d.ts) [Sanitizer](https://github.com/theSmaw/Caja-HTML-Sanitizer) by [Dave Taylor](http://davetayls.me)
* [:link:](satnav/satnav.d.ts) [satnav](https://github.com/f5io/satnav-js) by [Christian Holm Diget](https://github.com/DotNetNerd)
* [:link:](sax/sax.d.ts) [sax js](https://github.com/isaacs/sax-js) by [Asana](https://asana.com)
* [:link:](screenfull/screenfull.d.ts) [screenfull.js](https://github.com/sindresorhus/screenfull.js) by [Ilia Choly](http://github.com/icholy)
* [:link:](scrolltofixed/scrolltofixed.d.ts) [ScrollToFixed](https://github.com/bigspotteddog/ScrollToFixed) by [Ben Dixon](https://github.com/bmdixon)
* [:link:](seedrandom/seedrandom.d.ts) [seedrandom](https://github.com/davidbau/seedrandom) by [Kern Handa](https://github.com/kernhanda)
* [:link:](segment-analytics/segment-analytics.d.ts) [Segment's analytics.js](https://segment.com/docs/libraries/analytics.js) by [Andrew Fong](https://github.com/fongandrew)
* [:link:](analytics-node/analytics-node.d.ts) [Segment's analytics.js for Node.js](https://segment.com/docs/libraries/node) by [Andrew Fong](https://github.com/fongandrew)
* [:link:](select2/select2.d.ts) [Select2](http://ivaynberg.github.com/select2) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](selectize/selectize.d.ts) [Selectize](https://github.com/brianreavis/selectize.js) by [Adi Dahiya](https://github.com/adidahiya)
* [:link:](selenium-webdriver/selenium-webdriver.d.ts) [Selenium WebDriverJS](https://code.google.com/p/selenium) by [Bill Armstrong](https://github.com/BillArmstrong), [Yuki Kokubun](https://github.com/Kuniwak)
@@ -1091,6 +1119,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](simple-cw-node/simple-cw-node.d.ts) [simple-cw-node](https://github.com/astronaughts/simple-cw-node) by [vvakame](https://github.com/vvakame)
* [:link:](simplebar/simplebar.d.ts) [simplebar.js](https://github.com/Grsmto/simplebar) by [Gregor Woiwode](https://github.com/gregonnet)
* [:link:](jquery.simplemodal/jquery.simplemodal.d.ts) [SimpleModal](http://www.ericmmartin.com/projects/simplemodal) by [Friedrich von Never](https://github.com/ForNeVeR)
* [:link:](simpleStorage/simplestorage.js.d.ts) [simpleStorage](https://github.com/andris9/simpleStorage) by [Áxel Costas Pena](https://github.com/axelcostaspena)
* [:link:](sinon/sinon.d.ts) [Sinon](http://sinonjs.org) by [William Sears](https://github.com/mrbigdog2u)
* [:link:](sinon-chai/sinon-chai.d.ts) [sinon-chai](https://github.com/domenic/sinon-chai) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid), [Jed Mao](https://github.com/jedmao)
* [:link:](sinon-chrome/sinon-chrome.d.ts) [Sinon-Chrome](https://github.com/vitalets/sinon-chrome) by [Tim Perry](https://github.com/pimterry)
@@ -1104,11 +1133,12 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](slickgrid/slick.rowselectionmodel.d.ts) [SlickGrid RowSelectionModel Plugin](https://github.com/mleibman/SlickGrid) by [Derek Cicerone](https://github.com/derekcicerone)
* [:link:](smoothie/smoothie.d.ts) [Smoothie Charts](https://github.com/joewalnes/smoothie) by [Drew Noakes](https://drewnoakes.com), [Mike H. Hawley](https://github.com/mikehhawley)
* [:link:](snake-case/snake-case.d.ts) [snake-case](https://github.com/blakeembrey/snake-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
* [:link:](snapsvg/snapsvg.d.ts) [Snap-SVG](https://github.com/adobe-webplatform/Snap.svg) by [Lars Klein](https://github.com/lhk)
* [:link:](snapsvg/snapsvg.d.ts) [Snap-SVG](https://github.com/adobe-webplatform/Snap.svg) by [Lars Klein](https://github.com/lhk), [Mattanja Kern](https://github.com/mattanja)
* [:link:](socket.io/socket.io.d.ts) [socket.io](http://socket.io) by [PROGRE](https://github.com/progre), [Damian Connolly](https://github.com/divillysausages)
* [:link:](socket.io-client/socket.io-client.d.ts) [socket.io-client](http://socket.io) by [PROGRE](https://github.com/progre), [Damian Connolly](https://github.com/divillysausages)
* [:link:](socket.io.users/socket.io.users.d.ts) [socket.io.users](https://github.com/nodets/socket.io.users) by [Makis Maropoulos](https://github.com/kataras)
* [:link:](sockjs/sockjs.d.ts) [SockJS 0.3.x](https://github.com/sockjs/sockjs-client) by [Emil Ivanov](https://github.com/vladev)
* [:link:](sockjs-client/sockjs-client.d.ts) [sockjs-client](https://github.com/sockjs/sockjs-client) by [Emil Ivanov](https://github.com/vladev), [Alexander Rusakov](https://github.com/arusakov)
* [:link:](sockjs-node/sockjs-node.d.ts) [sockjs-node 0.3.x](https://github.com/sockjs/sockjs-node) by [Phil McCloghry-Laing](https://github.com/pmccloghrylaing)
* [:link:](soundjs/soundjs.d.ts) [SoundJS](http://www.createjs.com/#!/SoundJS) by [Pedro Ferreira](https://bitbucket.org/drk4)
* [:link:](source-map/source-map.d.ts) [source-map](https://github.com/mozilla/source-map) by [Morten Houston Ludvigsen](https://github.com/MortenHoustonLudvigsen)
@@ -1125,6 +1155,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](stack-mapper/stack-mapper.d.ts) [stack-mapper](https://github.com/thlorenz/stack-mapper) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](stacktrace-js/stacktrace-js.d.ts) [stacktrace.js](https://github.com/stacktracejs/stacktrace.js) by [Exceptionless](https://github.com/exceptionless)
* [:link:](stampit/stampit.d.ts) [stampit](https://github.com/stampit-org/stampit) by [Vasyl Boroviak](https://github.com/koresar)
* [:link:](stamplay-js-sdk/stamplay-js-sdk.d.ts) [stamplay-js-sdk](https://github.com/Stamplay/stamplay-js-sdk) by [Riderman de Sousa Barbosa](https://github.com/ridermansb)
* [:link:](static-eval/static-eval.d.ts) [static-eval](https://github.com/substack/static-eval) by [Ben Liddicott](https://github.com/benliddicott/DefinitelyTyped)
* [:link:](stats/stats.d.ts) [Stats.js r12](http://github.com/mrdoob/stats.js) by [Gregory Dalton](https://github.com/gregolai)
* [:link:](statsd-client/statsd-client.d.ts) [statsd-client](https://github.com/msiebuhr/node-statsd-client) by [Peter Kooijmans](https://github.com/peterkooijmans)
@@ -1159,7 +1190,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](swipe/swipe.d.ts) [Swipe](https://github.com/thebird/Swipe) by [Andrey Kurdyumov](https://github.com/kant2002)
* [:link:](swiper/swiper.d.ts) [Swiper](https://github.com/nolimits4web/Swiper) by [Sebastián Galiano](https://github.com/sgaliano)
* [:link:](swipeview/swipeview.d.ts) [SwipeView](http://cubiq.org/swipeview) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](switchery/switchery.d.ts) [switchery](https://github.com/abpetkov/switchery) by [Bruno Grieder](https://github.com/bgrieder)
* [:link:](switchery/switchery.d.ts) [switchery](https://github.com/abpetkov/switchery) by [Bruno Grieder](https://github.com/bgrieder), [Clayton Lautier](https://github.com/claylaut)
* [:link:](swiz/swiz.d.ts) [swiz](https://github.com/racker/node-swiz) by [Jeff Goddard](https://github.com/jedigo)
* [:link:](systemjs/systemjs.d.ts) [System.js](https://github.com/systemjs/systemjs) by [Ludovic HENIN](https://github.com/ludohenin), [Nathan Walker](https://github.com/NathanWalker)
* [:link:](tabris/tabris.d.ts) [Tabris.js](http://tabrisjs.com) by [Tabris.js team](http://github.com/eclipsesource/tabris)
@@ -1227,14 +1258,15 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](ui-grid/ui-grid.d.ts) [ui-grid](http://www.ui-grid.info) by [Ben Tesser](https://github.com/btesser)
* [:link:](ui-grid/ui-grid.d.ts) [ui-grid](http://www.ui-grid.info) by [Ben Tesser](https://github.com/btesser), [Joe Skeen](http://github.com/joeskeen)
* [:link:](ui-router-extras/ui-router-extras.d.ts) [UI-Router Extras (ct.ui.router.extras module)](https://github.com/christopherthielen/ui-router-extras) by [Michael Putters](https://github.com/mputters), [Marcel van de Kamp](https://github.com/marcel-k)
* [:link:](umbraco/umbraco-services.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland)
* [:link:](umbraco/umbraco.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland)
* [:link:](umbraco/umbraco-resources.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland)
* [:link:](umbraco/umbraco.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland)
* [:link:](umbraco/umbraco-services.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland)
* [:link:](underscore/underscore.d.ts) [Underscore](http://underscorejs.org) by [Boris Yankov](https://github.com/borisyankov), [Josh Baldwin](https://github.com/jbaldwin)
* [:link:](underscore-ko/underscore-ko.d.ts) [Underscore-ko 1.2.2 with underscore](https://github.com/kamranayub/UnderscoreKO) by [Maurits Elbers](https://github.com/MagicMau)
* [:link:](underscore.string/underscore.string.d.ts) [underscore.string](https://github.com/epeli/underscore.string) by [Ry Racherbaumer](http://github.com/rygine)
* [:link:](undertaker/undertaker.d.ts) [undertaker](https://github.com/phated/undertaker) by [Qubo](https://github.com/tkqubo)
* [:link:](jquery.uniform/jquery.uniform.d.ts) [Uniform.js](https://github.com/pixelmatrix/uniform) by [flyfishMT](https://github.com/flyfishMT)
* [:link:](uniq/uniq.d.ts) [uniq](https://www.npmjs.com/package/uniq) by [Hans Windhoff](https://github.com/hansrwindhoff)
* [:link:](unique-random/unique-random.d.ts) [unique-random](https://github.com/sindresorhus/unique-random) by [Yuki Kokubun](https://github.com/Kuniwak)
@@ -1274,12 +1306,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](webaudioapi/waa.d.ts) [Web Audio API](http://www.w3.org/TR/webaudio) by [Baruch Berger](https://github.com/bbss), [Kon](http://phyzkit.net), [kubosho](https://github.com/kubosho)
* [:link:](webmidi/webmidi.d.ts) [Web MIDI API](http://www.w3.org/TR/webmidi) by [Toshiya Nakakura](https://github.com/nakakura)
* [: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:](webcl/webcl.d.ts) [WebCL](https://www.khronos.org/registry/webcl/specs/1.0.0) by [Ralph Brown](https://github.com/NCARalph)
* [:link:](webcola/webcola.d.ts) [webcola](https://github.com/tgdwyer/WebCola) by [Qinfeng Chen](https://github.com/qinfchen)
* [:link:](webcomponents.js/webcomponents.js.d.ts) [webcomponents.js](https://github.com/webcomponents/webcomponentsjs) by [Adi Dahiya](https://github.com/adidahiya)
* [:link:](webcrypto/WebCrypto.d.ts) [WebCrypto](http://www.w3.org/TR/WebCryptoAPI) by [Lucas Dixon](https://github.com/iislucas)
* [:link:](webgl-ext/webgl-ext.d.ts) [WebGL Extensions](http://webgl.org) by [Arthur Langereis](https://github.com/zenmumbler)
* [:link:](webix/webix.d.ts) [Webix UI](http://webix.com) by [Maksim Kozhukh](http://github.com/mkozhukh)
* [:link:](webpack/webpack.d.ts) [webpack](https://github.com/webpack/webpack) by [Qubo](https://github.com/tkqubo)
* [:link:](webpack/webpack-env.d.ts) [webpack (module API)](https://github.com/webpack/webpack) by [use-strict](https://github.com/use-strict)
* [:link:](webrtc/MediaStream.d.ts) [WebRTC](http://dev.w3.org/2011/webrtc) by [Ken Smith](https://github.com/smithkl42)
* [:link:](websocket/websocket.d.ts) [websocket](https://github.com/Worlize/WebSocket-Node) by [Paul Loyd](https://github.com/loyd)
* [:link:](websql/websql.d.ts) [websql](http://www.w3.org/TR/webdatabase) by [TeamworkGuy2](https://github.com/TeamworkGuy2)

View File

@@ -6,6 +6,7 @@
function testSaveAs() {
var data: Blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"});
var filename: string = 'hello world.txt';
saveAs(data, filename);
var disableAutoBOM = true;
saveAs(data, filename, disableAutoBOM);
}

View File

@@ -20,8 +20,14 @@ interface FileSaver {
* @summary File name.
* @type {DOMString}
*/
filename: string
filename: string,
/**
* @summary Disable Unicode text encoding hints or not.
* @type {boolean}
*/
disableAutoBOM?: boolean
): void
}
declare var saveAs: FileSaver;
declare var saveAs: FileSaver;

View File

@@ -0,0 +1,266 @@
/// <reference path="./openjscad.d.ts" />
function test() {
var gProcessor: OpenJsCad.Processor = null;
// Show all exceptions to the user:
OpenJsCad.AlertUserOfUncaughtExceptions();
function onload()
{
gProcessor = new OpenJsCad.Processor(<HTMLDivElement>document.getElementById("viewer"));
updateSolid();
}
function updateSolid()
{
gProcessor.setJsCad((<HTMLTextAreaElement>document.getElementById('code')).value);
}
}
function main()
{
// Main entry point; here we construct our solid:
var gear = involuteGear(
15,
10,
20,
0,
5
);
var centerhole = CSG.cylinder({start: [0,0,-5], end: [0,0,5], radius: 2, resolution: 16});
gear = gear.subtract(centerhole);
return gear;
}
function involuteGear(numTeeth: number, circularPitch: number, pressureAngle: number, clearance: number, thickness: number)
{
// default values:
if(arguments.length < 3) pressureAngle = 20;
if(arguments.length < 4) clearance = 0;
if(arguments.length < 4) thickness = 1;
var addendum = circularPitch / Math.PI;
var dedendum = addendum + clearance;
// radiuses of the 4 circles:
var pitchRadius = numTeeth * circularPitch / (2 * Math.PI);
var baseRadius = pitchRadius * Math.cos(Math.PI * pressureAngle / 180);
var outerRadius = pitchRadius + addendum;
var rootRadius = pitchRadius - dedendum;
var maxtanlength = Math.sqrt(outerRadius*outerRadius - baseRadius*baseRadius);
var maxangle = maxtanlength / baseRadius;
var tl_at_pitchcircle = Math.sqrt(pitchRadius*pitchRadius - baseRadius*baseRadius);
var angle_at_pitchcircle = tl_at_pitchcircle / baseRadius;
var diffangle = angle_at_pitchcircle - Math.atan(angle_at_pitchcircle);
var angularToothWidthAtBase = Math.PI / numTeeth + 2*diffangle;
// build a single 2d tooth in the 'points' array:
var resolution = 5;
var points = [new CSG.Vector2D(0,0)];
for(var i = 0; i <= resolution; i++)
{
// first side of the tooth:
var angle = maxangle * i / resolution;
var tanlength = angle * baseRadius;
var radvector = CSG.Vector2D.fromAngle(angle);
var tanvector = radvector.normal();
var p = radvector.times(baseRadius).plus(tanvector.times(tanlength));
points[i+1] = p;
// opposite side of the tooth:
radvector = CSG.Vector2D.fromAngle(angularToothWidthAtBase - angle);
tanvector = radvector.normal().negated();
p = radvector.times(baseRadius).plus(tanvector.times(tanlength));
points[2 * resolution + 2 - i] = p;
}
// create the polygon and extrude into 3D:
var tooth3d = new CSG.Polygon2D(points).extrude({offset: [0, 0, thickness]});
var allteeth = new CSG();
for(var i = 0; i < numTeeth; i++)
{
var angle = i*360/numTeeth;
var rotatedtooth = <CSG>tooth3d.rotateZ(angle);
allteeth = allteeth.unionForNonIntersecting(rotatedtooth);
}
// build the root circle:
points = [];
var toothAngle = 2 * Math.PI / numTeeth;
var toothCenterAngle = 0.5 * angularToothWidthAtBase;
for(var i = 0; i < numTeeth; i++)
{
var angle = toothCenterAngle + i * toothAngle;
var p = CSG.Vector2D.fromAngle(angle).times(rootRadius);
points.push(p);
}
// create the polygon and extrude into 3D:
var rootcircle = new CSG.Polygon2D(points).extrude({offset: [0, 0, thickness]});
var result = rootcircle.union(allteeth);
// center at origin:
result = <CSG>result.translate([0, 0, -thickness/2]);
return result;
}
var cylresolution=16;
function main2()
{
var params =
{
quality: 0,
diameter1: 12.2,
shaftlength1: 15,
outerlength1: 20,
nutradius1: 4.65,
nutthickness1: 4.2,
screwdiameter1: 5,
diameter2: 9.5,
shaftlength2: 10,
outerlength2: 15,
nutradius2: 3.2,
nutthickness2: 2.6,
screwdiameter2: 3,
outerdiameter: 30,
spiderlength: 12,
spidermargin: 0,
numteeth: 2
};
cylresolution=(params.quality == 1)? 64:16;
var outerdiameter=params.outerdiameter;
outerdiameter=Math.max(outerdiameter, params.diameter1+0.5);
outerdiameter=Math.max(outerdiameter, params.diameter2+0.5);
var spidercenterdiameter=outerdiameter/2;
var part1=makeShaft(params.diameter1, outerdiameter,spidercenterdiameter,params.shaftlength1,params.outerlength1,params.spiderlength, params.nutradius1, params.nutthickness1, params.screwdiameter1, params.numteeth);
var part2=makeShaft(params.diameter2, outerdiameter,spidercenterdiameter,params.shaftlength2,params.outerlength2,params.spiderlength, params.nutradius2, params.nutthickness2, params.screwdiameter2, params.numteeth);
var spider=makeSpider(outerdiameter, spidercenterdiameter, params.spiderlength, params.numteeth);
if(params.spidermargin > 0)
{
spider=spider.contract(params.spidermargin, 4);
}
// rotate shaft parts for better 3d printing:
part1=<CSG>part1.rotateX(180).translate([0,0,params.outerlength1+params.spiderlength]);
part2=<CSG>part2.rotateX(180).translate([0,0,params.outerlength2+params.spiderlength]);
var result=<CSG>part1.translate([-outerdiameter-5,0,0]);
result=result.union(<CSG>part2.translate([0,0,0]));
result=result.union(<CSG>spider.translate([outerdiameter+5,0,-params.spidermargin]));
return result;
}
function makeShaft(innerdiameter: number, outerdiameter: number, spidercenterdiameter: number, shaftlength: number, outerlength: number, spiderlength: number, nutradius: number, nutthickness: number, screwdiameter: number, numteeth: number)
{
var result=CSG.cylinder({start:[0,0,0], end:[0,0,outerlength], radius:outerdiameter/2, resolution:cylresolution});
for(var i=0; i < numteeth; i++)
{
var angle=i*360/numteeth;
var pie=makePie(outerdiameter/2, spiderlength,angle-45/numteeth, angle+45/numteeth);
pie=<CSG>pie.translate([0,0,outerlength]);
result=result.union(pie);
}
var spidercylinder=CSG.cylinder({start:[0,0,outerlength], end:[0,0,outerlength+spiderlength],radius:spidercenterdiameter/2,resolution:cylresolution});
result=result.subtract(spidercylinder);
var shaftcylinder=CSG.cylinder({start:[0,0,0], end:[0,0,shaftlength], radius:innerdiameter/2, resolution:cylresolution});
result=result.subtract(shaftcylinder);
var screwz=shaftlength/2;
if(screwz < nutradius) screwz=nutradius;
var nutcutout = <CSG>hexagon(nutradius, nutthickness).translate([0,0,-nutthickness/2]);
var grubnutradiusAtFlatSide = nutradius * Math.cos(Math.PI / 180 * 30);
var nutcutoutrectangle = CSG.cube({
radius: [outerlength/2, grubnutradiusAtFlatSide, nutthickness/2],
center: [outerlength/2, 0, 0],
});
nutcutout = nutcutout.union(nutcutoutrectangle);
nutcutout = <CSG>nutcutout.rotateY(90);
nutcutout = <CSG>nutcutout.translate([(outerdiameter+innerdiameter)/4, 0, screwz]);
result = result.subtract(nutcutout);
var screwcutout=CSG.cylinder({
start: [outerdiameter/2, 0, screwz],
end: [0, 0, screwz],
radius: screwdiameter/2,
resolution:cylresolution
});
result=result.subtract(screwcutout);
//return nutcutout;
// nutcutout = nutcutout.translate([-grubnutheight/2 - centerholeradius - nutdistance,0,0]);
return result;
}
function makePie(radius: number, height: number, startangle: number, endangle: number)
{
var absangle=Math.abs(startangle-endangle);
if(absangle >= 180)
{
throw new Error("Pie angle must be less than 180 degrees");
}
var numsteps=cylresolution*absangle/360;
if(numsteps < 1) numsteps=1;
var points: CSG.Vector2D[] = [];
for(var i=0; i <= numsteps; i++)
{
var angle=startangle+i/numsteps*(endangle-startangle);
var vec = CSG.Vector2D.fromAngleDegrees(angle).times(radius);
points.push(vec);
}
points.push(new CSG.Vector2D(0,0));
var shape2d=new CSG.Polygon2D(points);
var extruded=shape2d.extrude({
offset: [0,0,height], // direction for extrusion
});
return extruded;
}
function hexagon(radius: number, height: number)
{
var vertices: CSG.Vertex[] = [];
for(var i=0; i < 6; i++)
{
var point=CSG.Vector2D.fromAngleDegrees(-i*60).times(radius).toVector3D(0);
vertices.push(new CSG.Vertex(point));
}
var polygon=new CSG.Polygon(vertices);
var hexagon=polygon.extrude([0,0,height]);
return hexagon;
}
function makeSpider(outerdiameter: number, spidercenterdiameter: number, spiderlength: number, numteeth: number)
{
var result=new CSG();
var numspiderteeth=numteeth*2; // spider has twice the number of teeth
for(var i=0; i < numspiderteeth; i++)
{
var angle=i*360/numspiderteeth;
var pie=makePie(outerdiameter/2, spiderlength,angle-90/numspiderteeth, angle+90/numspiderteeth);
pie=<CSG>pie.translate([0,0,0]);
result=result.union(pie);
}
var centercylinder=CSG.cylinder({start:[0,0,0], end:[0,0,spiderlength], radius:spidercenterdiameter/2, resolution:cylresolution});
result=result.union(centercylinder);
return result;
}

912
OpenJsCad/openjscad.d.ts vendored Normal file
View File

@@ -0,0 +1,912 @@
// Type definitions for OpenJsCad.js
// Project: https://github.com/joostn/OpenJsCad
// Definitions by: Dan Marshall <https://github.com/danmarshall>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../threejs/three.d.ts" />
declare module THREE {
var CSG: {
fromCSG: (csg: CSG, defaultColor: any) => {
colorMesh: Mesh;
wireframe: Mesh;
boundLen: number;
};
getGeometryVertex: (geometry: any, vertex_position: any) => number;
};
function OrbitControls(object: any, domElement: any): void;
function SpriteCanvasMaterial(parameters?: any): void;
interface ICanvasRendererOptions {
canvas?: HTMLCanvasElement;
alpha?: boolean;
}
class CanvasRenderer implements Renderer {
domElement: HTMLCanvasElement;
private pixelRatio;
private autoClear;
private sortObjects;
private sortElements;
private info;
private _projector;
private _renderData;
private _elements;
private _lights;
private _canvas;
private _canvasWidth;
private _canvasHeight;
private _canvasWidthHalf;
private _canvasHeightHalf;
private _viewportX;
private _viewportY;
private _viewportWidth;
private _viewportHeight;
private _context;
private _clearColor;
private _clearAlpha;
private _contextGlobalAlpha;
private _contextGlobalCompositeOperation;
private _contextStrokeStyle;
private _camera;
private _contextFillStyle;
private _contextLineWidth;
private _contextLineCap;
private _contextLineJoin;
private _contextLineDash;
private _v1;
private _v2;
private _v3;
private _v4;
private _v5;
private _v6;
private _v1x;
private _v1y;
private _v2x;
private _v2y;
private _v3x;
private _v3y;
private _v4x;
private _v4y;
private _v5x;
private _v5y;
private _v6x;
private _v6y;
private _color;
private _color1;
private _color2;
private _color3;
private _color4;
private _diffuseColor;
private _emissiveColor;
private _lightColor;
private _patterns;
private _image;
private _uvs;
private _uv1x;
private _uv1y;
private _uv2x;
private _uv2y;
private _uv3x;
private _uv3y;
private _clipBox;
private _clearBox;
private _elemBox;
private _ambientLight;
private _directionalLights;
private _pointLights;
private _vector3;
private _centroid;
private _normal;
private _normalViewMatrix;
constructor(parameters: ICanvasRendererOptions);
supportsVertexTextures(): void;
setFaceCulling: () => void;
getPixelRatio(): number;
setPixelRatio(value: any): void;
setSize(width: any, height: any, updateStyle: any): void;
setViewport(x: any, y: any, width: any, height: any): void;
setScissor(): void;
enableScissorTest(): void;
setClearColor(color: any, alpha: any): void;
setClearColorHex(hex: any, alpha: any): void;
getClearColor(): Color;
getClearAlpha(): number;
getMaxAnisotropy(): number;
clear(): void;
clearColor(): void;
clearDepth(): void;
clearStencil(): void;
render(scene: Scene, camera: Camera, renderTarget?: RenderTarget, forceClear?: boolean): void;
calculateLights(): void;
calculateLight(position: any, normal: any, color: any): void;
renderSprite(v1: any, element: any, material: any): void;
renderLine(v1: any, v2: any, element: any, material: any): void;
renderFace3(v1: any, v2: any, v3: any, uv1: any, uv2: any, uv3: any, element: any, material: any): void;
drawTriangle(x0: any, y0: any, x1: any, y1: any, x2: any, y2: any): void;
strokePath(color: any, linewidth: any, linecap: any, linejoin: any): void;
fillPath(color: any): void;
onTextureUpdate(event: any): void;
textureToPattern(texture: any): void;
patternPath(x0: any, y0: any, x1: any, y1: any, x2: any, y2: any, u0: any, v0: any, u1: any, v1: any, u2: any, v2: any, texture: any): void;
clipImage(x0: any, y0: any, x1: any, y1: any, x2: any, y2: any, u0: any, v0: any, u1: any, v1: any, u2: any, v2: any, image: any): void;
expand(v1: any, v2: any, pixels: any): void;
setOpacity(value: any): void;
setBlending(value: any): void;
setLineWidth(value: any): void;
setLineCap(value: any): void;
setLineJoin(value: any): void;
setStrokeStyle(value: any): void;
setFillStyle(value: any): void;
setLineDash(value: any): void;
}
function RenderableObject(): void;
function RenderableFace(): void;
function RenderableVertex(): void;
function RenderableLine(): void;
function RenderableSprite(): void;
function Projector(): void;
}
declare module OpenJsCad {
interface ILog {
(x: string): void;
prevLogTime?: number;
}
var log: ILog;
interface IViewerOptions {
drawLines?: boolean;
drawFaces?: boolean;
color?: number[];
bgColor?: number;
noWebGL?: boolean;
}
interface ProcessorOptions extends IViewerOptions {
verbose?: boolean;
viewerwidth?: number;
viewerheight?: number;
viewerheightratio?: number;
}
class Viewer {
private perspective;
private drawOptions;
private size;
private defaultColor_;
private bgColor_;
private containerElm_;
private scene_;
private camera_;
private controls_;
private renderer_;
private canvas;
private pauseRender_;
private requestID_;
constructor(containerElm: any, size: any, options: IViewerOptions);
createScene(drawAxes: any, axLen: any): void;
createCamera(): void;
createControls(canvas: any): void;
webGLAvailable(): boolean;
createRenderer(bool_noWebGL: any): void;
render(): void;
animate(): void;
cancelAnimate(): void;
refreshRenderer(bool_noWebGL: any): void;
drawAxes(axLen: any): void;
setCsg(csg: any, resetZoom: any): void;
applyDrawOptions(): void;
clear(): void;
getUserMeshes(str?: any): THREE.Object3D[];
resetZoom(r: any): void;
parseSizeParams(): void;
handleResize(): void;
}
function makeAbsoluteUrl(url: any, baseurl: any): any;
function isChrome(): boolean;
function runMainInWorker(mainParameters: any): void;
function expandResultObjectArray(result: any): any;
function checkResult(result: any): void;
function resultToCompactBinary(resultin: any): any;
function resultFromCompactBinary(resultin: any): any;
function parseJsCadScriptSync(script: any, mainParameters: any, debugging: any): any;
function parseJsCadScriptASync(script: any, mainParameters: any, options: any, callback: any): Worker;
function getWindowURL(): URL;
function textToBlobUrl(txt: any): string;
function revokeBlobUrl(url: any): void;
function FileSystemApiErrorHandler(fileError: any, operation: any): void;
function AlertUserOfUncaughtExceptions(): void;
function getParamDefinitions(script: any): any[];
interface EventHandler {
(ev?: Event): any;
}
/**
* options parameter:
* - drawLines: display wireframe lines
* - drawFaces: display surfaces
* - bgColor: canvas background color
* - color: object color
* - viewerwidth, viewerheight: set rendering size. Works with any css unit.
* viewerheight can also be specified as a ratio to width, ie number e (0, 1]
* - noWebGL: force render without webGL
* - verbose: show additional info (currently only time used for rendering)
*/
interface ViewerSize {
widthDefault: string;
heightDefault: string;
width: number;
height: number;
heightratio: number;
}
class Processor {
private containerdiv;
private options;
private onchange;
private static widthDefault;
private static heightDefault;
private viewerdiv;
private viewer;
private viewerSize;
private processing;
private currentObject;
private hasValidCurrentObject;
private hasOutputFile;
private worker;
private paramDefinitions;
private paramControls;
private script;
private hasError;
private debugging;
private errordiv;
private errorpre;
private statusdiv;
private controldiv;
private statusspan;
private statusbuttons;
private abortbutton;
private renderedElementDropdown;
private formatDropdown;
private generateOutputFileButton;
private downloadOutputFileLink;
private parametersdiv;
private parameterstable;
private currentFormat;
private filename;
private currentObjects;
private currentObjectIndex;
private isFirstRender_;
private outputFileDirEntry;
private outputFileBlobUrl;
constructor(containerdiv: HTMLDivElement, options?: ProcessorOptions, onchange?: EventHandler);
static convertToSolid(obj: any): any;
cleanOption(option: any, deflt: any): any;
toggleDrawOption(str: any): boolean;
setDrawOption(str: any, bool: any): void;
handleResize(): void;
createElements(): void;
getFilenameForRenderedObject(): string;
setRenderedObjects(obj: any): void;
setSelectedObjectIndex(index: number): void;
selectedFormat(): any;
selectedFormatInfo(): any;
updateDownloadLink(): void;
clearViewer(): void;
abort(): void;
enableItems(): void;
setOpenJsCadPath(path: string): void;
addLibrary(lib: any): void;
setError(txt: string): void;
setDebugging(debugging: boolean): void;
setJsCad(script: string, filename?: string): void;
getParamValues(): {};
rebuildSolid(): void;
hasSolid(): boolean;
isProcessing(): boolean;
clearOutputFile(): void;
generateOutputFile(): void;
currentObjectToBlob(): any;
supportedFormatsForCurrentObject(): string[];
formatInfo(format: any): any;
downloadLinkTextForCurrentObject(): string;
generateOutputFileBlobUrl(): void;
generateOutputFileFileSystem(): void;
createParamControls(): void;
}
}
interface Window {
Worker: Worker;
// URL: URL;
webkitURL: URL;
requestFileSystem: any;
webkitRequestFileSystem: any;
}
interface IAMFStringOptions {
unit: string;
}
declare class CxG {
toStlString(): string;
toStlBinary(): void;
toAMFString(AMFStringOptions?: IAMFStringOptions): void;
getBounds(): CxG[];
transform(matrix4x4: CSG.Matrix4x4): CxG;
mirrored(plane: CSG.Plane): CxG;
mirroredX(): CxG;
mirroredY(): CxG;
mirroredZ(): CxG;
translate(v: number[]): CxG;
translate(v: CSG.Vector3D): CxG;
scale(f: CSG.Vector3D): CxG;
rotateX(deg: number): CxG;
rotateY(deg: number): CxG;
rotateZ(deg: number): CxG;
rotate(rotationCenter: CSG.Vector3D, rotationAxis: CSG.Vector3D, degrees: number): CxG;
rotateEulerAngles(alpha: number, beta: number, gamma: number, position: number[]): CxG;
}
interface ICenter {
center(cAxes: string[]): CxG;
}
declare class CSG extends CxG implements ICenter {
polygons: CSG.Polygon[];
properties: CSG.Properties;
isCanonicalized: boolean;
isRetesselated: boolean;
cachedBoundingBox: CSG.Vector3D[];
static defaultResolution2D: number;
static defaultResolution3D: number;
static fromPolygons(polygons: CSG.Polygon[]): CSG;
static fromSlices(options: any): CSG;
static fromObject(obj: any): CSG;
static fromCompactBinary(bin: any): CSG;
toPolygons(): CSG.Polygon[];
union(csg: CSG[]): CSG;
union(csg: CSG): CSG;
unionSub(csg: CSG, retesselate?: boolean, canonicalize?: boolean): CSG;
unionForNonIntersecting(csg: CSG): CSG;
subtract(csg: CSG[]): CSG;
subtract(csg: CSG): CSG;
subtractSub(csg: CSG, retesselate: boolean, canonicalize: boolean): CSG;
intersect(csg: CSG[]): CSG;
intersect(csg: CSG): CSG;
intersectSub(csg: CSG, retesselate?: boolean, canonicalize?: boolean): CSG;
invert(): CSG;
transform1(matrix4x4: CSG.Matrix4x4): CSG;
transform(matrix4x4: CSG.Matrix4x4): CSG;
toString(): string;
expand(radius: number, resolution: number): CSG;
contract(radius: number, resolution: number): CSG;
stretchAtPlane(normal: number[], point: number[], length: number): CSG;
expandedShell(radius: number, resolution: number, unionWithThis: boolean): CSG;
canonicalized(): CSG;
reTesselated(): CSG;
getBounds(): CSG.Vector3D[];
mayOverlap(csg: CSG): boolean;
cutByPlane(plane: CSG.Plane): CSG;
connectTo(myConnector: CSG.Connector, otherConnector: CSG.Connector, mirror: boolean, normalrotation: number): CSG;
setShared(shared: CSG.Polygon.Shared): CSG;
setColor(args: any): CSG;
toCompactBinary(): {
"class": string;
numPolygons: number;
numVerticesPerPolygon: Uint32Array;
polygonPlaneIndexes: Uint32Array;
polygonSharedIndexes: Uint32Array;
polygonVertices: Uint32Array;
vertexData: Float64Array;
planeData: Float64Array;
shared: CSG.Polygon.Shared[];
};
toPointCloud(cuberadius: any): CSG;
getTransformationAndInverseTransformationToFlatLying(): any;
getTransformationToFlatLying(): any;
lieFlat(): CSG;
projectToOrthoNormalBasis(orthobasis: CSG.OrthoNormalBasis): CAG;
sectionCut(orthobasis: CSG.OrthoNormalBasis): CAG;
fixTJunctions(): CSG;
toTriangles(): any[];
getFeatures(features: any): any;
center(cAxes: string[]): CxG;
toX3D(): Blob;
toStlBinary(): Blob;
toStlString(): string;
toAMFString(m: IAMFStringOptions): Blob;
}
declare module CSG {
function fnNumberSort(a: any, b: any): number;
function parseOption(options: any, optionname: any, defaultvalue: any): any;
function parseOptionAs3DVector(options: any, optionname: any, defaultvalue: any): Vector3D;
function parseOptionAs3DVectorList(options: any, optionname: any, defaultvalue: any): any;
function parseOptionAs2DVector(options: any, optionname: any, defaultvalue: any): any;
function parseOptionAsFloat(options: any, optionname: any, defaultvalue: any): any;
function parseOptionAsInt(options: any, optionname: any, defaultvalue: any): any;
function parseOptionAsBool(options: any, optionname: any, defaultvalue: any): any;
function cube(options: any): CSG;
function sphere(options: any): CSG;
function cylinder(options: any): CSG;
function roundedCylinder(options: any): CSG;
function roundedCube(options: any): CSG;
/**
* polyhedron accepts openscad style arguments. I.e. define face vertices clockwise looking from outside
*/
function polyhedron(options: any): CSG;
function IsFloat(n: any): boolean;
function solve2Linear(a: any, b: any, c: any, d: any, u: any, v: any): number[];
class Vector3D extends CxG {
x: number;
y: number;
z: number;
constructor(v3: Vector3D);
constructor(v2: Vector2D);
constructor(v2: number[]);
constructor(x: number, y: number);
constructor(x: number, y: number, z: number);
static Create(x: number, y: number, z: number): Vector3D;
clone(): Vector3D;
negated(): Vector3D;
abs(): Vector3D;
plus(a: Vector3D): Vector3D;
minus(a: Vector3D): Vector3D;
times(a: number): Vector3D;
dividedBy(a: number): Vector3D;
dot(a: Vector3D): number;
lerp(a: Vector3D, t: number): Vector3D;
lengthSquared(): number;
length(): number;
unit(): Vector3D;
cross(a: Vector3D): Vector3D;
distanceTo(a: Vector3D): number;
distanceToSquared(a: Vector3D): number;
equals(a: Vector3D): boolean;
multiply4x4(matrix4x4: Matrix4x4): Vector3D;
transform(matrix4x4: Matrix4x4): Vector3D;
toString(): string;
randomNonParallelVector(): Vector3D;
min(p: Vector3D): Vector3D;
max(p: Vector3D): Vector3D;
toStlString(): string;
toAMFString(): string;
}
class Vertex extends CxG {
pos: Vector3D;
tag: number;
constructor(pos: Vector3D);
static fromObject(obj: any): Vertex;
flipped(): Vertex;
getTag(): number;
interpolate(other: Vertex, t: number): Vertex;
transform(matrix4x4: Matrix4x4): Vertex;
toString(): string;
toStlString(): string;
toAMFString(): string;
}
class Plane extends CxG {
normal: Vector3D;
w: number;
tag: number;
constructor(normal: Vector3D, w: number);
static fromObject(obj: any): Plane;
static EPSILON: number;
static fromVector3Ds(a: Vector3D, b: Vector3D, c: Vector3D): Plane;
static anyPlaneFromVector3Ds(a: Vector3D, b: Vector3D, c: Vector3D): Plane;
static fromPoints(a: Vector3D, b: Vector3D, c: Vector3D): Plane;
static fromNormalAndPoint(normal: Vector3D, point: Vector3D): Plane;
static fromNormalAndPoint(normal: number[], point: number[]): Plane;
flipped(): Plane;
getTag(): number;
equals(n: Plane): boolean;
transform(matrix4x4: Matrix4x4): Plane;
splitPolygon(polygon: Polygon): {
type: any;
front: any;
back: any;
};
splitLineBetweenPoints(p1: Vector3D, p2: Vector3D): Vector3D;
intersectWithLine(line3d: Line3D): Vector3D;
intersectWithPlane(plane: Plane): Line3D;
signedDistanceToPoint(point: Vector3D): number;
toString(): string;
mirrorPoint(point3d: Vector3D): Vector3D;
}
class Polygon extends CxG {
vertices: Vertex[];
shared: Polygon.Shared;
plane: Plane;
cachedBoundingSphere: any;
cachedBoundingBox: Vector3D[];
static defaultShared: CSG.Polygon.Shared;
constructor(vertices: Vector3D, shared?: Polygon.Shared, plane?: Plane);
constructor(vertices: Vertex[], shared?: Polygon.Shared, plane?: Plane);
static fromObject(obj: any): Polygon;
checkIfConvex(): void;
setColor(args: any): Polygon;
getSignedVolume(): number;
getArea(): number;
getTetraFeatures(features: any): any[];
extrude(offsetvector: any): CSG;
boundingSphere(): any;
boundingBox(): Vector3D[];
flipped(): Polygon;
transform(matrix4x4: Matrix4x4): Polygon;
toString(): string;
projectToOrthoNormalBasis(orthobasis: OrthoNormalBasis): CAG;
/**
* Creates solid from slices (CSG.Polygon) by generating walls
* @param {Object} options Solid generating options
* - numslices {Number} Number of slices to be generated
* - callback(t, slice) {Function} Callback function generating slices.
* arguments: t = [0..1], slice = [0..numslices - 1]
* return: CSG.Polygon or null to skip
* - loop {Boolean} no flats, only walls, it's used to generate solids like a tor
*/
solidFromSlices(options: any): CSG;
/**
*
* @param walls Array of wall polygons
* @param bottom Bottom polygon
* @param top Top polygon
*/
private _addWalls(walls, bottom, top, bFlipped);
static verticesConvex(vertices: Vertex[], planenormal: any): boolean;
static createFromPoints(points: number[][], shared?: CSG.Polygon.Shared, plane?: Plane): Polygon;
static isConvexPoint(prevpoint: any, point: any, nextpoint: any, normal: any): boolean;
static isStrictlyConvexPoint(prevpoint: any, point: any, nextpoint: any, normal: any): boolean;
toStlString(): string;
}
}
declare module CSG.Polygon {
class Shared {
color: any;
tag: any;
constructor(color: any);
static fromObject(obj: any): Shared;
static fromColor(args: any): Shared;
getTag(): any;
getHash(): any;
}
}
declare module CSG {
class PolygonTreeNode {
parent: any;
children: any;
polygon: Polygon;
removed: boolean;
constructor();
addPolygons(polygons: any): void;
remove(): void;
isRemoved(): boolean;
isRootNode(): boolean;
invert(): void;
getPolygon(): Polygon;
getPolygons(result: Polygon[]): void;
splitByPlane(plane: any, coplanarfrontnodes: any, coplanarbacknodes: any, frontnodes: any, backnodes: any): void;
_splitByPlane(plane: any, coplanarfrontnodes: any, coplanarbacknodes: any, frontnodes: any, backnodes: any): void;
addChild(polygon: Polygon): PolygonTreeNode;
invertSub(): void;
recursivelyInvalidatePolygon(): void;
}
class Tree {
polygonTree: PolygonTreeNode;
rootnode: Node;
constructor(polygons: Polygon[]);
invert(): void;
clipTo(tree: Tree, alsoRemovecoplanarFront?: boolean): void;
allPolygons(): Polygon[];
addPolygons(polygons: Polygon[]): void;
}
class Node {
parent: Node;
plane: Plane;
front: any;
back: any;
polygontreenodes: PolygonTreeNode[];
constructor(parent: Node);
invert(): void;
clipPolygons(polygontreenodes: PolygonTreeNode[], alsoRemovecoplanarFront: boolean): void;
clipTo(tree: Tree, alsoRemovecoplanarFront: boolean): void;
addPolygonTreeNodes(polygontreenodes: PolygonTreeNode[]): void;
getParentPlaneNormals(normals: Vector3D[], maxdepth: number): void;
}
class Matrix4x4 {
elements: number[];
constructor(elements?: number[]);
plus(m: Matrix4x4): Matrix4x4;
minus(m: Matrix4x4): Matrix4x4;
multiply(m: Matrix4x4): Matrix4x4;
clone(): Matrix4x4;
rightMultiply1x3Vector(v: Vector3D): Vector3D;
leftMultiply1x3Vector(v: Vector3D): Vector3D;
rightMultiply1x2Vector(v: Vector2D): Vector2D;
leftMultiply1x2Vector(v: Vector2D): Vector2D;
isMirroring(): boolean;
static unity(): Matrix4x4;
static rotationX(degrees: number): Matrix4x4;
static rotationY(degrees: number): Matrix4x4;
static rotationZ(degrees: number): Matrix4x4;
static rotation(rotationCenter: CSG.Vector3D, rotationAxis: CSG.Vector3D, degrees: number): Matrix4x4;
static translation(v: number[]): Matrix4x4;
static translation(v: Vector3D): Matrix4x4;
static mirroring(plane: Plane): Matrix4x4;
static scaling(v: number[]): Matrix4x4;
static scaling(v: Vector3D): Matrix4x4;
}
class Vector2D extends CxG {
x: number;
y: number;
constructor(x: number, y: number);
constructor(x: number[]);
constructor(x: Vector2D);
static fromAngle(radians: number): Vector2D;
static fromAngleDegrees(degrees: number): Vector2D;
static fromAngleRadians(radians: number): Vector2D;
static Create(x: number, y: number): Vector2D;
toVector3D(z: number): Vector3D;
equals(a: Vector2D): boolean;
clone(): Vector2D;
negated(): Vector2D;
plus(a: Vector2D): Vector2D;
minus(a: Vector2D): Vector2D;
times(a: number): Vector2D;
dividedBy(a: number): Vector2D;
dot(a: Vector2D): number;
lerp(a: Vector2D, t: number): Vector2D;
length(): number;
distanceTo(a: Vector2D): number;
distanceToSquared(a: Vector2D): number;
lengthSquared(): number;
unit(): Vector2D;
cross(a: Vector2D): number;
normal(): Vector2D;
multiply4x4(matrix4x4: Matrix4x4): Vector2D;
transform(matrix4x4: Matrix4x4): Vector2D;
angle(): number;
angleDegrees(): number;
angleRadians(): number;
min(p: Vector2D): Vector2D;
max(p: Vector2D): Vector2D;
toString(): string;
abs(): Vector2D;
}
class Line2D extends CxG {
normal: Vector2D;
w: number;
constructor(normal: Vector2D, w: number);
static fromPoints(p1: Vector2D, p2: Vector2D): Line2D;
reverse(): Line2D;
equals(l: Line2D): boolean;
origin(): Vector2D;
direction(): Vector2D;
xAtY(y: number): number;
absDistanceToPoint(point: Vector2D): number;
intersectWithLine(line2d: Line2D): Vector2D;
transform(matrix4x4: Matrix4x4): Line2D;
}
class Line3D extends CxG {
point: Vector3D;
direction: Vector3D;
constructor(point: Vector3D, direction: Vector3D);
static fromPoints(p1: Vector3D, p2: Vector3D): Line3D;
static fromPlanes(p1: Plane, p2: Plane): Line3D;
intersectWithPlane(plane: Plane): Vector3D;
clone(): Line3D;
reverse(): Line3D;
transform(matrix4x4: Matrix4x4): Line3D;
closestPointOnLine(point: Vector3D): Vector3D;
distanceToPoint(point: Vector3D): number;
equals(line3d: Line3D): boolean;
}
class OrthoNormalBasis extends CxG {
v: Vector3D;
u: Vector3D;
plane: Plane;
planeorigin: Vector3D;
constructor(plane: Plane, rightvector?: Vector3D);
static GetCartesian(xaxisid: string, yaxisid: string): OrthoNormalBasis;
static Z0Plane(): OrthoNormalBasis;
getProjectionMatrix(): Matrix4x4;
getInverseProjectionMatrix(): Matrix4x4;
to2D(vec3: Vector3D): Vector2D;
to3D(vec2: Vector2D): Vector3D;
line3Dto2D(line3d: Line3D): Line2D;
line2Dto3D(line2d: Line2D): Line3D;
transform(matrix4x4: Matrix4x4): OrthoNormalBasis;
}
function interpolateBetween2DPointsForY(point1: Vector2D, point2: Vector2D, y: number): number;
function reTesselateCoplanarPolygons(sourcepolygons: CSG.Polygon[], destpolygons: CSG.Polygon[]): void;
class fuzzyFactory {
multiplier: number;
lookuptable: any;
constructor(numdimensions: number, tolerance: number);
lookupOrCreate(els: any, creatorCallback: any): any;
}
class fuzzyCSGFactory {
vertexfactory: fuzzyFactory;
planefactory: fuzzyFactory;
polygonsharedfactory: any;
constructor();
getPolygonShared(sourceshared: Polygon.Shared): Polygon.Shared;
getVertex(sourcevertex: Vertex): Vertex;
getPlane(sourceplane: Plane): Plane;
getPolygon(sourcepolygon: Polygon): Polygon;
getCSG(sourcecsg: CSG): CSG;
}
var staticTag: number;
function getTag(): number;
class Properties {
cube: Properties;
center: any;
facecenters: any[];
roundedCube: Properties;
cylinder: Properties;
start: any;
end: any;
facepointH: any;
facepointH90: any;
sphere: Properties;
facepoint: any;
roundedCylinder: any;
_transform(matrix4x4: Matrix4x4): Properties;
_merge(otherproperties: Properties): Properties;
static transformObj(source: any, result: any, matrix4x4: Matrix4x4): void;
static cloneObj(source: any, result: any): void;
static addFrom(result: any, otherproperties: Properties): void;
}
class Connector extends CxG {
point: Vector3D;
axisvector: Vector3D;
normalvector: Vector3D;
constructor(point: number[], axisvector: Vector3D, normalvector: number[]);
constructor(point: number[], axisvector: number[], normalvector: number[]);
constructor(point: number[], axisvector: number[], normalvector: Vector3D);
constructor(point: Vector3D, axisvector: number[], normalvector: Vector3D);
constructor(point: Vector3D, axisvector: number[], normalvector: number[]);
constructor(point: Vector3D, axisvector: Vector3D, normalvector: Vector3D);
normalized(): Connector;
transform(matrix4x4: Matrix4x4): Connector;
getTransformationTo(other: Connector, mirror: boolean, normalrotation: number): Matrix4x4;
axisLine(): Line3D;
extend(distance: number): Connector;
}
class ConnectorList {
connectors_: Connector[];
closed: boolean;
constructor(connectors: Connector[]);
static defaultNormal: number[];
static fromPath2D(path2D: CSG.Path2D, arg1: any, arg2: any): ConnectorList;
static _fromPath2DTangents(path2D: any, start: any, end: any): ConnectorList;
static _fromPath2DExplicit(path2D: any, angleIsh: any): ConnectorList;
setClosed(bool: boolean): void;
appendConnector(conn: Connector): void;
followWith(cagish: any): CSG;
verify(): void;
}
interface IRadiusOptions {
radius?: number;
resolution?: number;
}
interface ICircleOptions extends IRadiusOptions {
center?: Vector2D | number[];
}
interface IArcOptions extends ICircleOptions {
startangle?: number;
endangle?: number;
maketangent?: boolean;
}
interface IEllpiticalArcOptions extends IRadiusOptions {
clockwise?: boolean;
large?: boolean;
xaxisrotation?: number;
xradius?: number;
yradius?: number;
}
interface IRectangleOptions {
center?: Vector2D;
corner1?: Vector2D;
corner2?: Vector2D;
radius?: Vector2D;
}
interface IRoundRectangleOptions {
roundradius: number;
resolution?: number;
}
class Path2D extends CxG {
closed: boolean;
points: Vector2D[];
lastBezierControlPoint: Vector2D;
constructor(points: number[], closed?: boolean);
constructor(points: Vector2D[], closed?: boolean);
static arc(options: IArcOptions): Path2D;
concat(otherpath: Path2D): Path2D;
appendPoint(point: Vector2D): Path2D;
appendPoints(points: Vector2D[]): Path2D;
close(): Path2D;
rectangularExtrude(width: number, height: number, resolution: number): CSG;
expandToCAG(pathradius: number, resolution: number): CAG;
innerToCAG(): CAG;
transform(matrix4x4: Matrix4x4): Path2D;
appendBezier(controlpoints: any, options: any): Path2D;
appendArc(endpoint: Vector2D, options: IEllpiticalArcOptions): Path2D;
}
}
declare class CAG extends CxG implements ICenter {
sides: CAG.Side[];
isCanonicalized: boolean;
constructor();
static fromSides(sides: CAG.Side[]): CAG;
static fromPoints(points: CSG.Vector2D[]): CAG;
static fromPointsNoCheck(points: CSG.Vector2D[]): CAG;
static fromFakeCSG(csg: CSG): CAG;
static linesIntersect(p0start: CSG.Vector2D, p0end: CSG.Vector2D, p1start: CSG.Vector2D, p1end: CSG.Vector2D): boolean;
static circle(options: CSG.ICircleOptions): CAG;
static rectangle(options: CSG.IRectangleOptions): CAG;
static roundedRectangle(options: any): CAG;
static fromCompactBinary(bin: any): CAG;
toString(): string;
_toCSGWall(z0: any, z1: any): CSG;
_toVector3DPairs(m: CSG.Matrix4x4): CSG.Vector3D[][];
_toPlanePolygons(options: any): CSG.Polygon[];
_toWallPolygons(options: any): any[];
union(cag: CAG[]): CAG;
union(cag: CAG): CAG;
subtract(cag: CAG[]): CAG;
subtract(cag: CAG): CAG;
intersect(cag: CAG[]): CAG;
intersect(cag: CAG): CAG;
transform(matrix4x4: CSG.Matrix4x4): CAG;
area(): number;
flipped(): CAG;
getBounds(): CSG.Vector2D[];
isSelfIntersecting(): boolean;
expandedShell(radius: number, resolution: number): CAG;
expand(radius: number, resolution: number): CAG;
contract(radius: number, resolution: number): CAG;
extrudeInOrthonormalBasis(orthonormalbasis: CSG.OrthoNormalBasis, depth: number, options?: any): CSG;
extrudeInPlane(axis1: any, axis2: any, depth: any, options: any): CSG;
extrude(options: CAG_extrude_options): CSG;
rotateExtrude(options: any): CSG;
check(): void;
canonicalized(): CAG;
toCompactBinary(): {
'class': string;
sideVertexIndices: Uint32Array;
vertexData: Float64Array;
};
getOutlinePaths(): CSG.Path2D[];
overCutInsideCorners(cutterradius: any): CAG;
center(cAxes: string[]): CxG;
toDxf(): Blob;
static PathsToDxf(paths: CSG.Path2D[]): Blob;
}
declare module CAG {
class Vertex {
pos: CSG.Vector2D;
tag: number;
constructor(pos: CSG.Vector2D);
toString(): string;
getTag(): number;
}
class Side extends CxG {
vertex0: Vertex;
vertex1: Vertex;
tag: number;
constructor(vertex0: Vertex, vertex1: Vertex);
static _fromFakePolygon(polygon: CSG.Polygon): Side;
toString(): string;
toPolygon3D(z0: any, z1: any): CSG.Polygon;
transform(matrix4x4: CSG.Matrix4x4): Side;
flipped(): Side;
direction(): CSG.Vector2D;
getTag(): number;
lengthSquared(): number;
length(): number;
}
class fuzzyCAGFactory {
vertexfactory: CSG.fuzzyFactory;
constructor();
getVertex(sourcevertex: Vertex): Vertex;
getSide(sourceside: Side): Side;
getCAG(sourcecag: CAG): CAG;
}
}
interface CAG_extrude_options {
offset?: number[];
twistangle?: number;
twiststeps?: number;
}
declare module CSG {
class Polygon2D extends CAG {
constructor(points: Vector2D[]);
}
}

View File

@@ -34,7 +34,7 @@ Please see the [contribution guide](http://definitelytyped.org/guides/contributi
Here is are the [currently requested definitions](https://github.com/borisyankov/DefinitelyTyped/labels/Definition%3ARequest).
## Licence
## License
This project is licensed under the MIT license.

1
acorn/acorn.d.ts vendored
View File

@@ -9,6 +9,7 @@ declare module acorn {
var version: string;
function parse(input: string, options?: Options): ESTree.Program;
function parseExpressionAt(input: string, pos: number, options?: Options): ESTree.Expression;
function getLineInfo(input: string, offset: number): ESTree.Position;
var defaultOptions: Options;
interface TokenType {

137
ag-grid/ag-grid-tests.ts Normal file
View File

@@ -0,0 +1,137 @@
/// <reference path="ag-grid" />
checkGridOptions(<ag.grid.GridOptions>{});
checkColDef(<ag.grid.ColDef>{});
function checkGridOptions(gridOptions: ag.grid.GridOptions): void {
gridOptions.virtualPaging = true;
gridOptions.toolPanelSuppressPivot = true;
gridOptions.toolPanelSuppressValues = true;
gridOptions.rowsAlreadyGrouped = true;
gridOptions.suppressRowClickSelection = true;
gridOptions.suppressCellSelection = true;
gridOptions.sortingOrder = ['asc','desc'];
gridOptions.suppressMultiSort = true;
gridOptions.suppressHorizontalScroll = true;
gridOptions.unSortIcon = true;
gridOptions.rowHeight = 0;
gridOptions.rowBuffer = 0;
gridOptions.enableColResize = true;
gridOptions.enableCellExpressions = true;
gridOptions.enableSorting = true;
gridOptions.enableServerSideSorting = true;
gridOptions.enableFilter = true;
gridOptions.enableServerSideFilter = true;
gridOptions.colWidth = 0;
gridOptions.suppressMenuHide = true;
gridOptions.singleClickEdit = true;
gridOptions.debug = true;
gridOptions.icons = {};
gridOptions.angularCompileRows = true;
gridOptions.angularCompileFilters = true;
gridOptions.angularCompileHeaders = true;
gridOptions.localeText = {};
gridOptions.localeTextFunc = function() {}
gridOptions.suppressScrollLag = true;
gridOptions.groupSuppressAutoColumn = true;
gridOptions.groupSelectsChildren = true;
gridOptions.groupHidePivotColumns = true;
gridOptions.groupIncludeFooter = true;
gridOptions.groupUseEntireRow = true;
gridOptions.groupSuppressRow = true;
gridOptions.groupSuppressBlankHeader = true;
gridOptions.forPrint = true;
gridOptions.groupColumnDef = {};
gridOptions.context = {};
gridOptions.rowStyle = {color: 'red'};
gridOptions.rowClass = 'green';
gridOptions.groupDefaultExpanded = false;
gridOptions.slaveGrids = [];
gridOptions.rowSelection = 'single';
gridOptions.rowDeselection = true;
gridOptions.rowData = [];
gridOptions.floatingTopRowData = [];
gridOptions.floatingBottomRowData = [];
gridOptions.showToolPanel = true;
gridOptions.groupKeys = ['a','b']
gridOptions.groupAggFields = ['a','b']
gridOptions.columnDefs = [];
gridOptions.datasource = {};
gridOptions.pinnedColumnCount = 0;
gridOptions.groupHeaders = true;
gridOptions.headerHeight = 0;
gridOptions.groupRowInnerRenderer = function(params) {};
gridOptions.groupRowRenderer = {};
gridOptions.isScrollLag = function() {return true;}
gridOptions.isExternalFilterPresent = function() { return true; };
gridOptions.doesExternalFilterPass = function(node: ag.grid.RowNode) { return false; };
gridOptions.getRowStyle = function() {};
gridOptions.getRowClass = function() {};
gridOptions.headerCellRenderer = function() {};
gridOptions.groupAggFunction = function(nodes: any[]) {};
gridOptions.onReady = function(api: any) {};
gridOptions.onModelUpdated = function() {};
gridOptions.onCellClicked = function(params) {};
gridOptions.onCellDoubleClicked = function(params) {};
gridOptions.onCellContextMenu = function(params) {};
gridOptions.onCellValueChanged = function(params) {};
gridOptions.onCellFocused = function(params) {};
gridOptions.onRowSelected = function(params) {};
gridOptions.onSelectionChanged = function() {};
gridOptions.onBeforeFilterChanged = function() {};
gridOptions.onAfterFilterChanged = function() {};
gridOptions.onFilterModified = function() {};
gridOptions.onBeforeSortChanged = function() {};
gridOptions.onAfterSortChanged = function() {};
gridOptions.onVirtualRowRemoved = function(params) {};
gridOptions.onRowClicked = function(params) {};
gridOptions.api = null;
gridOptions.columnApi = null;
}
function checkColDef(colDef: ag.grid.ColDef): void {
colDef.sort = 'test';
colDef.sortedAt = 0;
colDef.sortingOrder = ['asc','desc'];
colDef.headerName = 'test';
colDef.field = 'test';
colDef.headerValueGetter = 'test';
colDef.colId = 'test';
colDef.hide = true;
colDef.headerTooltip = 'test';
colDef.valueGetter = 'test';
colDef.headerCellRenderer = {};
colDef.headerClass = 'test';
colDef.width = 0;
colDef.minWidth = 0;
colDef.maxWidth = 0;
colDef.cellClass = 'test';
colDef.cellStyle = {color: 'test'};
colDef.cellRenderer = function() {};
colDef.floatingCellRenderer = function() {};
colDef.aggFunc = 'test';
colDef.comparator = function() {};
colDef.checkboxSelection = true;
colDef.suppressMenu = true;
colDef.suppressSorting = true;
colDef.unSortIcon = true;
colDef.suppressSizeToFit = true;
colDef.suppressResize = true;
colDef.headerGroup = 'test';
colDef.headerGroupShow = 'test';
colDef.editable = true;
colDef.newValueHandler = function() {};
colDef.volatile = true;
colDef.template = 'test';
colDef.templateUrl = 'test';
colDef.filter = 'test';
colDef.filterParams = {};
colDef.onCellValueChanged = function() {};
colDef.onCellClicked = function() {};
colDef.onCellDoubleClicked = function() {};
colDef.onCellContextMenu = function() {};
colDef.cellClassRules = {};
}

1991
ag-grid/ag-grid.d-2.1.2.ts Normal file

File diff suppressed because it is too large Load Diff

1991
ag-grid/ag-grid.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,11 @@
/// <reference path="amqplib.d.ts" />
// promise api tests
import amqp = require("amqplib");
var msg = "Hello World";
// test promise api
amqp.connect("amqp://localhost")
.then(connection => {
return connection.createChannel()
@@ -19,3 +21,47 @@ amqp.connect("amqp://localhost")
.then(channel => channel.consume("myQueue", newMsg => console.log("New Message: " + newMsg.content.toString())))
.ensure(() => connection.close());
});
// test promise api properties
var amqpMessage: amqp.Message;
amqpMessage.properties.contentType = "application/json";
var amqpAssertExchangeOptions: amqp.Options.AssertExchange;
var anqpAssertExchangeReplies: amqp.Replies.AssertExchange;
// callback api tests
import amqpcb = require("amqplib/callback_api");
amqpcb.connect("amqp://localhost", (err, connection) => {
if(!err) {
connection.createChannel((err, channel) => {
if (!err) {
channel.assertQueue("myQueue", {}, (err, ok) => {
if(!err) {
channel.sendToQueue("myQueue", new Buffer(msg));
}
});
}
});
}
});
amqpcb.connect("amqp://localhost", (err, connection) => {
if(!err) {
connection.createChannel((err, channel) => {
if (!err) {
channel.assertQueue("myQueue", {}, (err, ok) => {
if(!err) {
channel.consume("myQueue", newMsg => console.log("New Message: " + newMsg.content.toString()));
}
});
}
});
}
});
// test callback api properties
var amqpcbMessage: amqpcb.Message;
amqpcbMessage.properties.contentType = "application/json";
var amqpcbAssertExchangeOptions: amqpcb.Options.AssertExchange;
var anqpcbAssertExchangeReplies: amqpcb.Replies.AssertExchange;

108
amqplib/amqplib.d.ts vendored
View File

@@ -1,22 +1,12 @@
// Type definitions for amqplib 0.3.x
// Project: https://github.com/squaremo/amqp.node
// Definitions by: Michael Nahkies <https://github.com/mnahkies>
// Definitions by: Michael Nahkies <https://github.com/mnahkies>, Ab Reitsma <https://github.com/abreits>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../when/when.d.ts" />
/// <reference path="../node/node.d.ts" />
declare module "amqplib" {
import events = require("events");
import when = require("when");
interface Connection extends events.EventEmitter {
close(): when.Promise<void>;
createChannel(): when.Promise<Channel>;
createConfirmChannel(): when.Promise<Channel>;
}
declare module "amqplib/properties" {
module Replies {
interface Empty {
}
@@ -25,6 +15,9 @@ declare module "amqplib" {
messageCount: number;
consumerCount: number;
}
interface PurgeQueue {
messageCount: number;
}
interface DeleteQueue {
messageCount: number;
}
@@ -73,7 +66,7 @@ declare module "amqplib" {
contentType?: string;
contentEncoding?: string;
headers?: Object;
headers?: any;
priority?: number;
correlationId?: string;
replyTo?: string;
@@ -88,7 +81,7 @@ declare module "amqplib" {
noAck?: boolean;
exclusive?: boolean;
priority?: number;
arguments?: Object;
arguments?: any;
}
interface Get {
noAck?: boolean;
@@ -97,8 +90,24 @@ declare module "amqplib" {
interface Message {
content: Buffer;
fields: Object;
properties: Object;
fields: any;
properties: any;
}
}
declare module "amqplib" {
import events = require("events");
import when = require("when");
import shared = require("amqplib/properties")
export import Replies = shared.Replies;
export import Options = shared.Options;
export import Message = shared.Message;
interface Connection extends events.EventEmitter {
close(): when.Promise<void>;
createChannel(): when.Promise<Channel>;
createConfirmChannel(): when.Promise<Channel>;
}
interface Channel extends events.EventEmitter {
@@ -108,7 +117,7 @@ declare module "amqplib" {
checkQueue(queue: string): when.Promise<Replies.AssertQueue>;
deleteQueue(queue: string, options?: Options.DeleteQueue): when.Promise<Replies.DeleteQueue>;
purgeQueue(queue: string): when.Promise<Replies.DeleteQueue>;
purgeQueue(queue: string): when.Promise<Replies.PurgeQueue>;
bindQueue(queue: string, source: string, pattern: string, args?: any): when.Promise<Replies.Empty>;
unbindQueue(queue: string, source: string, pattern: string, args?: any): when.Promise<Replies.Empty>;
@@ -142,3 +151,68 @@ declare module "amqplib" {
function connect(url: string, socketOptions?: any): when.Promise<Connection>;
}
declare module "amqplib/callback_api" {
import events = require("events");
import shared = require("amqplib/properties")
export import Replies = shared.Replies;
export import Options = shared.Options;
export import Message = shared.Message;
interface Connection extends events.EventEmitter {
close(callback?: (err: any) => void): void;
createChannel(callback: (err: any, channel: Channel) => void): void;
createConfirmChannel(callback: (err: any, confirmChannel: ConfirmChannel) => void): void;
}
interface Channel extends events.EventEmitter {
close(callback: (err: any) => void): void;
assertQueue(queue?: string, options?: Options.AssertQueue, callback?: (err:any, ok: Replies.AssertQueue) => void): void;
checkQueue(queue: string, callback?: (err: any, ok: Replies.AssertQueue) => void): void;
deleteQueue(queue: string, options?: Options.DeleteQueue, callback?: (err:any, ok: Replies.DeleteQueue) => void): void;
purgeQueue(queue: string, callback?: (err:any, ok: Replies.PurgeQueue) => void): void;
bindQueue(queue: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void;
unbindQueue(queue: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void;
assertExchange(exchange: string, type: string, options?: Options.AssertExchange, callback?: (err: any, ok: Replies.AssertExchange) => void): void;
checkExchange(exchange: string, callback?: (err: any, ok: Replies.Empty) => void): void;
deleteExchange(exchange: string, options?: Options.DeleteExchange, callback?: (err: any, ok: Replies.Empty) => void): void;
bindExchange(destination: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void;
unbindExchange(destination: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void;
publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish): boolean;
sendToQueue(queue: string, content: Buffer, options?: Options.Publish): boolean;
consume(queue: string, onMessage: (msg: Message) => any, options?: Options.Consume, callback?: (err: any, ok: Replies.Consume) => void): void;
cancel(consumerTag: string, callback?: (err: any, ok: Replies.Empty) => void): void;
get(queue: string, options?: Options.Get, callback?: (err: any, ok: Message | boolean) => void): void;
ack(message: Message, allUpTo?: boolean): void;
ackAll(): void;
nack(message: Message, allUpTo?: boolean, requeue?: boolean): void;
nackAll(requeue?: boolean): void;
reject(message: Message, requeue?: boolean): void;
prefetch(count: number, global?: boolean): void;
recover(callback?: (err: any, ok: Replies.Empty) => void): void;
}
interface ConfirmChannel extends Channel {
publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish, callback?: (err: any, ok: Replies.Empty) => void): boolean;
sendToQueue(queue: string, content: Buffer, options?: Options.Publish, callback?: (err: any, ok: Replies.Empty) => void): boolean;
waitForConfirms(callback?: (err: any) => void): void;
}
function connect(callback: (err: any, connection: Connection) => void): void;
function connect(url: string, callback: (err: any, connection: Connection) => void): void;
function connect(url: string, socketOptions: any, callback: (err: any, connection: Connection) => void): void;
}

View File

@@ -80,3 +80,12 @@ function testIntegrations(): void {
}
});
}
function testFlush(): void {
analytics.flush();
analytics.flush(function(err, batch) {
if (err) { alert("Oh nos!"); }
else { console.log(batch.batch[0].type); }
});
}

View File

@@ -65,6 +65,16 @@ declare module AnalyticsNode {
anonymous_id?: string | number;
integrations?: Integrations;
}): Analytics;
/* Flush batched calls to make sure nothing is left in the queue */
flush(fn?: (err: Error, batch: {
batch: Array<{
type: string;
}>;
messageId: string;
sentAt: Date;
timestamp: Date;
}) => void): Analytics;
}
}

View File

@@ -0,0 +1,16 @@
/// <reference path="angular-dialog-service.d.ts" />
var options : angular.dialogservice.IDialogOptions = {};
options.animation = true;
options.backdrop = true;
options.keyboard = true;
options.backdropClass = "some-css-class";
options.windowClass = "some-css-class";
options.size = 'md';
var dialogs : angular.dialogservice.IDialogService;
dialogs.error('Error','An unknown error occurred preventing the completion of the requested action.');
dialogs.wait('Creating User','Please wait while we attempt to create user "Michael Conroy."<br><br>This should only take a moment.',50);
dialogs.notify('Something Happened','Something happened at this point in the application that I wish to let you know about');
dialogs.create('url/to/a/template','ctrlrToUse',{},{});

View File

@@ -0,0 +1,82 @@
// Type definitions for Angular Dialog Service 5.2.8
// Project: https://github.com/m-e-conroy/angular-dialog-service
// Definitions by: William Comartin <https://github.com/wcomartin>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts"/>
/// <reference path="../angular-ui-bootstrap/angular-ui-bootstrap.d.ts"/>
declare module angular.dialogservice {
interface IDialogOptions {
/**
* Set to false to disable animations on new modal/backdrop. Does not toggle animations for modals/backdrops that are already displayed.
*
* @default false
*/
animation?: boolean;
/**
* controls the presence of a backdrop
* Allowed values:
* - true (default)
* - false (no backdrop)
* - 'static' backdrop is present but modal window is not closed when clicking outside of the modal window
*
* @default true
*/
backdrop?: boolean | string;
/**
* indicates whether the dialog should be closable by hitting the ESC key
*
* @default true
*/
keyboard?: boolean;
/**
* additional CSS class(es) to be added to a modal backdrop template
*
* @default 'dialogs-backdrop-default'
*/
backdropClass?: string;
/**
* additional CSS class(es) to be added to a modal window template
*
* @default 'dialogs-default'
*/
windowClass?: string;
/**
* Optional suffix of modal window class. The value used is appended to the `modal-` class, i.e. a value of `sm` gives `modal-sm`.
*
* @default 'lg'
*/
size?: string;
}
interface IDialogService {
/**
* Opens a new error modal instance.
*/
error(header: string, msg: string, opts?: IDialogOptions): ng.ui.bootstrap.IModalServiceInstance
/**
* Opens a new wait modal instance.
*/
wait(header: string, msg: string, progress: number, opts?: IDialogOptions): ng.ui.bootstrap.IModalServiceInstance
/**
* Opens a new notify modal instance.
*/
notify(header: string, msg: string, opts?: IDialogOptions): ng.ui.bootstrap.IModalServiceInstance
/**
* Opens a new confirm modal instance.
*/
confirm(header: string, msg: string, opts?: IDialogOptions): ng.ui.bootstrap.IModalServiceInstance
/**
* Opens a new custom modal instance.
*/
create(url: string, ctrlr: string, data: any, opts?: IDialogOptions): ng.ui.bootstrap.IModalServiceInstance
}
}

View File

@@ -297,6 +297,7 @@ declare module AngularFormly {
bound?: any;
expression?: any;
value?: any;
[key: string]: any;
};

View File

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

View File

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

View File

@@ -0,0 +1,64 @@
/// <reference path="./httpi.d.ts" />
(function() {
'use strict';
var app = angular.module("Demo", ["httpi"]);
// -------------------------------------------------- //
// -------------------------------------------------- //
// I control the main demo.
app.controller(
"DemoController",
function($scope: ng.IScope, httpi: Httpi.HttpiFactory) {
console.warn("None of the API endpoints exist - they will all throw 404.");
// NOTE: The (.|.) notation will be stripped out automatically; it's only
// here to improve readability of the "happy paths" for interpolation
// labels. The following urls are pre-processed to be identical:
// --
// api/friends/( :listCommand | :id/:itemCommand )
// api/friends/:listCommand:id/:itemCommand
var resource = httpi.resource("api/friends/( :listCommand | :id/:itemCommand )");
// Clear list of friends - matching listCommand.
resource.post({
data: {
listCommand: "reset"
}
});
// Create a new friend - no matching URL parameters.
resource.post({
data: {
name: "Tricia"
}
});
// Get a given friend - ID matching.
resource.get({
data: {
id: 4
}
});
// Make best friend - ID, itemCommand matching.
resource.post({
data: {
id: 4,
itemCommand: "make-best-friend"
}
});
// Get gets friends - no matching URL parameters.
resource.get({
params: {
limit: "besties"
}
});
// Get a friend as a JSONP request.
// --
// NOTE: The "resource" will auto-inject the "JSON_CALLBACK" marker that
// AngularJS will automatically replace with an internal callback name.
resource.jsonp({
data: {
id: 43
}
});
}
);
})();

42
angular-httpi/httpi.d.ts vendored Normal file
View File

@@ -0,0 +1,42 @@
// Type definitions for angular-httpi
// Project: https://github.com/bennadel/httpi
// Definitions by: Andrew Camilleri <https://github.com/Kukks>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts" />
declare module Httpi {
export interface HttpiPayload extends ng.IRequestShortcutConfig {
method?: string;
url?: string;
params?: {};
data?: {};
keepTrailingSlash?: boolean;
}
export interface HttpiFactory {
(config: HttpiPayload): ng.IHttpPromise<{}>;
resource(url: string): HttpiResource;
}
export class HttpiResource {
constructor(http: ng.IHttpService, url: string);
delete<T>(config: HttpiPayload): ng.IHttpPromise<T>;
get<T>(config: HttpiPayload): ng.IHttpPromise<T>;
head<T>(config: HttpiPayload): ng.IHttpPromise<T>;
jsonp<T>(config: HttpiPayload): ng.IHttpPromise<T>;
post<T>(config: HttpiPayload): ng.IHttpPromise<T>;
put<T>(config: HttpiPayload): ng.IHttpPromise<T>;
setKeepTrailingSlash(newKeepTrailingSlash: boolean): HttpiResource;
}
}

View File

@@ -0,0 +1,15 @@
/// <reference path="angular-loading-bar.d.ts" />
var app = angular.module('testModule', ['angular-loading-bar']);
class TestController {
constructor($http: ng.IHttpService) {
$http.get("http://xyz.com", { ignoreLoadingBar: true })
}
}
app.controller('TestController', TestController);

View File

@@ -0,0 +1,18 @@
// Type definitions for angular-loading-bar
// Project: https://github.com/chieffancypants/angular-loading-bar
// Definitions by: Stephen Lautier <https://github.com/stephenlautier>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts" />
declare module angular {
interface IRequestShortcutConfig {
/**
* Indicates that the loading bar should be hidden.
*/
ignoreLoadingBar?: boolean;
}
}

View File

@@ -221,4 +221,19 @@ declare module angular.material {
setDefaultTheme(theme: string): void;
alwaysWatchTheme(alwaysWatch: boolean): void;
}
interface IDateLocaleProvider {
months: string[];
shortMonths: string[];
days: string[];
shortDays: string[];
dates: string[];
firstDayOfWeek: number;
parseDate(dateString: string): Date;
formatDate(date: Date): string;
monthHeaderFormatter(date: Date): string;
weekNumberFormatter(weekNumber: number): string;
msgCalendar: string;
msgOpenCalendar: string;
}
}

View File

@@ -71,10 +71,16 @@ declare module angular.ui {
* Arbitrary data object, useful for custom configuration.
*/
data?: any;
/**
* Boolean (default true). If false will not re-trigger 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;
/**
* Boolean (default true). If false will reload state on everytransitions. Useful for when you'd like to restore all data to its initial state.
*/
cache?: boolean;
}
interface IStateProvider extends angular.IServiceProvider {
@@ -229,10 +235,10 @@ declare module angular.ui {
*/
go(to: string, params?: {}, options?: IStateOptions): angular.IPromise<any>;
go(to: IState, params?: {}, options?: IStateOptions): angular.IPromise<any>;
transitionTo(state: string, params?: {}, updateLocation?: boolean): void;
transitionTo(state: IState, params?: {}, updateLocation?: boolean): void;
transitionTo(state: string, params?: {}, options?: IStateOptions): void;
transitionTo(state: IState, params?: {}, options?: IStateOptions): void;
transitionTo(state: string, params?: {}, updateLocation?: boolean): angular.IPromise<any>;
transitionTo(state: IState, params?: {}, updateLocation?: boolean): angular.IPromise<any>;
transitionTo(state: string, params?: {}, options?: IStateOptions): angular.IPromise<any>;
transitionTo(state: IState, params?: {}, options?: IStateOptions): angular.IPromise<any>;
includes(state: string, params?: {}): boolean;
is(state:string, params?: {}): boolean;
is(state: IState, params?: {}): boolean;
@@ -244,10 +250,10 @@ declare module angular.ui {
current: IState;
/** A param object, e.g. {sectionId: section.id)}, that you'd like to test against the current active state. */
params: IStateParamsService;
reload(): void;
reload(): angular.IPromise<any>;
/** Currently pending transition. A promise that'll resolve or reject. */
transition: ng.IPromise<{}>;
transition: angular.IPromise<{}>;
$current: IResolvedState;
}

View File

@@ -1,43 +1,3 @@
/// <reference path="angular2.d.ts"/>
/// <reference path="router.d.ts"/>
import {Component, View, Directive, bootstrap, bind, NgFor, NgIf} from "angular2/angular2";
class Service {
}
class Service2 {
}
class Cmp {
static annotations: any[];
}
Cmp.annotations = [
Component({
selector: 'cmp',
bindings: [Service, bind(Service2).toValue(null)]
}),
View({
template: '{{greeting}} world!',
directives: [NgFor, NgIf]
}),
Directive({
selector: '[tooltip]',
inputs: [
'text: tooltip'
],
outputs: [
'(mouseenter):onMouseEnter()',
'(mouseleave):onMouseLeave()'
]
})
];
@Component({selector: 'cmp2'})
@View({templateUrl: '/index.html'})
class Cmp2 {
}
bootstrap(Cmp);
// No tests, because angular 2 typings are not in DefinitelyTyped.

View File

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

17110
angular2/angular2.d.ts vendored

File diff suppressed because it is too large Load Diff

View File

@@ -13,7 +13,7 @@
// If you don't have them installed you can install them using TSD
// https://github.com/DefinitelyTyped/tsd
///<reference path="./angular2.d.ts"/>
///<reference path="./angular2-2.0.0-alpha.37.d.ts"/>

View File

@@ -13,7 +13,7 @@
// If you don't have them installed you can install them using TSD
// https://github.com/DefinitelyTyped/tsd
///<reference path="./angular2.d.ts"/>
///<reference path="./angular2-2.0.0-alpha.38.d.ts"/>

View File

@@ -13,7 +13,7 @@
// If you don't have them installed you can install them using TSD
// https://github.com/DefinitelyTyped/tsd
///<reference path="./angular2.d.ts"/>
///<reference path="./angular2-2.0.0-alpha.39.d.ts"/>

1310
angular2/http.d.ts vendored

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,7 @@
// Please do not create manual edits or send pull requests
// modifying this file.
// ***********************************************************
///<reference path="./angular2.d.ts"/>
///<reference path="./angular2-2.0.0-alpha.31.d.ts"/>

View File

@@ -13,7 +13,7 @@
// If you don't have them installed you can install them using TSD
// https://github.com/DefinitelyTyped/tsd
///<reference path="./angular2.d.ts"/>
///<reference path="./angular2-2.0.0-alpha.35.d.ts"/>

View File

@@ -13,7 +13,7 @@
// If you don't have them installed you can install them using TSD
// https://github.com/DefinitelyTyped/tsd
///<reference path="./angular2.d.ts"/>
///<reference path="./angular2-2.0.0-alpha.36.d.ts"/>

View File

@@ -13,7 +13,7 @@
// If you don't have them installed you can install them using TSD
// https://github.com/DefinitelyTyped/tsd
///<reference path="./angular2.d.ts"/>
///<reference path="./angular2-2.0.0-alpha.37.d.ts"/>

View File

@@ -13,7 +13,7 @@
// If you don't have them installed you can install them using TSD
// https://github.com/DefinitelyTyped/tsd
///<reference path="./angular2.d.ts"/>
///<reference path="./angular2-2.0.0-alpha.38.d.ts"/>

View File

@@ -13,7 +13,7 @@
// If you don't have them installed you can install them using TSD
// https://github.com/DefinitelyTyped/tsd
///<reference path="./angular2.d.ts"/>
///<reference path="./angular2-2.0.0-alpha.39.d.ts"/>

1330
angular2/router.d.ts vendored

File diff suppressed because it is too large Load Diff

View File

@@ -13,7 +13,7 @@
// If you don't have them installed you can install them using TSD
// https://github.com/DefinitelyTyped/tsd
///<reference path="./angular2.d.ts"/>
///<reference path="./angular2-2.0.0-alpha.38.d.ts"/>
///<reference path="../jasmine/jasmine.d.ts"/>

View File

@@ -13,7 +13,7 @@
// If you don't have them installed you can install them using TSD
// https://github.com/DefinitelyTyped/tsd
///<reference path="./angular2.d.ts"/>
///<reference path="./angular2-2.0.0-alpha.39.d.ts"/>
///<reference path="../jasmine/jasmine.d.ts"/>

408
angular2/test_lib.d.ts vendored
View File

@@ -1,408 +0,0 @@
// Type definitions for Angular v2.0.0-local_sha.7d5c3eb
// Project: http://angular.io/
// Definitions by: angular team <https://github.com/angular/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// ***********************************************************
// This file is generated by the Angular build process.
// Please do not create manual edits or send pull requests
// modifying this file.
// ***********************************************************
// angular2/test_lib depends transitively on these libraries.
// If you don't have them installed you can install them using TSD
// https://github.com/DefinitelyTyped/tsd
///<reference path="./angular2.d.ts"/>
///<reference path="../jasmine/jasmine.d.ts"/>
declare module ngTestLib {
/**
* Allows injecting dependencies in `beforeEach()` and `it()`.
*
* Example:
*
* ```
* beforeEach(inject([Dependency, AClass], (dep, object) => {
* // some code that uses `dep` and `object`
* // ...
* }));
*
* it('...', inject([AClass, AsyncTestCompleter], (object, async) => {
* object.doSomething().then(() => {
* expect(...);
* async.done();
* });
* })
* ```
*
* Notes:
* - injecting an `AsyncTestCompleter` allow completing async tests - this is the equivalent of
* adding a `done` parameter in Jasmine,
* - inject is currently a function because of some Traceur limitation the syntax should eventually
* becomes `it('...', @Inject (object: AClass, async: AsyncTestCompleter) => { ... });`
*
* @param {Array} tokens
* @param {Function} fn
* @return {FunctionWithParamTokens}
*/
function inject(tokens: any[], fn: Function): FunctionWithParamTokens;
var proxy: ClassDecorator;
var afterEach: Function;
type SyncTestFn = () => void
interface NgMatchers extends jasmine.Matchers {
toBe(expected: any): boolean;
toEqual(expected: any): boolean;
toBePromise(): boolean;
toBeAnInstanceOf(expected: any): boolean;
toHaveText(expected: any): boolean;
toHaveCssClass(expected: any): boolean;
toImplement(expected: any): boolean;
toContainError(expected: any): boolean;
toThrowErrorWith(expectedMessage: any): boolean;
not: NgMatchers;
}
var expect: (actual: any) => NgMatchers;
class AsyncTestCompleter {
constructor(_done: Function);
done(): void;
}
function describe(...args: any[]): void;
function ddescribe(...args: any[]): void;
function xdescribe(...args: any[]): void;
function beforeEach(fn: FunctionWithParamTokens | SyncTestFn): void;
/**
* Allows overriding default bindings defined in test_injector.js.
*
* The given function must return a list of DI bindings.
*
* Example:
*
* beforeEachBindings(() => [
* bind(Compiler).toClass(MockCompiler),
* bind(SomeToken).toValue(myValue),
* ]);
*/
function beforeEachBindings(fn: any): void;
function it(name: any, fn: any, timeOut?: any): void;
function xit(name: any, fn: any, timeOut?: any): void;
function iit(name: any, fn: any, timeOut?: any): void;
interface GuinessCompatibleSpy extends jasmine.Spy {
/**
* By chaining the spy with and.returnValue, all calls to the function will return a specific
* value.
*/
andReturn(val: any): void;
/**
* By chaining the spy with and.callFake, all calls to the spy will delegate to the supplied
* function.
*/
andCallFake(fn: Function): GuinessCompatibleSpy;
/**
* removes all recorded calls
*/
reset(): void;
}
class SpyObject {
constructor(type?: any);
static stub(object?: any, config?: any, overrides?: any): void;
noSuchMethod(args: any): void;
spy(name: any): void;
prop(name: any, value: any): void;
}
function isInInnerZone(): boolean;
interface RootTestComponent {
debugElement: ng.DebugElement;
detectChanges(): void;
destroy(): void;
}
/**
* Builds a RootTestComponent for use in component level tests.
*/
class TestComponentBuilder {
constructor(_injector: ng.Injector);
/**
* Overrides only the html of a {@link ComponentMetadata}.
* All the other properties of the component's {@link ng.ViewMetadata} are preserved.
*
* @param {ng.Type} component
* @param {string} html
*
* @return {TestComponentBuilder}
*/
overrideTemplate(componentType: ng.Type, template: string): TestComponentBuilder;
/**
* Overrides a component's {@link ng.ViewMetadata}.
*
* @param {ng.Type} component
* @param {view} View
*
* @return {TestComponentBuilder}
*/
overrideView(componentType: ng.Type, view: ng.ViewMetadata): TestComponentBuilder;
/**
* Overrides the directives from the component {@link ng.ViewMetadata}.
*
* @param {ng.Type} component
* @param {ng.Type} from
* @param {ng.Type} to
*
* @return {TestComponentBuilder}
*/
overrideDirective(componentType: ng.Type, from: ng.Type, to: ng.Type): TestComponentBuilder;
/**
* Overrides one or more injectables configured via `bindings` metadata property of a directive or
* component.
* Very useful when certain bindings need to be mocked out.
*
* The bindings specified via this method are appended to the existing `bindings` causing the
* duplicated bindings to
* be overridden.
*
* @param {ng.Type} component
* @param {any[]} bindings
*
* @return {TestComponentBuilder}
*/
overrideBindings(type: ng.Type, bindings: any[]): TestComponentBuilder;
/**
* Overrides one or more injectables configured via `bindings` metadata property of a directive or
* component.
* Very useful when certain bindings need to be mocked out.
*
* The bindings specified via this method are appended to the existing `bindings` causing the
* duplicated bindings to
* be overridden.
*
* @param {ng.Type} component
* @param {any[]} bindings
*
* @return {TestComponentBuilder}
*/
overrideViewBindings(type: ng.Type, bindings: any[]): TestComponentBuilder;
/**
* Builds and returns a RootTestComponent.
*
* @return {Promise<RootTestComponent>}
*/
createAsync(rootComponentType: ng.Type): Promise<RootTestComponent>;
}
function createTestInjector(bindings: Array<ng.Type | ng.Binding | any[]>): ng.Injector;
class FunctionWithParamTokens {
constructor(_tokens: any[], _fn: Function);
/**
* Returns the value of the executed function.
*/
execute(injector: ng.Injector): any;
hasToken(token: any): boolean;
}
/**
* Wraps a function to be executed in the fakeAsync zone:
* - microtasks are manually executed by calling `flushMicrotasks()`,
* - timers are synchronous, `tick()` simulates the asynchronous passage of time.
*
* If there are any pending timers at the end of the function, an exception will be thrown.
*
* @param fn
* @returns {Function} The function wrapped to be executed in the fakeAsync zone
*/
function fakeAsync(fn: Function): Function;
function clearPendingTimers(): void;
/**
* Simulates the asynchronous passage of time for the timers in the fakeAsync zone.
*
* The microtasks queue is drained at the very start of this function and after any timer callback
* has been executed.
*
* @param {number} millis Number of millisecond, defaults to 0
*/
function tick(millis?: number): void;
/**
* Flush any pending microtasks.
*/
function flushMicrotasks(): void;
class Log {
constructor();
add(value: any): void;
fn(value: any): void;
clear(): void;
result(): string;
}
class BrowserDetection {
constructor(ua: string);
isFirefox: boolean;
isAndroid: boolean;
isEdge: boolean;
isIE: boolean;
isWebkit: boolean;
isIOS7: boolean;
isSlow: boolean;
supportsIntlApi: boolean;
}
var browserDetection: BrowserDetection;
function dispatchEvent(element: any, eventType: any): void;
function el(html: string): HTMLElement;
function containsRegexp(input: string): RegExp;
function normalizeCSS(css: string): string;
function stringifyElement(el: any): string;
var RootTestComponent: ng.InjectableReference;
}
declare module "angular2/test_lib" {
export = ngTestLib;
}

View File

@@ -121,7 +121,7 @@ declare module angular.animate {
}
/**
* AngularProvider
* AnimateProvider
* see http://docs.angularjs.org/api/ngAnimate/provider/$animateProvider
*/
interface IAnimateProvider {

View File

@@ -8,11 +8,24 @@ interface IMyResourceClass extends angular.resource.IResourceClass<IMyResource>
///////////////////////////////////////
var actionDescriptor: angular.resource.IActionDescriptor;
actionDescriptor.url = '/api/test-url/'
actionDescriptor.headers = { header: 'value' };
actionDescriptor.isArray = true;
actionDescriptor.method = 'method action';
actionDescriptor.params = { key: 'value' };
angular.injector(['ng']).invoke(function ($cacheFactory: angular.ICacheFactoryService, $timeout: angular.ITimeoutService) {
actionDescriptor.method = 'method action';
actionDescriptor.params = { key: 'value' };
actionDescriptor.url = '/api/test-url/';
actionDescriptor.isArray = true;
actionDescriptor.transformRequest = function () { };
actionDescriptor.transformRequest = [function () { }];
actionDescriptor.transformResponse = function () { };
actionDescriptor.transformResponse = [function () { }];
actionDescriptor.headers = { header: 'value' };
actionDescriptor.cache = true;
actionDescriptor.cache = $cacheFactory('cacheId');
actionDescriptor.timeout = 1000;
actionDescriptor.timeout = $timeout(function () { });
actionDescriptor.withCredentials = true;
actionDescriptor.responseType = 'response type';
actionDescriptor.interceptor = { key: 'value' };
});
///////////////////////////////////////

View File

@@ -46,11 +46,18 @@ declare module angular.resource {
// Just a reference to facilitate describing new actions
interface IActionDescriptor {
url?: string;
method: string;
isArray?: boolean;
params?: any;
url?: string;
isArray?: boolean;
transformRequest?: angular.IHttpRequestTransformer | angular.IHttpRequestTransformer[];
transformResponse?: angular.IHttpResponseTransformer | angular.IHttpResponseTransformer[];
headers?: any;
cache?: boolean | angular.ICacheObject;
timeout?: number | angular.IPromise<any>;
withCredentials?: boolean;
responseType?: string;
interceptor?: any;
}
// Baseclass for everyresource with default actions.

View File

@@ -620,7 +620,7 @@ declare module angular {
}
///////////////////////////////////////////////////////////////////////////
// AngularProvider
// AnimateProvider
// see http://docs.angularjs.org/api/ng/provider/$animateProvider
///////////////////////////////////////////////////////////////////////////
interface IAnimateProvider {
@@ -1390,7 +1390,7 @@ declare module angular {
}
// See the jsdoc for transformData() at https://github.com/angular/angular.js/blob/master/src/ng/http.js#L228
interface IHttpResquestTransformer {
interface IHttpRequestTransformer {
(data: any, headersGetter: IHttpHeadersGetter): any;
}
@@ -1427,7 +1427,7 @@ declare module angular {
* headers and returns its transformed (typically serialized) version.
* @see {@link https://docs.angularjs.org/api/ng/service/$http#transforming-requests-and-responses}
*/
transformRequest?: IHttpResquestTransformer |IHttpResquestTransformer[];
transformRequest?: IHttpRequestTransformer |IHttpRequestTransformer[];
/**
* Transform function or an array of such functions. The transform function takes the http response body and

330
async/async.d.ts vendored
View File

@@ -1,165 +1,165 @@
// Type definitions for Async 1.4.2
// Project: https://github.com/caolan/async
// Definitions by: Boris Yankov <https://github.com/borisyankov/>, Arseniy Maximov <https://github.com/kern0>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface Dictionary<T> { [key: string]: T; }
interface ErrorCallback { (err?: Error): void; }
interface AsyncResultCallback<T> { (err: Error, result: T): void; }
interface AsyncResultArrayCallback<T> { (err: Error, results: T[]): void; }
interface AsyncResultObjectCallback<T> { (err: Error, results: Dictionary<T>): void; }
interface AsyncFunction<T> { (callback: (err: Error, result?: T) => void): void; }
interface AsyncIterator<T> { (item: T, callback: ErrorCallback): void; }
interface AsyncForEachOfIterator<T> { (item: T, key: number, callback: ErrorCallback): void; }
interface AsyncResultIterator<T, R> { (item: T, callback: AsyncResultCallback<R>): void; }
interface AsyncMemoIterator<T, R> { (memo: R, item: T, callback: AsyncResultCallback<R>): void; }
interface AsyncBooleanIterator<T> { (item: T, callback: (truthValue: boolean) => void): void; }
interface AsyncWorker<T> { (task: T, callback: ErrorCallback): void; }
interface AsyncVoidFunction { (callback: ErrorCallback): void; }
interface AsyncQueue<T> {
length(): number;
started: boolean;
running(): number;
idle(): boolean;
concurrency: number;
push(task: T, callback?: ErrorCallback): void;
push(task: T[], callback?: ErrorCallback): void;
unshift(task: T, callback?: ErrorCallback): void;
unshift(task: T[], callback?: ErrorCallback): void;
saturated: () => any;
empty: () => any;
drain: () => any;
paused: boolean;
pause(): void
resume(): void;
kill(): void;
}
interface AsyncPriorityQueue<T> {
length(): number;
concurrency: number;
started: boolean;
paused: boolean;
push(task: T, priority: number, callback?: AsyncResultArrayCallback<T>): void;
push(task: T[], priority: number, callback?: AsyncResultArrayCallback<T>): void;
saturated: () => any;
empty: () => any;
drain: () => any;
running(): number;
idle(): boolean;
pause(): void;
resume(): void;
kill(): void;
}
interface AsyncCargo {
length(): number;
payload: number;
push(task: any, callback? : Function): void;
push(task: any[], callback? : Function): void;
saturated(): void;
empty(): void;
drain(): void;
idle(): boolean;
pause(): void;
resume(): void;
kill(): void;
}
interface Async {
// Collections
each<T>(arr: T[], iterator: AsyncIterator<T>, callback?: ErrorCallback): void;
eachSeries<T>(arr: T[], iterator: AsyncIterator<T>, callback?: ErrorCallback): void;
eachLimit<T>(arr: T[], limit: number, iterator: AsyncIterator<T>, callback?: ErrorCallback): void;
forEachOf(obj: any, iterator: (item: any, key: [string|number], callback?: ErrorCallback) => void, callback: ErrorCallback): void;
forEachOf<T>(obj: T[], iterator: AsyncForEachOfIterator<T>, callback?: ErrorCallback): void;
forEachOfSeries(obj: any, iterator: (item: any, key: [string|number], callback?: ErrorCallback) => void, callback: ErrorCallback): void;
forEachOfSeries<T>(obj: T[], iterator: AsyncForEachOfIterator<T>, callback?: ErrorCallback): void;
forEachOfLimit(obj: any, limit: number, iterator: (item: any, key: [string|number], callback?: ErrorCallback) => void, callback: ErrorCallback): void;
forEachOfLimit<T>(obj: T[], limit: number, iterator: AsyncForEachOfIterator<T>, callback?: ErrorCallback): void;
map<T, R>(arr: T[], iterator: AsyncResultIterator<T, R>, callback?: AsyncResultArrayCallback<R>): any;
mapSeries<T, R>(arr: T[], iterator: AsyncResultIterator<T, R>, callback?: AsyncResultArrayCallback<R>): any;
mapLimit<T, R>(arr: T[], limit: number, iterator: AsyncResultIterator<T, R>, callback?: AsyncResultArrayCallback<R>): any;
filter<T>(arr: T[], iterator: AsyncResultIterator<T, boolean>, callback?: (results: T[]) => any): any;
select<T>(arr: T[], iterator: AsyncResultIterator<T, boolean>, callback?: (results: T[]) => any): any;
filterSeries<T>(arr: T[], iterator: AsyncResultIterator<T, boolean>, callback?: (results: T[]) => any): any;
selectSeries<T>(arr: T[], iterator: AsyncResultIterator<T, boolean>, callback?: (results: T[]) => any): any;
filterLimit<T>(arr: T[], limit: number, iterator: AsyncResultIterator<T, boolean>, callback?: (results: T[]) => any): any;
selectLimit<T>(arr: T[], limit: number, iterator: AsyncResultIterator<T, boolean>, callback?: (results: T[]) => any): any;
reject<T>(arr: T[], iterator: AsyncResultIterator<T, boolean>, callback?: (results: T[]) => any): any;
rejectSeries<T>(arr: T[], iterator: AsyncResultIterator<T, boolean>, callback?: (results: T[]) => any): any;
rejectLimit<T>(arr: T[], limit: number, iterator: AsyncResultIterator<T, boolean>, callback?: (results: T[]) => any): any;
reduce<T, R>(arr: T[], memo: R, iterator: AsyncMemoIterator<T, R>, callback?: AsyncResultCallback<R>): any;
inject<T, R>(arr: T[], memo: R, iterator: AsyncMemoIterator<T, R>, callback?: AsyncResultCallback<R>): any;
foldl<T, R>(arr: T[], memo: R, iterator: AsyncMemoIterator<T, R>, callback?: AsyncResultCallback<R>): any;
reduceRight<T, R>(arr: T[], memo: R, iterator: AsyncMemoIterator<T, R>, callback: AsyncResultCallback<R>): any;
foldr<T, R>(arr: T[], memo: R, iterator: AsyncMemoIterator<T, R>, callback: AsyncResultCallback<R>): any;
detect<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (result: T) => void): any;
detectSeries<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (result: T) => void): any;
detectLimit<T>(arr: T[], limit: number, iterator: AsyncBooleanIterator<T>, callback?: (result: T) => void): any;
sortBy<T, V>(arr: T[], iterator: AsyncResultIterator<T, V>, callback?: AsyncResultArrayCallback<T>): any;
some<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (result: boolean) => void): any;
someLimit<T>(arr: T[], limit: number, iterator: AsyncBooleanIterator<T>, callback?: (result: boolean) => void): any;
any<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (result: boolean) => void): any;
every<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (result: boolean) => any): any;
everyLimit<T>(arr: T[], limit: number, iterator: AsyncBooleanIterator<T>, callback?: (result: boolean) => any): any;
all<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (result: boolean) => any): any;
concat<T, R>(arr: T[], iterator: AsyncResultIterator<T, R[]>, callback?: AsyncResultArrayCallback<R>): any;
concatSeries<T, R>(arr: T[], iterator: AsyncResultIterator<T, R[]>, callback?: AsyncResultArrayCallback<R>): any;
// Control Flow
series<T>(tasks: AsyncFunction<T>[], callback?: AsyncResultArrayCallback<T>): void;
series<T>(tasks: Dictionary<AsyncFunction<T>>, callback?: AsyncResultObjectCallback<T>): void;
parallel<T>(tasks: Array<AsyncFunction<T>>, callback?: AsyncResultArrayCallback<T>): void;
parallel<T>(tasks: Dictionary<AsyncFunction<T>>, callback?: AsyncResultObjectCallback<T>): void;
parallelLimit<T>(tasks: Array<AsyncFunction<T>>, limit: number, callback?: AsyncResultArrayCallback<T>): void;
parallelLimit<T>(tasks: Dictionary<AsyncFunction<T>>, limit: number, callback?: AsyncResultObjectCallback<T>): void;
whilst(test: () => boolean, fn: AsyncVoidFunction, callback: (err: any) => void): void;
doWhilst(fn: AsyncVoidFunction, test: () => boolean, callback: (err: any) => void): void;
until(test: () => boolean, fn: AsyncVoidFunction, callback: (err: any) => void): void;
doUntil(fn: AsyncVoidFunction, test: () => boolean, callback: (err: any) => void): void;
during(test: (testCallback : (error: Error, truth: boolean) => void) => void, fn: AsyncVoidFunction, callback: (err: any) => void): void;
doDuring(fn: AsyncVoidFunction, test: (testCallback: (error: Error, truth: boolean) => void) => void, callback: (err: any) => void): void;
forever(next: (errCallback : (err: Error) => void) => void, errBack: (err: Error) => void) : void;
waterfall(tasks: Function[], callback?: (err: Error, result: any) => void): void;
compose(...fns: Function[]): void;
seq(...fns: Function[]): void;
applyEach(fns: Function[], argsAndCallback: any[]): void; // applyEach(fns, args..., callback). TS does not support ... for a middle argument. Callback is optional.
applyEachSeries(fns: Function[], argsAndCallback: any[]): void; // applyEachSeries(fns, args..., callback). TS does not support ... for a middle argument. Callback is optional.
queue<T>(worker: AsyncWorker<T>, concurrency?: number): AsyncQueue<T>;
priorityQueue<T>(worker: AsyncWorker<T>, concurrency: number): AsyncPriorityQueue<T>;
cargo(worker : (tasks: any[], callback : ErrorCallback) => void, payload? : number) : AsyncCargo;
auto(tasks: any, callback?: (error: Error, results: any) => void): void;
retry<T>(opts: number, task: (callback : AsyncResultCallback<T>, results: any) => void, callback: (error: Error, results: any) => void): void;
retry<T>(opts: { times: number, interval: number }, task: (callback: AsyncResultCallback<T>, results : any) => void, callback: (error: Error, results: any) => void): void;
iterator(tasks: Function[]): Function;
apply(fn: Function, ...arguments: any[]): AsyncFunction<any>;
nextTick(callback: Function): void;
setImmediate(callback: Function): void;
times<T> (n: number, iterator: AsyncResultIterator<number, T>, callback: AsyncResultArrayCallback<T>): void;
timesSeries<T>(n: number, iterator: AsyncResultIterator<number, T>, callback: AsyncResultArrayCallback<T>): void;
timesLimit<T>(n: number, limit: number, iterator: AsyncResultIterator<number, T>, callback: AsyncResultArrayCallback<T>): void;
// Utils
memoize(fn: Function, hasher?: Function): Function;
unmemoize(fn: Function): Function;
ensureAsync(fn: (... argsAndCallback: any[]) => void): Function;
constant(...values: any[]): Function;
asyncify(fn: Function): Function;
wrapSync(fn: Function): Function;
log(fn: Function, ...arguments: any[]): void;
dir(fn: Function, ...arguments: any[]): void;
noConflict(): Async;
}
declare var async: Async;
declare module "async" {
export = async;
}
// Type definitions for Async 1.4.2
// Project: https://github.com/caolan/async
// Definitions by: Boris Yankov <https://github.com/borisyankov/>, Arseniy Maximov <https://github.com/kern0>, Joe Herman <https://github.com/Penryn>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface Dictionary<T> { [key: string]: T; }
interface ErrorCallback { (err?: Error): void; }
interface AsyncResultCallback<T> { (err: Error, result: T): void; }
interface AsyncResultArrayCallback<T> { (err: Error, results: T[]): void; }
interface AsyncResultObjectCallback<T> { (err: Error, results: Dictionary<T>): void; }
interface AsyncFunction<T> { (callback: (err?: Error, result?: T) => void): void; }
interface AsyncIterator<T> { (item: T, callback: ErrorCallback): void; }
interface AsyncForEachOfIterator<T> { (item: T, key: number, callback: ErrorCallback): void; }
interface AsyncResultIterator<T, R> { (item: T, callback: AsyncResultCallback<R>): void; }
interface AsyncMemoIterator<T, R> { (memo: R, item: T, callback: AsyncResultCallback<R>): void; }
interface AsyncBooleanIterator<T> { (item: T, callback: (truthValue: boolean) => void): void; }
interface AsyncWorker<T> { (task: T, callback: ErrorCallback): void; }
interface AsyncVoidFunction { (callback: ErrorCallback): void; }
interface AsyncQueue<T> {
length(): number;
started: boolean;
running(): number;
idle(): boolean;
concurrency: number;
push(task: T, callback?: ErrorCallback): void;
push(task: T[], callback?: ErrorCallback): void;
unshift(task: T, callback?: ErrorCallback): void;
unshift(task: T[], callback?: ErrorCallback): void;
saturated: () => any;
empty: () => any;
drain: () => any;
paused: boolean;
pause(): void
resume(): void;
kill(): void;
}
interface AsyncPriorityQueue<T> {
length(): number;
concurrency: number;
started: boolean;
paused: boolean;
push(task: T, priority: number, callback?: AsyncResultArrayCallback<T>): void;
push(task: T[], priority: number, callback?: AsyncResultArrayCallback<T>): void;
saturated: () => any;
empty: () => any;
drain: () => any;
running(): number;
idle(): boolean;
pause(): void;
resume(): void;
kill(): void;
}
interface AsyncCargo {
length(): number;
payload: number;
push(task: any, callback? : Function): void;
push(task: any[], callback? : Function): void;
saturated(): void;
empty(): void;
drain(): void;
idle(): boolean;
pause(): void;
resume(): void;
kill(): void;
}
interface Async {
// Collections
each<T>(arr: T[], iterator: AsyncIterator<T>, callback?: ErrorCallback): void;
eachSeries<T>(arr: T[], iterator: AsyncIterator<T>, callback?: ErrorCallback): void;
eachLimit<T>(arr: T[], limit: number, iterator: AsyncIterator<T>, callback?: ErrorCallback): void;
forEachOf(obj: any, iterator: (item: any, key: string|number, callback?: ErrorCallback) => void, callback: ErrorCallback): void;
forEachOf<T>(obj: T[], iterator: AsyncForEachOfIterator<T>, callback?: ErrorCallback): void;
forEachOfSeries(obj: any, iterator: (item: any, key: string|number, callback?: ErrorCallback) => void, callback: ErrorCallback): void;
forEachOfSeries<T>(obj: T[], iterator: AsyncForEachOfIterator<T>, callback?: ErrorCallback): void;
forEachOfLimit(obj: any, limit: number, iterator: (item: any, key: string|number, callback?: ErrorCallback) => void, callback: ErrorCallback): void;
forEachOfLimit<T>(obj: T[], limit: number, iterator: AsyncForEachOfIterator<T>, callback?: ErrorCallback): void;
map<T, R>(arr: T[], iterator: AsyncResultIterator<T, R>, callback?: AsyncResultArrayCallback<R>): any;
mapSeries<T, R>(arr: T[], iterator: AsyncResultIterator<T, R>, callback?: AsyncResultArrayCallback<R>): any;
mapLimit<T, R>(arr: T[], limit: number, iterator: AsyncResultIterator<T, R>, callback?: AsyncResultArrayCallback<R>): any;
filter<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (results: T[]) => any): any;
select<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (results: T[]) => any): any;
filterSeries<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (results: T[]) => any): any;
selectSeries<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (results: T[]) => any): any;
filterLimit<T>(arr: T[], limit: number, iterator: AsyncBooleanIterator<T>, callback?: (results: T[]) => any): any;
selectLimit<T>(arr: T[], limit: number, iterator: AsyncBooleanIterator<T>, callback?: (results: T[]) => any): any;
reject<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (results: T[]) => any): any;
rejectSeries<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (results: T[]) => any): any;
rejectLimit<T>(arr: T[], limit: number, iterator: AsyncBooleanIterator<T>, callback?: (results: T[]) => any): any;
reduce<T, R>(arr: T[], memo: R, iterator: AsyncMemoIterator<T, R>, callback?: AsyncResultCallback<R>): any;
inject<T, R>(arr: T[], memo: R, iterator: AsyncMemoIterator<T, R>, callback?: AsyncResultCallback<R>): any;
foldl<T, R>(arr: T[], memo: R, iterator: AsyncMemoIterator<T, R>, callback?: AsyncResultCallback<R>): any;
reduceRight<T, R>(arr: T[], memo: R, iterator: AsyncMemoIterator<T, R>, callback: AsyncResultCallback<R>): any;
foldr<T, R>(arr: T[], memo: R, iterator: AsyncMemoIterator<T, R>, callback: AsyncResultCallback<R>): any;
detect<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (result: T) => void): any;
detectSeries<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (result: T) => void): any;
detectLimit<T>(arr: T[], limit: number, iterator: AsyncBooleanIterator<T>, callback?: (result: T) => void): any;
sortBy<T, V>(arr: T[], iterator: AsyncResultIterator<T, V>, callback?: AsyncResultArrayCallback<T>): any;
some<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (result: boolean) => void): any;
someLimit<T>(arr: T[], limit: number, iterator: AsyncBooleanIterator<T>, callback?: (result: boolean) => void): any;
any<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (result: boolean) => void): any;
every<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (result: boolean) => any): any;
everyLimit<T>(arr: T[], limit: number, iterator: AsyncBooleanIterator<T>, callback?: (result: boolean) => any): any;
all<T>(arr: T[], iterator: AsyncBooleanIterator<T>, callback?: (result: boolean) => any): any;
concat<T, R>(arr: T[], iterator: AsyncResultIterator<T, R[]>, callback?: AsyncResultArrayCallback<R>): any;
concatSeries<T, R>(arr: T[], iterator: AsyncResultIterator<T, R[]>, callback?: AsyncResultArrayCallback<R>): any;
// Control Flow
series<T>(tasks: AsyncFunction<T>[], callback?: AsyncResultArrayCallback<T>): void;
series<T>(tasks: Dictionary<AsyncFunction<T>>, callback?: AsyncResultObjectCallback<T>): void;
parallel<T>(tasks: Array<AsyncFunction<T>>, callback?: AsyncResultArrayCallback<T>): void;
parallel<T>(tasks: Dictionary<AsyncFunction<T>>, callback?: AsyncResultObjectCallback<T>): void;
parallelLimit<T>(tasks: Array<AsyncFunction<T>>, limit: number, callback?: AsyncResultArrayCallback<T>): void;
parallelLimit<T>(tasks: Dictionary<AsyncFunction<T>>, limit: number, callback?: AsyncResultObjectCallback<T>): void;
whilst(test: () => boolean, fn: AsyncVoidFunction, callback: (err: any) => void): void;
doWhilst(fn: AsyncVoidFunction, test: () => boolean, callback: (err: any) => void): void;
until(test: () => boolean, fn: AsyncVoidFunction, callback: (err: any) => void): void;
doUntil(fn: AsyncVoidFunction, test: () => boolean, callback: (err: any) => void): void;
during(test: (testCallback : (error: Error, truth: boolean) => void) => void, fn: AsyncVoidFunction, callback: (err: any) => void): void;
doDuring(fn: AsyncVoidFunction, test: (testCallback: (error: Error, truth: boolean) => void) => void, callback: (err: any) => void): void;
forever(next: (errCallback : (err: Error) => void) => void, errBack: (err: Error) => void) : void;
waterfall(tasks: Function[], callback?: (err: Error, results?: any) => void): void;
compose(...fns: Function[]): void;
seq(...fns: Function[]): void;
applyEach(fns: Function[], argsAndCallback: any[]): void; // applyEach(fns, args..., callback). TS does not support ... for a middle argument. Callback is optional.
applyEachSeries(fns: Function[], argsAndCallback: any[]): void; // applyEachSeries(fns, args..., callback). TS does not support ... for a middle argument. Callback is optional.
queue<T>(worker: AsyncWorker<T>, concurrency?: number): AsyncQueue<T>;
priorityQueue<T>(worker: AsyncWorker<T>, concurrency: number): AsyncPriorityQueue<T>;
cargo(worker : (tasks: any[], callback : ErrorCallback) => void, payload? : number) : AsyncCargo;
auto(tasks: any, callback?: (error: Error, results: any) => void): void;
retry<T>(opts: number, task: (callback : AsyncResultCallback<T>, results: any) => void, callback: (error: Error, results: any) => void): void;
retry<T>(opts: { times: number, interval: number }, task: (callback: AsyncResultCallback<T>, results : any) => void, callback: (error: Error, results: any) => void): void;
iterator(tasks: Function[]): Function;
apply(fn: Function, ...arguments: any[]): AsyncFunction<any>;
nextTick(callback: Function): void;
setImmediate(callback: Function): void;
times<T> (n: number, iterator: AsyncResultIterator<number, T>, callback: AsyncResultArrayCallback<T>): void;
timesSeries<T>(n: number, iterator: AsyncResultIterator<number, T>, callback: AsyncResultArrayCallback<T>): void;
timesLimit<T>(n: number, limit: number, iterator: AsyncResultIterator<number, T>, callback: AsyncResultArrayCallback<T>): void;
// Utils
memoize(fn: Function, hasher?: Function): Function;
unmemoize(fn: Function): Function;
ensureAsync(fn: (... argsAndCallback: any[]) => void): Function;
constant(...values: any[]): Function;
asyncify(fn: Function): Function;
wrapSync(fn: Function): Function;
log(fn: Function, ...arguments: any[]): void;
dir(fn: Function, ...arguments: any[]): void;
noConflict(): Async;
}
declare var async: Async;
declare module "async" {
export = async;
}

390
backbone/backbone-global.d.ts vendored Normal file
View File

@@ -0,0 +1,390 @@
// Type definitions for Backbone 1.0.0
// Project: http://backbonejs.org/
// Definitions by: Boris Yankov <https://github.com/borisyankov/>, Natan Vivo <https://github.com/nvivo/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />
declare module Backbone {
interface AddOptions extends Silenceable {
at?: number;
}
interface HistoryOptions extends Silenceable {
pushState?: boolean;
root?: string;
}
interface NavigateOptions {
trigger?: boolean;
replace?: boolean;
}
interface RouterOptions {
routes: any;
}
interface Silenceable {
silent?: boolean;
}
interface Validable {
validate?: boolean;
}
interface Waitable {
wait?: boolean;
}
interface Parseable {
parse?: any;
}
interface PersistenceOptions {
url?: string;
beforeSend?: (jqxhr: JQueryXHR) => void;
success?: (modelOrCollection?: any, response?: any, options?: any) => void;
error?: (modelOrCollection?: any, jqxhr?: JQueryXHR, options?: any) => void;
}
interface ModelSetOptions extends Silenceable, Validable {
}
interface ModelFetchOptions extends PersistenceOptions, ModelSetOptions, Parseable {
}
interface ModelSaveOptions extends Silenceable, Waitable, Validable, Parseable, PersistenceOptions {
patch?: boolean;
}
interface ModelDestroyOptions extends Waitable, PersistenceOptions {
}
interface CollectionFetchOptions extends PersistenceOptions, Parseable {
reset?: boolean;
}
interface ObjectHash {
[key: string]: any;
}
interface RoutesHash {
[routePattern: string]: string | {(...urlParts: string[]): void};
}
interface EventsHash {
[selector: string]: string | {(eventObject: JQueryEventObject): void};
}
class Events {
on(eventName: string, callback?: Function, context?: any): any;
on(eventMap: EventsHash): any;
off(eventName?: string, callback?: Function, context?: any): any;
trigger(eventName: string, ...args: any[]): any;
bind(eventName: string, callback: Function, context?: any): any;
unbind(eventName?: string, callback?: Function, context?: any): any;
once(events: string, callback: Function, context?: any): any;
listenTo(object: any, events: string, callback: Function): any;
listenToOnce(object: any, events: string, callback: Function): any;
stopListening(object?: any, events?: string, callback?: Function): any;
}
class ModelBase extends Events {
url: any;
parse(response: any, options?: any): any;
toJSON(options?: any): any;
sync(...arg: any[]): JQueryXHR;
}
class Model extends ModelBase {
/**
* Do not use, prefer TypeScript's extend functionality.
**/
private static extend(properties: any, classProperties?: any): any;
attributes: any;
changed: any[];
cid: string;
collection: Collection<any>;
/**
* Default attributes for the model. It can be an object hash or a method returning an object hash.
* For assigning an object hash, do it like this: this.defaults = <any>{ attribute: value, ... };
* That works only if you set it in the constructor or the initialize method.
**/
defaults(): ObjectHash;
id: any;
idAttribute: string;
validationError: any;
urlRoot: any;
constructor(attributes?: any, options?: any);
initialize(attributes?: any, options?: any): void;
fetch(options?: ModelFetchOptions): JQueryXHR;
/**
* For strongly-typed access to attributes, use the `get` method only privately in public getter properties.
* @example
* get name(): string {
* return super.get("name");
* }
**/
/*private*/ get(attributeName: string): any;
/**
* For strongly-typed assignment of attributes, use the `set` method only privately in public setter properties.
* @example
* set name(value: string) {
* super.set("name", value);
* }
**/
/*private*/ set(attributeName: string, value: any, options?: ModelSetOptions): Model;
set(obj: any, options?: ModelSetOptions): Model;
change(): any;
changedAttributes(attributes?: any): any[];
clear(options?: Silenceable): any;
clone(): Model;
destroy(options?: ModelDestroyOptions): any;
escape(attribute: string): string;
has(attribute: string): boolean;
hasChanged(attribute?: string): boolean;
isNew(): boolean;
isValid(options?:any): boolean;
previous(attribute: string): any;
previousAttributes(): any[];
save(attributes?: any, options?: ModelSaveOptions): any;
unset(attribute: string, options?: Silenceable): Model;
validate(attributes: any, options?: any): any;
private _validate(attributes: any, options: any): boolean;
// mixins from underscore
keys(): string[];
values(): any[];
pairs(): any[];
invert(): any;
pick(keys: string[]): any;
pick(...keys: string[]): any;
omit(keys: string[]): any;
omit(...keys: string[]): any;
}
class Collection<TModel extends Model> extends ModelBase {
/**
* Do not use, prefer TypeScript's extend functionality.
**/
private static extend(properties: any, classProperties?: any): any;
model: new (...args:any[]) => TModel;
models: TModel[];
length: number;
constructor(models?: TModel[] | Object[], options?: any);
initialize(models?: TModel[] | Object[], options?: any): void;
fetch(options?: CollectionFetchOptions): JQueryXHR;
comparator(element: TModel): number;
comparator(compare: TModel, to?: TModel): number;
add(model: {}|TModel, options?: AddOptions): TModel;
add(models: ({}|TModel)[], options?: AddOptions): TModel[];
at(index: number): TModel;
/**
* Get a model from a collection, specified by an id, a cid, or by passing in a model.
**/
get(id: number|string|Model): TModel;
create(attributes: any, options?: ModelSaveOptions): TModel;
pluck(attribute: string): any[];
push(model: TModel, options?: AddOptions): TModel;
pop(options?: Silenceable): TModel;
remove(model: TModel, options?: Silenceable): TModel;
remove(models: TModel[], options?: Silenceable): TModel[];
reset(models?: TModel[], options?: Silenceable): TModel[];
set(models?: TModel[], options?: Silenceable): TModel[];
shift(options?: Silenceable): TModel;
sort(options?: Silenceable): Collection<TModel>;
unshift(model: TModel, options?: AddOptions): TModel;
where(properties: any): TModel[];
findWhere(properties: any): TModel;
private _prepareModel(attributes?: any, options?: any): any;
private _removeReference(model: TModel): void;
private _onModelEvent(event: string, model: TModel, collection: Collection<TModel>, options: any): void;
// mixins from underscore
all(iterator: (element: TModel, index: number) => boolean, context?: any): boolean;
any(iterator: (element: TModel, index: number) => boolean, context?: any): boolean;
collect(iterator: (element: TModel, index: number, context?: any) => any[], context?: any): any[];
chain(): any;
contains(value: any): boolean;
countBy(iterator: (element: TModel, index: number) => any): _.Dictionary<number>;
countBy(attribute: string): _.Dictionary<number>;
detect(iterator: (item: any) => boolean, context?: any): any; // ???
drop(): TModel;
drop(n: number): TModel[];
each(iterator: (element: TModel, index: number, list?: any) => void, context?: any): any;
every(iterator: (element: TModel, index: number) => boolean, context?: any): boolean;
filter(iterator: (element: TModel, index: number) => boolean, context?: any): TModel[];
find(iterator: (element: TModel, index: number) => boolean, context?: any): TModel;
first(): TModel;
first(n: number): TModel[];
foldl(iterator: (memo: any, element: TModel, index: number) => any, initialMemo: any, context?: any): any;
forEach(iterator: (element: TModel, index: number, list?: any) => void, context?: any): any;
groupBy(iterator: (element: TModel, index: number) => string, context?: any): _.Dictionary<TModel[]>;
groupBy(attribute: string, context?: any): _.Dictionary<TModel[]>;
include(value: any): boolean;
indexOf(element: TModel, isSorted?: boolean): number;
initial(): TModel;
initial(n: number): TModel[];
inject(iterator: (memo: any, element: TModel, index: number) => any, initialMemo: any, context?: any): any;
isEmpty(object: any): boolean;
invoke(methodName: string, args?: any[]): any;
last(): TModel;
last(n: number): TModel[];
lastIndexOf(element: TModel, fromIndex?: number): number;
map(iterator: (element: TModel, index: number, context?: any) => any, context?: any): any[];
max(iterator?: (element: TModel, index: number) => any, context?: any): TModel;
min(iterator?: (element: TModel, index: number) => any, context?: any): TModel;
reduce(iterator: (memo: any, element: TModel, index: number) => any, initialMemo: any, context?: any): any;
select(iterator: any, context?: any): any[];
size(): number;
shuffle(): any[];
slice(min: number, max?: number): TModel[];
some(iterator: (element: TModel, index: number) => boolean, context?: any): boolean;
sortBy(iterator: (element: TModel, index: number) => number, context?: any): TModel[];
sortBy(attribute: string, context?: any): TModel[];
sortedIndex(element: TModel, iterator?: (element: TModel, index: number) => number): number;
reduceRight(iterator: (memo: any, element: TModel, index: number) => any, initialMemo: any, context?: any): any[];
reject(iterator: (element: TModel, index: number) => boolean, context?: any): TModel[];
rest(): TModel;
rest(n: number): TModel[];
tail(): TModel;
tail(n: number): TModel[];
toArray(): any[];
without(...values: any[]): TModel[];
}
class Router extends Events {
/**
* Do not use, prefer TypeScript's extend functionality.
**/
private static extend(properties: any, classProperties?: any): any;
/**
* Routes hash or a method returning the routes hash that maps URLs with parameters to methods on your Router.
* For assigning routes as object hash, do it like this: this.routes = <any>{ "route": callback, ... };
* That works only if you set it in the constructor or the initialize method.
**/
routes: RoutesHash | any;
constructor(options?: RouterOptions);
initialize(options?: RouterOptions): void;
route(route: string|RegExp, name: string, callback?: Function): Router;
navigate(fragment: string, options?: NavigateOptions): Router;
navigate(fragment: string, trigger?: boolean): Router;
private _bindRoutes(): void;
private _routeToRegExp(route: string): RegExp;
private _extractParameters(route: RegExp, fragment: string): string[];
}
var history: History;
class History extends Events {
handlers: any[];
interval: number;
start(options?: HistoryOptions): boolean;
getHash(window?: Window): string;
getFragment(fragment?: string, forcePushState?: boolean): string;
stop(): void;
route(route: string, callback: Function): number;
checkUrl(e?: any): void;
loadUrl(fragmentOverride: string): boolean;
navigate(fragment: string, options?: any): boolean;
static started: boolean;
options: any;
private _updateHash(location: Location, fragment: string, replace: boolean): void;
}
interface ViewOptions<TModel extends Model> {
model?: TModel;
// TODO: quickfix, this can't be fixed easy. The collection does not need to have the same model as the parent view.
collection?: Backbone.Collection<any>; //was: Collection<TModel>;
el?: any;
id?: string;
className?: string;
tagName?: string;
attributes?: {[id: string]: any};
}
class View<TModel extends Model> extends Events {
/**
* Do not use, prefer TypeScript's extend functionality.
**/
private static extend(properties: any, classProperties?: any): any;
constructor(options?: ViewOptions<TModel>);
initialize(options?: ViewOptions<TModel>): void;
/**
* Events hash or a method returning the events hash that maps events/selectors to methods on your View.
* For assigning events as object hash, do it like this: this.events = <any>{ "event:selector": callback, ... };
* That works only if you set it in the constructor or the initialize method.
**/
events(): EventsHash;
$(selector: string): JQuery;
model: TModel;
collection: Collection<TModel>;
//template: (json, options?) => string;
setElement(element: HTMLElement|JQuery, delegate?: boolean): View<TModel>;
id: string;
cid: string;
className: string;
tagName: string;
el: any;
$el: JQuery;
setElement(element: any): View<TModel>;
attributes: any;
$(selector: any): JQuery;
render(): View<TModel>;
remove(): View<TModel>;
make(tagName: any, attributes?: any, content?: any): any;
delegateEvents(events?: EventsHash): any;
delegate(eventName: string, selector: string, listener: Function): View<TModel>;
undelegateEvents(): any;
undelegate(eventName: string, selector?: string, listener?: Function): View<TModel>;
_ensureElement(): void;
}
// SYNC
function sync(method: string, model: Model, options?: JQueryAjaxSettings): any;
function ajax(options?: JQueryAjaxSettings): JQueryXHR;
var emulateHTTP: boolean;
var emulateJSON: boolean;
// Utility
function noConflict(): typeof Backbone;
var $: JQueryStatic;
}
declare module "backbone" {
export = Backbone;
}

View File

@@ -0,0 +1 @@
--noImplicitAny ./underscore/underscore.d.ts

View File

@@ -0,0 +1,314 @@
/// <reference path="../jquery/jquery.d.ts" />
/// <reference path="../lodash/lodash.d.ts" />
/// <reference path="./backbone-global.d.ts" />
function test_events() {
var object = new Backbone.Events();
object.on("alert", (eventName: string) => alert("Triggered " + eventName));
object.trigger("alert", "an event");
var onChange = () => alert('whatever');
var context: any;
object.off("change", onChange);
object.off("change");
object.off(null, onChange);
object.off(null, null, context);
object.off();
}
class SettingDefaults extends Backbone.Model {
// 'defaults' could be set in one of the following ways:
defaults() {
return {
name: "Joe"
}
}
constructor(attributes?: any, options?: any) {
this.defaults = <any>{
name: "Joe"
}
// super has to come last
super(attributes, options);
}
// or set it like this
initialize() {
this.defaults = <any>{
name: "Joe"
}
}
// same patterns could be used for setting 'Router.routes' and 'View.events'
}
class Sidebar extends Backbone.Model {
promptColor() {
var cssColor = prompt("Please enter a CSS color:");
this.set({ color: cssColor });
}
}
class Note extends Backbone.Model {
initialize() { }
author() { }
coordinates() { }
allowedToEdit(account: any) {
return true;
}
}
class PrivateNote extends Note {
allowedToEdit(account: any) {
return account.owns(this);
}
set(attributes: any, options?: any): Backbone.Model {
return Backbone.Model.prototype.set.call(this, attributes, options);
}
}
function test_models() {
var sidebar = new Sidebar();
sidebar.on('change:color', (model: {}, color: string) => $('#sidebar').css({ background: color }));
sidebar.set({ color: 'white' });
sidebar.promptColor();
//////////
var note = new PrivateNote();
note.get("title");
note.set({ title: "March 20", content: "In his eyes she eclipses..." });
note.set("title", "A Scandal in Bohemia");
}
class Employee extends Backbone.Model {
reports: EmployeeCollection;
constructor(attributes?: any, options?: any) {
super(options);
this.reports = new EmployeeCollection();
this.reports.url = '../api/employees/' + this.id + '/reports';
}
more() {
this.reports.reset();
}
}
class EmployeeCollection extends Backbone.Collection<Employee> {
findByName(key: any) { }
}
class Book extends Backbone.Model {
title: string;
author: string;
published: boolean;
}
class Library extends Backbone.Collection<Book> {
// This model definition is here only to test type compatibility of the model, but it
// is not necessary in working code as it is automatically inferred through generics.
model: typeof Book;
}
class Books extends Backbone.Collection<Book> { }
function test_collection() {
var books = new Books();
var book1: Book = new Book({ title: "Title 1", author: "Mike" });
books.add(book1);
// Objects can be added to collection by casting to model type.
// Compiler will check if object properties are valid for the cast.
// This gives better type checking than declaring an `any` overload.
books.add(<Book>{ title: "Title 2", author: "Mikey" });
var model: Book = book1.collection.first();
if (model !== book1) {
throw new Error("Error");
}
books.each(book =>
book.get("title"));
var titles = books.map(book =>
book.get("title"));
var publishedBooks = books.filter(book =>
book.get("published") === true);
var alphabetical = books.sortBy((book: Book): number => null);
}
//////////
Backbone.history.start();
module v1Changes {
module events {
function test_once() {
var model = new Employee;
model.once('invalid', () => { }, this);
model.once('invalid', () => { });
}
function test_listenTo() {
var model = new Employee;
var view = new Backbone.View<Employee>();
view.listenTo(model, 'invalid', () => { });
}
function test_listenToOnce() {
var model = new Employee;
var view = new Backbone.View<Employee>();
view.listenToOnce(model, 'invalid', () => { });
}
function test_stopListening() {
var model = new Employee;
var view = new Backbone.View<Employee>();
view.stopListening(model, 'invalid', () => { });
view.stopListening(model, 'invalid');
view.stopListening(model);
}
}
module ModelAndCollection {
function test_url() {
Employee.prototype.url = () => '/employees';
EmployeeCollection.prototype.url = () => '/employees';
}
function test_parse() {
var model = new Employee();
model.parse('{}', {});
var collection = new EmployeeCollection;
collection.parse('{}', {});
}
function test_toJSON() {
var model = new Employee();
model.toJSON({});
var collection = new EmployeeCollection;
collection.toJSON({});
}
function test_sync() {
var model = new Employee();
model.sync();
var collection = new EmployeeCollection;
collection.sync();
}
}
module Model {
function test_validationError() {
var model = new Employee;
if (model.validationError) {
console.log('has validation errors');
}
}
function test_fetch() {
var model = new Employee({ id: 1 });
model.fetch({
success: () => { },
error: () => { }
});
}
function test_set() {
var model = new Employee;
model.set({ name: 'JoeDoe', age: 21 }, { validate: false });
model.set('name', 'JoeDoes', { validate: false });
}
function test_destroy() {
var model = new Employee;
model.destroy({
wait: true,
success: (m?, response?, options?) => { },
error: (m?, jqxhr?, options?) => { }
});
model.destroy({
success: (m?, response?, options?) => { },
error: (m?, jqxhr?) => { }
});
model.destroy({
success: () => { },
error: (m?, jqxhr?) => { }
});
}
function test_save() {
var model = new Employee;
model.save({
name: 'Joe Doe',
age: 21
},
{
wait: true,
validate: false,
success: (m?, response?, options?) => { },
error: (m?, jqxhr?, options?) => { }
});
model.save({
name: 'Joe Doe',
age: 21
},
{
success: () => { },
error: (m?, jqxhr?) => { }
});
}
function test_validate() {
var model = new Employee;
model.validate({ name: 'JoeDoe', age: 21 }, { validateAge: false })
}
}
module Collection {
function test_fetch() {
var collection = new EmployeeCollection;
collection.fetch({ reset: true });
}
function test_create() {
var collection = new EmployeeCollection;
var model = new Employee;
collection.create(model, {
validate: false
});
}
}
module Router {
function test_navigate() {
var router = new Backbone.Router;
router.navigate('/employees', { trigger: true });
router.navigate('/employees', true);
}
}
}

371
backbone/backbone.d.ts vendored
View File

@@ -3,374 +3,5 @@
// Definitions by: Boris Yankov <https://github.com/borisyankov/>, Natan Vivo <https://github.com/nvivo/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />
/// <reference path="../underscore/underscore.d.ts" />
declare module Backbone {
interface AddOptions extends Silenceable {
at?: number;
}
interface HistoryOptions extends Silenceable {
pushState?: boolean;
root?: string;
}
interface NavigateOptions {
trigger?: boolean;
replace?: boolean;
}
interface RouterOptions {
routes: any;
}
interface Silenceable {
silent?: boolean;
}
interface Validable {
validate?: boolean;
}
interface Waitable {
wait?: boolean;
}
interface Parseable {
parse?: any;
}
interface PersistenceOptions {
url?: string;
beforeSend?: (jqxhr: JQueryXHR) => void;
success?: (modelOrCollection?: any, response?: any, options?: any) => void;
error?: (modelOrCollection?: any, jqxhr?: JQueryXHR, options?: any) => void;
}
interface ModelSetOptions extends Silenceable, Validable {
}
interface ModelFetchOptions extends PersistenceOptions, ModelSetOptions, Parseable {
}
interface ModelSaveOptions extends Silenceable, Waitable, Validable, Parseable, PersistenceOptions {
patch?: boolean;
}
interface ModelDestroyOptions extends Waitable, PersistenceOptions {
}
interface CollectionFetchOptions extends PersistenceOptions, Parseable {
reset?: boolean;
}
class Events {
on(eventName: string, callback?: Function, context?: any): any;
off(eventName?: string, callback?: Function, context?: any): any;
trigger(eventName: string, ...args: any[]): any;
bind(eventName: string, callback: Function, context?: any): any;
unbind(eventName?: string, callback?: Function, context?: any): any;
once(events: string, callback: Function, context?: any): any;
listenTo(object: any, events: string, callback: Function): any;
listenToOnce(object: any, events: string, callback: Function): any;
stopListening(object?: any, events?: string, callback?: Function): any;
}
class ModelBase extends Events {
url: any;
parse(response: any, options?: any): any;
toJSON(options?: any): any;
sync(...arg: any[]): JQueryXHR;
}
class Model extends ModelBase {
/**
* Do not use, prefer TypeScript's extend functionality.
**/
private static extend(properties: any, classProperties?: any): any;
attributes: any;
changed: any[];
cid: string;
collection: Collection<any>;
/**
* Default attributes for the model. It can be an object hash or a method returning an object hash.
* For assigning an object hash, do it like this: this.defaults = <any>{ attribute: value, ... };
* That works only if you set it in the constructor or the initialize method.
**/
defaults(): any;
id: any;
idAttribute: string;
validationError: any;
urlRoot: any;
constructor(attributes?: any, options?: any);
initialize(attributes?: any, options?: any): void;
fetch(options?: ModelFetchOptions): JQueryXHR;
/**
* For strongly-typed access to attributes, use the `get` method only privately in public getter properties.
* @example
* get name(): string {
* return super.get("name");
* }
**/
/*private*/ get(attributeName: string): any;
/**
* For strongly-typed assignment of attributes, use the `set` method only privately in public setter properties.
* @example
* set name(value: string) {
* super.set("name", value);
* }
**/
/*private*/ set(attributeName: string, value: any, options?: ModelSetOptions): Model;
set(obj: any, options?: ModelSetOptions): Model;
change(): any;
changedAttributes(attributes?: any): any[];
clear(options?: Silenceable): any;
clone(): Model;
destroy(options?: ModelDestroyOptions): any;
escape(attribute: string): string;
has(attribute: string): boolean;
hasChanged(attribute?: string): boolean;
isNew(): boolean;
isValid(options?:any): boolean;
previous(attribute: string): any;
previousAttributes(): any[];
save(attributes?: any, options?: ModelSaveOptions): any;
unset(attribute: string, options?: Silenceable): Model;
validate(attributes: any, options?: any): any;
private _validate(attributes: any, options: any): boolean;
// mixins from underscore
keys(): string[];
values(): any[];
pairs(): any[];
invert(): any;
pick(keys: string[]): any;
pick(...keys: string[]): any;
omit(keys: string[]): any;
omit(...keys: string[]): any;
}
class Collection<TModel extends Model> extends ModelBase {
/**
* Do not use, prefer TypeScript's extend functionality.
**/
private static extend(properties: any, classProperties?: any): any;
model: new (...args:any[]) => TModel;
models: TModel[];
length: number;
constructor(models?: TModel[] | Object[], options?: any);
initialize(models?: TModel[] | Object[], options?: any): void;
fetch(options?: CollectionFetchOptions): JQueryXHR;
comparator(element: TModel): number;
comparator(compare: TModel, to?: TModel): number;
add(model: {}|TModel, options?: AddOptions): TModel;
add(models: ({}|TModel)[], options?: AddOptions): TModel[];
at(index: number): TModel;
/**
* Get a model from a collection, specified by an id, a cid, or by passing in a model.
**/
get(id: number|string|Model): TModel;
create(attributes: any, options?: ModelSaveOptions): TModel;
pluck(attribute: string): any[];
push(model: TModel, options?: AddOptions): TModel;
pop(options?: Silenceable): TModel;
remove(model: TModel, options?: Silenceable): TModel;
remove(models: TModel[], options?: Silenceable): TModel[];
reset(models?: TModel[], options?: Silenceable): TModel[];
set(models?: TModel[], options?: Silenceable): TModel[];
shift(options?: Silenceable): TModel;
sort(options?: Silenceable): Collection<TModel>;
unshift(model: TModel, options?: AddOptions): TModel;
where(properties: any): TModel[];
findWhere(properties: any): TModel;
private _prepareModel(attributes?: any, options?: any): any;
private _removeReference(model: TModel): void;
private _onModelEvent(event: string, model: TModel, collection: Collection<TModel>, options: any): void;
// mixins from underscore
all(iterator: (element: TModel, index: number) => boolean, context?: any): boolean;
any(iterator: (element: TModel, index: number) => boolean, context?: any): boolean;
collect(iterator: (element: TModel, index: number, context?: any) => any[], context?: any): any[];
chain(): any;
contains(value: any): boolean;
countBy(iterator: (element: TModel, index: number) => any): _.Dictionary<number>;
countBy(attribute: string): _.Dictionary<number>;
detect(iterator: (item: any) => boolean, context?: any): any; // ???
drop(): TModel;
drop(n: number): TModel[];
each(iterator: (element: TModel, index: number, list?: any) => void, context?: any): any;
every(iterator: (element: TModel, index: number) => boolean, context?: any): boolean;
filter(iterator: (element: TModel, index: number) => boolean, context?: any): TModel[];
find(iterator: (element: TModel, index: number) => boolean, context?: any): TModel;
first(): TModel;
first(n: number): TModel[];
foldl(iterator: (memo: any, element: TModel, index: number) => any, initialMemo: any, context?: any): any;
forEach(iterator: (element: TModel, index: number, list?: any) => void, context?: any): any;
groupBy(iterator: (element: TModel, index: number) => string, context?: any): _.Dictionary<TModel[]>;
groupBy(attribute: string, context?: any): _.Dictionary<TModel[]>;
include(value: any): boolean;
indexOf(element: TModel, isSorted?: boolean): number;
initial(): TModel;
initial(n: number): TModel[];
inject(iterator: (memo: any, element: TModel, index: number) => any, initialMemo: any, context?: any): any;
isEmpty(object: any): boolean;
invoke(methodName: string, args?: any[]): any;
last(): TModel;
last(n: number): TModel[];
lastIndexOf(element: TModel, fromIndex?: number): number;
map(iterator: (element: TModel, index: number, context?: any) => any, context?: any): any[];
max(iterator?: (element: TModel, index: number) => any, context?: any): TModel;
min(iterator?: (element: TModel, index: number) => any, context?: any): TModel;
reduce(iterator: (memo: any, element: TModel, index: number) => any, initialMemo: any, context?: any): any;
select(iterator: any, context?: any): any[];
size(): number;
shuffle(): any[];
slice(min: number, max?: number): TModel[];
some(iterator: (element: TModel, index: number) => boolean, context?: any): boolean;
sortBy(iterator: (element: TModel, index: number) => number, context?: any): TModel[];
sortBy(attribute: string, context?: any): TModel[];
sortedIndex(element: TModel, iterator?: (element: TModel, index: number) => number): number;
reduceRight(iterator: (memo: any, element: TModel, index: number) => any, initialMemo: any, context?: any): any[];
reject(iterator: (element: TModel, index: number) => boolean, context?: any): TModel[];
rest(): TModel;
rest(n: number): TModel[];
tail(): TModel;
tail(n: number): TModel[];
toArray(): any[];
without(...values: any[]): TModel[];
}
class Router extends Events {
/**
* Do not use, prefer TypeScript's extend functionality.
**/
private static extend(properties: any, classProperties?: any): any;
/**
* Routes hash or a method returning the routes hash that maps URLs with parameters to methods on your Router.
* For assigning routes as object hash, do it like this: this.routes = <any>{ "route": callback, ... };
* That works only if you set it in the constructor or the initialize method.
**/
routes: any;
constructor(options?: RouterOptions);
initialize(options?: RouterOptions): void;
route(route: string|RegExp, name: string, callback?: Function): Router;
navigate(fragment: string, options?: NavigateOptions): Router;
navigate(fragment: string, trigger?: boolean): Router;
private _bindRoutes(): void;
private _routeToRegExp(route: string): RegExp;
private _extractParameters(route: RegExp, fragment: string): string[];
}
var history: History;
class History extends Events {
handlers: any[];
interval: number;
start(options?: HistoryOptions): boolean;
getHash(window?: Window): string;
getFragment(fragment?: string, forcePushState?: boolean): string;
stop(): void;
route(route: string, callback: Function): number;
checkUrl(e?: any): void;
loadUrl(fragmentOverride: string): boolean;
navigate(fragment: string, options?: any): boolean;
started: boolean;
options: any;
private _updateHash(location: Location, fragment: string, replace: boolean): void;
}
interface ViewOptions<TModel extends Model> {
model?: TModel;
// TODO: quickfix, this can't be fixed easy. The collection does not need to have the same model as the parent view.
collection?: Backbone.Collection<any>;
el?: any;
id?: string;
className?: string;
tagName?: string;
attributes?: {[id: string]: any};
}
class View<TModel extends Model> extends Events {
/**
* Do not use, prefer TypeScript's extend functionality.
**/
private static extend(properties: any, classProperties?: any): any;
constructor(options?: ViewOptions<TModel>);
initialize(options?: ViewOptions<TModel>): void;
/**
* Events hash or a method returning the events hash that maps events/selectors to methods on your View.
* For assigning events as object hash, do it like this: this.events = <any>{ "event:selector": callback, ... };
* That works only if you set it in the constructor or the initialize method.
**/
events(): any;
$(selector: string): JQuery;
model: TModel;
collection: Collection<TModel>;
//template: (json, options?) => string;
setElement(element: HTMLElement|JQuery, delegate?: boolean): View<TModel>;
id: string;
cid: string;
className: string;
tagName: string;
el: any;
$el: JQuery;
setElement(element: any): View<TModel>;
attributes: any;
$(selector: any): JQuery;
render(): View<TModel>;
remove(): View<TModel>;
make(tagName: any, attributes?: any, content?: any): any;
delegateEvents(events?: any): any;
undelegateEvents(): any;
_ensureElement(): void;
}
// SYNC
function sync(method: string, model: Model, options?: JQueryAjaxSettings): any;
function ajax(options?: JQueryAjaxSettings): JQueryXHR;
var emulateHTTP: boolean;
var emulateJSON: boolean;
// Utility
function noConflict(): typeof Backbone;
var $: JQueryStatic;
}
declare module "backbone" {
export = Backbone;
}
/// <reference path="./backbone-global.d.ts" />

22
barcode/barcode-tests.ts Normal file
View File

@@ -0,0 +1,22 @@
/// <reference path="barcode.d.ts" />
import barcode = require('barcode');
import path = require('path');
var code39 = barcode('code39', {
data: "it works",
width: 400,
height: 100,
});
code39.getStream(function (err, readStream) {
if (err) throw err;
// 'readStream' is an instance of ReadableStream
});
var outfile = path.join(__dirname, 'imgs', 'mycode.png');
code39.saveImage(outfile, function (err) {
if (err) throw err;
console.log('File has been written!');
});

25
barcode/barcode.d.ts vendored Normal file
View File

@@ -0,0 +1,25 @@
// Type definitions for barcode
// Project: https://github.com/samt/barcode
// Definitions by: Pascal Vomhoff <https://github.com/pvomhoff>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module "barcode" {
interface BarcodeOptions {
data:string|number;
width:number;
height:number;
}
interface BarcodeResult {
getStream(callback:(err:NodeJS.ErrnoException, stream:NodeJS.ReadableStream) => void):void;
saveImage(outputfilePath:string, callback:(err:NodeJS.ErrnoException) => void):void;
getBase64(callback:(err:NodeJS.ErrnoException, base64String:string) => void):void;
}
function barcode(type:string, options:BarcodeOptions):BarcodeResult;
export = barcode;
}

View File

@@ -0,0 +1,237 @@
/// <reference path="./benchmark.d.ts"/>
import Benchmark = require("benchmark");
var suite = new Benchmark.Suite;
// add tests
suite.add('RegExp#test', function() {
/o/.test('Hello World!');
})
.add('String#indexOf', function() {
'Hello World!'.indexOf('o') > -1;
})
.add('String#match', function() {
!!'Hello World!'.match(/o/);
})
// add listeners
.on('cycle', function(event: {target: any}) {
console.log(String(event.target));
})
.on('complete', function() {
console.log('Fastest is ' + this.filter('fastest').pluck('name'));
})
// run async
.run({ 'async': true });
var fn: Function;
var onStart: Function;
var onCycle: Function;
var onAbort: Function;
var onError: Function;
var onReset: Function;
var onComplete: Function;
var setup: Function;
var teardown: Function;
var benches: Benchmark[];
var listener: Function;
var count: number;
// basic usage (the `new` operator is optional)
var bench = new Benchmark(fn);
// or using a name first
var bench = new Benchmark('foo', fn);
// or with options
var bench = new Benchmark('foo', fn, {
// displayed by Benchmark#toString if `name` is not available
'id': 'xyz',
// called when the benchmark starts running
'onStart': onStart,
// called after each run cycle
'onCycle': onCycle,
// called when aborted
'onAbort': onAbort,
// called when a test errors
'onError': onError,
// called when reset
'onReset': onReset,
// called when the benchmark completes running
'onComplete': onComplete,
// compiled/called before the test loop
'setup': setup,
// compiled/called after the test loop
'teardown': teardown
});
// or name and options
var bench = new Benchmark('foo', {
// a flag to indicate the benchmark is deferred
'defer': true,
// benchmark test function
'fn': function(deferred: {resolve(): void}) {
// call resolve() when the deferred test is finished
deferred.resolve();
}
});
// or options only
var bench = new Benchmark({
// benchmark name
'name': 'foo',
// benchmark test as a string
'fn': '[1,2,3,4].sort()'
});
// a tests `this` binding is set to the benchmark instance
var bench = new Benchmark('foo', function() {
'My name is '.concat(this.name); // My name is foo
});
// get odd numbers
Benchmark.filter([1, 2, 3, 4, 5], function(n) {
return n % 2;
}); // -> [1, 3, 5];
// get fastest benchmarks
Benchmark.filter(benches, 'fastest');
// get slowest benchmarks
Benchmark.filter(benches, 'slowest');
// get benchmarks that completed without erroring
Benchmark.filter(benches, 'successful');
// invoke `reset` on all benchmarks
Benchmark.invoke(benches, 'reset');
// invoke `emit` with arguments
Benchmark.invoke(benches, 'emit', 'complete', listener);
// invoke `run(true)`, treat benchmarks as a queue, and register invoke callbacks
Benchmark.invoke(benches, {
// invoke the `run` method
'name': 'run',
// pass a single argument
'args': true,
// treat as queue, removing benchmarks from front of `benches` until empty
'queued': true,
// called before any benchmarks have been invoked.
'onStart': onStart,
// called between invoking benchmarks
'onCycle': onCycle,
// called after all benchmarks have been invoked.
'onComplete': onComplete
});
var element: HTMLElement;
// basic usage
var bench = new Benchmark({
'setup': function() {
var c = this.count,
element = document.getElementById('container');
while (c--) {
element.appendChild(document.createElement('div'));
}
},
'fn': function() {
element.removeChild(element.lastChild);
}
});
// or using strings
var bench = new Benchmark({
'setup': '\
var a = 0;\n\
(function() {\n\
(function() {\n\
(function() {',
'fn': 'a += 1;',
'teardown': '\
}())\n\
}())\n\
}())'
});
var bizarro = bench.clone({
'name': 'doppelganger'
});
// unregister a listener for an event type
bench.off('cycle', listener);
// unregister a listener for multiple event types
bench.off('start cycle', listener);
// unregister all listeners for an event type
bench.off('cycle');
// unregister all listeners for multiple event types
bench.off('start cycle complete');
// unregister all listeners for all event types
bench.off();
// register a listener for an event type
bench.on('cycle', listener);
// register a listener for multiple event types
bench.on('start cycle', listener);
// basic usage
bench.run();
// or with options
bench.run({ 'async': true });
// basic usage
suite.add(fn);
// or using a name first
suite.add('foo', fn);
// or with options
suite.add('foo', fn, {
'onCycle': onCycle,
'onComplete': onComplete
});
// or name and options
suite.add('foo', {
'fn': fn,
'onCycle': onCycle,
'onComplete': onComplete
});
// or options only
suite.add({
'name': 'foo',
'fn': fn,
'onCycle': onCycle,
'onComplete': onComplete
});
// basic usage
suite.run();
// or with options
suite.run({ 'async': true, 'queued': true });

192
benchmark/benchmark.d.ts vendored Normal file
View File

@@ -0,0 +1,192 @@
// Type definitions for Benchmark v1.0.0
// Project: http://benchmarkjs.com
// Definitions by: Asana <https://asana.com>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "benchmark" {
class Benchmark {
static deepClone<T>(value: T): T;
static each(obj: Object | any[], callback: Function, thisArg?: any): void;
static extend(destination: Object, ...sources: Object[]): Object;
static filter<T>(arr: T[], callback: (value: T) => any, thisArg?: any): T[];
static filter<T>(arr: T[], filter: string, thisArg?: any): T[];
static forEach<T>(arr: T[], callback: (value: T) => any, thisArg?: any): void;
static formatNumber(num: number): string;
static forOwn(obj: Object, callback: Function, thisArg?: any): void;
static hasKey(obj: Object, key: string): boolean;
static indexOf<T>(arr: T[], value: T, fromIndex?: number): number;
static interpolate(template: string, values: Object): string;
static invoke(benches: Benchmark[], name: string | Object, ...args: any[]): any[];
static join(obj: Object, separator1?: string, separator2?: string): string;
static map<T, K>(arr: T[], callback: (value: T) => K, thisArg?: any): K[];
static pluck<T, K>(arr: T[], key: string): K[];
static reduce<T, K>(arr: T[], callback: (accumulator: K, value: T) => K, thisArg?: any): K;
static options: Benchmark.Options;
static platform: Benchmark.Platform;
static support: Benchmark.Support;
static version: string;
constructor(fn: Function | string, options?: Benchmark.Options);
constructor(name: string, fn: Function | string, options?: Benchmark.Options);
constructor(name: string, options?: Benchmark.Options);
constructor(options: Benchmark.Options);
aborted: boolean;
compiled: Function | string;
count: number;
cycles: number;
error: Error;
fn: Function | string;
hz: number;
running: boolean;
setup: Function | string;
teardown: Function | string;
stats: Benchmark.Stats;
times: Benchmark.Times;
abort(): Benchmark;
clone(options: Benchmark.Options): Benchmark;
compare(benchmark: Benchmark): number;
emit(type: string | Object): any;
listeners(type: string): Function[];
off(type?: string, listener?: Function): Benchmark;
off(types: string[]): Benchmark;
on(type?: string, listener?: Function): Benchmark;
on(types: string[]): Benchmark;
reset(): Benchmark;
run(options?: Benchmark.Options): Benchmark;
toString(): string;
}
module Benchmark {
export interface Options {
async?: boolean;
defer?: boolean;
delay?: number;
id?: string;
initCount?: number;
maxTime?: number;
minSamples?: number;
minTime?: number;
name?: string;
onAbort?: Function;
onComplete?: Function;
onCycle?: Function;
onError?: Function;
onReset?: Function;
onStart?: Function;
setup?: Function | string;
teardown?: Function | string;
fn?: Function | string;
queued?: boolean;
}
export interface Platform {
description: string;
layout: string;
manufacturer: string;
name: string;
os: string;
prerelease: string;
product: string;
version: string;
toString(): string;
}
export interface Support {
air: boolean;
argumentsClass: boolean;
browser: boolean;
charByIndex: boolean;
charByOwnIndex: boolean;
decompilation: boolean;
descriptors: boolean;
getAllKeys: boolean;
iteratesOwnFirst: boolean;
java: boolean;
nodeClass: boolean;
timeout: boolean;
}
export interface Stats {
deviation: number;
mean: number;
moe: number;
rme: number;
sample: any[];
sem: number;
variance: number;
}
export interface Times {
cycle: number;
elapsed: number;
period: number;
timeStamp: number;
}
export class Deferred {
constructor(clone: Benchmark);
benchmark: Benchmark;
cycles: number;
elapsed: number;
timeStamp: number;
}
export class Event {
constructor(type: string | Object);
aborted: boolean;
cancelled: boolean;
currentTarget: Object;
result: any;
target: Object;
timeStamp: number;
type: string;
}
export class Suite {
static options: { name: string };
constructor(name?: string, options?: Options);
aborted: boolean;
length: number;
running: boolean;
abort(): Suite;
add(name: string, fn: Function | string, options?: Options): Suite;
add(fn: Function | string, options?: Options): Suite;
add(name: string, options?: Options): Suite;
add(options: Options): Suite;
clone(options: Options): Suite;
emit(type: string | Object): any;
filter(callback: Function | string): Suite;
forEach(callback: Function): Suite;
indexOf(value: any): number;
invoke(name: string, ...args: any[]): any[];
join(separator?: string): string;
listeners(type: string): Function[];
map(callback: Function): any[];
off(type?: string, callback?: Function): Benchmark;
off(types: string[]): Benchmark;
on(type?: string, callback?: Function): Benchmark;
on(types: string[]): Benchmark;
pluck(property: string): any[];
pop(): Function;
push(benchmark: Benchmark): number;
reduce<T>(callback: Function, accumulator: T): T;
reset(): Suite;
reverse(): any[];
run(options?: Options): Suite;
shift(): Benchmark;
slice(start: number, end: number): any[];
slice(start: number, deleteCount: number, ...values: any[]): any[];
unshift(benchmark: Benchmark): number;
}
}
export = Benchmark;
}

View File

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

View File

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

View File

@@ -4,6 +4,9 @@
var noArgument = bigInt(),
numberArgument = bigInt( 93 ),
stringArgument = bigInt( "75643564363473453456342378564387956906736546456235345" ),
baseArgumentInt = bigInt( "101010", 2 ),
baseArgumentStr = bigInt( "101010", "2" ),
baseArgumentBi = bigInt( "101010", bigInt( 2 ) ),
bigIntArgument = bigInt( noArgument );
// method tests
@@ -111,4 +114,4 @@ isNumber = x.toJSNumber();
isString = x.toString();
isNumber = x.valueOf();
isNumber = x.valueOf();

View File

@@ -214,7 +214,7 @@ interface BigIntegerStatic {
/** Parse a Javascript number into a bigInt */
( number: number ): BigInteger;
/** Parse a string into a bigInt */
( string: string ): BigInteger;
( string: string, base?: string | number | BigInteger): BigInteger;
/** no-op */
( bigInt: BigInteger ): BigInteger;
}
@@ -223,4 +223,4 @@ declare var bigInt: BigIntegerStatic;
declare module "big-integer" {
export = bigInt;
}
}

View File

@@ -1,4 +1,4 @@
/// <reference path="Microsoft.Maps.d.ts"/>
/// <reference path="Microsoft.Maps.d.ts"/>
/// <reference path="Microsoft.Maps.AdvancedShapes.d.ts"/>
/// <reference path="Microsoft.Maps.Directions.d.ts"/>
/// <reference path="Microsoft.Maps.Search.d.ts"/>
@@ -55,7 +55,7 @@ module BingMapsTests {
locations.push(location);
}
// Sets the view of the map to the smallest size that contains all of the
// Sets the view of the map to the smallest size that contains all of the
// specified locations (in this case the pusphin locations)
map.setView({ bounds: Microsoft.Maps.LocationRect.fromLocations(locations) });
}

View File

@@ -36,6 +36,9 @@ interface Foo {
interface Bar {
bar(): string;
}
interface Baz {
baz(): string;
}
// - - - - - - - - - - - - - - - - -
@@ -61,6 +64,7 @@ interface StrBarArrMap {
var foo: Foo;
var bar: Bar;
var baz: Baz;
var fooArr: Foo[];
var barArr: Bar[];
@@ -76,6 +80,7 @@ var voidProm: Promise<void>;
var fooProm: Promise<Foo>;
var barProm: Promise<Bar>;
var bazProm: Promise<Baz>;
// - - - - - - - - - - - - - - - - -
@@ -499,6 +504,30 @@ barProm = fooProm.race<Bar>();
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Promise.all([fooProm, barProm]).then(result => {
result[0].foo();
result[1].bar();
});
Promise.all([fooProm, fooProm]).then(result => {
result[0].foo();
result[1].foo();
});
Promise.all([fooProm, barProm, bazProm]).then(result => {
result[0].foo();
result[1].bar();
result[2].baz();
});
Promise.all([fooProm, barProm, fooProm]).then(result => {
result[0].foo();
result[1].bar();
result[2].foo();
});
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//TODO fix collection inference
barArrProm = fooProm.map<Foo, Bar>((item: Foo, index: number, arrayLength: number) => {

View File

@@ -464,6 +464,11 @@ declare class Promise<R> implements Promise.Thenable<R>, Promise.Inspection<R> {
static all<R>(values: Promise.Thenable<R[]>): Promise<R[]>;
// array with promises of value
static all<R>(values: Promise.Thenable<R>[]): Promise<R[]>;
// array with promises of different types
static all<T1, T2>(values: [Promise.Thenable<T1>, Promise.Thenable<T2>]): Promise<[T1, T2]>;
static all<T1, T2, T3>(values: [Promise.Thenable<T1>, Promise.Thenable<T2>, Promise.Thenable<T3>]): Promise<[T1, T2, T3]>;
static all<T1, T2, T3, T4>(values: [Promise.Thenable<T1>, Promise.Thenable<T2>, Promise.Thenable<T3>, Promise.Thenable<T4>]): Promise<[T1, T2, T3, T4]>;
static all<T1, T2, T3, T4, T5>(values: [Promise.Thenable<T1>, Promise.Thenable<T2>, Promise.Thenable<T3>, Promise.Thenable<T4>, Promise.Thenable<T5>]): Promise<[T1, T2, T3, T4, T5]>;
// array with values
static all<R>(values: R[]): Promise<R[]>;

View File

@@ -0,0 +1,70 @@
/// <reference path="bootstrap-maxlength.d.ts"/>
/// <reference path="../jquery/jquery.d.ts"/>
// Examples from the projects github page
$('input[maxlength]').maxlength();
$('input.className').maxlength({
threshold: 20
});
$('input.className').maxlength({
alwaysShow: true,
threshold: 10,
warningClass: "label label-info",
limitReachedClass: "label label-warning",
placement: 'top',
preText: 'used ',
separator: ' of ',
postText: ' chars.'
});
$('input.className').maxlength({
alwaysShow: true,
threshold: 10,
warningClass: "label label-info",
limitReachedClass: "label label-warning",
placement: 'top',
message: 'used %charsTyped% of %charsTotal% chars.'
});
// Testing the events
$('input.className').on('maxlength.shown', function(){
console.log('shown');
});
$('input.className').on('maxlength.hidden', function(){
console.log('hidden');
});
$('textarea').on('autosize.resized', function () {
$(this).trigger('maxlength.reposition');
});
// using message string
$('input.className').maxlength({
message: 'used %charsTyped% of %charsTotal% chars.'
});
// using message function
$('input.className').maxlength({
threshold: 20,
message: function (currentText, maxLength) {
return '' + Math.ceil(currentText.length / 160) + ' SMS Message(s)';
}
});
// placement string
$('input.className').maxlength({
placement: 'top-left'
});
// placement object
$('input.className').maxlength({
placement: {
top: 10,
left: '30%'
}
});
// placement function
$('input.className').maxlength({
placement: function (currentInput: JQuery, maxLengthIndicator: JQuery, currentInputPosition: BootstrapMaxlength.PositionParam) {
}
});

View File

@@ -0,0 +1,158 @@
// Type definitions for bootstrap-maxlength v1.7.0
// Project: https://github.com/mimo84/bootstrap-maxlength
// Definitions by: Dan Manastireanu <https://github.com/danmana>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />
declare module BootstrapMaxlength {
/**
* Possible options for the position of the counter. (passed to $.fn.css)
*/
interface PlacementOptions {
/**
* The top position of the counter (Number of pixels, or a px or percent string)
*/
top?: Number | string,
/**
* The right position of the counter (Number of pixels, or a px or percent string)
*/
right?: Number | string,
/**
* The bottom position of the counter (Number of pixels, or a px or percent string)
*/
bottom?: Number | string,
/**
* The left position of the counter (Number of pixels, or a px or percent string)
*/
left?: Number | string,
/**
* The positioning to use. For example 'relative', 'absolute'
*/
position?: string
}
/**
* Representation of the current input position
*/
interface PositionParam {
top: Number,
right: Number,
bottom: Number,
left: Number,
width: Number,
height: Number
}
export interface Options {
/**
* If true the threshold will be ignored and the remaining length indication will be always showing up while typing or on focus on the input
* @default false
*/
alwaysShow?: Boolean,
/**
* This is a number indicating how many chars are left to start displaying the indications
* @default 10
*/
threshold?: Number,
/**
* It's the class of the element with the indicator. By default is the bootstrap "label label-success" but can be changed to anything you'd like.
* @default 'label label-success'
*/
warningClass?: string,
/**
* It's the class the element gets when the limit is reached. Default is "label label-important label-danger" (to support Bootstrap 2 and 3).
* @default 'label label-important label-danger'
*/
limitReachedClass?: string,
/**
* Represents the separator between the number of typed chars and total number of available chars.
* @default ' / '
*/
separator?: string,
/**
* Is a string of text that can be outputted in front of the indicator.
* @default ''
*/
preText?: string,
/**
* Is a string outputted after the indicator.
* @default ''
*/
postText?: string,
/**
* If false, will display just the number of typed characters, e.g. will not display the max length.
* @default true
*/
showMaxLength?: Boolean,
/**
* If false, will display just the remaining length, e.g. will display remaining lenght instead of number of typed characters.
* @default true
*/
showCharsTyped?: Boolean,
/**
* Is a string, define where to output the counter.
* Options: bottom, left, top, right, bottom-right, top-right, top-left, bottom-left and centered-right
* @default 'bottom'
*/
placement?: string | PlacementOptions | ((currentInput: JQuery, maxLengthIndicator: JQuery, currentInputPosition: PositionParam) => void),
/**
* Appends the maxlength indicator badge to the parent of the input rather than to the body.
* @default false
*/
appendToParent?: boolean,
/**
* An alternative way to provide the message text.
* String example: 'You have typed %charsTyped% chars, %charsRemaining% of %charsTotal% remaining'.
* %charsTyped%, %charsRemaining% and %charsTotal% will be replaced by the actual values. This overrides the options separator, preText, postText and showMaxLength.
* Alternatively you may supply a function that the current text and max length and returns the string to be displayed.
* Function example: function(currentText, maxLength) { return '' + Math.ceil(currentText.length / 160) + ' SMS Message(s)'; }
* @default null
*/
message?: string | ((currentText : string, maxLength: Number) => string),
/**
* If true the input will count using utf8 bytesize/encoding. For example: the '£' character is counted as two characters.
* @default false
*/
utf8?: boolean,
/**
* Shows the badge as soon as it is added to the page, similar to alwaysShow
* @default false
*/
showOnReady?: boolean,
/**
* Count linebreak as 2 characters to match IE/Chrome textarea validation. As well as DB storage.
* @default true
*/
twoCharLinebreak?: boolean,
/**
* Allows a custom attribute to display indicator without triggering native maxlength behaviour.
* Ignored if value greater than a native maxlength attribute.
* 'overmax' class gets added when exceeded to allow user to implement form validation.
* @default null (use the maxlength attribute and browser functionality)
*/
customMaxAttribute?: string,
/**
* Will allow the input to be over the customMaxLength. Useful in soft max situations.
* @default false
*/
allowOverMax?: boolean,
/**
* If the browser doesn't support the maxlength attribute, attempt to type more than
* the indicated chars, will be prevented.
* @default false
*/
validate?: boolean
}
}
interface JQuery {
/** Apply the maxlength plugin on the selected elemens */
maxlength(options?: BootstrapMaxlength.Options): JQuery;
on(events: 'maxlength.shown', handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
on(events: 'maxlength.hidden', handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
trigger(eventType: 'maxlength.reposition', extraParameters?: any[]|Object): JQuery;
}

View File

@@ -1,9 +1,9 @@
/// <reference path="bootstrap-notify.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />
//Test for bootstrap-notify v3.1.3
//Copied example directly from Bootstrap-notify site
$.notify({
// options
icon: 'glyphicon glyphicon-warning-sign',
@@ -48,5 +48,5 @@ $.notify({
'<div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div>' +
'</div>' +
'<a href="{3}" target="{4}" data-notify="url"></a>' +
'</div>'
'</div>'
});

View File

@@ -0,0 +1,25 @@
/// <reference path="../jquery/jquery.d.ts"/>
/// <reference path="bootstrap-switch.d.ts" />
function test_cases() {
$('#switch').bootstrapSwitch();
$('#switch').bootstrapSwitch({
state: false
});
$('#switch').bootstrapSwitch({
state: false,
disabled: true
});
//var mySwitch = $('#switch').get(0);
//mySwitch.toggleAnimate();
$('#switch').bootstrapSwitch('state', true, true);
$('#switch').on('switchChange.bootstrapSwitch', (event) => {
console.log($(event.target).val());
});
}

102
bootstrap-switch/bootstrap-switch.d.ts vendored Normal file
View File

@@ -0,0 +1,102 @@
// Type definitions for Bootstrap Switch
// Project: http://www.bootstrap-switch.org/
// Definitions by: John M. Baughman <https://github.com/johnmbaughman>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/**
* bootstrap-switch - v3.3.2 Copyright (c) 2012-2013 Mattia Larentis
* Available via the Apache license.
* see: http://www.bootstrap-switch.org/ or https://github.com/nostalgiaz/bootstrap-switch for details.
*/
/// <reference path="../jquery/jquery.d.ts"/>
declare module BootstrapSwitch {
interface BootstrapSwitchChangeEventObject extends JQueryEventObject {
state: boolean
}
interface BootstrapSwitchEventObject extends JQueryEventObject { }
interface BootstrapSwitchOptions {
state?: boolean;
size?: string;
animate?: boolean;
disabled?: boolean;
readonly?: boolean;
indeterminate?: boolean;
invers?: boolean;
radioAllOff?: boolean;
onColor?: string;
offColor?: string;
onText?: string;
offText?: string;
labelText?: string;
handleWidth?: string;
labelWidth?: string;
baseClass?: string;
wrapperClass?: string;
onInit?: any;
onSwitchChange?: any;
}
interface Switch {
toggleAnimate(): JQuery;
toggleDisabled(): JQuery;
toggleReadonly(): JQuery;
toggleIndeterminate(): JQuery;
toggleInverse(): JQuery;
destroy(): JQuery;
state(): boolean;
state(value: any): JQuery;
state(value: any, skip: boolean): JQuery;
toggleState(skip?: boolean): JQuery;
radioAllOff(): boolean;
radioAllOff(state: boolean): JQuery;
size(): string;
size(size: string): JQuery;
animate(): boolean;
animate(state: boolean): JQuery;
disabled(): boolean;
disabled(state: boolean): JQuery;
toggleDisabled(): JQuery;
readonly(): boolean;
readonly(state: boolean): JQuery;
toggleReadOnly(): JQuery;
onColor(): string;
onColor(color: string): JQuery;
offColor(): string;
offColor(color: string): JQuery;
onText(): string;
onText(text: string): JQuery;
offText(): string;
offText(text: string): JQuery;
labelText(): string;
labelText(text: string): JQuery;
baseClass(): string;
baseClass(text: string): JQuery;
wrapperClass(): string;
wrapperClass(text: string): JQuery;
}
}
interface JQuery {
bootstrapSwitch(): JQuery;
bootstrapSwitch(options: BootstrapSwitch.BootstrapSwitchOptions): JQuery;
bootstrapSwitch(method: string): JQuery;
bootstrapSwitch(method: string, param: any): JQuery;
bootstrapSwitch(method: string, param1: any, param2: any): JQuery;
off(events: "init.bootstrapSwitch", selector?: string, handler?: (eventobject: BootstrapSwitch.BootstrapSwitchEventObject) => any): JQuery;
off(events: "init.bootstrapSwitch", handler?: (eventobject: BootstrapSwitch.BootstrapSwitchEventObject) => any): JQuery;
off(events: "switchChange.bootstrapSwitch", selector?: string, handler?: (eventobject: BootstrapSwitch.BootstrapSwitchChangeEventObject) => any): JQuery;
off(events: "switchChange.bootstrapSwitch", handler?: (eventobject: BootstrapSwitch.BootstrapSwitchChangeEventObject) => any): JQuery;
on(events: "init.bootstrapSwitch", selector?: string, handler?: (eventobject: BootstrapSwitch.BootstrapSwitchEventObject) => any): JQuery;
on(events: "init.bootstrapSwitch", handler?: (eventobject: BootstrapSwitch.BootstrapSwitchEventObject) => any): JQuery;
on(events: "switchChange.bootstrapSwitch", selector?: string, handler?: (eventobject: BootstrapSwitch.BootstrapSwitchChangeEventObject) => any): JQuery;
on(events: "switchChange.bootstrapSwitch", handler?: (eventobject: BootstrapSwitch.BootstrapSwitchChangeEventObject) => any): JQuery;
}

View File

@@ -44,8 +44,8 @@ interface DatepickerEventObject extends JQueryEventObject {
interface JQuery {
datepicker(): JQuery;
datepicker(methodName: string): JQuery;
datepicker(methodName: string, params: any): JQuery;
datepicker(methodName: string): any;
datepicker(methodName: string, params: any): any;
datepicker(options: DatepickerOptions): JQuery;
off(events: "changeDate", selector?: string, handler?: (eventObject: DatepickerEventObject) => any): JQuery;

View File

@@ -17,6 +17,7 @@ $('#myModal').modal('toggle');
$('.dropdown-toggle').dropdown();
$('#navbar').scrollspy();
$('body').scrollspy({ target: '#navbar-example' });
$('#element').tooltip('show');
@@ -42,4 +43,4 @@ $('.typeahead').typeahead({
highlighter: item => ""
});
$('#navbar').affix();
$('#navbar').affix();

View File

@@ -22,6 +22,7 @@ interface ModalOptionsBackdropString {
interface ScrollSpyOptions {
offset?: number;
target?: string;
}
interface TooltipOptions {

77
bounce/bounce-tests.ts Normal file
View File

@@ -0,0 +1,77 @@
/// <reference path="./bounce.d.ts" />
/// <reference path="./../jquery/jquery.d.ts" />
import Bounce from 'bounce.js';
import * as $ from 'jquery';
function test_chaining_transformations() {
var bounce = new Bounce();
bounce
.scale({
from: { x: 0, y: 0 },
to: { x: 2, y: 2 },
duration: 1000
})
.rotate({
from: 0,
to: 360,
delay: 500
})
.translate({
from: { x: 0, y: -100 },
to: { x: 0, y: 0 },
stiffness: 1,
bounces: 4
})
.skew({
from: { x: 1, y: 0.8 },
to: { x: 0.8, y: 1 },
easing: 'bounce'
});
}
function test_serialization() {
var b1 = new Bounce();
var serialized = b1.serialize();
var b2 = new Bounce();
b2.deserialize(serialized);
}
function test_apply () {
var bounce = new Bounce();
var element = document.createElement('div');
bounce.applyTo(element);
bounce.applyTo([element]);
bounce.applyTo($('div'));
var options = {
loop: true,
remove: true,
onComplete: () => {}
};
bounce.applyTo(element, options);
bounce.applyTo([element], options);
bounce.applyTo($('div'), options);
}
function test_apply_promise () {
var bounce = new Bounce();
var element = document.createElement('div');
bounce.applyTo($('div')).then(() => {});
var options = {
loop: true,
remove: true
};
bounce.applyTo($('div')).then(() => {});
}
function test_define() {
var bounce = new Bounce();
bounce.define('named-animation');
}
function test_remove() {
var bounce = new Bounce();
bounce.remove();
}

66
bounce/bounce.d.ts vendored Normal file
View File

@@ -0,0 +1,66 @@
// Type definitions for Bounce.js v0.8.2
// Project: http://github.com/tictail/bounce.js
// Definitions by: Cherry <http://github.com/cherrry>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>
declare module 'bounce.js' {
export default Bounce
interface Point2D {
x: number
y: number
}
interface BounceOptions<T> {
from: T
to: T
duration?: number
delay?: number
easing?: string
bounces?: number
stiffness?: number
}
interface AnimationOptions {
loop?: boolean
remove?: boolean
onComplete?: () => void
}
interface SerailizedComponent<T> {
type: string
from: T
to: T
duration: number
delay: number
easing: string
bounces: number
stiffness: number
}
class Bounce {
static FPS: number
static counter: number
static isSupported(): boolean
constructor();
scale(options: BounceOptions<Point2D>): Bounce
rotate(options: BounceOptions<number>): Bounce
translate(options: BounceOptions<Point2D>): Bounce
skew(options: BounceOptions<Point2D>): Bounce
serialize(): SerailizedComponent<number|Point2D>[]
deserialize(serailized: SerailizedComponent<number|Point2D>[]): Bounce
applyTo(element: Element, options?: AnimationOptions): void
applyTo(elements: Element[], options?: AnimationOptions): void
applyTo(elements: JQuery, options?: AnimationOptions): JQueryPromise<void>
define(name: string): Bounce
remove(): void
}
}

View File

@@ -1,9 +1,9 @@
/// <reference path="./bowser.d.ts" />
import Bowser = require('bowser');
Bowser.msedge === true;
Bowser.test(['msie']) === true;
Bowser.a === Bowser.c;
Bowser.osversion > 10;
Bowser.osversion === '10.1A';
/// <reference path="./bowser.d.ts" />
import Bowser = require('bowser');
Bowser.msedge === true;
Bowser.test(['msie']) === true;
Bowser.a === Bowser.c;
Bowser.osversion > 10;
Bowser.osversion === '10.1A';

108
bowser/bowser.d.ts vendored
View File

@@ -1,54 +1,54 @@
// Type definitions for Bowser 1.x
// Project: https://github.com/ded/bowser
// Definitions by: Paulo Cesar <https://github.com/pocesar>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module 'bowser' {
var def: BowserModule.IBowser;
export = def;
}
declare module BowserModule {
export interface IBowserUA {
msie: boolean;
chrome: boolean;
webkit: boolean;
phantom: boolean;
opera: boolean;
safari: boolean;
android: boolean;
ios: boolean;
webos: boolean;
msedge: boolean;
seamonkey: boolean;
firefox: boolean;
yandexbrowser: boolean;
blackberry: boolean;
tablet: boolean;
mobile: boolean;
silk: boolean;
bada: boolean;
tizen: boolean;
windowsphone: boolean;
firefoxos: boolean;
gecko: boolean;
sailfish: boolean;
chromeBook: boolean;
/** Grade A browser */
a: boolean;
/** Grade C browser */
c: boolean;
/** Grade X browser */
x: boolean;
name: string;
version: string|number;
osversion: string|number;
}
export interface IBowser extends IBowserUA {
test(browserList: string[]): boolean;
_detect(ua: string): IBowser;
}
}
// Type definitions for Bowser 1.x
// Project: https://github.com/ded/bowser
// Definitions by: Paulo Cesar <https://github.com/pocesar>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module 'bowser' {
var def: BowserModule.IBowser;
export = def;
}
declare module BowserModule {
export interface IBowserUA {
msie: boolean;
chrome: boolean;
webkit: boolean;
phantom: boolean;
opera: boolean;
safari: boolean;
android: boolean;
ios: boolean;
webos: boolean;
msedge: boolean;
seamonkey: boolean;
firefox: boolean;
yandexbrowser: boolean;
blackberry: boolean;
tablet: boolean;
mobile: boolean;
silk: boolean;
bada: boolean;
tizen: boolean;
windowsphone: boolean;
firefoxos: boolean;
gecko: boolean;
sailfish: boolean;
chromeBook: boolean;
/** Grade A browser */
a: boolean;
/** Grade C browser */
c: boolean;
/** Grade X browser */
x: boolean;
name: string;
version: string|number;
osversion: string|number;
}
export interface IBowser extends IBowserUA {
test(browserList: string[]): boolean;
_detect(ua: string): IBowser;
}
}

View File

@@ -79,9 +79,12 @@ bs.init({
bs.reload();
function browserSyncInit(): browserSync.BrowserSync {
function browserSyncInit() {
var browser = browserSync.create();
browser.init();
console.log(browser.name);
console.log(browserSync.name);
return browser;
}
var browser = browserSyncInit();
browser.exit();

View File

@@ -1,6 +1,6 @@
// Type definitions for browser-sync
// Project: http://www.browsersync.io/
// Definitions by: Asana <https://asana.com>
// Definitions by: Asana <https://asana.com>, Joe Skeen <http://github.com/joeskeen>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../chokidar/chokidar.d.ts"/>
@@ -12,55 +12,280 @@ declare module "browser-sync" {
import http = require("http");
interface Options {
/**
* Browsersync includes a user-interface that is accessed via a separate port. The UI allows to controls
* all devices, push sync updates and much more.
*
* port - Default: 3001
* weinre.port - Default: 8080
* Note: requires at least version 2.0.0
*/
ui?: UIOptions;
/**
* Browsersync can watch your files as you work. Changes you make will either be injected into the page (CSS
* & images) or will cause all browsers to do a full-page refresh. See anymatch for more information on glob
* patterns.
* Default: false
*/
files?: string | string[];
watchOptions?: GazeOptions;
/**
* File watching options that get passed along to Chokidar. Check their docs for available options
* Default: undefined
* Note: requires at least version 2.6.0
*/
watchOptions?: ChokidarOptions;
/**
* Use the built-in static server for basic HTML/JS/CSS websites.
* Default: false
*/
server?: ServerOptions;
proxy?: string | boolean;
/**
* Proxy an EXISTING vhost. Browsersync will wrap your vhost with a proxy URL to view your site.
* target - Default: undefined
* ws - Default: undefined
* middleware - Default: undefined
* reqHeaders - Default: undefined
* proxyRes - Default: undefined
*/
proxy?: string | boolean | ProxyOptions;
/**
* Use a specific port (instead of the one auto-detected by Browsersync)
* Default: 3000
*/
port?: number;
/**
* Add additional directories from which static files should be served.
* Should only be used in proxy or snippet mode.
* Default: []
* Note: requires at least version 2.8.0
*/
serveStatic?: string[];
/**
* Enable https for localhost development.
* Note - this is not needed for proxy option as it will be inferred from your target url.
* Note: requires at least version 1.3.0
*/
https?: boolean;
/**
* Clicks, Scrolls & Form inputs on any device will be mirrored to all others.
* clicks - Default: true
* scroll - Default: true
* forms - Default: true
*/
ghostMode?: GhostOptions | boolean;
/**
* Can be either "info", "debug", "warn", or "silent"
* Default: info
*/
logLevel?: string;
/**
* Change the console logging prefix. Useful if you're creating your own project based on Browsersync
* Default: BS
* Note: requires at least version 1.5.1
*/
logPrefix?: string;
/**
* Whether or not to log connections
* Default: false
*/
logConnections?: boolean;
/**
* Whether or not to log information about changed files
* Default: false
*/
logFileChanges?: boolean;
/**
* Log the snippet to the console when you're in snippet mode (no proxy/server)
* Default: true
* Note: requires at least version 1.5.2
*/
logSnippet?: boolean;
/**
* You can control how the snippet is injected onto each page via a custom regex + function.
* You can also provide patterns for certain urls that should be ignored from the snippet injection.
* Note: requires at least version 2.0.0
*/
snippetOptions?: SnippetOptions;
/**
* Add additional HTML rewriting rules.
* Default: false
* Note: requires at least version 2.4.0
*/
rewriteRules?: boolean | RewriteRules[];
/**
* Tunnel the Browsersync server through a random Public URL
* Default: null
*/
tunnel?: string | boolean;
/**
* Some features of Browsersync (such as xip & tunnel) require an internet connection, but if you're
* working offline, you can reduce start-up time by setting this option to false
*/
online?: boolean;
/**
* Default: true
* Decide which URL to open automatically when Browsersync starts. Defaults to "local" if none set.
* Can be true, local, external, ui, ui-external, tunnel or false
*/
open?: string | boolean;
/**
* The browser(s) to open
* Default: default
*/
browser?: string | string[];
/**
* Requires an internet connection - useful for services such as Typekit as it allows you to configure
* domains such as *.xip.io in your kit settings
* Default: false
*/
xip?: boolean;
/**
* Reload each browser when Browsersync is restarted.
* Default: false
*/
reloadOnRestart?: boolean;
/**
* The small pop-over notifications in the browser are not always needed/wanted.
* Default: true
*/
notify?: boolean;
scrollProportionally?: boolean;
/**
* scrollProportionally: false // Sync viewports to TOP position
* Default: true
*/
scrollProportionally?: boolean
/**
* How often to send scroll events
* Default: 0
*/
scrollThrottle?: number;
/**
* Decide which technique should be used to restore scroll position following a reload.
* Can be window.name or cookie
* Default: 'window.name'
*/
scrollRestoreTechnique?: string;
/**
* Sync the scroll position of any element on the page. Add any amount of CSS selectors
* Default: []
* Note: requires at least version 2.9.0
*/
scrollElements?: string[];
/**
* Default: []
* Note: requires at least version 2.9.0
* Sync the scroll position of any element on the page - where any scrolled element will cause
* all others to match scroll position. This is helpful when a breakpoint alters which element
* is actually scrolling
*/
scrollElementMapping?: string[];
/**
* Time, in milliseconds, to wait before instructing the browser to reload/inject following a file change event
* Default: 0
*/
reloadDelay?: number;
/**
* Restrict the frequency in which browser:reload events can be emitted to connected clients
* Default: 0
* Note: requires at least version 2.6.0
*/
reloadDebounce?: number;
/**
* User provided plugins
* Default: []
* Note: requires at least version 2.6.0
*/
plugins?: any[];
/**
* Whether to inject changes (rather than a page refresh)
* Default: true
*/
injectChanges?: boolean;
/**
* The initial path to load
*/
startPath?: string;
/**
* Whether to minify the client script
* Default: true
*/
minify?: boolean;
/**
* Override host detection if you know the correct IP to use
*/
host?: string;
/**
* Send file-change events to the browser
* Default: true
*/
codeSync?: boolean;
/**
* Append timestamps to injected files
* Default: true
*/
timestamps?: boolean;
/**
* Alter the script path for complete control over where the Browsersync Javascript is served
* from. Whatever you return from this function will be used as the script path.
* Note: requires at least version 1.5.0
*/
scriptPath?: (path: string) => string;
/**
* Configure the Socket.IO path and namespace & domain to avoid collisions.
* path - Default: "/browser-sync/socket.io"
* clientPath - Default: "/browser-sync"
* namespace - Default: "/browser-sync"
* domain - Default: undefined
* port - Default: undefined
* clients.heartbeatTimeout - Default: 5000
* Note: requires at least version 1.6.2
*/
socket?: SocketOptions;
}
interface GazeOptions {
interface Hash<T> {
[path: string]: T;
}
interface ChokidarOptions {
interval?: number;
debounceDelay?: number;
mode?: string;
cwd?: string;
}
interface UIOptions {
/** set the default port */
port?: number;
/** set the default weinre port */
weinre?: {
port?: number;
};
}
interface ServerOptions {
/** set base directory */
baseDir?: string | string[];
/** enable directory listing */
directory?: boolean;
/** set index filename */
index?: string;
routes?: {[path: string]: string};
/**
* key-value object hash, where the key is the url to match,
* and the value is the folder to serve (relative to your working directory)
* */
routes?: Hash<string>;
/** configure custom middleware */
middleware?: MiddlewareHandler[];
}
interface ProxyOptions {
target?: string;
middleware?: MiddlewareHandler;
ws: boolean;
reqHeaders: (config: any) => Hash<any>;
proxyRes: (res: http.ServerResponse, req: http.ServerRequest, next: Function) => any;
}
interface MiddlewareHandler {
(req: http.ServerRequest, res: http.ServerResponse, next: Function): any;
@@ -81,6 +306,9 @@ declare module "browser-sync" {
path?: string;
clientPath?: string;
namespace?: string;
domain?: string;
port?: number;
clients?: { heartbeatTimeout?: number; };
}
interface RewriteRules {
@@ -88,30 +316,99 @@ declare module "browser-sync" {
fn: (match: string) => string;
}
module browserSync {
interface BrowserSync {
init(config?: Options, callback?: (err: Error, bs: Object) => any): void;
reload(): void;
reload(file: string): void;
reload(files: string[]): void;
reload(options: {stream: boolean}): NodeJS.ReadWriteStream;
notify(message: string, timeout?: number): void;
exit(): void;
watch(patterns: string, opts?: chokidar.WatchOptions, fn?: (event: string, file: fs.Stats) => any): NodeJS.EventEmitter;
pause(): void;
resume(): void;
emitter: NodeJS.EventEmitter;
active: boolean;
paused: boolean;
}
interface BrowserSyncStatic extends BrowserSyncInstance {
/**
* Start the Browsersync service. This will launch a server, proxy or start the snippet mode
* depending on your use-case.
*/
(config?: Options, callback?: (err: Error, bs: Object) => any): BrowserSyncInstance;
/**
* Create a Browsersync instance
* @param name an identifier that can used for retrieval later
*/
create(name?: string): BrowserSyncInstance;
/**
* Get a single instance by name. This is useful if you have your build scripts in separate files
* @param name the identifier used for retrieval
*/
get(name: string): BrowserSyncInstance;
}
interface Exports extends browserSync.BrowserSync {
create(): browserSync.BrowserSync;
(config?: Options, callback?: (err: Error, bs: Object) => any): void;
interface BrowserSyncInstance {
/** the name of this instance of browser-sync */
name: string;
/**
* Start the Browsersync service. This will launch a server, proxy or start the snippet mode
* depending on your use-case.
*/
init(config?: Options, callback?: (err: Error, bs: Object) => any): BrowserSyncInstance;
/**
* Reload the browser
* The reload method will inform all browsers about changed files and will either cause the browser
* to refresh, or inject the files where possible.
*/
reload(): void;
/**
* Reload a single file
* The reload method will inform all browsers about changed files and will either cause the browser
* to refresh, or inject the files where possible.
*/
reload(file: string): void;
/**
* Reload multiple files
* The reload method will inform all browsers about changed files and will either cause the browser
* to refresh, or inject the files where possible.
*/
reload(files: string[]): void;
/**
* The reload method will inform all browsers about changed files and will either cause the browser
* to refresh, or inject the files where possible.
*/
reload(options: {stream: boolean}): NodeJS.ReadWriteStream;
/**
* The stream method returns a transform stream and can act once or on many files.
* @param opts Configuration for the stream method
*/
stream(opts: {once: boolean}): NodeJS.ReadWriteStream;
/**
* Helper method for browser notifications
* @param message Can be a simple message such as 'Connected' or HTML
* @param timeout How long the message will remain in the browser. @since 1.3.0
*/
notify(message: string, timeout?: number): void;
/**
* This method will close any running server, stop file watching & exit the current process.
*/
exit(): void;
/**
* Stand alone file-watcher. Use this along with Browsersync to create your own, minimal build system
*/
watch(patterns: string, opts?: chokidar.WatchOptions, fn?: (event: string, file: fs.Stats) => any)
: NodeJS.EventEmitter;
/**
* Method to pause file change events
*/
pause(): void;
/**
* Method to resume paused watchers
*/
resume(): void;
/**
* The internal Event Emitter used by the running Browsersync instance (if there is one). You can use
* this to emit your own events, such as changed files, logging etc.
*/
emitter: NodeJS.EventEmitter;
/**
* A simple true/false flag that you can use to determine if there's a currently-running Browsersync instance.
*/
active: boolean;
/**
* A simple true/false flag to determine if the current instance is paused
*/
paused: boolean;
}
var browserSync: Exports;
const browserSync: BrowserSyncStatic;
export = browserSync;
}

2536
c3/c3-tests.ts Normal file

File diff suppressed because it is too large Load Diff

1069
c3/c3.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -305,4 +305,4 @@ declare module "chai" {
interface Object {
should: Chai.Assertion;
}
}

776
chai/chai.d.ts vendored
View File

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

View File

@@ -34,3 +34,6 @@ chance.mixin({
});
var timeString: string = chance.time();
var chanceConstructedWithSeed100 = new Chance(100);
var chanceCalledWithSeed100 = Chance()

10
chance/chance.d.ts vendored
View File

@@ -5,7 +5,10 @@
declare module Chance {
interface ChanceStatic {
Chance(): Chance;
(): Chance
(seed: number): Chance
(generator: () => any): Chance
new(): Chance;
new(seed: number): Chance;
new(generator: () => any): Chance;
@@ -209,5 +212,10 @@ declare var Chance: Chance.ChanceStatic;
// import Chance = require('chance');
declare module 'chance' {
interface ExportedChance extends Chance.ChanceStatic {
Chance: ExportedChance;
}
var Chance: ExportedChance;
export = Chance;
}

6518
chrome/chrome.d.ts vendored

File diff suppressed because it is too large Load Diff

View File

@@ -64,6 +64,7 @@ declare module CKEDITOR {
var status: string;
var timestamp: string;
var version: string;
var config: config;
// Methods
@@ -556,6 +557,7 @@ declare module CKEDITOR {
}
interface config {
contentsCss?: string | string[];
startupMode?: string;
removeButtons?: string;
removePlugins?: string;
@@ -576,6 +578,7 @@ declare module CKEDITOR {
height?: string | number;
toolbarLocation?: string;
readOnly?: boolean;
customConfig?: string;
}

View File

@@ -0,0 +1,17 @@
/// <reference path="closure-compiler.d.ts"/>
import {compile} from 'closure-compiler';
compile('some.source()', {'check-only': null},
(err: Error, stdout: string, stderr: string): void => {
console.log('Got', err, 'stdout', stdout, 'stderr', stderr);
});
// No options, Callback wins.
compile('some.source()', (err: Error, stdout: string, stderr: string): void => {
console.log('Got', err, 'stdout', stdout, 'stderr', stderr);
});
compile(null, {'js': ['a/f.js', 'a/f2.js'], 'check-only': null},
(err: Error, stdout: string, stderr: string): void => {
console.log('Got', err, 'stdout', stdout, 'stderr', stderr);
});

11
closure-compiler/closure-compiler.d.ts vendored Normal file
View File

@@ -0,0 +1,11 @@
// Type definitions for closure-compiler
// Project: https://github.com/tim-smart/node-closure/
// Definitions by: Martin Probst <https://github.com/mprobst>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module 'closure-compiler' {
type Callback = (err: Error, stdout: string, stderr: string) => any;
function compile(src: string, callback: Callback): void;
function compile(src: string, options: {[k: string]: string | string[]},
callback: Callback): void;
}

View File

@@ -155,7 +155,7 @@ declare module commander {
* @return {Command} for chaining
* @api public
*/
option(flags:string, description?:string, fn?:(arg1:any, arg2:any)=>void, defaultValue?:any):ICommand;
option(flags:string, description?:string, fn?:((arg1:any, arg2:any)=>void)|RegExp, defaultValue?:any):ICommand;
option(flags:string, description?:string, defaultValue?:any):ICommand;
/**

View File

@@ -0,0 +1,69 @@
/// <reference path="./connect-livereload.d.ts" />
import * as connect from "connect";
import * as livereload from "connect-livereload";
const app = connect();
// With no options
app.use(livereload());
// With string options
app.use(livereload({
port: 35729,
ignore: [".js", ".svg"]
}));
// With RegExp options
app.use(livereload({
port: 35729,
ignore: [/\.js(\?.*)?$/, /\.css(\?.*)?$/]
}));
// With default options
app.use(livereload({
ignore: [
/\.js(\?.*)?$/, /\.css(\?.*)?$/, /\.svg(\?.*)?$/, /\.ico(\?.*)?$/, /\.woff(\?.*)?$/,
/\.png(\?.*)?$/, /\.jpg(\?.*)?$/, /\.jpeg(\?.*)?$/, /\.gif(\?.*)?$/, /\.pdf(\?.*)?$/
],
// include all urls by default
include: [/.*/],
// this function is used to determine if the content of `res.write` or `res.end` is html.
html: function (str) {
if (!str) return false;
return /<[:_-\w\s\!\/\=\"\']+>/i.test(str);
},
// rules are provided to find the place where the snippet should be inserted.
// the main problem is that on the server side it can be tricky to determine if a string will be valid html on the client.
// the function `fn` of the first `match` is executed like this `body.replace(rule.match, rule.fn);`
// the function `fn` has got the arguments `fn(w, s)` where `w` is the matches string and `s` is the snippet.
rules: [{
match: /<\/body>(?![\s\S]*<\/body>)/i,
fn: prepend
}, {
match: /<\/html>(?![\s\S]*<\/html>)/i,
fn: prepend
}, {
match: /<\!DOCTYPE.+?>/i,
fn: append
}],
// port where the script is loaded
port: 35729,
// location where the script is provided (not by connect-livereload). Change this e.g. when serving livereload with a proxy.
src: "http://localhost:35729/livereload.js?snipver=1",
// Set this option to `true` to set `req.headers['accept-encoding']` to 'identity' (disabling compression)
disableCompression: false
}));
function prepend(w: string, s: string): string {
return s + w;
}
function append(w: string, s: string): string {
return w + s;
}

View File

@@ -0,0 +1,38 @@
// Type definitions for connect-livereload v0.5.3
// Project: https://github.com/intesso/connect-livereload
// Definitions by: Maxime LUCE <https://github.com/SomaticIT/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../connect/connect.d.ts" />
declare module "connect-livereload" {
import { HandleFunction } from "connect";
function livereload(): HandleFunction;
function livereload(options: livereload.Options): HandleFunction;
module livereload {
export type FileMatcher = string | RegExp;
export interface Rule {
match: RegExp;
fn: (w: string, s: string) => string;
}
export interface Options {
ignore?: FileMatcher[];
excludeList?: FileMatcher[];
include?: FileMatcher[];
html?: (val: string) => boolean;
rules?: Rule[];
disableCompression?: boolean;
hostname?: string;
port?: number;
src?: string;
}
}
export = livereload;
}

32
connect/connect-tests.ts Normal file
View File

@@ -0,0 +1,32 @@
/// <reference path="./connect.d.ts" />
import * as http from "http";
import * as connect from "connect";
const app = connect();
// log all requests
app.use((req: http.IncomingMessage, res: http.ServerResponse, next: Function) => {
console.log(req, res);
next();
});
// Stop on errors
app.use((err: Error, req: http.IncomingMessage, res: http.ServerResponse, next: Function) => {
if (err) {
return res.end(`Error: ${err}`);
}
next();
});
// respond to all requests
app.use((req: http.IncomingMessage, res: http.ServerResponse) => {
res.end("Hello from Connect!\n");
});
//create node.js http server and listen on port
http.createServer(app).listen(3000);
//create node.js http server and listen on port using connect shortcut
app.listen(3000);

92
connect/connect.d.ts vendored Normal file
View File

@@ -0,0 +1,92 @@
// Type definitions for connect v3.4.0
// Project: https://github.com/senchalabs/connect
// Definitions by: Maxime LUCE <https://github.com/SomaticIT/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module "connect" {
import * as http from "http";
/**
* Create a new connect server.
* @public
*/
function createServer(): createServer.Server;
module createServer {
export type ServerHandle = HandleFunction | http.Server;
export type SimpleHandleFunction = (req: http.IncomingMessage, res: http.ServerResponse) => void;
export type NextHandleFunction = (req: http.IncomingMessage, res: http.ServerResponse, next: Function) => void;
export type ErrorHandleFunction = (err: Error, req: http.IncomingMessage, res: http.ServerResponse, next: Function) => void;
export type HandleFunction = SimpleHandleFunction | NextHandleFunction | ErrorHandleFunction;
export interface ServerStackItem {
route: string;
handle: ServerHandle;
}
export interface Server extends NodeJS.EventEmitter {
(req: http.IncomingMessage, res: http.ServerResponse, next?: Function): void;
route: string;
stack: ServerStackItem[];
/**
* Utilize the given middleware `handle` to the given `route`,
* defaulting to _/_. This "route" is the mount-point for the
* middleware, when given a value other than _/_ the middleware
* is only effective when that segment is present in the request's
* pathname.
*
* For example if we were to mount a function at _/admin_, it would
* be invoked on _/admin_, and _/admin/settings_, however it would
* not be invoked for _/_, or _/posts_.
*
* @public
*/
use(fn: HandleFunction): Server;
use(route: string, fn: HandleFunction): Server;
/**
* Handle server requests, punting them down
* the middleware stack.
*
* @private
*/
handle(req: http.IncomingMessage, res: http.ServerResponse, next: Function): void;
/**
* Listen for connections.
*
* This method takes the same arguments
* as node's `http.Server#listen()`.
*
* HTTP and HTTPS:
*
* If you run your application both as HTTP
* and HTTPS you may wrap them individually,
* since your Connect "server" is really just
* a JavaScript `Function`.
*
* var connect = require('connect')
* , http = require('http')
* , https = require('https');
*
* var app = connect();
*
* http.createServer(app).listen(80);
* https.createServer(options, app).listen(443);
*
* @api public
*/
listen(port: number, hostname?: string, backlog?: number, callback?: Function): http.Server;
listen(port: number, hostname?: string, callback?: Function): http.Server;
listen(path: string, callback?: Function): http.Server;
listen(handle: any, listeningListener?: Function): http.Server;
}
}
export = createServer;
}

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