mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-26 11:12:19 +08:00
Merge pull request #6 from borisyankov/master
Merge borisyankov:master into Asana:master
This commit is contained in:
+54
-8
@@ -9,6 +9,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](alertify/alertify.d.ts) [alertify](http://fabien-d.github.io/alertify.js) by [John Jeffery](http://github.com/jjeffery)
|
||||
* [:link:](amcharts/AmCharts.d.ts) [amCharts](http://www.amcharts.com) by [aleksey-bykov](https://github.com/aleksey-bykov)
|
||||
* [:link:](amplifyjs/amplifyjs.d.ts) [AmplifyJs](http://amplifyjs.com) by [Jonas Eriksson](https://github.com/joeriks)
|
||||
* [:link:](amqp-rpc/amqp-rpc.d.ts) [amqp-rpc](https://github.com/demchenkoe/node-amqp-rpc) by [Wonshik Kim](https://github.com/wokim)
|
||||
* [:link:](angular-file-upload/angular-file-upload.d.ts) [Angular File Upload](https://github.com/danialfarid/angular-file-upload) by [John Reilly](https://github.com/johnnyreilly)
|
||||
* [:link:](angularjs/angular.d.ts) [Angular JS](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar)
|
||||
* [:link:](angularjs/angular-animate.d.ts) [Angular JS (ngAnimate module)](http://angularjs.org) by [Michel Salib](https://github.com/michelsalib), [Adi Dahiya](https://github.com/adidahiya)
|
||||
@@ -19,13 +20,15 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](angularjs/angular-sanitize.d.ts) [Angular JS (ngSanitize module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar)
|
||||
* [:link:](angular-ui/angular-ui-router.d.ts) [Angular JS (ui.router module)](https://github.com/angular-ui/ui-router) by [Michel Salib](https://github.com/michelsalib)
|
||||
* [:link:](angular-protractor/angular-protractor.d.ts) [Angular Protractor](https://github.com/angular/protractor) by [Bill Armstrong](https://github.com/BillArmstrong)
|
||||
* [:link:](angularjs/angular-scenario.d.ts) [Angular Scenario Testing (ngScenario module)](http://angularjs.org) by [RomanoLindano](https://github.com/RomanoLindano)
|
||||
* [:link:](angular-scenario/angular-scenario.d.ts) [Angular Scenario Testing (ngScenario module)](http://angularjs.org) by [RomanoLindano](https://github.com/RomanoLindano)
|
||||
* [:link:](angular-translate/angular-translate.d.ts) [Angular Translate (pascalprecht.translate module)](https://github.com/PascalPrecht/angular-translate) by [Michel Salib](https://github.com/michelsalib)
|
||||
* [:link:](angular-ui-bootstrap/angular-ui-bootstrap.d.ts) [Angular UI Bootstrap](https://github.com/angular-ui/bootstrap) by [Brian Surowiec](https://github.com/xt0rted)
|
||||
* [:link:](angular-bootstrap-lightbox/angular-bootstrap-lightbox.d.ts) [angular-bootstrap-lightbox](https://github.com/compact/angular-bootstrap-lightbox) by [Roland Zwaga](https://github.com/rolandzwaga)
|
||||
* [:link:](angular-hotkeys/angular-hotkeys.d.ts) [angular-hotkeys](https://github.com/chieffancypants/angular-hotkeys) by [Jason Zhao](https://github.com/jlz27)
|
||||
* [:link:](angular-http-auth/angular-http-auth.d.ts) [angular-http-auth](https://github.com/witoldsz/angular-http-auth) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](angular-local-storage/angular-local-storage.d.ts) [angular-local-storage](https://github.com/grevory/angular-local-storage) by [Ken Fukuyama](https://github.com/kenfdev)
|
||||
* [:link:](angular-notify/angular-notify.d.ts) [angular-notify](https://github.com/cgross/angular-notify) by [Suwato](https://github.com/Suwato/DefinitelyTyped)
|
||||
* [:link:](angular-scroll/angular-scroll.d.ts) [angular-scroll](https://github.com/oblador/angular-scroll) by [Sam Herrmann](https://github.com/samherrmann)
|
||||
* [:link:](angular-spinner/angular-spinner.d.ts) [angular-spinner.js](https://github.com/urish/angular-spinner) by [Marcin Biegała](https://github.com/Biegal)
|
||||
* [:link:](angular-agility/angular-agility.d.ts) [AngularAgility](https://github.com/AngularAgility/AngularAgility) by [Roland Zwaga](https://github.com/rolandzwaga)
|
||||
* [:link:](angularfire/angularfire.d.ts) [AngularFire](http://angularfire.com) by [Dénes Harmath](http://github.com/thSoft)
|
||||
@@ -37,9 +40,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](appframework/appframework.d.ts) [AppFramework](http://app-framework-software.intel.com) by [kyo_ago](https://github.com/kyo-ago)
|
||||
* [:link:](arbiter/Arbiter.d.ts) [Arbiter.js](http://arbiterjs.com) by [Arash Shakery](https://github.com/arash16)
|
||||
* [:link:](asciify/asciify.d.ts) [asciify](https://www.npmjs.org/package/asciify) by [Alan Norbauer](http://alan.norbauer.com)
|
||||
* [:link:](aspnet-identity-pw/aspnet-identity-pw.d.ts) [aspnet-identity-pw](https://github.com/Syncbak-Git/aspnet-identity-pw) by [jt000](https://github.com/jt000)
|
||||
* [:link:](assert/assert.d.ts) [assert and power-assert](https://github.com/Jxck/assert) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](assertion-error/assertion-error.d.ts) [assertion-error](https://github.com/chaijs/assertion-error) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](async/async.d.ts) [Async](https://github.com/caolan/async) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](asyncblock/asyncblock.d.ts) [asyncblock](https://github.com/scriby/asyncblock) by [Hiroki Horiuchi](https://github.com/horiuchi)
|
||||
* [:link:](atmosphere/atmosphere.d.ts) [Atmosphere](https://github.com/Atmosphere/atmosphere-javascript) by [Kai Toedter](https://github.com/toedter)
|
||||
* [:link:](atom/atom.d.ts) [Atom](https://atom.io) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](atpl/atpl.d.ts) [atpl](https://github.com/soywiz/atpl.js) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
@@ -49,6 +54,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](node-azure/azure.d.ts) [Azure SDK for Node](https://github.com/WindowsAzure/azure-sdk-for-node) by [Andrew Gaspar](https://github.com/AndrewGaspar), [Anti Veeranna](https://github.com/antiveeranna), [Maxime LUCE](https://github.com/SomaticIT)
|
||||
* [:link:](backbone/backbone.d.ts) [Backbone](http://backbonejs.org) by [Boris Yankov](https://github.com/borisyankov), [Natan Vivo](https://github.com/nvivo)
|
||||
* [:link:](backbone-relational/backbone-relational.d.ts) [Backbone-relational](http://backbonerelational.org) by [Eirik Hoem](https://github.com/eirikhm)
|
||||
* [:link:](backbone.radio/backbone.radio.d.ts) [Backbone.Radio](https://github.com/marionettejs/backbone.radio) by [Peter Palotas](https://github.com/alphaleonis)
|
||||
* [:link:](backgrid/backgrid.d.ts) [Backgrid](http://backgridjs.com) by [Jeremy Lujan](https://github.com/jlujan)
|
||||
* [:link:](bcrypt/bcrypt.d.ts) [bcrypt](https://www.npmjs.org/package/bcrypt) by [Peter Harris](https://github.com/codeanimal)
|
||||
* [:link:](bgiframe/typescript.bgiframe.d.ts) [bgiframe](https://github.com/sumegizoltan/BgiFrame) by [Zoltan Sumegi](https://github.com/sumegizoltan)
|
||||
@@ -78,13 +84,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](canvasjs/canvasjs.d.ts) [CanvasJS](http://canvasjs.com) by [Mark Overholt](https://github.com/mover5)
|
||||
* [:link:](casperjs/casperjs.d.ts) [CasperJS](http://casperjs.org) by [Jed Mao](https://github.com/jedmao)
|
||||
* [:link:](chai/chai.d.ts) [chai](http://chaijs.com) by [Jed Hunsaker](https://github.com/jedhunsaker), [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](chai-as-promised/chai-as-promised.d.ts) [chai-as-promised](https://github.com/domenic/chai-as-promised) by [jt000](https://github.com/jt000)
|
||||
* [:link:](chai-datetime/chai-datetime.d.ts) [chai-datetime](https://github.com/gaslight/chai-datetime.git) by [Cliff Burger](https://github.com/cliffburger)
|
||||
* [:link:](chai-fuzzy/chai-fuzzy.d.ts) [chai-fuzzy](http://chaijs.com/plugins/chai-fuzzy) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](chai-http/chai-http.d.ts) [chai-http](https://github.com/chaijs/chai-http) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](chai-jquery/chai-jquery.d.ts) [chai-jquery](https://github.com/chaijs/chai-jquery) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid)
|
||||
* [:link:](chalk/chalk.d.ts) [chalk](https://github.com/sindresorhus/chalk) by [Diullei Gomes](https://github.com/Diullei), [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](change-case/change-case.d.ts) [change-case](https://github.com/blakeembrey/change-case) by [Asana](https://asana.com)
|
||||
* [:link:](chartjs/chart.d.ts) [Chart.js](https://github.com/nnnick/Chart.js) by [Steve Fenton](https://github.com/Steve-Fenton)
|
||||
* [:link:](devextreme/dx.chartjs.d.ts) [ChartJS](http://js.devexpress.com/WebDevelopment/Charts) by [DevExpress Inc.](http://devexpress.com)
|
||||
* [:link:](checksum/checksum.d.ts) [checksum](https://github.com/dshaw/checksum) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](cheerio/cheerio.d.ts) [Cheerio](https://github.com/cheeriojs/cheerio) by [Bret Little](https://github.com/blittle), [VILIC VANE](http://vilic.info), [Wayne Maurer](https://github.com/wmaurer)
|
||||
* [:link:](chosen/chosen.jquery.d.ts) [Chosen.JQuery](http://harvesthq.github.com/chosen) by [Boris Yankov](https://github.com/borisyankov)
|
||||
@@ -125,8 +132,10 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](deep-diff/deep-diff.d.ts) [deep-diff](https://github.com/flitbit/diff) by [ZauberNerd](https://github.com/ZauberNerd)
|
||||
* [:link:](deep-freeze/deep-freeze.d.ts) [deep-freeze](https://github.com/substack/deep-freeze) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](detect-indent/detect-indent.d.ts) [detect-indent](https://github.com/sindresorhus/detect-indent) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](devextreme/dx.devextreme.d.ts) [DevExtreme](http://js.devexpress.com) by [DevExpress Inc.](http://devexpress.com)
|
||||
* [:link:](dhtmlxgantt/dhtmlxgantt.d.ts) [dhtmlxGantt](http://dhtmlx.com/docs/products/dhtmlxGantt) by [Maksim Kozhukh](http://github.com/mkozhukh)
|
||||
* [:link:](dhtmlxscheduler/dhtmlxscheduler.d.ts) [dhtmlxScheduler](http://dhtmlx.com/docs/products/dhtmlxScheduler) by [Maksim Kozhukh](http://github.com/mkozhukh)
|
||||
* [:link:](di-lite/di-lite.d.ts) [di-lite](https://github.com/NickQiZhu/di.js) by [Timothy Morris](https://github.com/dcrusader)
|
||||
* [:link:](diff/diff.d.ts) [diff](https://github.com/kpdecker/jsdiff) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](docCookies/docCookies.d.ts) [docCookies](https://developer.mozilla.org/en-US/docs/Web/API/document.cookie) by [Jon Egerton](https://github.com/jonegerton)
|
||||
* [:link:](dock-spawn/dock-spawn.d.ts) [Dock Spawn](http://dockspawn.com) by [Drew Noakes](https://drewnoakes.com)
|
||||
@@ -135,13 +144,16 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](domready/domready.d.ts) [domready](https://github.com/ded/domready) by [Christian Holm Nielsen](https://github.com/dotnetnerd)
|
||||
* [:link:](dot/dot.d.ts) [doT](https://github.com/olado/doT) by [ZombieHunter](https://github.com/ZombieHunter)
|
||||
* [:link:](dotdotdot/dotdotdot.d.ts) [dotdotdot](http://dotdotdot.frebsite.nl) by [Milan Jaros](https://github.com/milanjaros)
|
||||
* [:link:](doublearray/doublearray.d.ts) [doublearray](https://github.com/takuyaa/doublearray) by [MIZUSHIMA Junki](https://github.com/mzsm)
|
||||
* [:link:](dropboxjs/dropboxjs.d.ts) [dropbox-js](https://github.com/dropbox/dropbox-js) by [Steve Fenton](https://github.com/Steve-Fenton), [Pedro Casaubon](https://github.com/xperiments)
|
||||
* [:link:](dropzone/dropzone.d.ts) [Dropzone](http://www.dropzonejs.com) by [Natan Vivo](https://github.com/nvivo)
|
||||
* [:link:](durandal/durandal.d.ts) [Durandal](http://durandaljs.com) by [Blue Spire](https://github.com/BlueSpire)
|
||||
* [:link:](easeljs/easeljs.d.ts) [EaselJS](http://www.createjs.com/#!/EaselJS) by [Pedro Ferreira](https://bitbucket.org/drk4), [Chris Smith](https://github.com/evilangelist)
|
||||
* [: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:](easystarjs/easystarjs.d.ts) [EasyStar.js](http://easystarjs.com) by [Magnus Gustafsson](https://github.com/borundin)
|
||||
* [:link:](ejs-locals/ejs-locals.d.ts) [ejs-locals](https://github.com/randometc/ejs-locals) by [jt000](https://github.com/jt000)
|
||||
* [:link:](jquery.elang/jquery.elang.d.ts) [eLang](https://github.com/sumegizoltan/ELang) by [Zoltan Sumegi](https://github.com/sumegizoltan)
|
||||
* [:link:](element-resize-event/element-resize-event.d.ts) [element-resize-event](https://github.com/KyleAMathews/element-resize-event) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](elm/elm.d.ts) [Elm](http://elm-lang.org) by [Dénes Harmath](https://github.com/thSoft)
|
||||
* [:link:](ember/ember.d.ts) [Ember.js](http://emberjs.com) by [Jed Mao](https://github.com/jedmao)
|
||||
* [:link:](emissary/emissary.d.ts) [emissary](https://github.com/atom/emissary) by [vvakame](https://github.com/vvakame)
|
||||
@@ -158,6 +170,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](express/express.d.ts) [Express 4.x](http://expressjs.com) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](express-jwt/express-jwt.d.ts) [express-jwt](https://www.npmjs.org/package/express-jwt) by [Wonshik Kim](https://github.com/wokim)
|
||||
* [:link:](express-myconnection/express-myconnection.d.ts) [express-myconnection](https://www.npmjs.org/package/express-myconnection) by [Michael Ferris](https://github.com/Cellule)
|
||||
* [:link:](express-partials/express-partials.d.ts) [express-partials](https://github.com/publicclass/express-partials) by [jt000](https://github.com/jt000)
|
||||
* [:link:](express-session/express-session.d.ts) [express-session](https://www.npmjs.org/package/express-session) by [Hiroki Horiuchi](https://github.com/horiuchi)
|
||||
* [: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)
|
||||
@@ -165,6 +178,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](fabricjs/fabricjs.d.ts) [FabricJS](http://fabricjs.com) by [Oliver Klemencic](https://github.com/oklemencic)
|
||||
* [:link:](fbsdk/fbsdk.d.ts) [Facebook Javascript SDK](https://developers.facebook.com/docs/javascript) by [Joshua Strobl](https://github.com/JoshStrobl)
|
||||
* [:link:](fancybox/fancybox.d.ts) [fancyBox](https://github.com/fancyapps/fancyBox) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](fast-stats/fast-stats.d.ts) [fast-stats](https://github.com/bluesmoon/node-faststats) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](fastclick/fastclick.d.ts) [FastClick](https://github.com/ftlabs/fastclick) by [Shinnosuke Watanabe](https://github.com/shinnn)
|
||||
* [:link:](fibers/fibers.d.ts) [fibers](https://github.com/laverdet/node-fibers) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
* [:link:](filewriter/filewriter.d.ts) [File API: Writer](http://www.w3.org/TR/file-writer-api) by [Kon](http://phyzkit.net)
|
||||
@@ -182,6 +196,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](flux/flux.d.ts) [Flux](http://facebook.github.io/flux) by [Steve Baker](https://github.com/stkb)
|
||||
* [:link:](ion.rangeSlider/ion.rangeSlider.d.ts) [for Ion.RangeSlider](https://github.com/IonDen/ion.rangeSlider) by [Sixin Li](https://github.com/sixinli)
|
||||
* [:link:](form-data/form-data.d.ts) [form-data](https://github.com/felixge/node-form-data) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
* [:link:](formidable/formidable.d.ts) [Formidable](https://github.com/felixge/node-formidable) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [: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:](from/from.d.ts) [from](https://github.com/dominictarr/from) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
@@ -204,8 +219,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](google.analytics/ga.d.ts) [Google Analytics (Classic and Universal)](https://developers.google.com/analytics/devguides/collection/gajs) by [Ronnie Haakon Hegelund](http://ronniehegelund.blogspot.dk), [Pat Kujawa](http://patkujawa.com)
|
||||
* [:link:](gapi/gapi.d.ts) [Google API Client](https://code.google.com/p/google-api-javascript-client) by [Frank M](https://github.com/sgtfrankieboy)
|
||||
* [:link:](google.feeds/google.feed.api.d.ts) [Google Feed Apis](https://developers.google.com/feed) by [RodneyJT](https://github.com/RodneyJT)
|
||||
* [:link:](googlemaps/google.maps.d.ts) [Google Geolocation](https://developers.google.com/maps) by [Folia A/S](http://www.folia.dk)
|
||||
* [:link:](google.geolocation/google.geolocation.d.ts) [Google Geolocation](https://code.google.com/p/geo-location-javascript) by [Vincent Bortone](https://github.com/vbortone)
|
||||
* [:link:](googlemaps/google.maps.d.ts) [Google Geolocation](https://developers.google.com/maps) by [Folia A/S](http://www.folia.dk)
|
||||
* [:link:](gapi.pagespeedonline/gapi.pagespeedonline.d.ts) [Google Page Speed Online Api](https://developers.google.com/speed/pagespeed) by [Frank M](https://github.com/sgtfrankieboy)
|
||||
* [:link:](recaptcha/recaptcha.d.ts) [Google Recaptcha](https://www.google.com/recaptcha) by [Brent Jenkins](https://github.com/brentj73)
|
||||
* [:link:](gapi.translate/gapi.translate.d.ts) [Google Translate API](https://developers.google.com/translate) by [Frank M](https://github.com/sgtfrankieboy)
|
||||
@@ -240,6 +255,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](i18next/i18next.d.ts) [i18next](http://i18next.com) by [Maarten Docter](https://github.com/mdocter)
|
||||
* [: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)
|
||||
* [:link:](imap/imap.d.ts) [imap](https://www.npmjs.com/package/imap) by [Peter Snider](https://github.com/psnider)
|
||||
* [:link:](impress/impress.d.ts) [Impress.js](https://github.com/bartaz/impress.js) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](inflection/inflection.d.ts) [inflection](https://github.com/dreamerslab/node.inflection) by [Shogo Iwano](https://github.com/shiwano)
|
||||
* [:link:](insight/insight.d.ts) [insight](https://github.com/yeoman/insight) by [vvakame](http://github.com/vvakame)
|
||||
@@ -260,6 +276,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](jasmine-matchers/jasmine-matchers.d.ts) [jasmine-matchers](https://github.com/uxebu/jasmine-matchers) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](jdataview/jdataview.d.ts) [jDataView](https://github.com/jDataView/jDataView) by [Ingvar Stepanyan](https://github.com/RReverser)
|
||||
* [:link:](jest/jest.d.ts) [Jest](http://facebook.github.io/jest) by [Asana](https://asana.com)
|
||||
* [:link:](jjv/jjv.d.ts) [JJV](https://github.com/acornejo/jjv) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](jjve/jjve.d.ts) [JJVE](https://github.com/silas/jjve) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](joi/joi.d.ts) [joi](https://github.com/spumko/joi) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](jointjs/jointjs.d.ts) [Joint JS](http://www.jointjs.com) by [Aidan Reel](http://github.com/areel), [David Durman](http://github.com/DavidDurman)
|
||||
* [:link:](jqrangeslider/jqrangeslider.d.ts) [jQRangeSlider](http://ghusse.github.com/jQRangeSlider) by [Dániel Tar](https://github.com/qcz)
|
||||
@@ -301,6 +319,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](jquery.customSelect/jquery.customSelect.d.ts) [jquery.customSelect.js](http://adam.co/lab/jquery/customselect/) by [adamcoulombe](https://github.com/adamcoulombe)
|
||||
* [:link:](jquery.cycle/jquery.cycle.d.ts) [jQuery.cycle.js](http://jquery.malsup.com/cycle) by [François Guillot](http://fguillot.developpez.com)
|
||||
* [:link:](jquery.dynatree/jquery.dynatree.d.ts) [jquery.dynatree](http://code.google.com/p/dynatree) by [François de Campredon](https://github.com/fdecampredon)
|
||||
* [:link:](jquery.fancytree/jquery.fancytree.d.ts) [jquery.fancytree](https://github.com/mar10/fancytree) by [Peter Palotas](https://github.com/alphaleonis)
|
||||
* [:link:](jquery.finger/jquery.finger.d.ts) [jquery.finger.js](http://ngryman.sh/jquery.finger) by [Max Ackley](https://github.com/maxackley)
|
||||
* [:link:](jquery.form/jquery.form.d.ts) [jQuery.form.js 3.26.0](http://malsup.com/jquery/form) by [François Guillot](http://fguillot.developpez.com)
|
||||
* [:link:](jquery.gridster/gridster.d.ts) [jQuery.gridster](https://github.com/jbaldwin/gridster) by [Josh Baldwin](https://github.com/jbaldwin)
|
||||
@@ -318,6 +337,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [: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)
|
||||
* [:link:](jquery.timeago/jquery.timeago.d.ts) [jQuery.timeago.js](http://timeago.yarp.com) by [François Guillot](http://fguillot.developpez.com)
|
||||
* [:link:](jquery.tipsy/jquery.tipsy.d.ts) [jQuery.tipsy](http://onehackoranother.com/projects/jquery/tipsy) by [Brian Dukes](https://github.com/bdukes)
|
||||
* [:link:](jquery.transit/jquery.transit.d.ts) [jQuery.transit.js](http://ricostacruz.com/jquery.transit) by [MrBigDog2U](https://github.com/MrBigDog2U)
|
||||
* [:link:](jquery.validation/jquery.validation.d.ts) [jquery.validation](http://jqueryvalidation.org) by [François de Campredon](https://github.com/fdecampredon), [Johj Reilly](https://github.com/johnnyreilly)
|
||||
* [:link:](jquery.timer/jquery.timer.d.ts) [jQueryTimer](https://github.com/jchavannes/jquery-timer) by [Joshua Strobl](https://github.com/JoshStrobl)
|
||||
@@ -330,6 +350,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](jsbn/jsbn.d.ts) [jsbn](http://www-cs-students.stanford.edu/%7Etjw/jsbn) by [Eugene Chernyshov](https://github.com/Evgenus)
|
||||
* [:link:](jscrollpane/jscrollpane.d.ts) [jScrollPane](http://jscrollpane.kelvinluck.com) by [Dániel Tar](https://github.com/qcz)
|
||||
* [:link:](jsdeferred/jsdeferred.d.ts) [JSDeferred](https://github.com/cho45/jsdeferred) by [Daisuke Mino](https://github.com/minodisk)
|
||||
* [:link:](jsdom/jsdom.d.ts) [jsdom](https://github.com/tmpvar/jsdom) by [Asana](https://asana.com)
|
||||
* [:link:](jsesc/jsesc.d.ts) [jsesc](https://github.com/mathiasbynens/jsesc) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](jsfl/jsfl.d.ts) [JSFL](https://adobe.com) by [soywiz](https://github.com/soywiz)
|
||||
* [:link:](jshamcrest/jshamcrest.d.ts) [JsHamcrest](https://github.com/danielfm/jshamcrest) by [David Harkness](https://github.com/dharkness)
|
||||
@@ -368,6 +389,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](knockstrap/knockstrap.d.ts) [Knockstrap](http://faulknercs.github.io/Knockstrap) by [Adam Pluciński](https://github.com/adaskothebeast)
|
||||
* [:link:](knockout.kogrid/ko-grid.d.ts) [ko-grid](http://knockout-contrib.github.io/KoGrid) by [huer12](https://github.com/huer12)
|
||||
* [:link:](kolite/kolite.d.ts) [KoLite](https://github.com/CodeSeven/kolite) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](kuromoji/kuromoji.d.ts) [kuromoji.js](https://github.com/takuyaa/kuromoji.js) by [MIZUSHIMA Junki](https://github.com/mzsm)
|
||||
* [:link:](ladda/ladda.d.ts) [Ladda](https://github.com/hakimel/Ladda) by [Danil Flores](https://github.com/dflor003)
|
||||
* [:link:](lazy.js/lazy.js.d.ts) [Lazy.js](https://github.com/dtao/lazy.js) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](leaflet/leaflet.d.ts) [Leaflet.js](https://github.com/Leaflet/Leaflet) by [Vladimir Zotov](https://github.com/rgripper)
|
||||
@@ -383,6 +405,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](lodash/lodash.d.ts) [Lo-Dash](http://lodash.com) by [Brian Zengel](https://github.com/bczengel)
|
||||
* [:link:](lockfile/lockfile.d.ts) [lockfile](https://github.com/isaacs/lockfile) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](log4javascript/log4javascript.d.ts) [log4javascript](http://log4javascript.org) by [Markus Wagner](https://github.com/Ritzlgrmft)
|
||||
* [:link:](log4js/log4js.d.ts) [log4js](https://github.com/nomiddlename/log4js-node) by [Kentaro Okuno](http://github.com/armorik83)
|
||||
* [:link:](logg/logg.d.ts) [logg](https://github.com/dpup/node-logg) by [Bret Little](https://github.com/blittle)
|
||||
* [:link:](long/long.d.ts) [Long.js](https://github.com/dcodeIO/Long.js) by [Toshihide Hara](https://github.com/kerug)
|
||||
* [:link:](lru-cache/lru-cache.d.ts) [lru-cache](https://github.com/isaacs/node-lru-cache) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
@@ -402,6 +425,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](microsoft-ajax/microsoft.ajax.d.ts) [Microsoft ASP.NET Ajax client side library](http://msdn.microsoft.com/en-us/library/ee341002(v=vs.100).aspx) by [Patrick Magee](https://github.com/pjmagee)
|
||||
* [:link:](microsoft-live-connect/microsoft-live-connect.d.ts) [Microsoft Live Connect](http://msdn.microsoft.com/en-us/library/live/hh243643.aspx) by [John Vilk](https://github.com/jvilk)
|
||||
* [:link:](azure-mobile-services-client/AzureMobileServicesClient.d.ts) [Microsoft Windows AzureMobile Service](http://www.windowsazure.com/en-us/develop/mobile) by [Morosinotto Daniele](https://github.com/dmorosinotto)
|
||||
* [:link:](bingmaps/Microsoft.Maps.d.ts) [Microsoft.Maps](http://msdn.microsoft.com/en-us/library/gg427611.aspx) by [Eric Todd](https://github.com/ericrtodd)
|
||||
* [:link:](bingmaps/Microsoft.Maps.AdvancedShapes.d.ts) [Microsoft.Maps.AdvancedShapes](http://msdn.microsoft.com/en-us/library/hh921952.aspx) by [Eric Todd](https://github.com/ericrtodd)
|
||||
* [:link:](bingmaps/Microsoft.Maps.Directions.d.ts) [Microsoft.Maps.Directions](http://msdn.microsoft.com/en-us/library/hh312813.aspx) by [Eric Todd](https://github.com/ericrtodd)
|
||||
* [:link:](bingmaps/Microsoft.Maps.Search.d.ts) [Microsoft.Maps.Search](http://msdn.microsoft.com/en-us/library/hh868061.aspx) by [Eric Todd](https://github.com/ericrtodd)
|
||||
* [:link:](bingmaps/Microsoft.Maps.Themes.BingTheme.d.ts) [Microsoft.Maps.Themes](http://msdn.microsoft.com/en-us/library/hh868061.aspx) by [Eric Todd](https://github.com/ericrtodd)
|
||||
* [:link:](bingmaps/Microsoft.Maps.Traffic.d.ts) [Microsoft.Maps.Traffic](http://msdn.microsoft.com/en-us/library/hh312840.aspx) by [Eric Todd](https://github.com/ericrtodd)
|
||||
* [:link:](bingmaps/Microsoft.Maps.VenueMaps.d.ts) [Microsoft.Maps.VenueMaps](http://msdn.microsoft.com/en-us/library/hh312797.aspx) by [Eric Todd](https://github.com/ericrtodd)
|
||||
* [:link:](milkcocoa/milkcocoa.d.ts) [Milkcocoa](https://mlkcca.com) by [odangosan](https://github.com/odangosan)
|
||||
* [:link:](mime/mime.d.ts) [mime](https://github.com/broofa/node-mime) by [Jeff Goddard](https://github.com/jedigo)
|
||||
* [:link:](minilog/minilog.d.ts) [minilog v2](https://github.com/mixu/minilog) by [Guido](http://guido.io)
|
||||
* [:link:](minimatch/minimatch.d.ts) [Minimatch](https://github.com/isaacs/minimatch) by [vvakame](https://github.com/vvakame)
|
||||
@@ -410,13 +441,15 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](mixpanel/mixpanel.d.ts) [Mixpanel](https://mixpanel.com) by [Knut Eirik Leira Hjelle](https://github.com/hjellek)
|
||||
* [:link:](mixto/mixto.d.ts) [mixto](https://github.com/atom/mixto) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](mkdirp/mkdirp.d.ts) [mkdirp](http://github.com/substack/node-mkdirp) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](mocha/mocha.d.ts) [mocha](http://visionmedia.github.io/mocha) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid), [otiai10](https://github.com/otiai10)
|
||||
* [:link:](mocha/mocha.d.ts) [mocha](http://mochajs.org) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid), [otiai10](https://github.com/otiai10), [jt000](https://github.com/jt000)
|
||||
* [:link:](mocha-phantomjs/mocha-phantomjs.d.ts) [mocha-phantomjs](http://metaskills.net/mocha-phantomjs) by [Erik Schierboom](https://github.com/ErikSchierboom)
|
||||
* [:link:](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.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)
|
||||
* [: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)
|
||||
* [:link:](morgan/morgan.d.ts) [morgan](https://github.com/expressjs/morgan) by [James Roland Cabresos](https://github.com/staticfunction)
|
||||
* [:link:](mousetrap/mousetrap.d.ts) [Mousetrap](http://craig.is/killing/mice) by [Dániel Tar](https://github.com/qcz)
|
||||
* [:link:](mousetrap/mousetrap-global-bind.d.ts) [Mousetrap 1.4.6's global-bind extension](http://craig.is/killing/mice#extensions.global) by [Andrew Bradley](https://github.com/cspotcode)
|
||||
@@ -427,23 +460,28 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](msgpack/msgpack.d.ts) [msgpack.js - MessagePack JavaScript Implementation](https://github.com/uupaa/msgpack.js) by [Shinya Mochizuki](https://github.com/enrapt-mochizuki)
|
||||
* [:link:](msnodesql/msnodesql.d.ts) [msnodesql](https://github.com/WindowsAzure/node-sqlserver) by [Boris Yankov](https://github.com/borisyankov), [Maxime LUCE](https://github.com/SomaticIT)
|
||||
* [:link:](mu2/mu2.d.ts) [mu2](http://github.com/raycmorgan/mu) by [Jeff Goddard](https://github.com/jedigo)
|
||||
* [:link:](multer/multer.d.ts) [multer](https://github.com/expressjs/multer) by [jt000](https://github.com/jt000)
|
||||
* [:link:](mustache/mustache.d.ts) [Mustache](https://github.com/janl/mustache.js) by [Mark Ashley Bell](https://github.com/markashleybell)
|
||||
* [:link:](nconf/nconf.d.ts) [nconf](https://github.com/flatiron/nconf) by [Jeff Goddard](https://github.com/jedigo)
|
||||
* [:link:](ncp/ncp.d.ts) [ncp](https://github.com/AvianFlu/ncp) by [Bart van der Schoor](https://github.com/bartvds)
|
||||
* [:link:](needle/needle.d.ts) [needle](https://github.com/tomas/needle) by [San Chen](https://github.com/bigsan)
|
||||
* [:link:](nexpect/nexpect.d.ts) [nexpect](https://github.com/nodejitsu/nexpect) by [vvakame](http://github.com/vvakame)
|
||||
* [:link:](ng-grid/ng-grid.d.ts) [ng-grid](http://angular-ui.github.io/ng-grid) by [Ken Smith](https://github.com/smithkl42), [Roland Zwaga](https://github.com/rolandzwaga), [Kent Cooper](https://github.com/kentcooper)
|
||||
* [:link:](ngprogress/ngprogress.d.ts) [ngProgress](http://victorbjelkholm.github.io/ngProgress) by [Martin McWhorter](https://github.com/martinmcwhorter)
|
||||
* [:link:](ngprogress-lite/ngprogress-lite.d.ts) [ngprogress-lite](https://github.com/voronianski/ngprogress-lite) by [Luke Forder](https://github.com/LukeForder)
|
||||
* [:link:](nightmare/nightmare.d.ts) [Nightmare](https://github.com/segmentio/nightmare) by [horiuchi](https://github.com/horiuchi)
|
||||
* [:link:](noble/noble.d.ts) [noble](https://github.com/sandeepmistry/noble) by [Seon-Wook Park](https://github.com/swook)
|
||||
* [:link:](nock/nock.d.ts) [nock](https://github.com/pgte/nock) by [bonnici](https://github.com/bonnici)
|
||||
* [:link:](node-imap/imap.d.ts) [node imap](https://github.com/mscdex/node-imap) by [Steve Fenton](https://github.com/Steve-Fenton)
|
||||
* [:link:](bunyan/bunyan.d.ts) [node-bunyan](https://github.com/trentm/node-bunyan) by [Alex Mikhalev](https://github.com/amikhalev)
|
||||
* [:link:](bunyan-logentries/bunyan-logentries.d.ts) [node-bunyan-logentries](https://github.com/nemtsov/node-bunyan-logentries) by [Aymeric Beaumet](http://aymericbeaumet.me)
|
||||
* [:link:](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)
|
||||
* [:link:](node-form/node-form.d.ts) [node-form](https://github.com/rsamec/form) by [Roman Samec](https://github.com/rsamec)
|
||||
* [:link:](node-git/node-git.d.ts) [node-git](https://github.com/christkv/node-git) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](ip/ip.d.ts) [node-ip](https://github.com/indutny/node-ip) by [Peter Harris](https://github.com/codeanimal)
|
||||
* [:link:](multiparty/multiparty.d.ts) [node-multiparty](https://github.com/andrewrk/node-multiparty) by [Ken Fukuyama](https://github.com/kenfdev)
|
||||
* [:link:](mysql/mysql.d.ts) [node-mysql](https://github.com/felixge/node-mysql) by [William Johnston](https://github.com/wjohnsto)
|
||||
* [:link:](promptly/promptly.d.ts) [node-promptly](https://github.com/IndigoUnited/node-promptly) by [Dan Spencer](https://github.com/danrspencer)
|
||||
* [:link:](radius/radius.d.ts) [node-radius](https://github.com/retailnext/node-radius) by [Peter Harris](https://github.com/codeanimal)
|
||||
@@ -461,9 +499,10 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](notifyjs/notifyjs.d.ts) [notify.js](https://github.com/alexgibson/notify.js) by [soundTricker](https://github.com/soundTricker)
|
||||
* [:link:](noVNC/noVNC.d.ts) [noVNC](https://github.com/kanaka/noVNC) by [Ken Smith](https://github.com/smithkl42)
|
||||
* [:link:](npm/npm.d.ts) [npm](https://github.com/npm/npm) by [Maxime LUCE](https://github.com/SomaticIT)
|
||||
* [:link:](nprogress/nprogress.d.ts) [NProgress](https://github.com/rstacruz/nprogress) by [Judah Gabriel Himango](http://debuggerdotbreak.wordpress.com)
|
||||
* [:link:](nprogress/NProgress.d.ts) [NProgress](https://github.com/rstacruz/nprogress) by [Judah Gabriel Himango](http://debuggerdotbreak.wordpress.com)
|
||||
* [:link:](numeraljs/numeraljs.d.ts) [Numeral.js](https://github.com/adamwdraper/Numeral-js) by [Vincent Bortone](https://github.com/vbortone)
|
||||
* [:link:](object-path/object-path.d.ts) [objectPath](https://github.com/mariocasciaro/object-path) by [Paulo Cesar](https://github.com/pocesar)
|
||||
* [:link:](oboe/oboe.d.ts) [oboe](https://github.com/jimhigson/oboe.js) by [Jared Klopper](https://github.com/optical)
|
||||
* [:link:](oclazyload/oclazyload.d.ts) [oc.LazyLoad](https://github.com/ocombe/ocLazyLoad) by [Roland Zwaga](https://github.com/rolandzwaga)
|
||||
* [: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.js](https://github.com/openlayers/openlayers) by [Ilya Bolkhovsky](https://github.com/bolhovsky)
|
||||
@@ -478,7 +517,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](passport-local/passport-local.d.ts) [passport-local](https://github.com/jaredhanson/passport-local) by [Maxime LUCE](https://github.com/SomaticIT)
|
||||
* [:link:](pathwatcher/pathwatcher.d.ts) [pathwatcher](https://github.com/atom/node-pathwatcher) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](pdf/pdf.d.ts) [PDF.js](https://github.com/mozilla/pdf.js) by [Josh Baldwin](https://github.com/jbaldwin)
|
||||
* [:link:](peerjs/Peer.d.ts) [PeerJS](http://peerjs.com) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
* [:link:](peerjs/peerjs.d.ts) [PeerJS](http://peerjs.com) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
* [:link:](pegjs/pegjs.d.ts) [PEG.js](http://pegjs.majda.cz) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](persona/persona.d.ts) [Persona](http://www.mozilla.org/en-US/persona) by [James Frasca](https://github.com/Nycto)
|
||||
* [:link:](pg/pg.d.ts) [pg](https://github.com/brianc/node-postgres) by [Phips Peter](http://pspeter3.com)
|
||||
@@ -486,7 +525,6 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](phantom/phantom.d.ts) [PhantomJS bridge for NodeJS](https://github.com/sgentle/phantomjs-node) by [horiuchi](https://github.com/horiuchi)
|
||||
* [:link:](phantomjs/phantomjs.d.ts) [PhantomJS v1.9.0 API](https://github.com/ariya/phantomjs/wiki/API-Reference) by [Jed Hunsaker](https://github.com/jedhunsaker), [Mike Keesey](https://github.com/keesey)
|
||||
* [:link:](phonegap/phonegap.d.ts) [PhoneGap](http://phonegap.com) by [Boris Yankov](https://github.com/borisyankov), [Dick van den Brink](https://github.com/DickvdBrink)
|
||||
* [:link:](devextreme/dx.phonejs.d.ts) [PhoneJS](http://js.devexpress.com/MobileDevelopment) by [DevExpress Inc.](http://devexpress.com)
|
||||
* [:link:](physijs/physijs.d.ts) [Physijs](http://chandlerprall.github.io/Physijs) by [Satoru Kimura](https://github.com/gyohk)
|
||||
* [:link:](pickadate/pickadate.d.ts) [pickadate.js](https://github.com/amsul/pickadate.js) by [Adi Dahiya](https://github.com/adidahiya)
|
||||
* [:link:](pixi/pixi.d.ts) [PIXI](https://github.com/GoodBoyDigital/pixi.js) by [xperiments](http://github.com/xperiments)
|
||||
@@ -494,6 +532,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](playerframework/playerFramework.d.ts) [Player Framework (MMPPF)](https://playerframework.codeplex.com) by [Ricardo Sabino](https://github.com/ricardosabino)
|
||||
* [:link:](pleasejs/please.d.ts) [PleaseJS](http://www.checkman.io/please) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
* [:link:](podcast/podcast.d.ts) [podcast](http://github.com/maxnowack/node-podcast) by [Niklas Mollenhauer](https://github.com/nikeee)
|
||||
* [:link:](poly2tri/poly2tri.d.ts) [poly2tri](http://github.com/r3mi/poly2tri.js) by [Elemar Junior](https://github.com/elemarjr)
|
||||
* [:link:](popcorn/popcorn.d.ts) [Popcorn](https://github.com/mozilla/popcorn-js) by [grapswiz](https://github.com/grapswiz)
|
||||
* [:link:](pouchDB/pouch.d.ts) [Pouch](http://pouchdb.com) by [Bill Sears](https://github.com/MrBigDog2U)
|
||||
* [:link:](power-assert/power-assert.d.ts) [power-assert](https://github.com/twada/power-assert) by [vvakame](https://github.com/vvakame)
|
||||
@@ -503,6 +542,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](progressjs/progress.d.ts) [ProgressJs](http://usablica.github.io/progress.js) by [Shunsuke Ohtani](https://github.com/zaneli)
|
||||
* [:link:](promise-pool/promise-pool.d.ts) [promise-pool](https://github.com/vilic/promise-pool) by [VILIC VANE](https://github.com/vilic)
|
||||
* [:link:](promises-a-plus/promises-a-plus.d.ts) [promises-a-plus](http://promisesaplus.com) by [Igor Oleinikov](https://github.com/Igorbek)
|
||||
* [:link:](protobufjs/protobufjs.d.ts) [ProtoBuf.js](https://github.com/dcodeIO/ProtoBuf.js) by [Panu Horsmalahti](https://github.com/panuhorsmalahti)
|
||||
* [:link:](proxyquire/proxyquire.d.ts) [Proxyquire](https://github.com/thlorenz/proxyquire) by [jt000](https://github.com/jt000)
|
||||
* [:link:](pubsubjs/pubsub.d.ts) [PubSubJS](https://github.com/mroderick/PubSubJS) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](purl/purl.d.ts) [Purl](https://github.com/allmarkedup/purl) by [Daniel Ferreira Monteiro Alves](https://github.com/danfma)
|
||||
* [:link:](q/Q.d.ts) [Q](https://github.com/kriskowal/q) by [Barrie Nemetchek](https://github.com/bnemetchek), [Andrew Gaspar](https://github.com/AndrewGaspar), [John Reilly](https://github.com/johnnyreilly)
|
||||
@@ -546,6 +587,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](rx/rx.time.d.ts) [RxJS-Time](http://rx.codeplex.com) by [Carl de Billy](http://carl.debilly.net), [Igor Oleinikov](https://github.com/Igorbek)
|
||||
* [:link:](rx/rx.virtualtime.d.ts) [RxJS-VirtualTime](http://rx.codeplex.com) by [gsino](http://www.codeplex.com/site/users/view/gsino), [Igor Oleinikov](https://github.com/Igorbek)
|
||||
* [:link:](sammyjs/sammyjs.d.ts) [Sammy.js](http://sammyjs.org) by [Boris Yankov](https://github.com/borisyankov), [Oisin Grehan](https://github.com/oising)
|
||||
* [:link:](sanitize-filename/sanitize-filename.d.ts) [sanitize-filename](https://github.com/parshap/node-sanitize-filename) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](screenfull/screenfull.d.ts) [screenfull.js](https://github.com/sindresorhus/screenfull.js) by [Ilia Choly](http://github.com/icholy)
|
||||
* [: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)
|
||||
@@ -596,6 +639,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](svg-pan-zoom/svg-pan-zoom.d.ts) [svg-pan-zoom](https://github.com/ariutta/svg-pan-zoom) by [Chintan Shah](https://github.com/Promact)
|
||||
* [:link:](svgjs/svgjs.d.ts) [svg.js](http://www.svgjs.com) by [Sean Hess](https://seanhess.github.io)
|
||||
* [:link:](svgjs.draggable/svgjs.draggable.d.ts) [svgjs.draggable](http://www.svgjs.com) by [Luigi Trabacchin](https://github.com/LiFeleSs)
|
||||
* [:link:](swag/swag.d.ts) [swag](https://github.com/elving/swag) by [Shogo Iwano](https://github.com/shiwano)
|
||||
* [:link:](swfobject/swfobject.d.ts) [swfobject](https://code.google.com/p/swfobject) by [rou](https://github.com/rou)
|
||||
* [:link:](swig/swig.d.ts) [swig](http://github.com/paularmstrong/swig) by [Peter Harris](https://github.com/CodeAnimal), [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
* [:link:](swiper/swiper.d.ts) [Swiper](https://github.com/nolimits4web/Swiper) by [Sebastián Galiano](https://github.com/sgaliano)
|
||||
@@ -625,6 +669,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](timezone-js/timezone-js.d.ts) [timezone-js](https://github.com/mde/timezone-js) by [bonnici](https://github.com/bonnici)
|
||||
* [:link:](timezonecomplete/timezonecomplete.d.ts) [timezonecomplete](https://github.com/SpiritIT/timezonecomplete) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](tv4/tv4.d.ts) [Tiny Validator tv4](https://github.com/geraintluff/tv4) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](tinycolor/tinycolor.d.ts) [tinycolor](https://github.com/bgrins/TinyColor) by [Mordechai Zuber](https://github.com/M-Zuber)
|
||||
* [:link:](titanium/titanium.d.ts) [Titanium Movile 3.1.3.GA](http://www.appcelerator.com) by [Airam Rguez](https://github.com/airamrguez)
|
||||
* [:link:](toastr/toastr.d.ts) [Toastr](https://github.com/CodeSeven/toastr) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](sencha_touch/SenchaTouch.d.ts) [Touch](http://www.sencha.com/products/touch) by [Brian Kotek](https://github.com/brian428)
|
||||
@@ -657,16 +702,17 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](vimeo/froogaloop.d.ts) [Vimeo](http://developer.vimeo.com/player/js-api) by [Daz Wilkin](https://github.com/DazWilkin)
|
||||
* [:link:](vinyl/vinyl.d.ts) [vinyl](https://github.com/wearefractal/vinyl) by [vvakame](https://github.com/vvakame), [jedmao](https://github.com/jedmao)
|
||||
* [:link:](vinyl-fs/vinyl-fs.d.ts) [vinyl-fs](https://github.com/wearefractal/vinyl-fs) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](vue/vue.d.ts) [vuejs](https://github.com/yyx990803/vue) by [odangosan](https://github.com/odangosan)
|
||||
* [:link:](watch/watch.d.ts) [watch](https://github.com/mikeal/watch) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
* [:link:](jquery.watermark/jquery.watermark.d.ts) [Watermark plugin for jQuery](http://jquery-watermark.googlecode.com) by [Anwar Javed](https://github.com/anwarjaved)
|
||||
* [: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:](webaudioapi/waa-nightly.d.ts) [Web Audio API (nightly)](http://www.w3.org/TR/2012/WD-webaudio-20120802) by [Baruch Berger](https://github.com/bbss)
|
||||
* [:link:](webmidi/webmidi.d.ts) [Web MIDI API](http://www.w3.org/TR/webmidi) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
* [:link:](devextreme/dx.webappjs.d.ts) [WebAppJS](http://js.devexpress.com/WebDevelopment) by [DevExpress Inc.](http://devexpress.com)
|
||||
* [:link:](webcrypto/WebCrypto.d.ts) [WebCrypto](http://www.w3.org/TR/WebCryptoAPI) by [Lucas Dixon](https://github.com/iislucas)
|
||||
* [:link:](webrtc/MediaStream.d.ts) [WebRTC](http://dev.w3.org/2011/webrtc) by [Ken Smith](https://github.com/smithkl42)
|
||||
* [:link:](websocket/websocket.d.ts) [websocket](https://github.com/Worlize/WebSocket-Node) by [Paul Loyd](https://github.com/loyd)
|
||||
* [:link:](when/when.d.ts) [When](https://github.com/cujojs/when) by [Derek Cicerone](https://github.com/derekcicerone), [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](which/which.d.ts) [which](https://github.com/isaacs/node-which) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](winjs/winjs.d.ts) [WinJS](http://try.buildwinjs.com) by [TypeScript samples](https://www.typescriptlang.org), [Adam Hewitt](https://github.com/adamhewitt627), [Craig Treasure](https://github.com/craigktreasure), [Jeff Fisher](https://github.com/xirzec)
|
||||
* [:link:](winrt/winrt.d.ts) [WinRT](http://msdn.microsoft.com/en-us/library/windows/apps/br211377.aspx) by [TypeScript samples](https://www.typescriptlang.org)
|
||||
* [:link:](winston/winston.d.ts) [winston](https://github.com/flatiron/winston) by [bonnici](https://github.com/bonnici), [Peter Harris](https://github.com/codeanimal)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/// <reference path="FileSaver.d.ts" />
|
||||
|
||||
/**
|
||||
* @summary Test for "saveAs" function.
|
||||
*/
|
||||
function testSaveAs() {
|
||||
var data: Blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"});
|
||||
var filename: string = 'hello world.txt';
|
||||
|
||||
saveAs(data, filename);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
--noImplicitAny
|
||||
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
// Type definitions for FileSaver.js
|
||||
// Project: https://github.com/eligrey/FileSaver.js/
|
||||
// Definitions by: Cyril Schumacher <https://github.com/cyrilschumacher>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @summary Interface for "saveAs" function.
|
||||
* @author Cyril Schumacher
|
||||
* @version 1.0
|
||||
*/
|
||||
interface FileSaver {
|
||||
(
|
||||
/**
|
||||
* @summary Data.
|
||||
* @type {Blob}
|
||||
*/
|
||||
data: Blob,
|
||||
|
||||
/**
|
||||
* @summary File name.
|
||||
* @type {DOMString}
|
||||
*/
|
||||
filename: string
|
||||
): void
|
||||
}
|
||||
|
||||
declare var saveAs: FileSaver;
|
||||
@@ -1,23 +0,0 @@
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
|
||||
function readJSON(target) {
|
||||
return JSON.parse(fs.readFileSync(target, 'utf8'));
|
||||
}
|
||||
|
||||
function getSemFloat(str) {
|
||||
var m = /^[^\d]*(\d+)\.(\d+)/.exec(str);
|
||||
return parseFloat(m[1] + '.' + m[2]);
|
||||
}
|
||||
|
||||
var repo = readJSON(path.resolve(__dirname, '..', 'package.json'));
|
||||
|
||||
var testerPath = path.resolve(__dirname, '..', 'node_modules', 'definition-tester', 'package.json');
|
||||
|
||||
// ultra lame semver major/minor check
|
||||
if (!fs.existsSync(testerPath) || getSemFloat(repo.dependencies['definition-tester']) > getSemFloat(readJSON(testerPath).version)) {
|
||||
console.log('DefinitelyTyped tester needs an update!\n\n please run \'npm install\'\n');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
require('definition-tester');
|
||||
-9178
File diff suppressed because it is too large
Load Diff
@@ -1,2 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
require('./tsc.js')
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-14202
File diff suppressed because it is too large
Load Diff
@@ -1,2 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
require('./tsc.js')
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-14931
File diff suppressed because it is too large
Load Diff
@@ -1,2 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
require('./tsc.js')
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-14958
File diff suppressed because it is too large
Load Diff
@@ -1,2 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
require('./tsc.js')
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-14958
File diff suppressed because it is too large
Load Diff
@@ -1,2 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
require('./tsc.js')
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-14958
File diff suppressed because it is too large
Load Diff
@@ -1,2 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
require('./tsc.js')
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-14169
File diff suppressed because it is too large
Load Diff
@@ -1,2 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
require('./tsc.js')
|
||||
File diff suppressed because one or more lines are too long
-14169
File diff suppressed because it is too large
Load Diff
@@ -1,2 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
require('./tsc.js')
|
||||
File diff suppressed because one or more lines are too long
@@ -14,7 +14,7 @@ interface TestScope extends ng.IScope {
|
||||
|
||||
module ng.local.storage.tests {
|
||||
export class TestController {
|
||||
constructor($scope: TestScope, localStorageService: ng.local.storage.ILocalStorageService) {
|
||||
constructor($scope: TestScope, localStorageService: ng.local.storage.ILocalStorageService<string>) {
|
||||
// isSupported
|
||||
if (localStorageService.isSupported) {
|
||||
// do something
|
||||
@@ -72,4 +72,4 @@ app.config(function (localStorageServiceProvider: ng.local.storage.ILocalStorage
|
||||
.setNotify(true, true);
|
||||
});
|
||||
|
||||
app.controller('TestController', ng.local.storage.tests.TestController);
|
||||
app.controller('TestController', ng.local.storage.tests.TestController);
|
||||
|
||||
+4
-4
@@ -75,7 +75,7 @@ declare module ng.local.storage {
|
||||
|
||||
}
|
||||
|
||||
interface ILocalStorageService {
|
||||
interface ILocalStorageService<T> {
|
||||
/**
|
||||
* Checks if the browser support the current storage type(e.g: localStorage, sessionStorage).
|
||||
* Returns: Boolean
|
||||
@@ -92,14 +92,14 @@ declare module ng.local.storage {
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
set(key: string, value: string): boolean;
|
||||
set(key: string, value: T): boolean;
|
||||
/**
|
||||
* Directly get a value from local storage.
|
||||
* If local storage is not supported, use cookies instead.
|
||||
* Returns: value from local storage
|
||||
* @param key
|
||||
*/
|
||||
get(key: string): string;
|
||||
get(key: string): T;
|
||||
/**
|
||||
* Return array of keys for local storage, ignore keys that not owned.
|
||||
* Returns: value from local storage
|
||||
@@ -146,4 +146,4 @@ declare module ng.local.storage {
|
||||
*/
|
||||
cookie:ICookie;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-98
@@ -534,7 +534,7 @@ declare module protractor {
|
||||
all(locator: webdriver.Locator): ElementArrayFinder;
|
||||
}
|
||||
|
||||
interface ElementFinder extends webdriver.IWebElement, webdriver.promise.IThenable<ElementFinder> {
|
||||
interface ElementFinder extends webdriver.IWebElement, webdriver.promise.IThenable<any> {
|
||||
/**
|
||||
* Calls to element may be chained to find elements within a parent.
|
||||
*
|
||||
@@ -701,103 +701,6 @@ declare module protractor {
|
||||
*/
|
||||
allowAnimations(value: string): ElementFinder;
|
||||
|
||||
/**
|
||||
* Cancels the computation of this promise's value, rejecting the promise in the
|
||||
* process. This method is a no-op if the promise has alreayd been resolved.
|
||||
*
|
||||
* @param {string=} opt_reason The reason this promise is being cancelled.
|
||||
*/
|
||||
cancel(opt_reason?: string): void;
|
||||
|
||||
|
||||
/** @return {boolean} Whether this promise's value is still being computed. */
|
||||
isPending(): boolean;
|
||||
|
||||
|
||||
/**
|
||||
* Registers listeners for when this instance is resolved.
|
||||
*
|
||||
* @param {?(function(T): (R|webdriver.promise.Promise.<R>))=} opt_callback The
|
||||
* function to call if this promise is successfully resolved. The function
|
||||
* should expect a single argument: the promise's resolved value.
|
||||
* @param {?(function(*): (R|webdriver.promise.Promise.<R>))=} opt_errback The
|
||||
* function to call if this promise is rejected. The function should expect
|
||||
* a single argument: the rejection reason.
|
||||
* @return {!webdriver.promise.Promise.<R>} A new promise which will be
|
||||
* resolved with the result of the invoked callback.
|
||||
* @template R
|
||||
*/
|
||||
then<R>(opt_callback?: (value: ElementFinder) => any, opt_errback?: (error: any) => any): webdriver.promise.Promise<R>;
|
||||
|
||||
|
||||
/**
|
||||
* Registers a listener for when this promise is rejected. This is synonymous
|
||||
* with the {@code catch} clause in a synchronous API:
|
||||
* <pre><code>
|
||||
* // Synchronous API:
|
||||
* try {
|
||||
* doSynchronousWork();
|
||||
* } catch (ex) {
|
||||
* console.error(ex);
|
||||
* }
|
||||
*
|
||||
* // Asynchronous promise API:
|
||||
* doAsynchronousWork().thenCatch(function(ex) {
|
||||
* console.error(ex);
|
||||
* });
|
||||
* </code></pre>
|
||||
*
|
||||
* @param {function(*): (R|webdriver.promise.Promise.<R>)} errback The function
|
||||
* to call if this promise is rejected. The function should expect a single
|
||||
* argument: the rejection reason.
|
||||
* @return {!webdriver.promise.Promise.<R>} A new promise which will be
|
||||
* resolved with the result of the invoked callback.
|
||||
* @template R
|
||||
*/
|
||||
thenCatch<R>(errback: (error: any) => any): webdriver.promise.Promise<R>;
|
||||
|
||||
|
||||
/**
|
||||
* Registers a listener to invoke when this promise is resolved, regardless
|
||||
* of whether the promise's value was successfully computed. This function
|
||||
* is synonymous with the {@code finally} clause in a synchronous API:
|
||||
* <pre><code>
|
||||
* // Synchronous API:
|
||||
* try {
|
||||
* doSynchronousWork();
|
||||
* } finally {
|
||||
* cleanUp();
|
||||
* }
|
||||
*
|
||||
* // Asynchronous promise API:
|
||||
* doAsynchronousWork().thenFinally(cleanUp);
|
||||
* </code></pre>
|
||||
*
|
||||
* <b>Note:</b> similar to the {@code finally} clause, if the registered
|
||||
* callback returns a rejected promise or throws an error, it will silently
|
||||
* replace the rejection error (if any) from this promise:
|
||||
* <pre><code>
|
||||
* try {
|
||||
* throw Error('one');
|
||||
* } finally {
|
||||
* throw Error('two'); // Hides Error: one
|
||||
* }
|
||||
*
|
||||
* webdriver.promise.rejected(Error('one'))
|
||||
* .thenFinally(function() {
|
||||
* throw Error('two'); // Hides Error: one
|
||||
* });
|
||||
* </code></pre>
|
||||
*
|
||||
*
|
||||
* @param {function(): (R|webdriver.promise.Promise.<R>)} callback The function
|
||||
* to call when this promise is resolved.
|
||||
* @return {!webdriver.promise.Promise.<R>} A promise that will be fulfilled
|
||||
* with the callback result.
|
||||
* @template R
|
||||
*/
|
||||
thenFinally<R>(callback: () => any): webdriver.promise.Promise<R>;
|
||||
|
||||
/**
|
||||
* Create a shallow copy of ElementFinder.
|
||||
*
|
||||
@@ -1015,6 +918,7 @@ declare module protractor {
|
||||
* @return {!webdriver.promise.Promise} A promise that resolves to the final
|
||||
* value of the accumulator.
|
||||
*/
|
||||
reduce<T>(reduceFn: (acc: T, element: ElementFinder, index: number, arr: ElementFinder[]) => webdriver.promise.Promise<T>, initialValue: T): webdriver.promise.Promise<T>;
|
||||
reduce<T>(reduceFn: (acc: T, element: ElementFinder, index: number, arr: ElementFinder[]) => T, initialValue: T): webdriver.promise.Promise<T>;
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
/// <reference path="angular-scroll.d.ts" />
|
||||
|
||||
module TestApp {
|
||||
|
||||
class TestController {
|
||||
|
||||
constructor($scope: ng.IScope, $document: duScroll.IDocumentService) {
|
||||
var positionFromTop = 400;
|
||||
var positionFromLeft = 200;
|
||||
var offsetInPixels = 100;
|
||||
var durationInMillis = 2000;
|
||||
var someElement: ng.IAugmentedJQuery;
|
||||
|
||||
$document.duScrollTo(positionFromLeft, positionFromTop);
|
||||
$document.duScrollTo(positionFromLeft, positionFromTop, durationInMillis).then(this.onScrollCompleted);
|
||||
$document.duScrollTo(positionFromLeft, positionFromTop, durationInMillis, this.invertedEasingFn).then(this.onScrollCompleted);
|
||||
|
||||
$document.duScrollTo(someElement);
|
||||
$document.duScrollTo(someElement, offsetInPixels);
|
||||
$document.duScrollTo(someElement, offsetInPixels, durationInMillis).then(this.onScrollCompleted);
|
||||
$document.duScrollTo(someElement, offsetInPixels, durationInMillis, this.invertedEasingFn).then(this.onScrollCompleted);
|
||||
|
||||
$document.duScrollToElement(someElement);
|
||||
$document.duScrollToElement(someElement, offsetInPixels);
|
||||
$document.duScrollToElement(someElement, offsetInPixels, durationInMillis).then(this.onScrollCompleted);
|
||||
$document.duScrollToElement(someElement, offsetInPixels, durationInMillis, this.invertedEasingFn).then(this.onScrollCompleted);
|
||||
|
||||
$document.duScrollToElementAnimated(someElement).then(this.onScrollCompleted);
|
||||
$document.duScrollToElementAnimated(someElement, offsetInPixels).then(this.onScrollCompleted);
|
||||
$document.duScrollToElementAnimated(someElement, offsetInPixels, durationInMillis).then(this.onScrollCompleted);
|
||||
$document.duScrollToElementAnimated(someElement, offsetInPixels, durationInMillis, this.invertedEasingFn).then(this.onScrollCompleted);
|
||||
|
||||
$document.duScrollTop(positionFromTop);
|
||||
$document.duScrollTop(positionFromTop, durationInMillis).then(this.onScrollCompleted);
|
||||
$document.duScrollTop(positionFromTop, durationInMillis, this.invertedEasingFn).then(this.onScrollCompleted);
|
||||
|
||||
$document.duScrollTopAnimated(positionFromTop).then(this.onScrollCompleted);
|
||||
$document.duScrollTopAnimated(positionFromTop, durationInMillis).then(this.onScrollCompleted);
|
||||
$document.duScrollTopAnimated(positionFromTop, durationInMillis, this.invertedEasingFn).then(this.onScrollCompleted);
|
||||
|
||||
$document.duScrollLeft(positionFromLeft);
|
||||
$document.duScrollLeft(positionFromLeft, durationInMillis).then(this.onScrollCompleted);
|
||||
$document.duScrollLeft(positionFromLeft, durationInMillis, this.invertedEasingFn).then(this.onScrollCompleted);
|
||||
|
||||
$document.duScrollLeftAnimated(positionFromLeft).then(this.onScrollCompleted);
|
||||
$document.duScrollLeftAnimated(positionFromLeft, durationInMillis).then(this.onScrollCompleted);
|
||||
$document.duScrollLeftAnimated(positionFromLeft, durationInMillis, this.invertedEasingFn).then(this.onScrollCompleted);
|
||||
|
||||
var verticalPosition: number = $document.duScrollTop();
|
||||
var horixontalPosition: number = $document.duScrollLeft();
|
||||
}
|
||||
|
||||
private invertedEasingFn = (x: number): number => {
|
||||
return 1 - x;
|
||||
}
|
||||
|
||||
private onScrollCompleted = (): void => {
|
||||
console.log('Done scrolling');
|
||||
}
|
||||
}
|
||||
|
||||
angular.module('testApp', ['duScroll'])
|
||||
.controller('testController', TestController);
|
||||
}
|
||||
Vendored
+44
@@ -0,0 +1,44 @@
|
||||
// Type definitions for angular-scroll
|
||||
// Project: https://github.com/oblador/angular-scroll
|
||||
// Definitions by: Sam Herrmann <https://github.com/samherrmann>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
|
||||
declare module duScroll {
|
||||
|
||||
/**
|
||||
* Extends the angular.element object returned by the $document sercive with a few jQuery like functions.
|
||||
* see https://github.com/oblador/angular-scroll#angularelement-scroll-api
|
||||
*/
|
||||
interface IDocumentService extends ng.IDocumentService {
|
||||
|
||||
duScrollTo(left: number, top: number): void;
|
||||
duScrollTo(left: number, top: number, duration: number, easing?: Function): ng.IPromise<void>;
|
||||
|
||||
duScrollTo(element: ng.IAugmentedJQuery, offset?: number): void;
|
||||
duScrollTo(element: ng.IAugmentedJQuery, offset: number, duration: number, easing?: Function): ng.IPromise<void>;
|
||||
|
||||
duScrollToElement(element: ng.IAugmentedJQuery, offset?: number): void;
|
||||
duScrollToElement(element: ng.IAugmentedJQuery, offset: number, duration: number, easing?: Function): ng.IPromise<void>;
|
||||
|
||||
duScrollToElementAnimated(element: ng.IAugmentedJQuery, offset?: number): ng.IPromise<void>;
|
||||
duScrollToElementAnimated(element: ng.IAugmentedJQuery, offset: number, duration: number, easing?: Function): ng.IPromise<void>;
|
||||
|
||||
duScrollTop(top: number): void;
|
||||
duScrollTop(top: number, duration: number, easing?: Function): ng.IPromise<void>;
|
||||
|
||||
duScrollTopAnimated(top: number): ng.IPromise<void>;
|
||||
duScrollTopAnimated(top: number, duration: number, easing?: Function): ng.IPromise<void>;
|
||||
|
||||
duScrollLeft(left: number): void;
|
||||
duScrollLeft(left: number, duration: number, easing?: Function): ng.IPromise<void>;
|
||||
|
||||
duScrollLeftAnimated(left: number): ng.IPromise<void>;
|
||||
duScrollLeftAnimated(left: number, duration: number, easing?: Function): ng.IPromise<void>;
|
||||
|
||||
duScrollTop(): number;
|
||||
duScrollLeft(): number;
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,13 @@ myApp.config((
|
||||
$urlMatcherFactory: ng.ui.IUrlMatcherFactory) => {
|
||||
|
||||
var matcher: ng.ui.IUrlMatcher = $urlMatcherFactory.compile("/foo/:bar?param1");
|
||||
|
||||
$urlMatcherFactory.type("myType2", {
|
||||
encode: function (item: any) { return item; },
|
||||
decode: function (item: any) { return item; },
|
||||
is: function (item: any) { return true; }
|
||||
});
|
||||
|
||||
var obj: Object = matcher.exec('/user/bob', { x:'1', q:'hello' });
|
||||
var concat: ng.ui.IUrlMatcher = matcher.concat('/test');
|
||||
var str: string = matcher.format({ id:'bob', q:'yes' });
|
||||
|
||||
Vendored
+1
@@ -42,6 +42,7 @@ declare module ng.ui {
|
||||
interface IUrlMatcherFactory {
|
||||
compile(pattern: string): IUrlMatcher;
|
||||
isMatcher(o: any): boolean;
|
||||
type(name: string, definition: any, definitionFn?: any): any;
|
||||
}
|
||||
|
||||
interface IUrlRouterProvider extends IServiceProvider {
|
||||
|
||||
@@ -8,10 +8,29 @@
|
||||
|
||||
declare var $routeProvider: ng.route.IRouteProvider;
|
||||
$routeProvider
|
||||
.when('/projects/:projectId/dashboard',{
|
||||
controller: '',
|
||||
templateUrl: '',
|
||||
caseInsensitiveMatch: true,
|
||||
reloadOnSearch: false
|
||||
})
|
||||
.otherwise({redirectTo: '/'});
|
||||
.when('/projects/:projectId/dashboard', {
|
||||
controller: 'I am a string',
|
||||
templateUrl: "So am I",
|
||||
caseInsensitiveMatch: true,
|
||||
reloadOnSearch: false
|
||||
})
|
||||
.when('/projects/:projectId/dashboard2', {
|
||||
controller: function () {
|
||||
//Look at me - I'm a function!
|
||||
},
|
||||
template: function ($routeParams?: ng.route.IRouteParamsService) {
|
||||
return "I return a string"
|
||||
}
|
||||
})
|
||||
.when('/projects/:projectId/dashboard3', {
|
||||
controllerAs: 'I am a string',
|
||||
template: "Yup. String"
|
||||
})
|
||||
.when('/projects/:projectId/dashboard4', {
|
||||
controller: 'I am a string',
|
||||
templateUrl: function ($routeParams?: ng.route.IRouteParamsService) {
|
||||
return "I return a string"
|
||||
}
|
||||
})
|
||||
.otherwise({ redirectTo: '/' })
|
||||
.otherwise({ redirectTo: ($routeParams?: ng.route.IRouteParamsService, $locationPath?: string, $locationSearch?: any) => "" });
|
||||
|
||||
Vendored
+5
-5
@@ -42,7 +42,7 @@ declare module ng.route {
|
||||
* {(string|function()=}
|
||||
* Controller fn that should be associated with newly created scope or the name of a registered controller if passed as a string.
|
||||
*/
|
||||
controller?: any;
|
||||
controller?: string|Function;
|
||||
/**
|
||||
* A controller alias name. If present the controller will be published to scope under the controllerAs name.
|
||||
*/
|
||||
@@ -59,7 +59,7 @@ declare module ng.route {
|
||||
*
|
||||
* {Array.<Object>} - route parameters extracted from the current $location.path() by applying the current route
|
||||
*/
|
||||
template?: string;
|
||||
template?: string|{($routeParams?: ng.route.IRouteParamsService) : string;}
|
||||
/**
|
||||
* {string=|function()=}
|
||||
* Path or function that returns a path to an html template that should be used by ngView.
|
||||
@@ -68,14 +68,14 @@ declare module ng.route {
|
||||
*
|
||||
* {Array.<Object>} - route parameters extracted from the current $location.path() by applying the current route
|
||||
*/
|
||||
templateUrl?: any;
|
||||
templateUrl?: string|{ ($routeParams?: ng.route.IRouteParamsService): string; }
|
||||
/**
|
||||
* {Object.<string, function>=} - An optional map of dependencies which should be injected into the controller. If any of these dependencies are promises, the router will wait for them all to be resolved or one to be rejected before the controller is instantiated. If all the promises are resolved successfully, the values of the resolved promises are injected and $routeChangeSuccess event is fired. If any of the promises are rejected the $routeChangeError event is fired. The map object is:
|
||||
*
|
||||
* - key - {string}: a name of a dependency to be injected into the controller.
|
||||
* - factory - {string|function}: If string then it is an alias for a service. Otherwise if function, then it is injected and the return value is treated as the dependency. If the result is a promise, it is resolved before its value is injected into the controller. Be aware that ngRoute.$routeParams will still refer to the previous route within these resolve functions. Use $route.current.params to access the new route parameters, instead.
|
||||
*/
|
||||
resolve?: {[key: string]: any};
|
||||
resolve?: {[key: string]: any};
|
||||
/**
|
||||
* {(string|function())=}
|
||||
* Value to update $location path with and trigger route redirection.
|
||||
@@ -87,7 +87,7 @@ declare module ng.route {
|
||||
* - {Object} - current $location.search()
|
||||
* - The custom redirectTo function is expected to return a string which will be used to update $location.path() and $location.search().
|
||||
*/
|
||||
redirectTo?: any;
|
||||
redirectTo?: string|{($routeParams?: ng.route.IRouteParamsService, $locationPath?: string, $locationSearch?: any) : string};
|
||||
/**
|
||||
* Reload route when only $location.search() or $location.hash() changes.
|
||||
*
|
||||
|
||||
Vendored
+40
-82
@@ -392,32 +392,44 @@ declare module ng {
|
||||
// see http://docs.angularjs.org/api/ng.$compile.directive.Attributes
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IAttributes {
|
||||
// this is necessary to be able to access the scoped attributes. it's not very elegant
|
||||
// because you have to use attrs['foo'] instead of attrs.foo but I don't know of a better way
|
||||
// this should really be limited to return string but it creates this problem: http://stackoverflow.com/q/17201854/165656
|
||||
/**
|
||||
* this is necessary to be able to access the scoped attributes. it's not very elegant
|
||||
* because you have to use attrs['foo'] instead of attrs.foo but I don't know of a better way
|
||||
* this should really be limited to return string but it creates this problem: http://stackoverflow.com/q/17201854/165656
|
||||
*/
|
||||
[name: string]: any;
|
||||
|
||||
// Adds the CSS class value specified by the classVal parameter to the
|
||||
// element. If animations are enabled then an animation will be triggered
|
||||
// for the class addition.
|
||||
/**
|
||||
* Adds the CSS class value specified by the classVal parameter to the
|
||||
* element. If animations are enabled then an animation will be triggered
|
||||
* for the class addition.
|
||||
*/
|
||||
$addClass(classVal: string): void;
|
||||
|
||||
// Removes the CSS class value specified by the classVal parameter from the
|
||||
// element. If animations are enabled then an animation will be triggered for
|
||||
// the class removal.
|
||||
/**
|
||||
* Removes the CSS class value specified by the classVal parameter from the
|
||||
* element. If animations are enabled then an animation will be triggered for
|
||||
* the class removal.
|
||||
*/
|
||||
$removeClass(classVal: string): void;
|
||||
|
||||
// Set DOM element attribute value.
|
||||
/**
|
||||
* Set DOM element attribute value.
|
||||
*/
|
||||
$set(key: string, value: any): void;
|
||||
|
||||
// Observes an interpolated attribute.
|
||||
// The observer function will be invoked once during the next $digest
|
||||
// following compilation. The observer is then invoked whenever the
|
||||
// interpolated value changes.
|
||||
/**
|
||||
* Observes an interpolated attribute.
|
||||
* The observer function will be invoked once during the next $digest
|
||||
* following compilation. The observer is then invoked whenever the
|
||||
* interpolated value changes.
|
||||
*/
|
||||
$observe(name: string, fn: (value?: any) => any): Function;
|
||||
|
||||
// A map of DOM element attribute names to the normalized name. This is needed
|
||||
// to do reverse lookup from normalized name back to actual name.
|
||||
/**
|
||||
* A map of DOM element attribute names to the normalized name. This is needed
|
||||
* to do reverse lookup from normalized name back to actual name.
|
||||
*/
|
||||
$attr: Object;
|
||||
}
|
||||
|
||||
@@ -820,33 +832,9 @@ declare module ng {
|
||||
* Change search part when called with parameter and return $location.
|
||||
*
|
||||
* @param search New search params
|
||||
* @param paramValue If search is a string or a Number, then paramValue will override only a single search property. If paramValue is null, the property specified via the first argument will be deleted.
|
||||
* @param paramValue If search is a string or a Number, then paramValue will override only a single search property. If paramValue is null, the property specified via the first argument will be deleted. If paramValue is an array, it will override the property of the search component of $location specified via the first argument. If paramValue is true, the property specified via the first argument will be added with no value nor trailing equal sign.
|
||||
*/
|
||||
search(search: string, paramValue: string): ILocationService;
|
||||
|
||||
/**
|
||||
* Change search part when called with parameter and return $location.
|
||||
*
|
||||
* @param search New search params
|
||||
* @param paramValue If search is a string or a Number, then paramValue will override only a single search property. If paramValue is null, the property specified via the first argument will be deleted.
|
||||
*/
|
||||
search(search: string, paramValue: number): ILocationService;
|
||||
|
||||
/**
|
||||
* Change search part when called with parameter and return $location.
|
||||
*
|
||||
* @param search New search params
|
||||
* @param paramValue If paramValue is an array, it will override the property of the search component of $location specified via the first argument.
|
||||
*/
|
||||
search(search: string, paramValue: string[]): ILocationService;
|
||||
|
||||
/**
|
||||
* Change search part when called with parameter and return $location.
|
||||
*
|
||||
* @param search New search params
|
||||
* @param paramValue If paramValue is true, the property specified via the first argument will be added with no value nor trailing equal sign.
|
||||
*/
|
||||
search(search: string, paramValue: boolean): ILocationService;
|
||||
search(search: string, paramValue: string|number|string[]|boolean): ILocationService;
|
||||
|
||||
state(): any;
|
||||
state(state: any): ILocationService;
|
||||
@@ -906,15 +894,7 @@ declare module ng {
|
||||
*
|
||||
* @param promises An array or hash of promises.
|
||||
*/
|
||||
all(promises: IPromise<any>[]): IPromise<any[]>;
|
||||
/**
|
||||
* Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
|
||||
*
|
||||
* Returns a single promise that will be resolved with an array/hash of values, each value corresponding to the promise at the same index/key in the promises array/hash. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
|
||||
*
|
||||
* @param promises An array or hash of promises.
|
||||
*/
|
||||
all(promises: { [id: string]: IPromise<any>; }): IPromise<{ [id: string]: any }>;
|
||||
all(promises: IPromise<any>[]|{ [id: string]: IPromise<any>; }): IPromise<any[]>;
|
||||
/**
|
||||
* Creates a Deferred object which represents a task which will finish in the future.
|
||||
*/
|
||||
@@ -932,13 +912,7 @@ declare module ng {
|
||||
*
|
||||
* @param value Value or a promise
|
||||
*/
|
||||
when<T>(value: IPromise<T>): IPromise<T>;
|
||||
/**
|
||||
* Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
|
||||
*
|
||||
* @param value Value or a promise
|
||||
*/
|
||||
when<T>(value: T): IPromise<T>;
|
||||
when<T>(value: IPromise<T>|T): IPromise<T>;
|
||||
/**
|
||||
* Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
|
||||
*
|
||||
@@ -953,32 +927,12 @@ declare module ng {
|
||||
*
|
||||
* This method returns a new promise which is resolved or rejected via the return value of the successCallback, errorCallback. It also notifies via the return value of the notifyCallback method. The promise can not be resolved or rejected from the notifyCallback method.
|
||||
*/
|
||||
then<TResult>(successCallback: (promiseValue: T) => IHttpPromise<TResult>, errorCallback?: (reason: any) => any, notifyCallback?: (state: any) => any): IPromise<TResult>;
|
||||
/**
|
||||
* Regardless of when the promise was or will be resolved or rejected, then calls one of the success or error callbacks asynchronously as soon as the result is available. The callbacks are called with a single argument: the result or rejection reason. Additionally, the notify callback may be called zero or more times to provide a progress indication, before the promise is resolved or rejected.
|
||||
*
|
||||
* This method returns a new promise which is resolved or rejected via the return value of the successCallback, errorCallback. It also notifies via the return value of the notifyCallback method. The promise can not be resolved or rejected from the notifyCallback method.
|
||||
*/
|
||||
then<TResult>(successCallback: (promiseValue: T) => IPromise<TResult>, errorCallback?: (reason: any) => any, notifyCallback?: (state: any) => any): IPromise<TResult>;
|
||||
/**
|
||||
* Regardless of when the promise was or will be resolved or rejected, then calls one of the success or error callbacks asynchronously as soon as the result is available. The callbacks are called with a single argument: the result or rejection reason. Additionally, the notify callback may be called zero or more times to provide a progress indication, before the promise is resolved or rejected.
|
||||
*
|
||||
* This method returns a new promise which is resolved or rejected via the return value of the successCallback, errorCallback. It also notifies via the return value of the notifyCallback method. The promise can not be resolved or rejected from the notifyCallback method.
|
||||
*/
|
||||
then<TResult>(successCallback: (promiseValue: T) => TResult, errorCallback?: (reason: any) => TResult, notifyCallback?: (state: any) => any): IPromise<TResult>;
|
||||
then<TResult>(successCallback: (promiseValue: T) => IHttpPromise<TResult>|IPromise<TResult>|TResult, errorCallback?: (reason: any) => any, notifyCallback?: (state: any) => any): IPromise<TResult>;
|
||||
|
||||
/**
|
||||
* Shorthand for promise.then(null, errorCallback)
|
||||
*/
|
||||
catch<TResult>(onRejected: (reason: any) => IHttpPromise<TResult>): IPromise<TResult>;
|
||||
/**
|
||||
* Shorthand for promise.then(null, errorCallback)
|
||||
*/
|
||||
catch<TResult>(onRejected: (reason: any) => IPromise<TResult>): IPromise<TResult>;
|
||||
/**
|
||||
* Shorthand for promise.then(null, errorCallback)
|
||||
*/
|
||||
catch<TResult>(onRejected: (reason: any) => TResult): IPromise<TResult>;
|
||||
catch<TResult>(onRejected: (reason: any) => IHttpPromise<TResult>|IPromise<TResult>|TResult): IPromise<TResult>;
|
||||
|
||||
/**
|
||||
* Allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful to release resources or do some clean-up that needs to be done whether the promise was rejected or resolved. See the full specification for more information.
|
||||
@@ -1273,13 +1227,17 @@ declare module ng {
|
||||
interface IHttpPromise<T> extends IPromise<T> {
|
||||
success(callback: IHttpPromiseCallback<T>): IHttpPromise<T>;
|
||||
error(callback: IHttpPromiseCallback<any>): IHttpPromise<T>;
|
||||
then<TResult>(successCallback: (response: IHttpPromiseCallbackArg<T>) => IPromise<TResult>, errorCallback?: (response: IHttpPromiseCallbackArg<any>) => any): IPromise<TResult>;
|
||||
then<TResult>(successCallback: (response: IHttpPromiseCallbackArg<T>) => TResult, errorCallback?: (response: IHttpPromiseCallbackArg<any>) => any): IPromise<TResult>;
|
||||
then<TResult>(successCallback: (response: IHttpPromiseCallbackArg<T>) => IPromise<TResult>|TResult, errorCallback?: (response: IHttpPromiseCallbackArg<any>) => any): IPromise<TResult>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Object that controls the defaults for $http provider
|
||||
* https://docs.angularjs.org/api/ng/service/$http#defaults
|
||||
*/
|
||||
interface IHttpProviderDefaults {
|
||||
xsrfCookieName?: string;
|
||||
xsrfHeaderName?: string;
|
||||
withCredentials?: boolean;
|
||||
headers?: {
|
||||
common?: any;
|
||||
post?: any;
|
||||
|
||||
@@ -0,0 +1,189 @@
|
||||
/// <reference path="asyncblock.d.ts" />
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
import asyncblock = require('asyncblock');
|
||||
import fs = require('fs');
|
||||
|
||||
|
||||
// Sleeping in series
|
||||
asyncblock((flow: asyncblock.IFlow) => {
|
||||
console.time('time');
|
||||
|
||||
setTimeout(flow.add(), 1000);
|
||||
flow.wait(); //Wait for the first setTimeout to finish
|
||||
|
||||
setTimeout(flow.add(), 2000);
|
||||
flow.wait(); //Wait for the second setTimeout to finish
|
||||
|
||||
console.timeEnd('time'); //3 seconds
|
||||
});
|
||||
|
||||
// Trapping results
|
||||
asyncblock((flow) => {
|
||||
var path1 = '', path2 = '';
|
||||
//Start two parallel file reads
|
||||
fs.readFile(path1, 'utf8', flow.set('contents1'));
|
||||
fs.readFile(path2, 'utf8', flow.set('contents2'));
|
||||
|
||||
//Print the concatenation of the results when both reads are finished
|
||||
console.log(flow.get<string>('contents1') + flow.get<string>('contents2'));
|
||||
|
||||
var paths: string[] = [];
|
||||
//Wait for a large number of tasks
|
||||
for(var i = 0; i < 100; i++){
|
||||
//Add each task in parallel with i as the key
|
||||
fs.readFile(paths[i], 'utf8', flow.add(i));
|
||||
}
|
||||
|
||||
//Wait for all the tasks to finish. Results is an object of the form {key1: value1, key2: value2, ...}
|
||||
var results = flow.wait();
|
||||
|
||||
var path = '';
|
||||
//One-liner syntax for waiting on a single task
|
||||
var contents = flow.sync( fs.readFile(path, 'utf8', flow.callback()) );
|
||||
|
||||
//See overview & API docs for more extensive description of techniques
|
||||
});
|
||||
|
||||
// Error handling
|
||||
var asyncTask = (callback: (err: any) => void) => {
|
||||
asyncblock((flow) => {
|
||||
flow.errorCallback = callback; //Setting the errorCallback is the easiest way to perform error handling. If erroCallback isn't set, and an error occurs, it will be thrown instead of returned to the callback
|
||||
|
||||
var path = '';
|
||||
fs.readFile(path, 'utf8', flow.add()); //If readFile encountered an error, it would automatically get passed to the callback
|
||||
var contents = flow.wait();
|
||||
|
||||
console.log(contents); //If an error occured above, this code won't run
|
||||
});
|
||||
};
|
||||
|
||||
// Returning results
|
||||
var asyncTask2 = (callback: (err: any, res: string) => void) => {
|
||||
asyncblock((flow) => {
|
||||
var path = '';
|
||||
var contents = flow.sync( fs.readFile(path, 'utf8', flow.callback()) ); //If readFile encountered an error, it would automatically get passed to the callback
|
||||
|
||||
return contents; //Return the value you want to be passed to the callback
|
||||
}, callback); //The callback can be specified as the 2nd arg to asyncblock. It will be called with the value returned from the asyncblock as the 2nd arg.
|
||||
//If an error occurs, the callback will be called with the error as the first argument.
|
||||
};
|
||||
|
||||
|
||||
// Sample
|
||||
asyncblock.nostack((flow) => {
|
||||
fs.readFile('path1', 'utf8', flow.add('first'));
|
||||
fs.readFile('path2', 'utf8', flow.add('second'));
|
||||
|
||||
//Wait until done reading the first and second files, then write them to another file
|
||||
fs.writeFile('path3', flow.wait<string>('first') + flow.wait<string>('second'), flow.add());
|
||||
flow.wait(); //Wait on all outstanding tasks
|
||||
|
||||
fs.readFile('path3', 'utf8', flow.add('data'));
|
||||
|
||||
console.log(flow.wait('data')); //Print the 3rd file's data
|
||||
console.log('all done');
|
||||
});
|
||||
|
||||
|
||||
// Formatting results
|
||||
(function() {
|
||||
|
||||
var asyncTask = function(callback: (err: any, res1: number, res2: number, res3: number) => void) {
|
||||
process.nextTick(function() {
|
||||
callback(null, 1, 2, 3);
|
||||
});
|
||||
}
|
||||
|
||||
asyncblock(function(flow) {
|
||||
asyncTask(flow.add());
|
||||
|
||||
var result = flow.wait();
|
||||
console.log(result); // Prints 1
|
||||
});
|
||||
|
||||
asyncblock(function(flow) {
|
||||
asyncTask(flow.add(['first', 'second', 'third']));
|
||||
|
||||
var result = flow.wait();
|
||||
console.log(result); // Prints { first: 1, second: 2, third: 3 }
|
||||
|
||||
asyncTask(flow.add('key1', ['first', 'second', 'third']));
|
||||
asyncTask(flow.add('key2', ['a', 'b', 'c']));
|
||||
var result = flow.wait();
|
||||
console.log(result); // Prints { key1: { first: 1, second: 2, third: 3 }, key2: { a: 1, b: 2, c: 3} }
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
|
||||
// Parallel task rate limiting
|
||||
(function() {
|
||||
|
||||
asyncblock(function(flow) {
|
||||
flow.queue(function(callback: Function) {
|
||||
setTimeout(callback, 1000);
|
||||
});
|
||||
|
||||
flow.wait(); //This will wait for about a second
|
||||
});
|
||||
|
||||
asyncblock(function(flow) {
|
||||
flow.maxParallel = 2;
|
||||
|
||||
process.nextTick(function(){
|
||||
flow.queue(function(callback: Function) {
|
||||
setTimeout(callback, 1000);
|
||||
});
|
||||
|
||||
flow.queue(function(callback: Function) {
|
||||
setTimeout(callback, 2000);
|
||||
});
|
||||
|
||||
flow.queue(function(callback: Function) {
|
||||
setTimeout(callback, 3000);
|
||||
});
|
||||
|
||||
flow.doneAdding();
|
||||
});
|
||||
|
||||
flow.forceWait();
|
||||
});
|
||||
|
||||
asyncblock(function(flow) {
|
||||
setTimeout(flow.callback(), 1000);
|
||||
|
||||
flow.queue(function(callback: Function) {
|
||||
setTimeout(callback, 1000);
|
||||
});
|
||||
flow.queue((callback: (err: any, res: string) => void) => {
|
||||
callback(null, '');
|
||||
});
|
||||
|
||||
flow.wait();
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
|
||||
// Task timeouts
|
||||
(function() {
|
||||
|
||||
asyncblock(function(flow){
|
||||
setTimeout(flow.add({timeout: 1000, timeoutIsError: false}), 2000);
|
||||
flow.wait(); //The fiber will yield here for 1 second, then continue
|
||||
|
||||
//Code here will run
|
||||
});
|
||||
|
||||
asyncblock(function(flow){
|
||||
flow.timeoutIsError = false;
|
||||
|
||||
setTimeout(flow.add({timeout: 1000}), 2000);
|
||||
flow.wait(); //The fiber will yield here for 1 second, then continue
|
||||
|
||||
//Code here will run
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
Vendored
+73
@@ -0,0 +1,73 @@
|
||||
// Type definitions for asyncblock 2.1.23
|
||||
// Project: https://github.com/scriby/asyncblock
|
||||
// Definitions by: Hiroki Horiuchi <https://github.com/horiuchi/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
declare module "asyncblock" {
|
||||
function asyncblock<T>(f: (flow: asyncblock.IFlow) => void, callback?: (err: any, res: T) => void): void;
|
||||
|
||||
module asyncblock {
|
||||
export function nostack<T>(f: (flow: asyncblock.IFlow) => void, callback?: (err: any, res: T) => void): void;
|
||||
|
||||
export interface IFlow {
|
||||
add(responseFormat?: string[]): IExecuteFunction;
|
||||
add(key: string, responseFormat?: string[]): IExecuteFunction;
|
||||
add(key: number, responseFormat?: string[]): IExecuteFunction;
|
||||
add(options: IFlowOptions): IExecuteFunction;
|
||||
callback(responseFormat?: string[]): IExecuteFunction;
|
||||
callback(key: string, responseFormat?: string[]): IExecuteFunction;
|
||||
callback(key: number, responseFormat?: string[]): IExecuteFunction;
|
||||
callback(options: IFlowOptions): IExecuteFunction;
|
||||
wait<T>(key?: string): T;
|
||||
wait<T>(key?: number): T;
|
||||
|
||||
get<T>(key: string): T;
|
||||
set(key: string, responseFormat?: string[]): IExecuteFunction;
|
||||
set(options: IFlowOptions): IExecuteFunction;
|
||||
del(key: string): void;
|
||||
|
||||
sync<T>(task: any): T;
|
||||
queue(toExecute: IExecuteFunction): void;
|
||||
queue(key: string, toExecute: IExecuteFunction): void;
|
||||
queue(key: number, toExecute: IExecuteFunction): void;
|
||||
queue(responseFormat: string[], toExecute: IExecuteFunction): void;
|
||||
queue(key: string, responseFormat: string[], toExecute: IExecuteFunction): void;
|
||||
queue(key: number, responseFormat: string[], toExecute: IExecuteFunction): void;
|
||||
queue(options: IFlowOptions, toExecute: IExecuteFunction): void;
|
||||
doneAdding(): void;
|
||||
forceWait<T>(): T;
|
||||
|
||||
maxParallel: number;
|
||||
errorCallback: (err: any) => void;
|
||||
taskTimeout: number;
|
||||
timeoutIsError: boolean;
|
||||
}
|
||||
|
||||
export interface IFlowOptions {
|
||||
ignoreError?: boolean; // default false
|
||||
key?: string; // string | number
|
||||
responseFormat?: string[];
|
||||
timeout?: number;
|
||||
timeoutIsError?: boolean;
|
||||
dontWait?: boolean;
|
||||
firstArgIsError?: boolean; // default true
|
||||
}
|
||||
|
||||
export interface IExecuteFunction {
|
||||
<T1, T2, T3>(err: any, res1: T1, res2: T2, res3: T3): any;
|
||||
<T1, T2>(err: any, res1: T1, res2: T2): any;
|
||||
<T>(err: any, res: T): any;
|
||||
(err: any): any;
|
||||
|
||||
// firstArgIsError === false
|
||||
<T1, T2, T3>(res1: T1, res2: T2, res3: T3): any;
|
||||
<T1, T2>(res1: T1, res2: T2): any;
|
||||
<T>(res: T): any;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export = asyncblock;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
/// <reference path="backbone.radio.d.ts" />
|
||||
/// <reference path="../jquery/jquery.d.ts" />
|
||||
|
||||
class MyCommands extends Backbone.Radio.Commands {
|
||||
|
||||
}
|
||||
|
||||
class MyRequests extends Backbone.Radio.Requests {
|
||||
|
||||
}
|
||||
|
||||
function onRender() : void {
|
||||
|
||||
}
|
||||
|
||||
function onStart(arg1 : string, arg2 : number) : number {
|
||||
return 0;
|
||||
}
|
||||
|
||||
function TestCommands() {
|
||||
var myCommands = new MyCommands();
|
||||
|
||||
var r: Backbone.Radio.Commands;
|
||||
r = myCommands.comply('render', onRender);
|
||||
myCommands.command('render');
|
||||
myCommands.command('start', 'pelle', 23);
|
||||
|
||||
r = myCommands.complyOnce('start', onStart);
|
||||
r = myCommands.complyOnce('start', onStart, myCommands);
|
||||
|
||||
r = myCommands.comply({
|
||||
'render': onRender,
|
||||
'start': onStart
|
||||
});
|
||||
|
||||
r = myCommands.complyOnce({
|
||||
'render': onRender,
|
||||
'start': onStart
|
||||
});
|
||||
|
||||
myCommands.stopComplying('render');
|
||||
myCommands.stopComplying(null, onStart);
|
||||
myCommands.stopComplying(null, null, myCommands);
|
||||
}
|
||||
|
||||
function TestRequests() {
|
||||
var myRequests = new MyRequests();
|
||||
|
||||
var r: Backbone.Radio.Requests;
|
||||
r = myRequests.reply('render', onRender);
|
||||
|
||||
var result: any;
|
||||
result = myRequests.request('render');
|
||||
result = myRequests.request('start', 'pelle', 23);
|
||||
|
||||
r = myRequests.replyOnce('start', onStart);
|
||||
r = myRequests.replyOnce('start', onStart, myRequests);
|
||||
|
||||
r = myRequests.reply({
|
||||
'render': onRender,
|
||||
'start': onStart
|
||||
});
|
||||
|
||||
r = myRequests.replyOnce({
|
||||
'render': onRender,
|
||||
'start': onStart
|
||||
});
|
||||
|
||||
myRequests.stopReplying('render');
|
||||
myRequests.stopReplying(null, onStart);
|
||||
myRequests.stopReplying(null, null, myRequests);
|
||||
}
|
||||
|
||||
function TestGlobalApiAndChannels() {
|
||||
var authChannel = Backbone.Radio.channel('auth');
|
||||
|
||||
// Turn on debug mode
|
||||
Backbone.Radio.DEBUG = true;
|
||||
|
||||
// This will log a warning to the console if it goes unhandled
|
||||
authChannel.command('show:view');
|
||||
|
||||
// Likewise, this will too, helping to prevent memory leaks
|
||||
authChannel.stopReplying('startTime');
|
||||
|
||||
var radio: Backbone.Radio = Backbone.Radio.tuneIn('calendar');
|
||||
radio.tuneIn('calendar');
|
||||
radio = Backbone.Radio.tuneOut('calendar');
|
||||
|
||||
Backbone.Radio.log('channelName', 'eventName', 42, true);
|
||||
|
||||
// Trigger 'some:event' on the settings channel
|
||||
Backbone.Radio.trigger('settings', 'some:event');
|
||||
|
||||
authChannel.reset();
|
||||
|
||||
var channelName: string = authChannel.channelName;
|
||||
|
||||
Backbone.Radio.command('auth', 'show:view');
|
||||
Backbone.Radio.comply('auth', 'show', onRender, authChannel);
|
||||
|
||||
Backbone.Radio.reply('auth', 'authenticate', onStart);
|
||||
Backbone.Radio.request('auth', 'authenticate', 'pelle', 42);
|
||||
}
|
||||
Vendored
+92
@@ -0,0 +1,92 @@
|
||||
// Type definitions for Backbone.Radio v0.8.3
|
||||
// Project: https://github.com/marionettejs/backbone.radio
|
||||
// Definitions by: Peter Palotas <https://github.com/alphaleonis/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../backbone/backbone.d.ts" />
|
||||
|
||||
declare module Backbone {
|
||||
interface Radio {
|
||||
tuneIn(channelName: string): Radio;
|
||||
tuneOut(channelName: string): Radio;
|
||||
log(channelName: string, eventName: string, ...args: any[]): void;
|
||||
channel(channelName: string): Radio.Channel;
|
||||
}
|
||||
|
||||
module Radio {
|
||||
var VERSION: string;
|
||||
var DEBUG: boolean;
|
||||
|
||||
function log(channelName: string, eventName: string, ...args: any[]): void;
|
||||
function tuneIn(channelName: string): Radio;
|
||||
function tuneOut(channelName: string): Radio;
|
||||
function channel(channelName: string): Channel;
|
||||
|
||||
// Proxy functions for Commands
|
||||
function command(channelName: string, commandName: string, ...args: any[]): void;
|
||||
function comply(channelName: string, commandName: string, callback: (...args: any[]) => void, context?: any): Commands;
|
||||
function comply(channelName: string, commands: { [key: string]: (...args: any[]) => any }, context?: any): Commands;
|
||||
function complyOnce(channelName: string, commandName: string, callback: (...args: any[]) => void, context?: any): Commands;
|
||||
function complyOnce(channelName: string, commands: { [key: string]: (...args: any[]) => any }, context?: any): Commands;
|
||||
function stopComplying(channelName: string, commandName?: string, callback?: (...args: any[]) => void, context?: any): Commands;
|
||||
|
||||
// Proxy functions for Requests
|
||||
function request(channelName: string, requestName: string, ...args: any[]): any;
|
||||
function reply(channelName: string, requestName: string, callback: (...args: any[]) => any, context?: any): Requests;
|
||||
function reply(channelName: string, commands: { [key: string]: (...args: any[]) => any }, context?: any): Requests;
|
||||
function replyOnce(channelName: string, requestName: string, callback: (...args: any[]) => any, context?: any): Requests;
|
||||
function replyOnce(channelName: string, commands: { [key: string]: (...args: any[]) => any }, context?: any): Requests;
|
||||
function stopReplying(channelName: string, commandName?: string, callback?: (...args: any[]) => any, context?: any): Requests;
|
||||
|
||||
// Proxy functions for Backbone.Events
|
||||
function on(channelName: string, eventName: string, callback?: Function, context?: any): any;
|
||||
function off(channelName: string, eventName?: string, callback?: Function, context?: any): any;
|
||||
function trigger(channelName: string, eventName: string, ...args: any[]): any;
|
||||
function bind(channelName: string, eventName: string, callback: Function, context?: any): any;
|
||||
function unbind(channelName: string, eventName?: string, callback?: Function, context?: any): any;
|
||||
|
||||
function once(channelName: string, events: string, callback: Function, context?: any): any;
|
||||
function listenTo(channelName: string, object: any, events: string, callback: Function): any;
|
||||
function listenToOnce(channelName: string, object: any, events: string, callback: Function): any;
|
||||
function stopListening(channelName: string, object?: any, events?: string, callback?: Function): any;
|
||||
|
||||
class Commands {
|
||||
command(commandName: string, ...args: any[]): void;
|
||||
comply(commandName: string, callback: (...args: any[]) => void, context?: any): Commands;
|
||||
comply(commands: { [key: string]: (...args: any[]) => any }, context?: any): Commands;
|
||||
complyOnce(commands: { [key: string]: (...args: any[]) => any }, context?: any): Commands;
|
||||
complyOnce(commandName: string, callback: (...args: any[]) => void, context?: any): Commands;
|
||||
stopComplying(commandName?: string, callback?: (...args: any[]) => void, context?: any): Commands;
|
||||
}
|
||||
|
||||
class Requests {
|
||||
request(requestName: string, ...args: any[]): any;
|
||||
reply(requestName: string, callback: (...args: any[]) => any, context?: any): Requests;
|
||||
reply(commands: { [key: string]: (...args: any[]) => any }, context?: any): Requests;
|
||||
replyOnce(requestName: string, callback: (...args: any[]) => any, context?: any): Requests;
|
||||
replyOnce(commands: { [key: string]: (...args: any[]) => any }, context?: any): Requests;
|
||||
stopReplying(commandName?: string, callback?: (...args: any[]) => any, context?: any): Requests;
|
||||
}
|
||||
|
||||
class Channel extends Backbone.Events implements Commands, Requests {
|
||||
channelName: string;
|
||||
reset(): Channel;
|
||||
|
||||
// Radio.Commands
|
||||
command(commandName: string, ...args: any[]): void;
|
||||
comply(commandName: string, callback: (...args: any[]) => void, context?: any): Commands;
|
||||
comply(commands: { [key: string]: (...args: any[]) => any }, context?: any): Commands;
|
||||
complyOnce(commandName: string, callback: (...args: any[]) => void, context?: any): Commands;
|
||||
complyOnce(commands: { [key: string]: (...args: any[]) => any }, context?: any): Commands;
|
||||
stopComplying(commandName?: string, callback?: (...args: any[]) => void, context?: any): Commands;
|
||||
|
||||
// Radio.Requests
|
||||
request(requestName: string, ...args: any[]): any;
|
||||
reply(requestName: string, callback: (...args: any[]) => any, context?: any): Requests;
|
||||
reply(commands: { [key: string]: (...args: any[]) => any }, context?: any): Requests;
|
||||
replyOnce(requestName: string, callback: (...args: any[]) => any, context?: any): Requests;
|
||||
replyOnce(commands: { [key: string]: (...args: any[]) => any }, context?: any): Requests;
|
||||
stopReplying(commandName?: string, callback?: (...args: any[]) => any, context?: any): Requests;
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+9
-9
@@ -275,7 +275,7 @@ declare module Backbone {
|
||||
* 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;
|
||||
routes: any;
|
||||
|
||||
constructor(options?: RouterOptions);
|
||||
initialize(options?: RouterOptions): void;
|
||||
@@ -311,14 +311,14 @@ declare module Backbone {
|
||||
private _updateHash(location: Location, fragment: string, replace: boolean): void;
|
||||
}
|
||||
|
||||
interface ViewOptions<TModel extends Model> {
|
||||
model?: TModel;
|
||||
collection?: Backbone.Collection<TModel>;
|
||||
el?: any;
|
||||
id?: string;
|
||||
className?: string;
|
||||
tagName?: string;
|
||||
attributes?: any[];
|
||||
interface ViewOptions<TModel extends Model> {
|
||||
model?: TModel;
|
||||
collection?: Backbone.Collection<TModel>;
|
||||
el?: any;
|
||||
id?: string;
|
||||
className?: string;
|
||||
tagName?: string;
|
||||
attributes?: {[id: string]: any};
|
||||
}
|
||||
|
||||
class View<TModel extends Model> extends Events {
|
||||
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
// Type definitions for Microsoft.Maps.AdvancedShapes 7.0
|
||||
// Project: http://msdn.microsoft.com/en-us/library/hh921952.aspx
|
||||
// Definitions by: Eric Todd <https://github.com/ericrtodd>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="Microsoft.Maps.d.ts"/>
|
||||
|
||||
declare module Microsoft.Maps.AdvancedShapes {
|
||||
|
||||
export class EntityCollection {
|
||||
|
||||
constructor(options: EntityCollectionOptions);
|
||||
|
||||
clear(): void;
|
||||
get(index: number): Entity;
|
||||
getLength(): number;
|
||||
getVisible(): boolean;
|
||||
getZIndex(): number;
|
||||
indexOf(entity: Entity): number;
|
||||
insert(entity: Entity, index: number): void;
|
||||
pop(): Entity;
|
||||
push(entity: Entity): void;
|
||||
remove(entity: Entity): Entity;
|
||||
removeAt(index: number): Entity;
|
||||
setOptions(options: EntityCollectionOptions): void;
|
||||
toString(): string;
|
||||
|
||||
entityAdded: (args: EntityChangeArgs) => any;
|
||||
entityChanged: (args: EntityChangeArgs) => any;
|
||||
entityRemoved: (args: EntityChangeArgs) => any;
|
||||
}
|
||||
|
||||
export class Polygon implements Entity {
|
||||
|
||||
constructor(locations: Array<Location>, options?: PolygonOptions);
|
||||
|
||||
getFillColor(): Color;
|
||||
getLocations(): Array<Location>;
|
||||
getStrokeColor(): Color;
|
||||
getStrokeDashArray(): string;
|
||||
getStrokeThickness(): number;
|
||||
getVisible(): boolean;
|
||||
setLocations(locations: Location[]): void;
|
||||
setOptions(options: PolylineOptions): void;
|
||||
toString(): string;
|
||||
|
||||
click: (eventArgs: MouseEventArgs) => void;
|
||||
dbclick: (eventArgs: MouseEventArgs) => void;
|
||||
entitychanged: (entity: Entity) => void;
|
||||
mousedown: (eventArgs: MouseEventArgs) => void;
|
||||
mouseout: (eventArgs: MouseEventArgs) => void;
|
||||
mouseover: (eventArgs: MouseEventArgs) => void;
|
||||
mouseup: (eventArgs: MouseEventArgs) => void;
|
||||
rightclick: (eventArgs: MouseEventArgs) => void;
|
||||
}
|
||||
|
||||
}
|
||||
+461
@@ -0,0 +1,461 @@
|
||||
// Type definitions for Microsoft.Maps.Directions 7.0
|
||||
// Project: http://msdn.microsoft.com/en-us/library/hh312813.aspx
|
||||
// Definitions by: Eric Todd <https://github.com/ericrtodd>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="Microsoft.Maps.d.ts"/>
|
||||
|
||||
declare module Microsoft.Maps.Directions {
|
||||
|
||||
export interface BusinessDetails {
|
||||
|
||||
businessName?: string;
|
||||
entityId?: string;
|
||||
phoneNumber?: string;
|
||||
website?: string;
|
||||
}
|
||||
|
||||
export interface WaypointOptions {
|
||||
|
||||
address?: string;
|
||||
businessDetails?: BusinessDetails;
|
||||
disambiguationContainer?: HTMLElement;
|
||||
exactLocation?: string;
|
||||
isViapoint?: boolean;
|
||||
location?: Location;
|
||||
pushpin?: Pushpin;
|
||||
shortAddress?: string;
|
||||
}
|
||||
|
||||
export interface BusinessDisambiguationSuggestion {
|
||||
|
||||
address?: string;
|
||||
distance?: number;
|
||||
entityId?: number;
|
||||
index?: number;
|
||||
isApproximate?: boolean;
|
||||
location?: Location;
|
||||
name?: string;
|
||||
phoneNumber?: string;
|
||||
photoUrl?: string;
|
||||
rooftopLocation?: Location;
|
||||
website?: string;
|
||||
}
|
||||
|
||||
export interface LocationDisambiguationSuggestion {
|
||||
|
||||
formattedSuggestion?: string;
|
||||
location?: Location;
|
||||
rooftopLocation?: Location;
|
||||
suggestion?: string;
|
||||
}
|
||||
|
||||
export interface Disambiguation {
|
||||
|
||||
businessSuggestions?: Array<BusinessDisambiguationSuggestion>;
|
||||
hasMoreSuggestions?: boolean;
|
||||
headerText?: string;
|
||||
locationSuggestions?: Array<LocationDisambiguationSuggestion>;
|
||||
}
|
||||
|
||||
export interface WaypointEventArgs {
|
||||
|
||||
waypoint: Waypoint;
|
||||
}
|
||||
|
||||
export class Waypoint {
|
||||
|
||||
constructor(options: WaypointOptions);
|
||||
|
||||
clear(): void;
|
||||
dispose(): void;
|
||||
getAddress(): string;
|
||||
getBusinessDetails(): BusinessDetails;
|
||||
getDisambiguationContainer(): HTMLElement;
|
||||
getDisambiguationResult(): Disambiguation;
|
||||
getLocation(): Location;
|
||||
getPushpin(): Pushpin;
|
||||
getShortAddress(): string;
|
||||
isExactLocation(): boolean;
|
||||
isViapoint(): boolean;
|
||||
setOptions(options: WaypointOptions): void;
|
||||
|
||||
changed: (args: WaypointEventArgs) => void;
|
||||
geocoded: (args: WaypointEventArgs) => void;
|
||||
reverseGeocoded: (args: WaypointEventArgs) => void;
|
||||
}
|
||||
|
||||
export interface DirectionsRenderOptions {
|
||||
|
||||
autoDisplayDisambiguation?: boolean;
|
||||
autoUpdateMapView?: boolean;
|
||||
disambiguationPushpinOptions?: PushpinOptions;
|
||||
displayDisclaimer?: boolean;
|
||||
displayManeuverIcons?: boolean;
|
||||
displayPostItineraryItemHints?: boolean;
|
||||
displayPreItineraryItemHints?: boolean;
|
||||
displayRouteSelector?: boolean;
|
||||
displayStepWarnings?: boolean;
|
||||
displayTrafficAvoidanceOption?: boolean;
|
||||
displayWalkingWarning?: boolean;
|
||||
drivingPolylineOptions?: PolylineOptions;
|
||||
itineraryContainer?: HTMLElement;
|
||||
lastWaypointIcon?: string;
|
||||
middleWaypointIcon?: string;
|
||||
stepPushpinOptions?: PushpinOptions;
|
||||
transitPolylineOptions?: PolylineOptions;
|
||||
viapointPushpinsOptions?: PushpinOptions;
|
||||
walkingPolylineOptions?: PolylineOptions;
|
||||
waypointPushpinOptions?: PushpinOptions;
|
||||
}
|
||||
|
||||
export enum DistanceUnit {
|
||||
kilometers= 0,
|
||||
miles= 1
|
||||
}
|
||||
|
||||
export enum RouteAvoidance {
|
||||
none= 0,
|
||||
minimizeLimitedAccessHighway= 1,
|
||||
minimizeToll= 2,
|
||||
avoidLimitedAccessHighway= 4,
|
||||
avoidToll= 8,
|
||||
avoidExpressTrain= 16,
|
||||
avoidAirline= 32,
|
||||
avoidBulletTrain= 64
|
||||
}
|
||||
|
||||
export enum RouteMode {
|
||||
driving,
|
||||
transit,
|
||||
walking
|
||||
}
|
||||
|
||||
export enum RouteOptimization {
|
||||
shortestTime= 0,
|
||||
shortestDistance= 1,
|
||||
minimizeMoney= 3,
|
||||
minimizeTransfers= 4,
|
||||
minimizeWalking= 5
|
||||
}
|
||||
|
||||
export enum TimeType {
|
||||
arrival,
|
||||
departure,
|
||||
lastAvailable
|
||||
}
|
||||
|
||||
export interface TransitOptions {
|
||||
timeType?: TimeType;
|
||||
transitTime?: Date;
|
||||
}
|
||||
|
||||
export interface DirectionsRequestOptions {
|
||||
|
||||
avoidTraffic?: boolean;
|
||||
distanceUnit?: DistanceUnit;
|
||||
maxRoutes?: number;
|
||||
routeAvoidance?: Array<RouteAvoidance>;
|
||||
routeDraggable?: boolean;
|
||||
routeIndex?: boolean;
|
||||
routeMode?: RouteMode;
|
||||
routeOptimization?: RouteOptimization;
|
||||
transitOptions?: TransitOptions;
|
||||
}
|
||||
|
||||
export class DirectionsManager {
|
||||
|
||||
constructor(map: Microsoft.Maps.Map);
|
||||
|
||||
resetDirections(): void;
|
||||
addWaypoint(waypoint: Waypoint, index?: number): void;
|
||||
calculateDirections(): void;
|
||||
clearDisplay(): void;
|
||||
dispose(): void;
|
||||
getAllWaypoints(): Array<Waypoint>;
|
||||
getMap(): Map;
|
||||
getNearbyMajorRoads(location: Location, callback: any, errorCallback: any, userData: any): void;
|
||||
getRenderOptions(): DirectionsRenderOptions;
|
||||
getRequestOptions(): DirectionsRequestOptions;
|
||||
getRouteResult(): Array<Route>;
|
||||
removeWaypoint(waypoint: Waypoint): void;
|
||||
removeWaypoint(index: number): void;
|
||||
resetDirections(options: ResetDirectionsOptions): void;
|
||||
reverseGeocode(location: Location, callback: any, errorCallback: any, userData: any): void;
|
||||
setMapView(): void;
|
||||
setRenderOptions(options: DirectionsRenderOptions): void;
|
||||
setRequestOptions(options: DirectionsRequestOptions): void;
|
||||
|
||||
afterRouteSelectorRender: (args: RouteSelectorRenderEventArgs) => void;
|
||||
afterStepRender: (args: DirectionsStepRenderEventArgs) => void;
|
||||
afterSummaryRender: (args: RouteSummaryRenderEventArgs) => void;
|
||||
afterWaypointRender: (args: WaypointRenderEventArgs) => void;
|
||||
beforeDisambiguationRender: (args: DisambiguationRenderEventArgs) => void;
|
||||
beforeRouteSelectorRender: (args: RouteSelectorRenderEventArgs) => void;
|
||||
beforeStepRender: (args: DirectionsStepRenderEventArgs) => void;
|
||||
beforeSummaryRender: (args: RouteSummaryRenderEventArgs) => void;
|
||||
beforeWaypointRender: (args: WaypointRenderEventArgs) => void;
|
||||
directionsError: (args: DirectionsErrorEventArgs) => void;
|
||||
directionsUpdated: (args: DirectionsEventArgs) => void;
|
||||
dragDropCompleted: () => void;
|
||||
itineraryStepClicked: (args: DirectionsStepEventArgs) => void;
|
||||
mouseEnterRouteSelector: (args: RouteSelectorEventArgs) => void;
|
||||
mouseEnterStep: (args: DirectionsStepEventArgs) => void;
|
||||
mouseLeaveRouteSelector: (args: RouteSelectorEventArgs) => void;
|
||||
mouseLeaveStep: (args: DirectionsStepEventArgs) => void;
|
||||
routeSelectorClicked: (args: RouteSelectorEventArgs) => void;
|
||||
waypointAdded: (args: WaypointEventArgs) => void;
|
||||
waypointRemoved: (args: WaypointEventArgs) => void;
|
||||
}
|
||||
|
||||
export interface DirectionsStepEventArgs {
|
||||
handled: boolean;
|
||||
location: Location;
|
||||
routeIndex: number;
|
||||
routeLegIndex: number;
|
||||
step: DirectionsStep;
|
||||
stepIndex: number;
|
||||
stepNumber: number;
|
||||
}
|
||||
|
||||
export interface DirectionsErrorEventArgs {
|
||||
responseCode: RouteResponseCode;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface DirectionsEventArgs {
|
||||
routeSummary: Array<RouteSummary>;
|
||||
route: Array<Route>;
|
||||
}
|
||||
|
||||
export interface DisambiguationRenderEventArgs {
|
||||
containerElement: HTMLElement;
|
||||
handled: boolean;
|
||||
waypoint: Waypoint;
|
||||
}
|
||||
|
||||
export interface DirectionsStepRenderEventArgs {
|
||||
containerElement: HTMLElement;
|
||||
handled: boolean;
|
||||
lastStep: boolean;
|
||||
routeIndex: number;
|
||||
routeLegIndex: number;
|
||||
step: DirectionsStep;
|
||||
stepIndex: number;
|
||||
}
|
||||
|
||||
export interface RouteSummaryRenderEventArgs {
|
||||
containerElement: HTMLElement;
|
||||
handled: boolean;
|
||||
routeLegIndex: number;
|
||||
summary: RouteSummary;
|
||||
}
|
||||
|
||||
export interface WaypointRenderEventArgs {
|
||||
containerElement: HTMLElement;
|
||||
handled: boolean;
|
||||
waypoint: Waypoint;
|
||||
}
|
||||
|
||||
export interface DirectionsStep {
|
||||
|
||||
childItineraryItems: Array<DirectionsStep>;
|
||||
coordinate: Location;
|
||||
distance: string;
|
||||
durationInSeconds: number;
|
||||
formattedText: string;
|
||||
iconType: IconType;
|
||||
isImageRoadShield: boolean;
|
||||
maneuver: Maneuver;
|
||||
maneuverImageName: string;
|
||||
monetaryCost: number;
|
||||
postIntersectionHints: Array<string>;
|
||||
preIntersectionHings: Array<string>;
|
||||
startStopName: string;
|
||||
transitLine: TransitLine;
|
||||
transitStepIcon: string;
|
||||
transitStopId: string;
|
||||
transitTerminus: string;
|
||||
warnings: Array<DirectionsStepWarning>;
|
||||
}
|
||||
|
||||
export enum IconType {
|
||||
none,
|
||||
other,
|
||||
auto,
|
||||
ferry,
|
||||
walk,
|
||||
bus,
|
||||
train,
|
||||
airline
|
||||
}
|
||||
|
||||
export enum Maneuver {
|
||||
none= 0,
|
||||
unknown= 1,
|
||||
departStart= 2,
|
||||
departIntermediateStop= 3,
|
||||
departIntermediateStopReturning= 4,
|
||||
arriveFinish= 5,
|
||||
arriveIntermediateStop= 6,
|
||||
turnLeft= 7,
|
||||
turnRight= 8,
|
||||
turnBack= 9,
|
||||
uTurn= 10,
|
||||
turnToStayLeft= 11,
|
||||
turnToStayRight= 12,
|
||||
bearLeft= 13,
|
||||
bearRight= 14,
|
||||
keepToStayLeft= 15,
|
||||
keepToStayRight= 16,
|
||||
keepToStayStraight= 17,
|
||||
keepLeft= 18,
|
||||
keepRight= 19,
|
||||
keepStraight= 20,
|
||||
take= 21,
|
||||
takeRampLeft= 22,
|
||||
takeRampRight= 23,
|
||||
takeRampStraight= 24,
|
||||
keepOnRampLeft= 25,
|
||||
keepOnRampRight= 26,
|
||||
keepOnRampStraight= 27,
|
||||
merge= 28,
|
||||
continueRoute= 29,
|
||||
roadNameChange= 30,
|
||||
enterRoundabout= 31,
|
||||
exitRoundabout= 32,
|
||||
turnRightThenTurnRight= 33,
|
||||
turnRightThenTurnLeft= 34,
|
||||
turnRightThenBearRight= 35,
|
||||
turnRightThenBearLeft= 36,
|
||||
turnLeftThenTurnLeft= 37,
|
||||
turnLeftThenTurnRight= 38,
|
||||
turnLeftThenBearLeft= 39,
|
||||
turnLeftThenBearRight= 40,
|
||||
bearRightThenTurnRight= 41,
|
||||
bearRightThenTurnLeft= 42,
|
||||
bearRightThenBearRight= 43,
|
||||
bearRightThenBearLeft= 44,
|
||||
bearLeftThenTurnLeft= 45,
|
||||
bearLeftThenTurnRight= 46,
|
||||
bearLeftThenBearRight= 47,
|
||||
bearLeftThenBearLeft= 48,
|
||||
rampThenHighwayRight= 49,
|
||||
rampThenHighwayLeft= 50,
|
||||
rampToHighwayStraight= 51,
|
||||
enterThenExitRoundabout= 52,
|
||||
bearThenMerge= 53,
|
||||
turnThenMerge= 54,
|
||||
bearThenKeep= 55,
|
||||
transfer= 56,
|
||||
wait = 57,
|
||||
takeTransit= 58,
|
||||
walk = 59,
|
||||
transitDepart = 60,
|
||||
transitArrive= 61,
|
||||
}
|
||||
|
||||
export interface TransitLine {
|
||||
abbreviatedName: string;
|
||||
agencyId: number;
|
||||
agencyName: string;
|
||||
agencyUrl: string;
|
||||
lineColor: Color;
|
||||
lineTextColor: Color;
|
||||
providerInfo: string;
|
||||
verboseName: string;
|
||||
}
|
||||
|
||||
export interface DirectionsStepWarning {
|
||||
style: StepWarningStyle;
|
||||
text: string;
|
||||
}
|
||||
|
||||
export enum StepWarningStyle {
|
||||
info= 0,
|
||||
minor= 1,
|
||||
moderate= 2,
|
||||
major= 3,
|
||||
ccZoneEnter= 4,
|
||||
ccZoneExit= 5
|
||||
}
|
||||
|
||||
export interface ResetDirectionsOptions {
|
||||
removeAllWaypoints?: boolean;
|
||||
resetRenderOptions?: boolean;
|
||||
resetRequestOptions?: boolean;
|
||||
}
|
||||
|
||||
export interface Route {
|
||||
routeLegs: Array<RouteLeg>;
|
||||
}
|
||||
|
||||
export interface RouteLeg {
|
||||
endTime: Date;
|
||||
endWaypointLocation: Location;
|
||||
itineraryItems: Array<DirectionsStep>;
|
||||
originalRouteIndex: number;
|
||||
startTime: Date;
|
||||
startWaypointLocation: Location;
|
||||
subLegs: Array<RouteSubLeg>;
|
||||
summary: RouteSummary;
|
||||
}
|
||||
|
||||
export interface RouteSubLeg {
|
||||
actualEnd: Location;
|
||||
actualStart: Location;
|
||||
endDescription: string;
|
||||
routePath: RoutePath;
|
||||
startDescription: string;
|
||||
summary: RouteSummary;
|
||||
}
|
||||
|
||||
export interface RoutePath {
|
||||
decodedLatitudes: Array<number>;
|
||||
decodedLongitudes: Array<number>;
|
||||
decodedRegions: Array<any>;
|
||||
}
|
||||
|
||||
export interface RouteSummary {
|
||||
distance: number;
|
||||
monetaryCost: number;
|
||||
northEast: Location;
|
||||
southWest: Location;
|
||||
time: number;
|
||||
timeWithTraffic: number;
|
||||
}
|
||||
|
||||
export enum RouteResponseCode {
|
||||
success= 0,
|
||||
unknownError= 1,
|
||||
cannotFindNearbyRoad= 2,
|
||||
tooFar= 3,
|
||||
noSolution= 4,
|
||||
dataSourceNotFound= 5,
|
||||
noAvailableTransitTrip= 7,
|
||||
transitStopsTooClose= 8,
|
||||
walkingBestAlternative= 9,
|
||||
outOfTransitBounds= 10,
|
||||
timeout= 11,
|
||||
waypointDisambiguation= 12,
|
||||
hasEmptyWaypoint= 13,
|
||||
exceedMaxWaypointLimit= 14,
|
||||
atleastTwoWaypointRequired= 15,
|
||||
firstOrLastStoppointsIsVia= 16,
|
||||
searchServiceFailed= 17,
|
||||
invalidCredentials= 18
|
||||
}
|
||||
|
||||
export interface RouteSelectorEventArgs {
|
||||
handled: boolean;
|
||||
routeIndex: number;
|
||||
}
|
||||
|
||||
export interface RouteSelectorRenderEventArgs {
|
||||
containerElement: HTMLElement;
|
||||
handled: boolean;
|
||||
routeIndex: number;
|
||||
routeLeg: RouteLeg;
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
+152
@@ -0,0 +1,152 @@
|
||||
// Type definitions for Microsoft.Maps.Search 7.0
|
||||
// Project: http://msdn.microsoft.com/en-us/library/hh868061.aspx
|
||||
// Definitions by: Eric Todd <https://github.com/ericrtodd>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="Microsoft.Maps.d.ts"/>
|
||||
|
||||
declare module Microsoft.Maps.Search {
|
||||
|
||||
export interface Address {
|
||||
addressLine: string;
|
||||
adminDistrict: string;
|
||||
countryRegion: string;
|
||||
district: string;
|
||||
formattedAddress: string;
|
||||
locality: string;
|
||||
postalCode: string;
|
||||
postalTown:string;
|
||||
}
|
||||
|
||||
export interface GeocodeLocation {
|
||||
location: Location;
|
||||
name: string;
|
||||
precision:LocationPrecision;
|
||||
}
|
||||
|
||||
export interface GeocodeRequestOptions {
|
||||
bounds: LocationRect;
|
||||
callback: (result: GeocodeResult, userData: any) => any;
|
||||
count: number;
|
||||
errorCallback: (options: GeocodeRequestOptions) => any;
|
||||
timeout: number;
|
||||
userData: any;
|
||||
where:string;
|
||||
}
|
||||
|
||||
export interface GeocodeResult {
|
||||
parsedAddress: Address;
|
||||
parsedKeyword: string;
|
||||
parsedSeparator: string;
|
||||
results:Array<PlaceResult>;
|
||||
}
|
||||
|
||||
export enum LocationPrecision {
|
||||
interpolated,
|
||||
rooftop,
|
||||
}
|
||||
|
||||
export enum MatchCode {
|
||||
none,
|
||||
good,
|
||||
ambiguous,
|
||||
upHierarchy,
|
||||
modified,
|
||||
}
|
||||
|
||||
export enum MatchConfidence {
|
||||
high,
|
||||
medium,
|
||||
low,
|
||||
unknown,
|
||||
}
|
||||
|
||||
export interface PlaceResult {
|
||||
bestView: LocationRect;
|
||||
location: GeocodeLocation;
|
||||
locations: Array<GeocodeLocation>;
|
||||
matchCode: MatchCode;
|
||||
matchConfidence: MatchConfidence;
|
||||
name:string;
|
||||
}
|
||||
|
||||
export interface ReverseGeocodeRequestOptions {
|
||||
callback: (result: PlaceResult, userData: any) => any;
|
||||
errorCallback: (options: ReverseGeocodeRequestOptions) => any;
|
||||
location: Location;
|
||||
timeout: number;
|
||||
userData:any;
|
||||
}
|
||||
|
||||
export class SearchManager {
|
||||
|
||||
constructor(map: Map);
|
||||
|
||||
geocode(request: GeocodeRequestOptions): void;
|
||||
reverseGeocode(request: ReverseGeocodeRequestOptions): void;
|
||||
search(request:SearchRequestOptions):void;
|
||||
}
|
||||
|
||||
export interface SearchParseResult {
|
||||
keyword: string;
|
||||
location: GeocodeLocation;
|
||||
matchConfidence:MatchConfidence;
|
||||
}
|
||||
|
||||
export interface SearchRegion {
|
||||
address: Address;
|
||||
geocodeLocations: Array<GeocodeLocation>;
|
||||
explicitLocation: GeocodeLocation;
|
||||
mapBounds: LocationRect;
|
||||
matchCode: MatchCode;
|
||||
matchConfidence: MatchConfidence;
|
||||
source:string;
|
||||
}
|
||||
|
||||
export interface SearchRequestOptions {
|
||||
callback:(result: SearchResponse, userData: any)=>any;
|
||||
count: number;
|
||||
errorCallback:(options: SearchRequestOptions)=>any;
|
||||
query: string;
|
||||
startIndex: number;
|
||||
timeout: number;
|
||||
entityType: string;
|
||||
userData: any;
|
||||
what: string;
|
||||
where:string;
|
||||
}
|
||||
|
||||
export interface SearchResponse {
|
||||
alternateSearchRegions: Array<SearchRegion>;
|
||||
hasMore: boolean;
|
||||
parseResults: Array<SearchParseResult>;
|
||||
responseSummary: SearchResponseSummary;
|
||||
searchRegion: SearchRegion;
|
||||
searchResults:Array<SearchResult>;
|
||||
}
|
||||
|
||||
export interface SearchResponseSummary {
|
||||
authResultCode: number;
|
||||
copyright: string;
|
||||
errorMessage: string;
|
||||
statusCode: number;
|
||||
traceId:number;
|
||||
}
|
||||
|
||||
export interface SearchResult {
|
||||
address: Address;
|
||||
city: string;
|
||||
country: string;
|
||||
entityType: string;
|
||||
hoursOfOperation: string;
|
||||
id: number;
|
||||
location: Location;
|
||||
name: string;
|
||||
phone: string;
|
||||
postalCode: string;
|
||||
reviewCount: number;
|
||||
userRating: number;
|
||||
website:string;
|
||||
}
|
||||
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// Type definitions for Microsoft.Maps.Themes 7.0
|
||||
// Project: http://msdn.microsoft.com/en-us/library/hh868061.aspx
|
||||
// Definitions by: Eric Todd <https://github.com/ericrtodd>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module Microsoft.Maps.Themes {
|
||||
|
||||
export class BingTheme {
|
||||
constructor();
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
// Type definitions for Microsoft.Maps.Traffic 7.0
|
||||
// Project: http://msdn.microsoft.com/en-us/library/hh312840.aspx
|
||||
// Definitions by: Eric Todd <https://github.com/ericrtodd>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="Microsoft.Maps.d.ts"/>
|
||||
|
||||
declare module Microsoft.Maps.Traffic {
|
||||
|
||||
export class TrafficManager {
|
||||
|
||||
constructor(map: Map);
|
||||
|
||||
hide(): void;
|
||||
hideFlow(): void;
|
||||
hideIncidents(): void;
|
||||
hideLegend(): void;
|
||||
show(): void;
|
||||
showFlow(): void;
|
||||
showIncidents(): void;
|
||||
showLegend():void;
|
||||
}
|
||||
|
||||
}
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
// Type definitions for Microsoft.Maps.VenueMaps 7.0
|
||||
// Project: http://msdn.microsoft.com/en-us/library/hh312797.aspx
|
||||
// Definitions by: Eric Todd <https://github.com/ericrtodd>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="Microsoft.Maps.d.ts"/>
|
||||
|
||||
declare module Microsoft.Maps.VenueMaps {
|
||||
|
||||
export interface MouseResponse {
|
||||
eventArgs: MouseEventArgs;
|
||||
}
|
||||
|
||||
export interface Directory {
|
||||
|
||||
addToDOM(div: HTMLElement, sortOrder: DirectorySortOrder, to_group_or_not: DirectoryGrouping): void;
|
||||
createUIElements(): void;
|
||||
handleMouseClick(response: MouseResponse): void;
|
||||
handleMouseOut(response: MouseResponse): void;
|
||||
handleMouseOver(response: MouseResponse): void;
|
||||
isInDOM(): boolean;
|
||||
removeFromDOM(): void;
|
||||
setHeight(height: number): void;
|
||||
|
||||
click: (eventArgs: MouseEventArgs) => any;
|
||||
mouseOut: (eventArgs: MouseEventArgs) => any;
|
||||
mouseOver: (eventArgs: MouseEventArgs) => any;
|
||||
}
|
||||
|
||||
export enum DirectoryGrouping {
|
||||
byCategory,
|
||||
none,
|
||||
}
|
||||
|
||||
export enum DirectorySortOrder {
|
||||
alphabetical,
|
||||
byFloor,
|
||||
}
|
||||
|
||||
export interface Floor {
|
||||
name: string;
|
||||
primitives: Array<Primitive>;
|
||||
zoomRange: Array<number>;
|
||||
}
|
||||
|
||||
export interface Footprint {
|
||||
polygons: Array<Polygon>;
|
||||
zoomRange: Array<number>;
|
||||
}
|
||||
|
||||
export interface Metadata {
|
||||
CenterLatitude: number;
|
||||
CenterLongitude: number;
|
||||
DefaultFloor: string;
|
||||
FloorHeader: string;
|
||||
Floors: Array<Floor>;
|
||||
Footprint: Footprint;
|
||||
MapId: string;
|
||||
MapType: string;
|
||||
Name: string;
|
||||
YpId: string;
|
||||
}
|
||||
|
||||
export interface NearbyVenue {
|
||||
distance: number;
|
||||
metadata: Metadata;
|
||||
}
|
||||
|
||||
export interface NearbyVenueOptions {
|
||||
callback: (maps: Array<VenueMap>) => any;
|
||||
location: Location;
|
||||
map: Map;
|
||||
radius: number;
|
||||
}
|
||||
|
||||
export interface Polygon {
|
||||
bounds: LocationRect;
|
||||
center: Location;
|
||||
locations: Array<Location>;
|
||||
}
|
||||
|
||||
export interface Primitive {
|
||||
|
||||
bounds: LocationRect;
|
||||
businessId: string;
|
||||
categoryId: string;
|
||||
categoryName: string;
|
||||
center: Location;
|
||||
floor: Floor;
|
||||
id: string;
|
||||
locations: Array<Location>;
|
||||
name: string;
|
||||
|
||||
highlight(): void;
|
||||
unhighlight(): void;
|
||||
}
|
||||
|
||||
export interface VenueMap {
|
||||
|
||||
address: string;
|
||||
bestMapView: ViewOptions;
|
||||
businessId: string;
|
||||
center: Location;
|
||||
defaultFloor: string;
|
||||
directory: Directory;
|
||||
floorHeader: string;
|
||||
floors: Array<Floor>;
|
||||
footprint: Footprint;
|
||||
id: string;
|
||||
name: string;
|
||||
phoneNumber: string;
|
||||
type: string;
|
||||
|
||||
dispose(): void;
|
||||
getActiveFloor(): string;
|
||||
hide(): void;
|
||||
setActiveFloor(floor: string): void;
|
||||
show(): void;
|
||||
|
||||
click: (eventArgs: Primitive) => any;
|
||||
close: () => any;
|
||||
footprintclick: (eventArgs: Primitive) => any;
|
||||
mouseout: (eventArgs: Primitive) => any;
|
||||
mouseover: (eventArgs: Primitive) => any;
|
||||
}
|
||||
|
||||
export interface VenueMapCreationOptions {
|
||||
error: (errorCode: number, args: any) => any;
|
||||
success: (venueMap: VenueMap, args: any) => any;
|
||||
venueMapId: string;
|
||||
}
|
||||
|
||||
export class VenueMapFactory {
|
||||
|
||||
constructor(map: Map);
|
||||
|
||||
create(options: VenueMapCreationOptions): void;
|
||||
getNearbyVenues(options: NearbyVenueOptions): void;
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
+573
@@ -0,0 +1,573 @@
|
||||
// Type definitions for Microsoft.Maps 7.0
|
||||
// Project: http://msdn.microsoft.com/en-us/library/gg427611.aspx
|
||||
// Definitions by: Eric Todd <https://github.com/ericrtodd>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module Microsoft.Maps {
|
||||
|
||||
export enum AltitudeReference {
|
||||
ground,
|
||||
ellipsoid
|
||||
}
|
||||
|
||||
export class Location {
|
||||
|
||||
constructor(latitude: number, longitude: number, altitude?: number, altitudeReference?: AltitudeReference);
|
||||
|
||||
altitude: number;
|
||||
altitudeReference: AltitudeReference;
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
|
||||
static areEqual(location1: Location, location2: Location): boolean;
|
||||
static normalizeLongitude(longitude: number): number;
|
||||
|
||||
clone(): Location;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export class LocationRect {
|
||||
|
||||
constructor(center: Location, width: number, height: number);
|
||||
|
||||
center: Location;
|
||||
height: number;
|
||||
width: number;
|
||||
|
||||
static fromCorners(northwest: Location, southeast: Location): LocationRect;
|
||||
static fromEdges(north: number, west: number, south: number, east: number, altitude: number, altitudeReference: AltitudeReference): LocationRect;
|
||||
static fromLocations(locations: Array<Location>): LocationRect;
|
||||
static fromString(value: string): LocationRect;
|
||||
|
||||
clone(): LocationRect;
|
||||
contains(location: Location): boolean;
|
||||
getEast(): number;
|
||||
getNorth(): number;
|
||||
getNorthwest(): Location;
|
||||
getSouth(): number;
|
||||
getSouthEast(): Location;
|
||||
getWest(): number;
|
||||
intersects(rect: LocationRect): boolean;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export class Point {
|
||||
|
||||
constructor(x: number, y: number);
|
||||
|
||||
x: number;
|
||||
y: number;
|
||||
|
||||
static areEqual(p1: Point, p2: Point): boolean;
|
||||
static clone(p: Point): Point;
|
||||
|
||||
clone(): Point;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export class Events {
|
||||
|
||||
static addHandler(target: any, eventName: string, handler: () => void): any;
|
||||
static addThrottledHandler(target: any, eventName: string, handler: () => void, throttleInterval: number): any;
|
||||
static hasHandler(target: any, eventName: string): boolean;
|
||||
static invoke(target: any, eventName: string, args: any): void;
|
||||
static removeHandler(handlerId: any): void;
|
||||
}
|
||||
|
||||
export interface KeyEventArgs {
|
||||
altKey: boolean;
|
||||
ctrlKey: boolean;
|
||||
eventName: boolean;
|
||||
handled: boolean;
|
||||
keyCode: string;
|
||||
originalEvent: any;
|
||||
shiftKey: boolean;
|
||||
}
|
||||
|
||||
export enum LabelOverlay {
|
||||
hidden,
|
||||
visible
|
||||
}
|
||||
|
||||
export interface ZoomRange {
|
||||
min: number;
|
||||
max: number;
|
||||
}
|
||||
|
||||
export class Map {
|
||||
|
||||
constructor(containerElement: HTMLElement, options: MapOptions);
|
||||
|
||||
entities: EntityCollection;
|
||||
|
||||
static getVersion(): string;
|
||||
|
||||
blur(): void;
|
||||
dispose(): void;
|
||||
focus(): void;
|
||||
getBounds(): LocationRect;
|
||||
getCenter(): Location;
|
||||
getCopyrights(callback: (copyrights: Array<string>) => void): void;
|
||||
getCredentials(callback: (credentials: Array<string>) => void): void;
|
||||
getHeading(): string;
|
||||
getHeight(): number;
|
||||
getImageryId: string;
|
||||
getMapTypeId(): string;
|
||||
getMetersPerPixel(): number;
|
||||
getMode(): MapMode;
|
||||
getModeLayer(): HTMLElement;
|
||||
getOptions(): MapOptions;
|
||||
getPageX(): number;
|
||||
getPageY(): number;
|
||||
getRootElement(): HTMLElement;
|
||||
getTargetBounds(): LocationRect;
|
||||
getTargetCenter(): Location;
|
||||
getTargetHeading(): number;
|
||||
getTargetMetersPerPixel(): number;
|
||||
getTargetZoom(): number;
|
||||
getUserLayer(): HTMLElement;
|
||||
getViewportX(): number;
|
||||
getViewportY(): number;
|
||||
getWidth(): number;
|
||||
getZoom(): number;
|
||||
getZoomRange(): ZoomRange;
|
||||
isDownloadingTiles(): boolean;
|
||||
isMercator(): boolean;
|
||||
isRotationEnabled(): boolean;
|
||||
setMapType(mapTypeId: MapTypeId): void;
|
||||
setOptions(options: MapOptions): void;
|
||||
setView(options: ViewOptions): void;
|
||||
tryLocationToPixel(locations: Array<Location>, reference?: PixelReference): any;
|
||||
tryPixelToLocation(points: Array<Point>, reference?: PixelReference): any;
|
||||
|
||||
click: (eventArgs: MouseEventArgs) => void;
|
||||
copyrightchanged: () => void;
|
||||
dblclick: (eventArgs: MouseEventArgs) => void;
|
||||
imagerychanged: () => void;
|
||||
keydown: (eventArgs: KeyEventArgs) => void;
|
||||
keypress: (eventArgs: KeyEventArgs) => void;
|
||||
keyup: (eventArgs: KeyEventArgs) => void;
|
||||
maptypechanged: () => void;
|
||||
mousedown: (eventArgs: MouseEventArgs) => void;
|
||||
mousemove: (eventArgs: MouseEventArgs) => void;
|
||||
mouseout: (eventArgs: MouseEventArgs) => void;
|
||||
mouseover: (eventArgs: MouseEventArgs) => void;
|
||||
mouseup: (eventArgs: MouseEventArgs) => void;
|
||||
mousewheel: (eventArgs: MouseEventArgs) => void;
|
||||
rightlick: (eventArgs: MouseEventArgs) => void;
|
||||
targetviewchanged: () => void;
|
||||
tiledownloadcomplete: () => void;
|
||||
viewchange: () => void;
|
||||
viewchangeend: () => void;
|
||||
viewchangestart: () => void;
|
||||
}
|
||||
|
||||
export class MapMode {
|
||||
|
||||
getDrawShapesInSingleLayer(): boolean;
|
||||
getShouldClipPolygons(): boolean;
|
||||
setOptions(options: MapOptions): void;
|
||||
setViewChangeEndDelay(delay: number): void;
|
||||
}
|
||||
|
||||
export interface MapOptions {
|
||||
|
||||
backgroundColor?: Color;
|
||||
credentials?: string;
|
||||
customizeOverlays?: boolean;
|
||||
disableBirdseye?: boolean;
|
||||
disableKeyboardInput?: boolean;
|
||||
disableMouseInput?: boolean;
|
||||
disablePanning?: boolean;
|
||||
disableTouchInput?: boolean;
|
||||
disableUserInput?: boolean;
|
||||
disableZooming?: boolean;
|
||||
enableClickableLogo?: boolean;
|
||||
enableSearchLogo?: boolean;
|
||||
fixedMapPosition?: boolean;
|
||||
height?: number;
|
||||
inertiaIntensity?: number;
|
||||
showBreadcrumb?: boolean;
|
||||
showCopyright?: boolean;
|
||||
showDashboard?: boolean;
|
||||
showMapTypeSelector?: boolean;
|
||||
showScalebar?: boolean;
|
||||
theme?: any;
|
||||
tileBuffer?: number;
|
||||
useInertia?: boolean;
|
||||
width?: number;
|
||||
center?: Location;
|
||||
zoom?: number;
|
||||
mapTypeId?: MapTypeId;
|
||||
}
|
||||
|
||||
export enum MapTypeId {
|
||||
aerial,
|
||||
auto,
|
||||
birdseye,
|
||||
collinsBart,
|
||||
mercator,
|
||||
ordnanceSurvey,
|
||||
road
|
||||
}
|
||||
|
||||
export class MouseEventArgs {
|
||||
|
||||
eventName: string;
|
||||
handled: boolean;
|
||||
isPrimary: boolean;
|
||||
isSecondary: boolean;
|
||||
isTouchEvent: boolean;
|
||||
originalEvent: any;
|
||||
pageX: number;
|
||||
pageY: number;
|
||||
target: any;
|
||||
targetType: string;
|
||||
wheelDelta: number;
|
||||
|
||||
getX(): number;
|
||||
getY(): number;
|
||||
}
|
||||
|
||||
export enum PixelReference {
|
||||
control,
|
||||
page,
|
||||
viewport
|
||||
}
|
||||
|
||||
export interface ViewOptions {
|
||||
|
||||
animate?: boolean;
|
||||
bounds?: LocationRect;
|
||||
center?: Location;
|
||||
centerOffset?: Point;
|
||||
heading?: number;
|
||||
labelOverlay?: LabelOverlay;
|
||||
mapTypeId?: string;
|
||||
padding?: number;
|
||||
zoom?: number;
|
||||
}
|
||||
|
||||
export class Color {
|
||||
|
||||
constructor(alpha: number, red: number, green: number, blue: number);
|
||||
|
||||
a: number;
|
||||
r: number;
|
||||
g: number;
|
||||
b: number;
|
||||
|
||||
static clone(color: Color): Color;
|
||||
static fromHex(hex: string): Color;
|
||||
|
||||
clone(): Color;
|
||||
getOpacity(): number;
|
||||
toHex(): string;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export interface EntityChangeArgs {
|
||||
collection: EntityCollection;
|
||||
entity: Entity;
|
||||
}
|
||||
|
||||
export interface EntityCollectionOptions {
|
||||
bubble: boolean;
|
||||
visible: boolean;
|
||||
zIndex: number;
|
||||
}
|
||||
|
||||
export class EntityCollection {
|
||||
|
||||
constructor(options: EntityCollectionOptions);
|
||||
|
||||
clear(): void;
|
||||
get(index: number): Entity;
|
||||
getLength(): number;
|
||||
getVisible(): boolean;
|
||||
getZIndex(): number;
|
||||
indexOf(entity: Entity): number;
|
||||
insert(entity: Entity, index: number): void;
|
||||
pop(): Entity;
|
||||
push(entity: Entity): void;
|
||||
remove(entity: Entity): Entity;
|
||||
removeAt(index: number): Entity;
|
||||
setOptions(options: EntityCollectionOptions): void;
|
||||
toString(): string;
|
||||
|
||||
entityAdded: (args: EntityChangeArgs) => any;
|
||||
entityChanged: (args: EntityChangeArgs) => any;
|
||||
entityRemoved: (args: EntityChangeArgs) => any;
|
||||
}
|
||||
|
||||
export class Infobox {
|
||||
|
||||
constructor(location: Location, options?: InfoboxOptions);
|
||||
|
||||
getActions(): any;
|
||||
getAnchor(): Point;
|
||||
getDescription(): string;
|
||||
getHeight(): number;
|
||||
getHtmlContent(): string;
|
||||
getId(): string;
|
||||
getLocation(): Location;
|
||||
getOffset(): Point;
|
||||
getOptions(): InfoboxOptions;
|
||||
getShowCloseButton(): boolean;
|
||||
getShowPointer(): boolean;
|
||||
getTitle(): string;
|
||||
getTitleAction(): any;
|
||||
getTitleClickHandler(): () => void;
|
||||
getVisible(): boolean;
|
||||
getWidth(): number;
|
||||
getZIndex(): number;
|
||||
setHtmlContent(content: string): void;
|
||||
setLocation(location: Location): void;
|
||||
setOptions(options: InfoboxOptions): void;
|
||||
toString(): string;
|
||||
|
||||
click: (eventArgs: MouseEventArgs) => void;
|
||||
entitychanged: (entity: Entity) => void;
|
||||
mouseenter: (eventArgs: MouseEventArgs) => void;
|
||||
mouseleave: (eventArgs: MouseEventArgs) => void;
|
||||
}
|
||||
|
||||
export interface Action {
|
||||
label?: string;
|
||||
icon?: string;
|
||||
eventHandler: (args?: any) => void;
|
||||
}
|
||||
|
||||
export interface InfoboxOptions {
|
||||
|
||||
actions?: Array<Action>;
|
||||
description?: string;
|
||||
htmlContent?: string;
|
||||
id?: string;
|
||||
location?: Location;
|
||||
offset?: Point;
|
||||
showCloseButton?: boolean;
|
||||
showPointer?: boolean;
|
||||
pushpin?: Pushpin;
|
||||
title?: string;
|
||||
titleAction?: { label?: string; eventHandler: () => void; };
|
||||
titleClickHandler?: () => void;
|
||||
typeName?: InfoboxType;
|
||||
visible?: boolean;
|
||||
width?: number;
|
||||
height?: number;
|
||||
}
|
||||
|
||||
export enum InfoboxType {
|
||||
mini,
|
||||
standard
|
||||
}
|
||||
|
||||
export interface Entity {
|
||||
}
|
||||
|
||||
export class Polyline implements Entity {
|
||||
|
||||
constructor(locations: Array<Location>, options?: PolylineOptions);
|
||||
|
||||
getLocations(): Array<Location>;
|
||||
getStrokeColor(): Color;
|
||||
getStrokeDashArray(): string;
|
||||
getStrokeThickness(): number;
|
||||
getVisible(): boolean;
|
||||
setLocations(locations: Array<Location>): void;
|
||||
setOptions(options: PolylineOptions): void;
|
||||
toString(): string;
|
||||
|
||||
click: (eventArgs: MouseEventArgs) => void;
|
||||
dblclick: (eventArgs: MouseEventArgs) => void;
|
||||
entitychanged: (entity: Entity) => void;
|
||||
mousedown: (eventArgs: MouseEventArgs) => void;
|
||||
mouseout: (eventArgs: MouseEventArgs) => void;
|
||||
mouseover: (eventArgs: MouseEventArgs) => void;
|
||||
mouseup: (eventArgs: MouseEventArgs) => void;
|
||||
rightclick: (eventArgs: MouseEventArgs) => void;
|
||||
}
|
||||
|
||||
export interface PolylineOptions {
|
||||
|
||||
strokeColor: Color;
|
||||
strokeDashArray: string;
|
||||
strokeThickness: number;
|
||||
visible: boolean;
|
||||
}
|
||||
|
||||
export class Polygon implements Entity {
|
||||
|
||||
constructor(locations: Array<Location>, options?: PolygonOptions);
|
||||
|
||||
getFillColor(): Color;
|
||||
getLocations(): Array<Location>;
|
||||
getStrokeColor(): Color;
|
||||
getStrokeDashArray(): string;
|
||||
getStrokeThickness(): number;
|
||||
getVisible(): boolean;
|
||||
setLocations(locations: Location[]): void;
|
||||
setOptions(options: PolylineOptions): void;
|
||||
toString(): string;
|
||||
|
||||
click: (eventArgs: MouseEventArgs) => void;
|
||||
dbclick: (eventArgs: MouseEventArgs) => void;
|
||||
entitychanged: (entity: Entity) => void;
|
||||
mousedown: (eventArgs: MouseEventArgs) => void;
|
||||
mouseout: (eventArgs: MouseEventArgs) => void;
|
||||
mouseover: (eventArgs: MouseEventArgs) => void;
|
||||
mouseup: (eventArgs: MouseEventArgs) => void;
|
||||
rightclick: (eventArgs: MouseEventArgs) => void;
|
||||
}
|
||||
|
||||
export interface PolygonOptions {
|
||||
|
||||
strokeColor: Color;
|
||||
strokeDashArray: string;
|
||||
strokeThickness: number;
|
||||
visible: boolean;
|
||||
}
|
||||
|
||||
export class Pushpin implements Entity {
|
||||
|
||||
constructor(location: Location, options?: PushpinOptions);
|
||||
|
||||
getAnchor(): Point;
|
||||
getIcon(): string;
|
||||
getHeight(): number;
|
||||
getLocation(): Location;
|
||||
getText(): string;
|
||||
getTextOffset(): Point;
|
||||
getTypeName(): string;
|
||||
getVisible(): boolean;
|
||||
getWidth(): number;
|
||||
getZIndex(): number;
|
||||
setLocation(location: Location): void;
|
||||
setOptions(options: PushpinOptions): void;
|
||||
toString(): string;
|
||||
|
||||
click: (eventArgs: MouseEventArgs) => void;
|
||||
dblclick: (eventArgs: MouseEventArgs) => void;
|
||||
drag: (object: Pushpin) => any;
|
||||
dragend: (eventArgs: MouseEventArgs) => void;
|
||||
dragstart: (eventArgs: MouseEventArgs) => void;
|
||||
entitychanged: (object: { entity: Entity; }) => any;
|
||||
mousedown: (eventArgs: MouseEventArgs) => void;
|
||||
mouseout: (eventArgs: MouseEventArgs) => void;
|
||||
mouseover: (eventArgs: MouseEventArgs) => void;
|
||||
mouseup: (eventArgs: MouseEventArgs) => void;
|
||||
rightclick: (eventArgs: MouseEventArgs) => void;
|
||||
}
|
||||
|
||||
export enum EntityState {
|
||||
highlighted,
|
||||
none,
|
||||
selected
|
||||
}
|
||||
|
||||
export interface PushpinOptions {
|
||||
|
||||
anchor?: Point;
|
||||
draggable?: boolean;
|
||||
height?: number;
|
||||
htmlContent?: string;
|
||||
icon?: string;
|
||||
infobox?: Infobox;
|
||||
state?: EntityState;
|
||||
text?: string;
|
||||
textOffset?: Point;
|
||||
typeName?: string;
|
||||
visible?: boolean;
|
||||
width?: number;
|
||||
zIndex?: number;
|
||||
}
|
||||
|
||||
export class TileLayer implements Entity {
|
||||
|
||||
constructor(options: TileLayerOptions);
|
||||
|
||||
getOpacty(): number;
|
||||
getTileSource(projection: string): TileSource;
|
||||
getZIndex(): number;
|
||||
setOptions(options: TileLayerOptions): void;
|
||||
toString(): string;
|
||||
|
||||
tiledownloadcomplete: () => void;
|
||||
}
|
||||
|
||||
export class TileSource {
|
||||
|
||||
constructor(options: TileSourceOptions);
|
||||
|
||||
getHeight(): number;
|
||||
getUriConstructor(): string;
|
||||
getWidth(): string;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export interface TileSourceOptions {
|
||||
|
||||
height?: number;
|
||||
uriConstructor: string;
|
||||
width?: number;
|
||||
}
|
||||
|
||||
|
||||
export interface TileLayerOptions {
|
||||
|
||||
animationDisplay?: AnimationVisibility;
|
||||
downloadTimeout?: number;
|
||||
mercator?: TileSource;
|
||||
opacity?: number;
|
||||
visible?: boolean;
|
||||
zIndex?: number;
|
||||
}
|
||||
|
||||
export enum AnimationVisibility {
|
||||
auto,
|
||||
hide,
|
||||
show
|
||||
}
|
||||
|
||||
export class Coordinates {
|
||||
|
||||
accuracy: number;
|
||||
altitude: number;
|
||||
altitudeAccuracy: number;
|
||||
heading: number;
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
}
|
||||
|
||||
export class GeoLocationProvider {
|
||||
|
||||
constructor(map: Map);
|
||||
|
||||
addAccuracyCircle(center: Location, radiusInMeters: number, segments: number, options: PositionCircleOptions): void;
|
||||
cancelCurrentRequest(): void;
|
||||
getCurrentPosition(options?: PositionOptions): void;
|
||||
removeAccuracyCircle(): void;
|
||||
}
|
||||
|
||||
export interface PositionCircleOptions {
|
||||
polygonOptions: PolygonOptions;
|
||||
showOnMap: boolean;
|
||||
}
|
||||
|
||||
export class PositionError {
|
||||
errorCode: number;
|
||||
internalError: string;
|
||||
}
|
||||
|
||||
export interface ModuleOptions {
|
||||
callback?: () => void;
|
||||
styleURLS?: Array<string>;
|
||||
culture?: string;
|
||||
homeRegion?: string;
|
||||
}
|
||||
|
||||
export function loadModule(moduleKey: string, options: ModuleOptions): void;
|
||||
export function moduleLoaded(moduleKey: string): void;
|
||||
export function registerModule(moduleKey: string, scriptUrl: string, options?: ModuleOptions): void;
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
/// <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"/>
|
||||
/// <reference path="Microsoft.Maps.Themes.BingTheme.d.ts"/>
|
||||
/// <reference path="Microsoft.Maps.Traffic.d.ts"/>
|
||||
/// <reference path="Microsoft.Maps.VenueMaps.d.ts"/>
|
||||
|
||||
module BingMapsTests {
|
||||
|
||||
// An interactive set of Bing Maps AJAX control usages can be found at http://www.bingmapsportal.com/isdk/ajaxv7
|
||||
// A full API description can be found at http://msdn.microsoft.com/en-us/library/gg427610.aspx
|
||||
export class TestFixture {
|
||||
|
||||
public createMap(
|
||||
// This key can be acquired at http://www.microsoft.com/maps/create-a-bing-maps-key.aspx
|
||||
bingMapsApiKey: string,
|
||||
// This is the HTML container that the map will be drawn inside of
|
||||
target: HTMLElement,
|
||||
// These positions will be placed as pushpins onto the map
|
||||
mapPositions: Array<Position>,
|
||||
// This will fire if the geolocation fails and will pass the original target (parameter 2)
|
||||
onFailure: (element: HTMLElement) => any) {
|
||||
|
||||
var self = this;
|
||||
var map: Microsoft.Maps.Map;
|
||||
|
||||
navigator.geolocation.getCurrentPosition((position: Position) => {
|
||||
|
||||
var locations: Array<Microsoft.Maps.Location> = new Array<Microsoft.Maps.Location>();
|
||||
var options: Microsoft.Maps.MapOptions;
|
||||
|
||||
function loadMap() {
|
||||
options = {};
|
||||
options.credentials = bingMapsApiKey;
|
||||
options.enableClickableLogo = false;
|
||||
options.enableSearchLogo = false;
|
||||
options.showDashboard = false;
|
||||
options.showScalebar = false;
|
||||
options.center = self.toLocation(position);
|
||||
options.zoom = 16;
|
||||
options.mapTypeId = Microsoft.Maps.MapTypeId.road;
|
||||
options.height = target.clientHeight;
|
||||
options.width = target.clientWidth;
|
||||
|
||||
target.innerHTML = "";
|
||||
|
||||
map = new Microsoft.Maps.Map(target, options);
|
||||
|
||||
for (var i = 0; i < mapPositions.length; ++i) {
|
||||
|
||||
var mapPosition: Position = mapPositions[i];
|
||||
var location: Microsoft.Maps.Location = self.createPushpin(map, mapPosition);
|
||||
|
||||
locations.push(location);
|
||||
}
|
||||
|
||||
// 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) });
|
||||
}
|
||||
|
||||
if ((<any>window).Windows != undefined) {
|
||||
// Running in Win8 app
|
||||
Microsoft.Maps.loadModule("Microsoft.Maps.Map", { callback: loadMap });
|
||||
} else {
|
||||
// Running anywhere else
|
||||
loadMap();
|
||||
}
|
||||
}, () => onFailure(target), { maximumAge: 3000, timeout: 5000, enableHighAccuracy: true });
|
||||
|
||||
}
|
||||
|
||||
// Converts a standard HTML geolocation Position to a Location
|
||||
private toLocation(position: Position): Microsoft.Maps.Location {
|
||||
return new Microsoft.Maps.Location(position.coords.latitude, position.coords.longitude);
|
||||
}
|
||||
|
||||
// Creates a pushpin on a specified map and returns the Location for potentially setting the map view
|
||||
private createPushpin(map: Microsoft.Maps.Map, position: Position): Microsoft.Maps.Location {
|
||||
|
||||
var location: Microsoft.Maps.Location;
|
||||
var pushpin: Microsoft.Maps.Pushpin;
|
||||
|
||||
location = this.toLocation(position);
|
||||
pushpin = new Microsoft.Maps.Pushpin(location, null);
|
||||
|
||||
map.entities.push(pushpin);
|
||||
|
||||
return location;
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+3
-3
@@ -26,8 +26,8 @@ interface BootboxButton {
|
||||
}
|
||||
|
||||
interface BootboxDialogOptions {
|
||||
message: any; // String | Element
|
||||
title?: any; // String | Element
|
||||
message: string | Element
|
||||
title?: string | Element
|
||||
callback?: (result: boolean) => any;
|
||||
show?: boolean;
|
||||
onEscape?: () => any;
|
||||
@@ -60,4 +60,4 @@ interface BootboxStatic {
|
||||
hideAll(): void;
|
||||
}
|
||||
|
||||
declare var bootbox: BootboxStatic;
|
||||
declare var bootbox: BootboxStatic;
|
||||
|
||||
Vendored
+5
-5
@@ -18,8 +18,8 @@ declare module "bunyan" {
|
||||
child(obj:Object, simple?:boolean):Logger;
|
||||
reopenFileStreams():void;
|
||||
|
||||
level(value:any /* number | string */):void;
|
||||
levels(name:any /* number | string */, value:any /* number | string */):void;
|
||||
level(value: number | string):void;
|
||||
levels(name: number | string, value: number | string):void;
|
||||
|
||||
trace(error:Error, format?:any, ...params:any[]):void;
|
||||
trace(buffer:Buffer, format?:any, ...params:any[]):void;
|
||||
@@ -62,9 +62,9 @@ declare module "bunyan" {
|
||||
|
||||
interface Stream {
|
||||
type?: string;
|
||||
level?: any; // number | string
|
||||
level?: number | string;
|
||||
path?: string;
|
||||
stream?: WritableStream;
|
||||
stream?: WritableStream | Stream;
|
||||
closeOnExit?: boolean;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ declare module "bunyan" {
|
||||
export var ERROR:number;
|
||||
export var FATAL:number;
|
||||
|
||||
export function resolveLevel(value:any /* number | string */):number;
|
||||
export function resolveLevel(value: number | string):number;
|
||||
|
||||
export function createLogger(options:LoggerOptions):Logger;
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
/// <reference path="../when/when.d.ts" />
|
||||
/// <reference path="./chai-http.d.ts" />
|
||||
|
||||
import fs = require('fs');
|
||||
import http = require('http');
|
||||
import chai = require('chai');
|
||||
import chaiHttp = require('chai-http');
|
||||
import when = require('when');
|
||||
|
||||
chai.use(chaiHttp);
|
||||
|
||||
// Add promise support if this does not exist natively.
|
||||
if (!global.Promise) {
|
||||
chai.request.addPromises(when.promise);
|
||||
}
|
||||
|
||||
|
||||
var app: http.Server;
|
||||
|
||||
chai.request(app).get('/');
|
||||
chai.request('http://localhost:8080').get('/');
|
||||
|
||||
chai.request(app)
|
||||
.put('/user/me')
|
||||
.set('X-API-Key', 'foobar')
|
||||
.send({ password: '123', confirmPassword: '123' });
|
||||
|
||||
chai.request(app)
|
||||
.post('/user/me')
|
||||
.field('_method', 'put')
|
||||
.field('password', '123')
|
||||
.field('confirmPassword', '123');
|
||||
|
||||
chai.request(app)
|
||||
.post('/user/avatar')
|
||||
.attach('imageField', fs.readFileSync('avatar.png'), 'avatar.png');
|
||||
|
||||
chai.request(app)
|
||||
.get('/protected')
|
||||
.auth('user', 'pass');
|
||||
|
||||
chai.request(app)
|
||||
.get('/search')
|
||||
.query('name', 'foo')
|
||||
.query('limit', '10');
|
||||
|
||||
chai.request(app)
|
||||
.put('/user/me')
|
||||
.send({ passsword: '123', confirmPassword: '123' })
|
||||
.end((err: any, res: chaiHttp.Response) => {
|
||||
chai.expect(err).to.be.null;
|
||||
chai.expect(res).to.have.status(200);
|
||||
});
|
||||
|
||||
chai.request(app)
|
||||
.put('/user/me')
|
||||
.send({ passsword: '123', confirmPassword: '123' })
|
||||
.then((res: chaiHttp.Response) => chai.expect(res).to.have.status(200))
|
||||
.catch((err: any) => { throw err; });
|
||||
|
||||
var agent = chai.request.agent(app);
|
||||
|
||||
agent
|
||||
.post('/session')
|
||||
.send({ username: 'me', password: '123' })
|
||||
.then((res: chaiHttp.Response) => {
|
||||
chai.expect(res).to.have.cookie('sessionid');
|
||||
// The `agent` now has the sessionid cookie saved, and will send it
|
||||
// back to the server in the next request:
|
||||
return agent.get('/user/me')
|
||||
.then((res: chaiHttp.Response) => chai.expect(res).to.have.status(200));
|
||||
});
|
||||
|
||||
function test1() {
|
||||
var req = chai.request(app).get('/');
|
||||
req.then((res: chaiHttp.Response) => {
|
||||
chai.expect(res).to.have.status(200);
|
||||
chai.expect(res).to.have.header('content-type', 'text/plain');
|
||||
chai.expect(res).to.have.header('content-type', /^text/);
|
||||
chai.expect(res).to.have.headers;
|
||||
chai.expect('127.0.0.1').to.be.an.ip;
|
||||
chai.expect(res).to.be.json;
|
||||
chai.expect(res).to.be.html;
|
||||
chai.expect(res).to.be.text;
|
||||
chai.expect(res).to.redirect;
|
||||
chai.expect(res).to.redirectTo('http://example.com');
|
||||
chai.expect(res).to.have.param('orderby');
|
||||
chai.expect(res).to.have.param('orderby', 'date');
|
||||
chai.expect(res).to.not.have.param('limit');
|
||||
chai.expect(req).to.have.cookie('session_id');
|
||||
chai.expect(req).to.have.cookie('session_id', '1234');
|
||||
chai.expect(req).to.not.have.cookie('PHPSESSID');
|
||||
chai.expect(res).to.have.cookie('session_id');
|
||||
chai.expect(res).to.have.cookie('session_id', '1234');
|
||||
chai.expect(res).to.not.have.cookie('PHPSESSID');
|
||||
chai.expect(res.body).to.have.property('version', '4.0.0');
|
||||
}, (err: any) => {
|
||||
throw err;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
when(chai.request(app).get('/')).done(() => console.log('success'), () => console.log('failure'));
|
||||
Vendored
+87
@@ -0,0 +1,87 @@
|
||||
// Type definitions for chai-http
|
||||
// Project: https://github.com/chaijs/chai-http
|
||||
// Definitions by: Wim Looman <https://github.com/Nemo157>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
/// <reference path="../chai/chai.d.ts" />
|
||||
|
||||
declare module chai {
|
||||
export function request(server: any): chaiHttp.Agent;
|
||||
|
||||
export module request {
|
||||
export function agent(server: any): chaiHttp.Agent;
|
||||
export function addPromises(promiseConstructor: chaiHttp.PromiseConstructor): void;
|
||||
}
|
||||
|
||||
interface Assertions extends chaiHttp.Assertions {
|
||||
}
|
||||
|
||||
interface TypeComparison extends chaiHttp.TypeComparison {
|
||||
}
|
||||
}
|
||||
|
||||
declare function chaiHttp(chai: any, utils: any): void;
|
||||
declare module chaiHttp {
|
||||
interface PromiseConstructor {
|
||||
<T>(resolver: (resolve: (value: T) => void, reject: (reason: any) => void) => void): Promise<T>;
|
||||
}
|
||||
|
||||
interface Promise<T> {
|
||||
then<U>(onFulfilled: (value: T) => U, onRejected?: (reason: any) => U): Promise<U>;
|
||||
}
|
||||
|
||||
interface Response {
|
||||
body: any;
|
||||
type: string;
|
||||
status: number;
|
||||
}
|
||||
|
||||
interface Request extends FinishedRequest {
|
||||
attach(field: string, file: string, filename: string): Request;
|
||||
attach(field: string, file: Buffer, filename: string): Request;
|
||||
set(field: string, val: string): Request;
|
||||
query(key: string, value: string): Request;
|
||||
send(data: Object): Request;
|
||||
auth(user: string, name: string): Request;
|
||||
field(name: string, val: string): Request;
|
||||
end(callback?: (err: any, res: Response) => void): FinishedRequest;
|
||||
}
|
||||
|
||||
interface FinishedRequest {
|
||||
then(success?: (res: Response) => void, failure?: (err: any) => void): FinishedRequest;
|
||||
catch(failure?: (err: any) => void): FinishedRequest;
|
||||
}
|
||||
|
||||
interface Agent {
|
||||
get(url: string, callback?: (err: any, res: Response) => void): Request;
|
||||
post(url: string, callback?: (err: any, res: Response) => void): Request;
|
||||
put(url: string, callback?: (err: any, res: Response) => void): Request;
|
||||
head(url: string, callback?: (err: any, res: Response) => void): Request;
|
||||
del(url: string, callback?: (err: any, res: Response) => void): Request;
|
||||
options(url: string, callback?: (err: any, res: Response) => void): Request;
|
||||
patch(url: string, callback?: (err: any, res: Response) => void): Request;
|
||||
}
|
||||
|
||||
interface Assertions {
|
||||
status(code: number): any;
|
||||
header(key: string, value?: string): any;
|
||||
header(key: string, value?: RegExp): any;
|
||||
headers: any;
|
||||
json: any;
|
||||
// text: any;
|
||||
// html: any;
|
||||
redirect: any;
|
||||
redirectTo(location: string): any;
|
||||
param(key: string, value?: string): any;
|
||||
cookie(key: string, value?: string): any;
|
||||
}
|
||||
|
||||
interface TypeComparison {
|
||||
ip: any;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "chai-http" {
|
||||
export = chaiHttp;
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
Vendored
+2
-2
@@ -18,7 +18,7 @@ declare module chrome.app.runtime {
|
||||
}
|
||||
|
||||
interface LaunchDataItem {
|
||||
entry: File;
|
||||
entry: FileEntry;
|
||||
type: string;
|
||||
}
|
||||
|
||||
@@ -367,4 +367,4 @@ declare module chrome.sockets.tcpServer {
|
||||
|
||||
var onAccept: Event<AcceptEventArgs>;
|
||||
var onAcceptError: Event<AcceptErrorEventArgs>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
Vendored
+12
-8
@@ -2173,20 +2173,24 @@ declare module chrome.webNavigation {
|
||||
error: string;
|
||||
}
|
||||
|
||||
interface WebNavigationEventFilters {
|
||||
url: chrome.events.UrlFilter[];
|
||||
}
|
||||
|
||||
interface WebNavigationReferenceFragmentUpdatedEvent extends chrome.events.Event {
|
||||
addListener(callback: (details: ReferenceFragmentUpdatedDetails) => void): void;
|
||||
addListener(callback: (details: ReferenceFragmentUpdatedDetails) => void, filters? : WebNavigationEventFilters): void;
|
||||
}
|
||||
|
||||
interface WebNavigationCompletedEvent extends chrome.events.Event {
|
||||
addListener(callback: (details: CompletedDetails) => void): void;
|
||||
addListener(callback: (details: CompletedDetails) => void, filters? : WebNavigationEventFilters): void;
|
||||
}
|
||||
|
||||
interface WebNavigationHistoryStateUpdatedEvent extends chrome.events.Event {
|
||||
addListener(callback: (details: HistoryStateUpdatedDetails) => void): void;
|
||||
addListener(callback: (details: HistoryStateUpdatedDetails) => void, filters?: WebNavigationEventFilters): void;
|
||||
}
|
||||
|
||||
interface WebNavigationCreatedNavigationTargetEvent extends chrome.events.Event {
|
||||
addListener(callback: (details: CreatedNavigationTargetDetails) => void): void;
|
||||
addListener(callback: (details: CreatedNavigationTargetDetails) => void, filters?: WebNavigationEventFilters): void;
|
||||
}
|
||||
|
||||
interface WebNavigationTabReplacedEvent extends chrome.events.Event {
|
||||
@@ -2194,19 +2198,19 @@ declare module chrome.webNavigation {
|
||||
}
|
||||
|
||||
interface WebNavigationBeforeNavigateEvent extends chrome.events.Event {
|
||||
addListener(callback: (details: BeforeNavigateDetails) => void): void;
|
||||
addListener(callback: (details: BeforeNavigateDetails) => void, filters?: WebNavigationEventFilters): void;
|
||||
}
|
||||
|
||||
interface WebNavigationCommittedEvent extends chrome.events.Event {
|
||||
addListener(callback: (details: CommittedDetails) => void): void;
|
||||
addListener(callback: (details: CommittedDetails) => void, filters?: WebNavigationEventFilters): void;
|
||||
}
|
||||
|
||||
interface WebNavigationDomContentLoadedEvent extends chrome.events.Event {
|
||||
addListener(callback: (details: DomContentLoadedDetails) => void): void;
|
||||
addListener(callback: (details: DomContentLoadedDetails) => void, filters?: WebNavigationEventFilters): void;
|
||||
}
|
||||
|
||||
interface WebNavigationErrorOccurredEvent extends chrome.events.Event {
|
||||
addListener(callback: (details: ErrorOccurredDetails) => void): void;
|
||||
addListener(callback: (details: ErrorOccurredDetails) => void, filters?: WebNavigationEventFilters): void;
|
||||
}
|
||||
|
||||
export function getFrame(details: GetFrameDetails, callback: (details?: GetFrameResultDetails) => void): void;
|
||||
|
||||
@@ -32,12 +32,29 @@ var conf = convict({
|
||||
format: (val: string) => validator.isUUID(val),
|
||||
default: '01527E56-8431-11E4-AF91-47B661C210CA'
|
||||
},
|
||||
db: {
|
||||
ip: {
|
||||
doc: 'The IP address to bind.',
|
||||
format: 'ipaddress',
|
||||
default: '127.0.0.1',
|
||||
env: 'IP_ADDRESS',
|
||||
},
|
||||
port: {
|
||||
doc: 'The port to bind.',
|
||||
format: 'port',
|
||||
default: 0,
|
||||
env: 'PORT',
|
||||
arg: 'port',
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
// load environment dependent configuration
|
||||
|
||||
var env = conf.get('env');
|
||||
var dbip = conf.get('db.ip');
|
||||
conf.loadFile('./config/' + env + '.json');
|
||||
conf.loadFile(['./configs/always.json', './configs/sometimes.json']);
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -8,7 +8,7 @@ declare module "convict" {
|
||||
|
||||
module convict {
|
||||
interface Schema {
|
||||
[name: string]: {
|
||||
[name: string]: convict.Schema | {
|
||||
default: any;
|
||||
doc?: string;
|
||||
format?: any;
|
||||
|
||||
Vendored
+3
-2
@@ -2,9 +2,9 @@
|
||||
// Project: http://cordova.apache.org
|
||||
// Definitions by: Microsoft Open Technologies Inc. <http://msopentech.com>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
//
|
||||
//
|
||||
// Copyright (c) Microsoft Open Technologies, Inc.
|
||||
// Licensed under the MIT license.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
/// <reference path="plugins/BatteryStatus.d.ts"/>
|
||||
/// <reference path="plugins/Camera.d.ts"/>
|
||||
@@ -22,6 +22,7 @@
|
||||
/// <reference path="plugins/NetworkInformation.d.ts"/>
|
||||
/// <reference path="plugins/Push.d.ts"/>
|
||||
/// <reference path="plugins/Splashscreen.d.ts"/>
|
||||
/// <reference path="plugins/StatusBar.d.ts"/>
|
||||
/// <reference path="plugins/Vibration.d.ts"/>
|
||||
/// <reference path="plugins/WebSQL.d.ts"/>
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
// Licensed under the MIT license.
|
||||
|
||||
/// <reference path="StatusBar.d.ts" />
|
||||
|
||||
var statusBar: StatusBar = window.StatusBar;
|
||||
statusBar.overlaysWebView(true);
|
||||
statusBar.overlaysWebView(false);
|
||||
statusBar.styleDefault();
|
||||
statusBar.styleLightContent();
|
||||
statusBar.styleBlackTranslucent();
|
||||
statusBar.styleBlackOpaque();
|
||||
statusBar.backgroundColorByName("red");
|
||||
statusBar.backgroundColorByHexString("#aaa");
|
||||
statusBar.hide();
|
||||
statusBar.show();
|
||||
var visible: boolean = statusBar.isVisible;
|
||||
Vendored
+75
@@ -0,0 +1,75 @@
|
||||
// Type definitions for Apache Cordova StatusBar plugin.
|
||||
// Project: https://github.com/apache/cordova-plugin-statusbar
|
||||
// Definitions by: Xinkai Chen <https://github.com/Xinkai>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* Global object StatusBar.
|
||||
*/
|
||||
interface Window {
|
||||
StatusBar: StatusBar;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The StatusBar object provides some functions to customize the iOS and Android StatusBar.
|
||||
*/
|
||||
interface StatusBar {
|
||||
/**
|
||||
* On iOS 7, make the statusbar overlay or not overlay the WebView.
|
||||
* @param isOverlay On iOS 7, set to false to make the statusbar appear like iOS 6.
|
||||
* Set the style and background color to suit using the other functions.
|
||||
*/
|
||||
overlaysWebView: (isOverlay: boolean) => void;
|
||||
|
||||
/**
|
||||
* Use the default statusbar (dark text, for light backgrounds).
|
||||
*/
|
||||
styleDefault: () => void;
|
||||
|
||||
/**
|
||||
* Use the lightContent statusbar (light text, for dark backgrounds).
|
||||
*/
|
||||
styleLightContent: () => void;
|
||||
|
||||
/**
|
||||
* Use the blackTranslucent statusbar (light text, for dark backgrounds).
|
||||
*/
|
||||
styleBlackTranslucent: () => void;
|
||||
|
||||
/**
|
||||
* Use the blackOpaque statusbar (light text, for dark backgrounds).
|
||||
*/
|
||||
styleBlackOpaque: () => void;
|
||||
|
||||
/**
|
||||
* On iOS 7, when you set StatusBar.statusBarOverlaysWebView to false,
|
||||
* you can set the background color of the statusbar by color name.
|
||||
* @param color Supported color names are:
|
||||
* black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
|
||||
*/
|
||||
backgroundColorByName: (color: string) => void;
|
||||
|
||||
/**
|
||||
* Sets the background color of the statusbar by a hex string.
|
||||
* @param color CSS shorthand properties are also supported.
|
||||
* On iOS 7, when you set StatusBar.statusBarOverlaysWebView to false, you can set the background color of the statusbar by a hex string (#RRGGBB).
|
||||
* On WP7 and WP8 you can also specify values as #AARRGGBB, where AA is an alpha value
|
||||
*/
|
||||
backgroundColorByHexString: (color: string) => void;
|
||||
|
||||
/**
|
||||
* Hide the statusbar.
|
||||
*/
|
||||
hide: () => void;
|
||||
|
||||
/**
|
||||
* Show the statusbar.
|
||||
*/
|
||||
show: () => void;
|
||||
|
||||
/**
|
||||
* Read this property to see if the statusbar is visible or not.
|
||||
*/
|
||||
isVisible: boolean;
|
||||
}
|
||||
Vendored
+2
-2
@@ -62,12 +62,12 @@ interface SqlTransaction {
|
||||
* @param sql SQL statement to execute.
|
||||
* @param arguments SQL stetement arguments.
|
||||
* @param successCallback Called in case of query has been successfully done.
|
||||
* @param errorCallback Called, when query fails.
|
||||
* @param errorCallback Called, when query fails. Return false to continue transaction; true or no return to rollback.
|
||||
*/
|
||||
executeSql(sql: string,
|
||||
arguments?: any[],
|
||||
successCallback?: (transaction: SqlTransaction, resultSet: SqlResultSet) => void,
|
||||
errorCallback?: (transaction: SqlTransaction, error: SqlError) => void): void;
|
||||
errorCallback?: (transaction: SqlTransaction, error: SqlError) => any): void;
|
||||
}
|
||||
|
||||
declare var SqlTransaction: {
|
||||
|
||||
Vendored
+3
@@ -56,6 +56,7 @@ declare module createjs {
|
||||
clone(): Event;
|
||||
preventDefault(): void;
|
||||
remove(): void;
|
||||
set(props: Object): Event;
|
||||
stopImmediatePropagation(): void;
|
||||
stopPropagation(): void;
|
||||
toString(): string;
|
||||
@@ -93,7 +94,9 @@ declare module createjs {
|
||||
willTrigger(type: string): boolean;
|
||||
}
|
||||
|
||||
export function extend(subclass: () => any, superclass: () => any): () => any; // returns the subclass prototype
|
||||
export function indexOf(array: any[], searchElement: Object): number;
|
||||
export function promote(subclass: () => any, prefix: string): () => any;
|
||||
|
||||
export function proxy(method: (eventObj: Object) => boolean, scope: Object, ...arg: any[]): (eventObj: Object) => any;
|
||||
export function proxy(method: (eventObj: Object) => void, scope: Object, ...arg: any[]): (eventObj: Object) => any;
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/// <reference path="../d3/d3.d.ts" />
|
||||
/// <reference path="d3.cloud.layout.d.ts" />
|
||||
|
||||
interface ICompTextSize{
|
||||
text:string;
|
||||
size:number;
|
||||
x?:number;
|
||||
y?:number;
|
||||
rotate?:number;
|
||||
}
|
||||
|
||||
|
||||
var fill = d3.scale.category20();
|
||||
d3.layout.cloud().size([300, 300])
|
||||
.words([
|
||||
"Hello", "world", "normally", "you", "want", "more", "words",
|
||||
"than", "this"].map(function(d:string) {
|
||||
return {text: d, size: 10 + Math.random() * 90};
|
||||
}))
|
||||
.padding(5)
|
||||
.rotate(function() { return ~~(Math.random() * 2) * 90; })
|
||||
.font("Impact")
|
||||
.fontSize(function(d:ICompTextSize) { return d.size; })
|
||||
.on("end", draw)
|
||||
.start();
|
||||
function draw(words:ICompTextSize[]) {
|
||||
d3.select("body").append("svg")
|
||||
.attr("width", 300)
|
||||
.attr("height", 300)
|
||||
.append("g")
|
||||
.attr("transform", "translate(150,150)")
|
||||
.selectAll("text")
|
||||
.data(words)
|
||||
.enter().append("text")
|
||||
.style("font-size", function(d:ICompTextSize) { return d.size + "px"; })
|
||||
.style("font-family", "Impact")
|
||||
.style("fill", function(d:ICompTextSize, i:number) { return fill(i); })
|
||||
.attr("text-anchor", "middle")
|
||||
.attr("transform", function(d:ICompTextSize) {
|
||||
return "translate(" + [d.x, d.y] + ")rotate(" + d.rotate + ")";
|
||||
})
|
||||
.text(function(d:ICompTextSize) { return d.text; });
|
||||
}
|
||||
Vendored
+45
@@ -0,0 +1,45 @@
|
||||
// Type definitions for d3JS cloud layout plugin by Jason Davies
|
||||
// Project: https://github.com/jasondavies/d3-cloud
|
||||
// Definitions by: hans windhoff <https://github.com/hansrwindhoff>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../d3/d3.d.ts" />
|
||||
|
||||
declare module D3 {
|
||||
export module Layout {
|
||||
export interface IRotate {
|
||||
(number:number) : CloudLayout;
|
||||
(number:()=>number) : CloudLayout;
|
||||
}
|
||||
|
||||
|
||||
|
||||
export interface CloudLayout {
|
||||
(layers: any[], index?: number): any[];
|
||||
values(accessor?: (d: any) => any): CloudLayout;
|
||||
offset(offset: string): CloudLayout;
|
||||
size: {
|
||||
/**
|
||||
* Gets the available layout size
|
||||
*/
|
||||
(): Array<number>;
|
||||
/**
|
||||
* Sets the available layout size
|
||||
*/
|
||||
(size: Array<number>): CloudLayout;
|
||||
};
|
||||
words: (inputArray: Array<any>) => CloudLayout;
|
||||
rotate:IRotate;
|
||||
padding: (number:number) => CloudLayout;
|
||||
font: (string:string) => CloudLayout;
|
||||
fontSize(fctn: (d: any) => number): CloudLayout;
|
||||
on: (eventname: string, callee: (words: any[]) => void) => CloudLayout;
|
||||
start: () => CloudLayout;
|
||||
}
|
||||
|
||||
|
||||
export interface Layout {
|
||||
cloud(): CloudLayout;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
/// <reference path="dagre.d.ts"/>
|
||||
module DagreTests {
|
||||
var gDagre = new dagre.graphlib.Graph();
|
||||
gDagre.setGraph({});
|
||||
gDagre.setDefaultEdgeLabel(function(){
|
||||
return ;
|
||||
});
|
||||
|
||||
gDagre.setNode("a", {});
|
||||
gDagre.setEdge("b", "c");
|
||||
|
||||
dagre.layout(gDagre);
|
||||
}
|
||||
Vendored
+29
@@ -0,0 +1,29 @@
|
||||
// Type definitions for dagre 0.7.0
|
||||
// Project: https://github.com/cpettitt/dagre
|
||||
// Definitions by: Qinfeng Chen <https://github.com/qinfchen>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
declare module Dagre{
|
||||
interface DagreFactory {
|
||||
graphlib: GraphLib;
|
||||
layout(graph: Graph): void;
|
||||
}
|
||||
|
||||
interface Graph {
|
||||
new (): Graph;
|
||||
edges(): string[];
|
||||
edge(id: string): any;
|
||||
nodes(): string[];
|
||||
node(id: string): any;
|
||||
setDefaultEdgeLabel(callback: () => void): void;
|
||||
setEdge(sourceId: string, targetId: string): void;
|
||||
setGraph(options: { [key: string]: any }): void;
|
||||
setNode(id: string, node: { [key: string]: any }): void;
|
||||
}
|
||||
|
||||
interface GraphLib {
|
||||
Graph: Graph
|
||||
}
|
||||
}
|
||||
|
||||
declare var dagre: Dagre.DagreFactory;
|
||||
|
||||
@@ -0,0 +1,280 @@
|
||||
/// <reference path="deployJava.d.ts" />
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "allowPlugin".
|
||||
*/
|
||||
function testAllowPlugin() {
|
||||
var result: boolean = deployJava.allowPlugin();
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "compareVersions".
|
||||
*/
|
||||
function testCompareVersions() {
|
||||
var installed = '1.8';
|
||||
var required = '1.7';
|
||||
|
||||
var result = deployJava.compareVersions(installed, required);
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "compareVersionToPattern".
|
||||
*/
|
||||
function testCompareVersionToPattern() {
|
||||
var version: string = '1.8';
|
||||
var patternArray: Array<string> = ['1.6', '1.7', '1.8'];
|
||||
var familyMatch: boolean = false;
|
||||
var minMatch: boolean = true;
|
||||
|
||||
var result = deployJava.compareVersionToPattern(version, patternArray, familyMatch, minMatch);
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "enableAlerts".
|
||||
*/
|
||||
function testEnableAlerts() {
|
||||
deployJava.enableAlerts();
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "FFInstall".
|
||||
*/
|
||||
function testFFInstall() {
|
||||
var result: boolean = deployJava.FFInstall();
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "getBrowser".
|
||||
*/
|
||||
function testGetBrowser() {
|
||||
var result: string = deployJava.getBrowser();
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "getJPIVersionUsingMimeType".
|
||||
*/
|
||||
function testGetJPIVersionUsingMimeType() {
|
||||
deployJava.getJPIVersionUsingMimeType();
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "getJREs".
|
||||
*/
|
||||
function testGetJREs() {
|
||||
var versions: Array<String> = deployJava.getJREs();
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "getPlugin".
|
||||
*/
|
||||
function testGetPlugin() {
|
||||
var versions: HTMLElement = deployJava.getPlugin();
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "IEInstall".
|
||||
*/
|
||||
function testIEInstall() {
|
||||
var result: boolean = deployJava.IEInstall();
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "installJRE".
|
||||
*/
|
||||
function testInstallJRE() {
|
||||
var requestVersion: string = '1.8';
|
||||
var result: boolean = deployJava.installJRE(requestVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "installLatestJRE".
|
||||
*/
|
||||
function testInstallLatestJRE() {
|
||||
var installCallback: Function = () => {};
|
||||
var result: boolean = deployJava.installLatestJRE(installCallback);
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "isAutoInstallEnabled".
|
||||
*/
|
||||
function testIsAutoInstallEnabled() {
|
||||
var requestedJREVersion: string = '1.8';
|
||||
var result: boolean = deployJava.isAutoInstallEnabled();
|
||||
var result: boolean = deployJava.isAutoInstallEnabled(requestedJREVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "isAutoUpdateEnabled".
|
||||
*/
|
||||
function testIsAutoUpdateEnabled() {
|
||||
var result: boolean = deployJava.isAutoUpdateEnabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "isCallbackSupported".
|
||||
*/
|
||||
function testIsCallbackSupported() {
|
||||
var result: boolean = deployJava.isCallbackSupported();
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "isPlugin2".
|
||||
*/
|
||||
function testIsPlugin2() {
|
||||
var result: boolean = deployJava.isPlugin2();
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "isPluginInstalled".
|
||||
*/
|
||||
function testIsPluginInstalled() {
|
||||
var result: boolean = deployJava.isPluginInstalled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "isWebStartInstalled".
|
||||
*/
|
||||
function testIsWebStartInstalled() {
|
||||
var minimumVersion: string = '1.7';
|
||||
var result: boolean = deployJava.isWebStartInstalled();
|
||||
var result: boolean = deployJava.isWebStartInstalled(minimumVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "launch".
|
||||
*/
|
||||
function testLaunch() {
|
||||
var jnlp: string = 'http://www.example.com/';
|
||||
var result: boolean = deployJava.launch(jnlp);
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "launchWebStartApplication".
|
||||
*/
|
||||
function testLaunchWebStartApplication() {
|
||||
var jnlp: string = 'http://www.example.com/';
|
||||
deployJava.launchWebStartApplication(jnlp);
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "poll".
|
||||
*/
|
||||
function testPool() {
|
||||
deployJava.poll();
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "refresh".
|
||||
*/
|
||||
function testRefresh() {
|
||||
deployJava.refresh();
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "runApplet".
|
||||
*/
|
||||
function testRunApplet() {
|
||||
var attributes: Object = {
|
||||
code:'java2d.Java2DemoApplet.class',
|
||||
archive:'Java2Demo.jar',
|
||||
width:710,
|
||||
height:540
|
||||
};
|
||||
|
||||
var parameters: Object = { fontSize:16, permissions:'sandbox' };
|
||||
var version: string = '1.8';
|
||||
|
||||
deployJava.runApplet(attributes, parameters);
|
||||
deployJava.runApplet(attributes, parameters, version);
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "setAdditionalPackages".
|
||||
*/
|
||||
function testSetAdditionalPackages() {
|
||||
var packageList: string = 'javax.swing';
|
||||
var result: boolean = deployJava.setAdditionalPackages(packageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "setAutoUpdateEnabled".
|
||||
*/
|
||||
function testSetAutoUpdateEnabled() {
|
||||
deployJava.setAutoUpdateEnabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "setEarlyAccess".
|
||||
*/
|
||||
function testSetEarlyAccess() {
|
||||
var enabled: string = 'true';
|
||||
deployJava.setEarlyAccess(enabled);
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "setInstallerType".
|
||||
*/
|
||||
function testSetInstallerType() {
|
||||
var type: string = 'kernel';
|
||||
deployJava.setInstallerType(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "testForMSVM".
|
||||
*/
|
||||
function testTestForMSVM() {
|
||||
var result: boolean = deployJava.testForMSVM();
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "testUsingActiveX".
|
||||
*/
|
||||
function testTestUsingActiveX() {
|
||||
var version: string = '1.7.0';
|
||||
var result: boolean = deployJava.testUsingActiveX(version);
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "testUsingMimeTypes".
|
||||
*/
|
||||
function testTestUsingMimeTypes() {
|
||||
var version: string = '1.7.0';
|
||||
var result: boolean = deployJava.testUsingMimeTypes(version);
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "testUsingPluginsArray".
|
||||
*/
|
||||
function testTestUsingPluginsArray() {
|
||||
var version: string = '1.7.0';
|
||||
var result: boolean = deployJava.testUsingPluginsArray(version);
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "versionCheck".
|
||||
*/
|
||||
function testVersionCheck() {
|
||||
deployJava.versionCheck('1.x');
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "writeAppletTag".
|
||||
*/
|
||||
function testWriteAppletTag() {
|
||||
var attributes: Object = {
|
||||
code:'java2d.Java2DemoApplet.class',
|
||||
archive:'Java2Demo.jar',
|
||||
width:710,
|
||||
height:540
|
||||
};
|
||||
|
||||
var parameters: Object = { fontSize:16, permissions:'sandbox' };
|
||||
deployJava.writeAppletTag(attributes, parameters);
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Test for the method: "writeEmbedTag".
|
||||
*/
|
||||
function testWriteEmbedTag() {
|
||||
deployJava.writeEmbedTag();
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
--noImplicitAny
|
||||
Vendored
+315
@@ -0,0 +1,315 @@
|
||||
// Type definitions for deployJava.js
|
||||
// Project: https://www.java.com/js/deployJava.txt
|
||||
// Definitions by: Cyril Schumacher <https://github.com/cyrilschumacher>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module DeployJava {
|
||||
/**
|
||||
* @summary Interface for {@link deployJava} object.
|
||||
* @author Cyril Schumacher
|
||||
* @version 1.0
|
||||
*/
|
||||
interface DeployJavaStatic {
|
||||
/**
|
||||
* @summary Brand name.
|
||||
* @member {string}
|
||||
*/
|
||||
brand: string;
|
||||
|
||||
/**
|
||||
* @summary Debug mode.
|
||||
* @member {boolean}
|
||||
*/
|
||||
debug: boolean;
|
||||
|
||||
/**
|
||||
* @summary Early Access state.
|
||||
* @member {string}
|
||||
*/
|
||||
EAInstallEnabled: boolean;
|
||||
|
||||
/**
|
||||
* @summary URL to early access.
|
||||
* @member {string}
|
||||
*/
|
||||
EarlyAccessURL: string;
|
||||
|
||||
/**
|
||||
* @summary Preferred install type (null, online, kernel).
|
||||
* @member {string}
|
||||
*/
|
||||
installType: string;
|
||||
|
||||
/**
|
||||
* @summary Locale.
|
||||
* @member {string}
|
||||
*/
|
||||
locale: string;
|
||||
|
||||
/**
|
||||
* @summary Interval for check versions of JRE available.
|
||||
* @member {number}
|
||||
*/
|
||||
myInterval: number;
|
||||
|
||||
/**
|
||||
* @summary JRE versions installed.
|
||||
* @member {Array<string>}
|
||||
*/
|
||||
preInstallJREList: Array<string>;
|
||||
|
||||
/**
|
||||
* @summary URL of current document.
|
||||
* @member {string}
|
||||
*/
|
||||
returnPage: string;
|
||||
|
||||
/**
|
||||
* @summary Determines if the browser has allowed the Java plugin.
|
||||
* @return {boolean} True if the Java plugin is allowed, otherwise, False.
|
||||
*/
|
||||
allowPlugin(): boolean;
|
||||
|
||||
/**
|
||||
* @summary Compares a installed version and required version.
|
||||
* @param {string} installed JRE installed version.
|
||||
* @param {string} required JRE required version.
|
||||
* @return {boolean} True if installed version is greater than or equal to required version.
|
||||
*/
|
||||
compareVersions(installed: string, required: string): boolean;
|
||||
|
||||
/**
|
||||
* @summary Compares a version with a pattern.
|
||||
* @param {string} version Version to compare.
|
||||
* @param {Array<string>} patternArray Patterns to compare.
|
||||
* @param {boolean} familyMatch Family match.
|
||||
* @param {boolean} minMatch Minimum version match.
|
||||
* @return {boolean} True if a or many patterns are identical to version, otherwise, False.
|
||||
*/
|
||||
compareVersionToPattern(version: string, patternArray: Array<string>, familyMatch: boolean, minMatch: boolean): boolean;
|
||||
|
||||
/**
|
||||
* @summary Enable alerts.
|
||||
*/
|
||||
enableAlerts(): void;
|
||||
|
||||
/**
|
||||
* @summary Redirect to Java plugin website for Mozilla Firefox.
|
||||
* @return {boolean} True if the redirection to Java plugin website was performed, otherwise, False.
|
||||
*/
|
||||
FFInstall(): boolean;
|
||||
|
||||
/**
|
||||
* @summary Gets browser name.
|
||||
* @return {string} Browser name.
|
||||
*/
|
||||
getBrowser(): string;
|
||||
|
||||
/**
|
||||
* @summary Obtains JPI version using {@link navigator.mimeTypes} array if found,
|
||||
* set the version to {@link firefoxJavaVersion}.
|
||||
*/
|
||||
getJPIVersionUsingMimeType(): void;
|
||||
|
||||
/**
|
||||
* @summary Get JRE versions (in format : "#.#[.#[_#]]") installed.
|
||||
* @return {Array<string>} JRE Version list.
|
||||
*/
|
||||
getJREs(): Array<string>;
|
||||
|
||||
/**
|
||||
* Gets a Java plugin.
|
||||
* @return {HTMLElement} Java plugin.
|
||||
*/
|
||||
getPlugin(): HTMLElement;
|
||||
|
||||
/**
|
||||
* Redirect to Java plugin website for Internet Explorer.
|
||||
* @return {boolean} True if the redirection to Java plugin website was performed, otherwise, False.
|
||||
*/
|
||||
IEInstall(): boolean;
|
||||
|
||||
/**
|
||||
* @summary Triggers a JRE installation.
|
||||
* @param {string} requestVersion JRE request version.
|
||||
* @return {boolean} True if the install is succeeded, otherwise, False.
|
||||
*/
|
||||
installJRE(requestVersion: string): boolean;
|
||||
|
||||
/**
|
||||
* @summary Triggers a installation of the latest version of JRE.
|
||||
* @param {Function} installCallback A reference to a javascript callback function for reporting install status.
|
||||
* @return {boolean} True if the install is succeeded, otherwise, False.
|
||||
*/
|
||||
installLatestJRE(installCallback?: Function): boolean;
|
||||
|
||||
/**
|
||||
* @summary Determines if JRE auto install for the version is enabled for the local system.
|
||||
*
|
||||
* DT plugin for 6uX only knows about JRE installer signed by SUN cert.
|
||||
* If it encounter Oracle signed JRE installer, it will have chance of
|
||||
* deadlock when running with IE. This function is to guard against this.
|
||||
*
|
||||
* @param {string} requestedJREVersion JRE version. If not specified, it will be treated as installing any JRE version.
|
||||
* @return {boolean} True if JRE auto install for the version is enabled for the local system, otherwise, False.
|
||||
*/
|
||||
isAutoInstallEnabled(requestedJREVersion?: string): boolean;
|
||||
|
||||
/**
|
||||
* @summary Determines if the plugin is installed and AutoUpdate is enabled.
|
||||
* @return {boolean} True if the plugin is installed and AutoUpdate is enabled, otherwise, False.
|
||||
*/
|
||||
isAutoUpdateEnabled(): boolean;
|
||||
|
||||
/**
|
||||
* @summary Determines if JRE install callback is supported.
|
||||
* @return {boolean} True if JRE install callback is supported, otherwise, False.
|
||||
*/
|
||||
isCallbackSupported(): boolean;
|
||||
|
||||
/**
|
||||
* @summary Determines if the next generation plugin (Plugin II) is default.
|
||||
* @return {boolean} True if next generation plugin is default, otherwise, False.
|
||||
*/
|
||||
isPlugin2(): boolean;
|
||||
|
||||
/**
|
||||
* @summary Determines if the ActiveX or XPI plugin is installed.
|
||||
* @return {boolean} True if the ActiveX or XPI plugin is installed, otherwise, False.
|
||||
*/
|
||||
isPluginInstalled(): boolean;
|
||||
|
||||
/**
|
||||
* @summary Checks if an installation of Java Web Start of the specified minimum version can be detected.
|
||||
* @param {string} minimumVersion Minimum version.
|
||||
* @return {boolean} True if an installation of Java Web Start of the specified minimum version can be detected
|
||||
*/
|
||||
isWebStartInstalled(minimumVersion?: string): boolean;
|
||||
|
||||
/**
|
||||
* @summary Launch a JNLP application (using the plugin if available).
|
||||
* @param {string} jnlp JNLP file.
|
||||
* @return {boolean} True if a JNLP application is launched, otherwise, False.
|
||||
*/
|
||||
launch(jnlp: string): boolean;
|
||||
|
||||
/**
|
||||
* @summary Launch the specified JNLP application using the passed in jnlp file.
|
||||
* @param {string} jnlp JNLP file.
|
||||
*/
|
||||
launchWebStartApplication(jnlp: string): void;
|
||||
|
||||
/**
|
||||
* @summary Checks versions of JRE available.
|
||||
*/
|
||||
poll(): void;
|
||||
|
||||
/**
|
||||
* @summary Writes embed tags if JRE plugin is available.
|
||||
*/
|
||||
refresh(): void;
|
||||
|
||||
/**
|
||||
* @summary Ensures that an appropriate JRE is installed and then runs an applet.
|
||||
*
|
||||
* After installJRE() is called, the script will attempt to detect that the
|
||||
* JRE installation has completed and begin running the applet, but there
|
||||
* are circumstances (such as when the JRE installation requires a browser
|
||||
* restart) when this cannot be fulfilled.
|
||||
* As with writeAppletTag(), this function should only be called prior to
|
||||
* the web page being completely rendered. Note that version wildcards
|
||||
* (star (*) and plus (+)) are not supported, and including them in the
|
||||
* minimumVersion will result in an error message.
|
||||
*
|
||||
* @param {Object} attributes Names and values of the attributes of the generated <applet> tag.
|
||||
* @param {Object} parameters Names and values of the <param> tags in the generated <applet> tag.
|
||||
* @param {string} minimumVersion A minimum version of the JRE software that is required to run this applet. Default value is : "1.1".
|
||||
*/
|
||||
runApplet(attributes: Object, parameters: Object, minimumVersion?: string): void;
|
||||
|
||||
/**
|
||||
* @summary Sets additional package list.
|
||||
*
|
||||
* Note: To be used by kernel installer.
|
||||
*
|
||||
* @param {string} packageList Package list.
|
||||
* @return {boolean} True if the value was set, otherwise, False if the plugin is already installed.
|
||||
*/
|
||||
setAdditionalPackages(packageList: string): boolean;
|
||||
|
||||
/**
|
||||
* @summary Sets AutoUpdate on if plugin is installed.
|
||||
*/
|
||||
setAutoUpdateEnabled(): void;
|
||||
|
||||
/**
|
||||
* @summary Sets preference to install Early Access versions if available.
|
||||
* @param {string} enabled Preference to install Early Access versions.
|
||||
*/
|
||||
setEarlyAccess(enabled: string): void;
|
||||
|
||||
/**
|
||||
* @summary Sets the preferred install type.
|
||||
* @param {string} type Preferred install (null, online or kernel).
|
||||
* @return {boolean} True if the value was set, otherwise, False if the plugin is already installed.
|
||||
*/
|
||||
setInstallerType(type: string): boolean;
|
||||
|
||||
/**
|
||||
* @summary Detects the Microsoft virtual machine.
|
||||
* @return {boolean} True if the Microsoft virtual machine exists, otherwise, False.
|
||||
*/
|
||||
testForMSVM(): boolean;
|
||||
|
||||
/**
|
||||
* @summary Checks if ActiveX can be used with Java plugin.
|
||||
* @param {string} Java version.
|
||||
* @return {boolean} True if ActiveX can be used, otherwise, False.
|
||||
*/
|
||||
testUsingActiveX(version: string): boolean;
|
||||
|
||||
/**
|
||||
* @summary Checks if MIME types can be used with Java plugin.
|
||||
* @param {string} Java version.
|
||||
* @return {boolean} True if MIME types can be used, otherwise, False.
|
||||
*/
|
||||
testUsingMimeTypes(version: string): boolean;
|
||||
|
||||
/**
|
||||
* @summary Checks if plugins can be used with Java plugin.
|
||||
* @param {string} Java version.
|
||||
* @return {boolean} True if plugins can be used, otherwise, False.
|
||||
*/
|
||||
testUsingPluginsArray(version: string): boolean;
|
||||
|
||||
/**
|
||||
* @summary Check if there is a matching JRE version currently installed.
|
||||
* @param {string} versionPattern Java version pattern (in format : #[.#[.#[_#]]][+|*]).
|
||||
* @return {boolean} True if there is a matching JRE version currently installed, otherwise, False.
|
||||
*/
|
||||
versionCheck(versionPattern: string): boolean;
|
||||
|
||||
/**
|
||||
* @summary Write in outputs an applet tag for applet with the specified attributes and parameters.
|
||||
*
|
||||
* Each key/value pair in attributes becomes an attribute of the applet tag
|
||||
* itself, while key/value pairs in parameters become <PARAM> tags.
|
||||
* No version checking or other special behaviors are performed; the tag is
|
||||
* simply written to the page using document.writeln().
|
||||
* As document.writeln() is generally only safe to use while the page is
|
||||
* being rendered, you should never call this function after the page
|
||||
* has been completed.
|
||||
*
|
||||
* @param {Object} attributes Names and values of the attributes of the generated <applet> tag.
|
||||
* @param {Object} parameters Names and values of the <param> tags in the generated <applet> tag.
|
||||
*/
|
||||
writeAppletTag(attributes: Object, parameters: Object): void;
|
||||
|
||||
/**
|
||||
* @summary Write in outputs an embed tag for applet.
|
||||
*/
|
||||
writeEmbedTag(): void;
|
||||
}
|
||||
}
|
||||
|
||||
declare var deployJava: DeployJava.DeployJavaStatic;
|
||||
@@ -0,0 +1,139 @@
|
||||
/// <reference path="di-lite.d.ts" />
|
||||
|
||||
interface Dependency {
|
||||
dependencies?: string;
|
||||
}
|
||||
|
||||
function doTest(test: (ctx: any, ...obj: Dependency[]) => void) {
|
||||
// create di context
|
||||
var ctx = di.createContext(),
|
||||
A: Dependency = () => {
|
||||
this.dependencies = "b, c";
|
||||
},
|
||||
B: Dependency = () => {
|
||||
this.dependencies = "c";
|
||||
},
|
||||
C: Dependency = () => {};
|
||||
|
||||
// register a class with an unique name
|
||||
ctx.register("a", A);
|
||||
ctx.register("b", B);
|
||||
ctx.register("c", C);
|
||||
|
||||
test(ctx, A, B, C);
|
||||
}
|
||||
|
||||
module BasicWiring {
|
||||
doTest(ctx => {
|
||||
// initialize di container so all singleton(default) objects will be wired at this stage
|
||||
ctx.initialize();
|
||||
|
||||
var instanceOfA = ctx.get("a");
|
||||
instanceOfA.b === ctx.get("b"); // true
|
||||
instanceOfA.c === ctx.get("c"); // true
|
||||
|
||||
var instanceOfB = ctx.get("b");
|
||||
instanceOfB.c === ctx.get("c"); // true
|
||||
});
|
||||
}
|
||||
|
||||
module WiringWithAssignment {
|
||||
doTest((ctx, A) => {
|
||||
A.dependencies = "bee=b, c"; // mix explicit and implicit assignment
|
||||
|
||||
ctx.initialize();
|
||||
|
||||
var instanceOfA = ctx.get("a");
|
||||
instanceOfA.bee === ctx.get("b"); // true - explicit assignment
|
||||
instanceOfA.c === ctx.get("c"); // true - implicit assignment
|
||||
});
|
||||
}
|
||||
|
||||
module PassiveDependencyResolution {
|
||||
doTest((ctx, A) => {
|
||||
ctx.register("a", A);
|
||||
ctx.get("a"); // this triggers the dependency resolution for "a" alone
|
||||
ctx.initialize();
|
||||
});
|
||||
}
|
||||
|
||||
module PrototypeStrategy {
|
||||
doTest((ctx, A) => {
|
||||
ctx.register("prototype", A).strategy(di.strategy.proto);
|
||||
ctx.get("prototype") === ctx.get("prototype"); // false
|
||||
ctx.create("prototype", 100); // create can be used if you want to explicitly pass in a new parameter
|
||||
});
|
||||
}
|
||||
|
||||
module PassingConstructorArguments {
|
||||
class ProfileView { }
|
||||
|
||||
doTest(ctx => {
|
||||
ctx.register("str", String, "hello world"); // signle simple argument
|
||||
ctx.register("profileView", ProfileView, { el: "#profile_div" }); // signle object literal argument
|
||||
ctx.register("array", Array, ["Saab", "Volvo", "BMW"]); // multiple argument is passed in using an array
|
||||
});
|
||||
}
|
||||
|
||||
module CyclicalDependency {
|
||||
doTest((ctx, A, B) => {
|
||||
A.dependencies = "b";
|
||||
B.dependencies = "a";
|
||||
|
||||
ctx.register("a", A);
|
||||
ctx.register("b", B);
|
||||
|
||||
ctx.initialize();
|
||||
|
||||
ctx.get("a").b === ctx.get("b"); // true
|
||||
ctx.get("b").a === ctx.get("a"); // true
|
||||
ctx.get("a").b.a === ctx.get("a"); // true
|
||||
ctx.get("b").a.b === ctx.get("b"); // true
|
||||
});
|
||||
}
|
||||
|
||||
module FunctionalObject {
|
||||
doTest(ctx => {
|
||||
var FuncObject = (spec: any) => {
|
||||
var that = {};
|
||||
return that;
|
||||
},
|
||||
spec: any = [];
|
||||
|
||||
ctx.register("funcObjSingleton", FuncObject, spec).factory(di.factory.func);
|
||||
|
||||
// function chaining can be used to customize your object registration
|
||||
ctx.register("funcObjProto", FuncObject, spec)
|
||||
.strategy(di.strategy.proto)
|
||||
.factory(di.factory.func);
|
||||
|
||||
ctx.initialize();
|
||||
|
||||
ctx.get("funcObjSingleton"); // will return you a signleton instance of FuncObject
|
||||
ctx.get("funcObjProto"); // will return you a new instance of FuncObject each time
|
||||
});
|
||||
}
|
||||
|
||||
module RuntimeDependenciesOverride {
|
||||
doTest((ctx, A) => {
|
||||
ctx.register("a", A)
|
||||
.dependencies("bee=b"); // dependencies specified here will take precedence
|
||||
ctx.get("a").bee === ctx.get("b"); // true
|
||||
});
|
||||
}
|
||||
|
||||
module CreateYourOwn {
|
||||
class Backbone {
|
||||
history: History = new History();
|
||||
}
|
||||
|
||||
class History {
|
||||
start() {}
|
||||
}
|
||||
|
||||
doTest(ctx => {
|
||||
ctx.register("history").object(new Backbone().history);
|
||||
ctx.get("history").start(); // you can use it since it is already created and initialized
|
||||
ctx.initialize(); // initialize the rest of the objects
|
||||
});
|
||||
}
|
||||
Vendored
+69
@@ -0,0 +1,69 @@
|
||||
// Type definitions for di-lite 0.3.3
|
||||
// Project: https://github.com/NickQiZhu/di.js
|
||||
// Definitions by: Timothy Morris <https://github.com/dcrusader>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module DiLite {
|
||||
interface DiLiteStatic {
|
||||
version: string;
|
||||
createContext(): CreateContext;
|
||||
dependencyExpression(depExp: string): string;
|
||||
entry(name: string, ctx: CreateContext): any;
|
||||
strategy: StrategyEnum;
|
||||
factory: FactoryEnum;
|
||||
utils: Utils;
|
||||
}
|
||||
|
||||
interface Dictionary<T> {
|
||||
[index: string]: T;
|
||||
}
|
||||
|
||||
interface CreateContext {
|
||||
map: Dictionary<any>;
|
||||
entry<T>(name: string): T;
|
||||
register<T>(name: string, service: T): Entry;
|
||||
has(name: string): boolean;
|
||||
get(name: string): any;
|
||||
create<T>(name: string, args: any): T;
|
||||
initialize(): void;
|
||||
clear(): void;
|
||||
inject<T>(name: string, o: T, dependencies: string): T;
|
||||
ready<T>(o: Function): T;
|
||||
ready<T>(o: any): T;
|
||||
}
|
||||
|
||||
interface Entry {
|
||||
create(newArgs: any): Entry;
|
||||
object<T>(o: T): Entry;
|
||||
object<T>(): T;
|
||||
strategy<T>(s: Function): Entry;
|
||||
strategy<T>(): T;
|
||||
type<T>(t: T): Entry;
|
||||
type<T>(): T;
|
||||
dependencies<T>(d: T): Entry;
|
||||
dependencies<T>(): T;
|
||||
args<T>(a: T): Entry;
|
||||
args<T>(): T;
|
||||
factory(f: Function): Entry;
|
||||
factory<T>(): T;
|
||||
}
|
||||
|
||||
interface StrategyEnum {
|
||||
proto<TObject, TType>(name: string, object: TObject, type: TType, args: any, ctx: CreateContext, dependencies: any): TObject;
|
||||
singleton<TObject, TType>(name: string, object: TObject, type: TType, args: any, ctx?: CreateContext, dependencies?: any): TObject;
|
||||
}
|
||||
|
||||
interface FactoryEnum {
|
||||
constructor<T>(type: T, args: any): T;
|
||||
func<T>(type: T, args: any): T;
|
||||
}
|
||||
|
||||
interface Utils {
|
||||
invokeStmt(args: any, op: string): string;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "di-lite" {
|
||||
export = di;
|
||||
}
|
||||
declare var di: DiLite.DiLiteStatic;
|
||||
@@ -0,0 +1,32 @@
|
||||
/// <reference path="doublearray.d.ts" />
|
||||
|
||||
// https://github.com/takuyaa/doublearray/blob/master/README.md
|
||||
var words = [
|
||||
{ k: 'a', v: 1 },
|
||||
{ k: 'abc', v: 2 },
|
||||
{ k: '奈良', v: 3 },
|
||||
{ k: '奈良先端', v: 4 },
|
||||
{ k: '奈良先端科学技術大学院大学', v: 5 }
|
||||
];
|
||||
|
||||
var trie = doublearray.builder().build(words);
|
||||
|
||||
var trie = doublearray
|
||||
.builder()
|
||||
.append('a', 1)
|
||||
.append('abc', 2)
|
||||
.append('奈良', 3)
|
||||
.append('奈良先端', 4)
|
||||
.append('奈良先端科学技術大学院大学', 5)
|
||||
.build();
|
||||
|
||||
trie.contain('a');
|
||||
|
||||
trie.lookup('abc');
|
||||
|
||||
trie.commonPrefixSearch('奈良先端科学技術大学院大学');
|
||||
|
||||
var base_buffer: Int32Array = trie.bc.getBaseBuffer();
|
||||
var check_buffer: Int32Array = trie.bc.getCheckBuffer();
|
||||
|
||||
var loaded_trie = doublearray.load(base_buffer, check_buffer);
|
||||
Vendored
+99
@@ -0,0 +1,99 @@
|
||||
// Type definitions for doublearray
|
||||
// Project: https://github.com/takuyaa/doublearray
|
||||
// Definitions by: MIZUSHIMA Junki <https://github.com/mzsm>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module doublearray {
|
||||
interface KeyValue {
|
||||
k: string;
|
||||
v: number;
|
||||
}
|
||||
|
||||
interface BaseAndCheck {
|
||||
getBaseBuffer(): any; // Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array
|
||||
getCheckBuffer(): any; // Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array
|
||||
loadBaseBuffer(base_buffer: Int8Array): BaseAndCheck;
|
||||
loadBaseBuffer(base_buffer: Int16Array): BaseAndCheck;
|
||||
loadBaseBuffer(base_buffer: Int32Array): BaseAndCheck;
|
||||
loadBaseBuffer(base_buffer: Uint8Array): BaseAndCheck;
|
||||
loadBaseBuffer(base_buffer: Uint16Array): BaseAndCheck;
|
||||
loadBaseBuffer(base_buffer: Uint32Array): BaseAndCheck;
|
||||
loadCheckBuffer(check_buffer: Int8Array): BaseAndCheck;
|
||||
loadCheckBuffer(check_buffer: Int16Array): BaseAndCheck;
|
||||
loadCheckBuffer(check_buffer: Int32Array): BaseAndCheck;
|
||||
loadCheckBuffer(check_buffer: Uint8Array): BaseAndCheck;
|
||||
loadCheckBuffer(check_buffer: Uint16Array): BaseAndCheck;
|
||||
loadCheckBuffer(check_buffer: Uint32Array): BaseAndCheck;
|
||||
size(): number;
|
||||
getBase(): number;
|
||||
getCheck(): number;
|
||||
setBase(index: number, base_value: number): void;
|
||||
setCheck(index: number, check_value: number): void;
|
||||
setFirstUnusedNode(index: number): void;
|
||||
getFirstUnusedNode(): number;
|
||||
shrink(): void;
|
||||
calc(): {all: number; unused: number; efficiency: number};
|
||||
dump(): string;
|
||||
}
|
||||
|
||||
interface DoubleArrayBuilder {
|
||||
bc: BaseAndCheck;
|
||||
keys: KeyValue[];
|
||||
append(key: string, record: number): DoubleArrayBuilder;
|
||||
build(keys?: KeyValue[], sorted?: boolean): DoubleArray;
|
||||
getChildrenInfo(position: number, start: number, length: number): Int32Array;
|
||||
setBC(parent_id: number, children_info: Int32Array, _base: number): void;
|
||||
findAllocatableBase(children_info: Int32Array): number;
|
||||
isUnusedNode(index: number): boolean;
|
||||
}
|
||||
|
||||
interface DoubleArray {
|
||||
bc: BaseAndCheck;
|
||||
contain(key: string): boolean;
|
||||
lookup(key: string): number;
|
||||
commonPrefixSearch(key: string): KeyValue;
|
||||
traverse(parent: number, code: number): number;
|
||||
size(): number;
|
||||
calc(): {all: number; unused: number; efficiency: number};
|
||||
dump(): string;
|
||||
}
|
||||
|
||||
export function builder(initial_size?: number): DoubleArrayBuilder;
|
||||
// TODO: Replace to union types in the future.
|
||||
export function load(base_buffer: Int8Array, check_buffer: Int8Array): DoubleArray;
|
||||
export function load(base_buffer: Int8Array, check_buffer: Int16Array): DoubleArray;
|
||||
export function load(base_buffer: Int8Array, check_buffer: Int32Array): DoubleArray;
|
||||
export function load(base_buffer: Int8Array, check_buffer: Uint8Array): DoubleArray;
|
||||
export function load(base_buffer: Int8Array, check_buffer: Uint16Array): DoubleArray;
|
||||
export function load(base_buffer: Int8Array, check_buffer: Uint32Array): DoubleArray;
|
||||
export function load(base_buffer: Int16Array, check_buffer: Int8Array): DoubleArray;
|
||||
export function load(base_buffer: Int16Array, check_buffer: Int16Array): DoubleArray;
|
||||
export function load(base_buffer: Int16Array, check_buffer: Int32Array): DoubleArray;
|
||||
export function load(base_buffer: Int16Array, check_buffer: Uint8Array): DoubleArray;
|
||||
export function load(base_buffer: Int16Array, check_buffer: Uint16Array): DoubleArray;
|
||||
export function load(base_buffer: Int16Array, check_buffer: Uint32Array): DoubleArray;
|
||||
export function load(base_buffer: Int32Array, check_buffer: Int8Array): DoubleArray;
|
||||
export function load(base_buffer: Int32Array, check_buffer: Int16Array): DoubleArray;
|
||||
export function load(base_buffer: Int32Array, check_buffer: Int32Array): DoubleArray;
|
||||
export function load(base_buffer: Int32Array, check_buffer: Uint8Array): DoubleArray;
|
||||
export function load(base_buffer: Int32Array, check_buffer: Uint16Array): DoubleArray;
|
||||
export function load(base_buffer: Int32Array, check_buffer: Uint32Array): DoubleArray;
|
||||
export function load(base_buffer: Uint8Array, check_buffer: Int8Array): DoubleArray;
|
||||
export function load(base_buffer: Uint8Array, check_buffer: Int16Array): DoubleArray;
|
||||
export function load(base_buffer: Uint8Array, check_buffer: Int32Array): DoubleArray;
|
||||
export function load(base_buffer: Uint8Array, check_buffer: Uint8Array): DoubleArray;
|
||||
export function load(base_buffer: Uint8Array, check_buffer: Uint16Array): DoubleArray;
|
||||
export function load(base_buffer: Uint8Array, check_buffer: Uint32Array): DoubleArray;
|
||||
export function load(base_buffer: Uint16Array, check_buffer: Int8Array): DoubleArray;
|
||||
export function load(base_buffer: Uint16Array, check_buffer: Int16Array): DoubleArray;
|
||||
export function load(base_buffer: Uint16Array, check_buffer: Int32Array): DoubleArray;
|
||||
export function load(base_buffer: Uint16Array, check_buffer: Uint8Array): DoubleArray;
|
||||
export function load(base_buffer: Uint16Array, check_buffer: Uint16Array): DoubleArray;
|
||||
export function load(base_buffer: Uint16Array, check_buffer: Uint32Array): DoubleArray;
|
||||
export function load(base_buffer: Uint32Array, check_buffer: Int8Array): DoubleArray;
|
||||
export function load(base_buffer: Uint32Array, check_buffer: Int16Array): DoubleArray;
|
||||
export function load(base_buffer: Uint32Array, check_buffer: Int32Array): DoubleArray;
|
||||
export function load(base_buffer: Uint32Array, check_buffer: Uint8Array): DoubleArray;
|
||||
export function load(base_buffer: Uint32Array, check_buffer: Uint16Array): DoubleArray;
|
||||
export function load(base_buffer: Uint32Array, check_buffer: Uint32Array): DoubleArray;
|
||||
}
|
||||
Vendored
+307
-41
@@ -1,4 +1,4 @@
|
||||
// Type definitions for EaselJS 0.7.1
|
||||
// Type definitions for EaselJS 0.8.0
|
||||
// Project: http://www.createjs.com/#!/EaselJS
|
||||
// Definitions by: Pedro Ferreira <https://bitbucket.org/drk4>, Chris Smith <https://github.com/evilangelist>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
@@ -59,25 +59,18 @@ declare module createjs {
|
||||
setTransform(x?: number, y?: number, scaleX?: number, scaleY?: number, rotation?: number, skewX?: number, skewY?: number, regX?: number, regY?: number): Bitmap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated renamed to Sprite, here for backwards compatibility
|
||||
*/
|
||||
export class BitmapAnimation extends Sprite {
|
||||
}
|
||||
|
||||
|
||||
export class BitmapText extends DisplayObject {
|
||||
constructor(text?:string, spriteSheet?:SpriteSheet);
|
||||
|
||||
static maxPoolSize: number;
|
||||
|
||||
// properties
|
||||
letterSpacing: number;
|
||||
lineHeight: number;
|
||||
spaceWidth: number;
|
||||
spriteSheet: SpriteSheet;
|
||||
text: string;
|
||||
|
||||
// methods
|
||||
set(props: Object): BitmapText;
|
||||
setTransform(x?: number, y?: number, scaleX?: number, scaleY?: number, rotation?: number, skewX?: number, skewY?: number, regX?: number, regY?: number): BitmapText;
|
||||
}
|
||||
|
||||
export class BlurFilter extends Filter {
|
||||
@@ -102,6 +95,7 @@ declare module createjs {
|
||||
overLabel: any; // String or Number
|
||||
play: boolean;
|
||||
target: DisplayObject; // MovieClip or Sprite
|
||||
enabled: boolean;
|
||||
|
||||
// methods
|
||||
setEnabled(value: boolean): void;
|
||||
@@ -137,9 +131,10 @@ declare module createjs {
|
||||
clone(): ColorMatrix;
|
||||
concat(...matrix: number[]): ColorMatrix;
|
||||
concat(matrix: ColorMatrix): ColorMatrix;
|
||||
copyMatrix(...matrix: number[]): ColorMatrix;
|
||||
copyMatrix(matrix: ColorMatrix): ColorMatrix;
|
||||
copy(...matrix: number[]): ColorMatrix;
|
||||
copy(matrix: ColorMatrix): ColorMatrix;
|
||||
reset(): ColorMatrix;
|
||||
setColor( brightness: number, contrast: number, saturation: number, hue: number ): ColorMatrix;
|
||||
toArray(): number[];
|
||||
toString(): string;
|
||||
}
|
||||
@@ -148,22 +143,21 @@ declare module createjs {
|
||||
constructor(matrix: number[]);
|
||||
constructor(matrix: ColorMatrix);
|
||||
|
||||
// properties
|
||||
matrix: ColorMatrix; // or array
|
||||
|
||||
// methods
|
||||
clone(): ColorMatrixFilter;
|
||||
}
|
||||
|
||||
export class Command {
|
||||
// methods
|
||||
constructor(f: any, params: any, path?: any);
|
||||
exec(scope: any): void;
|
||||
}
|
||||
|
||||
|
||||
export class Container extends DisplayObject {
|
||||
constructor();
|
||||
|
||||
// properties
|
||||
children: DisplayObject[];
|
||||
mouseChildren: boolean;
|
||||
numChildren: number;
|
||||
tickChildren: boolean;
|
||||
|
||||
// methods
|
||||
@@ -175,9 +169,12 @@ declare module createjs {
|
||||
getChildAt(index: number): DisplayObject;
|
||||
getChildByName(name: string): DisplayObject;
|
||||
getChildIndex(child: DisplayObject): number;
|
||||
/**
|
||||
* @deprecated - use numChildren property instead.
|
||||
*/
|
||||
getNumChildren(): number;
|
||||
getObjectsUnderPoint(x: number, y: number): DisplayObject[];
|
||||
getObjectUnderPoint(x: number, y: number): DisplayObject;
|
||||
getObjectsUnderPoint(x: number, y: number, mode: number): DisplayObject[];
|
||||
getObjectUnderPoint(x: number, y: number, mode: number): DisplayObject;
|
||||
removeAllChildren(): void;
|
||||
removeChild(...child: DisplayObject[]): boolean;
|
||||
removeChildAt(...index: number[]): boolean;
|
||||
@@ -217,8 +214,10 @@ declare module createjs {
|
||||
* @deprecated
|
||||
*/
|
||||
snapToPixel: boolean;
|
||||
stage: Stage;
|
||||
static suppressCrossDomainErrors: boolean;
|
||||
tickEnabled: boolean;
|
||||
transformMatrix: Matrix2D;
|
||||
visible: boolean;
|
||||
x: number;
|
||||
y: number;
|
||||
@@ -229,15 +228,19 @@ declare module createjs {
|
||||
draw(ctx: CanvasRenderingContext2D, ignoreCache?: boolean): boolean;
|
||||
getBounds(): Rectangle;
|
||||
getCacheDataURL(): string;
|
||||
getConcatenatedDisplayProps(props?: DisplayProps): DisplayProps;
|
||||
getConcatenatedMatrix(mtx?: Matrix2D): Matrix2D;
|
||||
getMatrix(matrix?: Matrix2D): Matrix2D;
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
getStage(): Stage;
|
||||
getTransformedBounds(): Rectangle;
|
||||
globalToLocal(x: number, y: number): Point;
|
||||
globalToLocal(x: number, y: number, pt?: Object): Point; // 'pt' is Point or Object
|
||||
hitTest(x: number, y: number): boolean;
|
||||
isVisible(): boolean;
|
||||
localToGlobal(x: number, y: number): Point;
|
||||
localToLocal(x: number, y: number, target: DisplayObject): Point;
|
||||
localToGlobal(x: number, y: number, pt?: Object): Point; // 'pt' is Point or Object
|
||||
localToLocal(x: number, y: number, target: DisplayObject, pt?: Object): Point; // 'pt' is Point or Object
|
||||
set(props: Object): DisplayObject;
|
||||
setBounds(x: number, y: number, width: number, height: number): void;
|
||||
setTransform(x?: number, y?: number, scaleX?: number, scaleY?: number, rotation?: number, skewX?: number, skewY?: number, regX?: number, regY?: number): DisplayObject;
|
||||
@@ -247,6 +250,25 @@ declare module createjs {
|
||||
|
||||
}
|
||||
|
||||
export class DisplayProps {
|
||||
constructor(visible?: number, alpha?: number, shadow?: number, compositeOperation?: number, matrix?: number);
|
||||
|
||||
// properties
|
||||
alpha: number;
|
||||
compositeOperation: string;
|
||||
matrix: Matrix2D;
|
||||
shadow: Shadow;
|
||||
visible: boolean;
|
||||
|
||||
// methods
|
||||
append(visible: boolean, alpha: number, shadow: Shadow, compositeOperation: string, matrix?: Matrix2D): DisplayProps;
|
||||
clone(): DisplayProps;
|
||||
identity(): DisplayProps;
|
||||
prepend(visible: boolean, alpha: number, shadow: Shadow, compositeOperation: string, matrix?: Matrix2D): DisplayProps;
|
||||
setValues(visible?: boolean, alpha?: number, shadow?: number, compositeOperation?: number, matrix?: number): DisplayProps;
|
||||
}
|
||||
|
||||
|
||||
export class DOMElement extends DisplayObject {
|
||||
constructor(htmlElement: HTMLElement);
|
||||
|
||||
@@ -281,11 +303,14 @@ declare module createjs {
|
||||
|
||||
// properties
|
||||
static BASE_64: Object;
|
||||
static Command: any;
|
||||
static beginCmd: Graphics.BeginPath;
|
||||
command: Object;
|
||||
instructions: Object[]; // array of graphics command objects (Graphics.Fill, etc)
|
||||
static STROKE_CAPS_MAP: string[];
|
||||
static STROKE_JOINTS_MAP: string[];
|
||||
|
||||
// methods
|
||||
append(command: Object, clean?: boolean): Graphics;
|
||||
arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise: boolean): Graphics;
|
||||
arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): Graphics;
|
||||
beginBitmapFill(image: Object, repetition?: string, matrix?: Matrix2D): Graphics;
|
||||
@@ -300,7 +325,7 @@ declare module createjs {
|
||||
clear(): Graphics;
|
||||
clone(): Graphics;
|
||||
closePath(): Graphics;
|
||||
curveTo (cpx: number, cpy: number, x: number, y: number): Graphics;
|
||||
curveTo(cpx: number, cpy: number, x: number, y: number): Graphics;
|
||||
decodePath(str: string): Graphics;
|
||||
draw(ctx: CanvasRenderingContext2D): void;
|
||||
drawAsPath(ctx: CanvasRenderingContext2D): void;
|
||||
@@ -313,8 +338,12 @@ declare module createjs {
|
||||
endFill(): Graphics;
|
||||
endStroke(): Graphics;
|
||||
static getHSL(hue: number, saturation: number, lightness: number, alpha?: number): string;
|
||||
/**
|
||||
* @deprecated - use the instructions property instead
|
||||
*/
|
||||
getInstructions(): Object[];
|
||||
static getRGB(r: number, g: number, b: number, alpha?: number): string;
|
||||
inject(callback: (data: any) => any, data: any): Graphics;
|
||||
inject(callback: (data: any) => any, data: any): Graphics; // deprecated
|
||||
isEmpty(): boolean;
|
||||
lineTo(x: number, y: number): Graphics;
|
||||
moveTo(x: number, y: number): Graphics;
|
||||
@@ -324,7 +353,9 @@ declare module createjs {
|
||||
setStrokeStyle(thickness: number, caps?: number, joints?: string, miterLimit?: number, ignoreScale?: boolean): Graphics;
|
||||
setStrokeStyle(thickness: number, caps?: string, joints?: number, miterLimit?: number, ignoreScale?: boolean): Graphics;
|
||||
setStrokeStyle(thickness: number, caps?: number, joints?: number, miterLimit?: number, ignoreScale?: boolean): Graphics;
|
||||
store(): Graphics;
|
||||
toString(): string;
|
||||
unstore(): Graphics;
|
||||
|
||||
|
||||
// tiny API - short forms of methods above
|
||||
@@ -360,42 +391,207 @@ declare module createjs {
|
||||
ss(thickness: number, caps?: number, joints?: number, miterLimit?: number, ignoreScale?: boolean): Graphics;
|
||||
}
|
||||
|
||||
|
||||
module Graphics
|
||||
{
|
||||
export class Arc
|
||||
{
|
||||
constructor(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise: number);
|
||||
|
||||
// properties
|
||||
anticlockwise: number;
|
||||
endAngle: number;
|
||||
radius: number;
|
||||
startAngle: number;
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
export class ArcTo
|
||||
{
|
||||
constructor(x1: number, y1: number, x2: number, y2: number, radius: number);
|
||||
|
||||
// properties
|
||||
x1: number;
|
||||
y1: number;
|
||||
x2: number;
|
||||
y2: number;
|
||||
radius: number;
|
||||
}
|
||||
|
||||
export class BeginPath
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
export class BezierCurveTo
|
||||
{
|
||||
constructor(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number);
|
||||
|
||||
// properties
|
||||
cp1x: number;
|
||||
cp1y: number;
|
||||
cp2x: number;
|
||||
cp2y: number;
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
export class Circle
|
||||
{
|
||||
constructor(x: number, y: number, radius: number);
|
||||
|
||||
// properties
|
||||
x: number;
|
||||
y: number;
|
||||
radius: number;
|
||||
}
|
||||
|
||||
export class ClosePath
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
export class Fill
|
||||
{
|
||||
constructor(style: Object, matrix?: Matrix2D);
|
||||
|
||||
// properties
|
||||
style: Object;
|
||||
matrix: Matrix2D;
|
||||
|
||||
// methods
|
||||
bitmap(image: HTMLImageElement, repetition?: string): Fill;
|
||||
linearGradient(colors: number[], ratios: number[], x0: number, y0: number, x1: number, y1: number): Fill;
|
||||
radialGradient(colors: number[], ratios: number[], x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): Fill;
|
||||
}
|
||||
|
||||
export class LineTo
|
||||
{
|
||||
constructor(x: number, y: number);
|
||||
|
||||
// properties
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
export class MoveTo
|
||||
{
|
||||
constructor(x: number, y: number);
|
||||
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
export class PolyStar
|
||||
{
|
||||
constructor(x: number, y: number, radius: number, sides: number, pointSize: number, angle: number);
|
||||
|
||||
// properties
|
||||
angle: number;
|
||||
pointSize: number;
|
||||
radius: number;
|
||||
sides: number;
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
export class QuadraticCurveTo
|
||||
{
|
||||
constructor(cpx: number, cpy: number, x: number, y: number);
|
||||
|
||||
// properties
|
||||
cpx: number;
|
||||
cpy: number;
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
export class Rect
|
||||
{
|
||||
constructor(x: number, y: number, w: number, h: number);
|
||||
|
||||
// properties
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
}
|
||||
|
||||
export class RoundRect
|
||||
{
|
||||
constructor(x: number, y: number, w: number, h: number, radiusTL: number, radiusTR: number, radiusBR: number, radiusBL: number);
|
||||
|
||||
// properties
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
radiusTL: number;
|
||||
radiusTR: number;
|
||||
radiusBR: number;
|
||||
radiusBL: number;
|
||||
}
|
||||
|
||||
export class Stroke
|
||||
{
|
||||
constructor(style: Object, ignoreScale: boolean);
|
||||
|
||||
// properties
|
||||
style: Object;
|
||||
ignoreScale: boolean;
|
||||
|
||||
// methods
|
||||
bitmap(image: HTMLImageElement, repetition?: string): Stroke;
|
||||
linearGradient(colors: number[], ratios: number[], x0: number, y0: number, x1: number, y1: number): Stroke;
|
||||
radialGradient(colors: number[], ratios: number[], x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): Stroke;
|
||||
}
|
||||
|
||||
export class StrokeStyle
|
||||
{
|
||||
constructor(width: number, caps: string, joints: number, miterLimit: number);
|
||||
|
||||
// properties
|
||||
caps: string;
|
||||
joints: string;
|
||||
miterLimit: number;
|
||||
width: number;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
export class Matrix2D {
|
||||
constructor(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number);
|
||||
|
||||
// properties
|
||||
a: number;
|
||||
alpha: number;
|
||||
b: number;
|
||||
c: number;
|
||||
compositeOperation: string;
|
||||
d: number;
|
||||
static DEG_TO_RAD: number;
|
||||
static identity: Matrix2D;
|
||||
shadow: Shadow;
|
||||
tx: number;
|
||||
ty: number;
|
||||
|
||||
// methods
|
||||
append(a: number, b: number, c: number, d: number, tx: number, ty: number): Matrix2D;
|
||||
appendMatrix(matrix: Matrix2D): Matrix2D;
|
||||
appendProperties(alpha: number, shadow: Shadow, compositeOperation: string): Matrix2D;
|
||||
appendTransform(x: number, y: number, scaleX: number, scaleY: number, rotation: number, skewX: number, skewY: number, regX?: number, regY?: number): Matrix2D;
|
||||
clone(): Matrix2D;
|
||||
copy(matrix: Matrix2D): Matrix2D;
|
||||
decompose(): {x: number; y: number; scaleX: number; scaleY: number; rotation: number; skewX: number; skewY: number};
|
||||
decompose(target: Object): Matrix2D;
|
||||
equals(matrix: Matrix2D): boolean;
|
||||
identity(): Matrix2D;
|
||||
initialize(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number): Matrix2D;
|
||||
invert(): Matrix2D;
|
||||
isIdentity(): boolean;
|
||||
prepend(a: number, b: number, c: number, d: number, tx: number, ty: number): Matrix2D;
|
||||
prependMatrix(matrix: Matrix2D): Matrix2D;
|
||||
prependProperties(alpha: number, shadow: Shadow, compositeOperation: string): Matrix2D;
|
||||
prependTransform(x: number, y: number, scaleX: number, scaleY: number, rotation: number, skewX: number, skewY: number, regX?: number, regY?: number): Matrix2D;
|
||||
reinitialize(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number, alpha?: number, shadow?: Shadow, compositeOperation?: string): Matrix2D;
|
||||
rotate(angle: number): Matrix2D;
|
||||
scale(x: number, y: number): Matrix2D;
|
||||
setValues(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number): Matrix2D;
|
||||
skew(skewX: number, skewY: number): Matrix2D;
|
||||
toString(): string;
|
||||
transformPoint(x: number, y: number, pt?: Point): Point;
|
||||
@@ -408,6 +604,7 @@ declare module createjs {
|
||||
constructor(type: string, bubbles: boolean, cancelable: boolean, stageX: number, stageY: number, nativeEvent: NativeMouseEvent, pointerID: number, primary: boolean, rawX: number, rawY: number);
|
||||
|
||||
// properties
|
||||
isTouch: boolean;
|
||||
localX: number;
|
||||
localY: number;
|
||||
nativeEvent: NativeMouseEvent;
|
||||
@@ -458,8 +655,11 @@ declare module createjs {
|
||||
autoReset: boolean;
|
||||
static buildDate: string;
|
||||
currentFrame: number;
|
||||
currentLabel: string;
|
||||
frameBounds: Rectangle[];
|
||||
framerate: number;
|
||||
static INDEPENDENT: string;
|
||||
labels: Object[];
|
||||
loop: boolean;
|
||||
mode: string;
|
||||
paused: boolean;
|
||||
@@ -470,8 +670,15 @@ declare module createjs {
|
||||
static version: string;
|
||||
|
||||
// methods
|
||||
advance(time?: number): void;
|
||||
clone(): MovieClip; // not supported
|
||||
getCurrentLabel(): string;
|
||||
/**
|
||||
* @deprecated - use 'currentLabel' property instead
|
||||
*/
|
||||
getCurrentLabel(): string; // deprecated
|
||||
/**
|
||||
* @deprecated - use 'labels' property instead
|
||||
*/
|
||||
getLabels(): Object[];
|
||||
gotoAndPlay(positionOrLabel: string): void;
|
||||
gotoAndPlay(positionOrLabel: number): void;
|
||||
@@ -498,7 +705,7 @@ declare module createjs {
|
||||
// methods
|
||||
clone(): Point;
|
||||
copy(point: Point): Point;
|
||||
initialize (x?: number, y?: number): Point;
|
||||
setValues(x?: number, y?: number): Point;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
@@ -513,9 +720,15 @@ declare module createjs {
|
||||
|
||||
// methods
|
||||
clone(): Rectangle;
|
||||
contains(x: number, y: number, width?: number, height?: number): boolean;
|
||||
copy(rectangle: Rectangle): Rectangle;
|
||||
initialize(x?: number, y?: number, width?: number, height?: number): Rectangle;
|
||||
extend(x: number, y: number, width?: number, height?: number): Rectangle;
|
||||
intersection(rect: Rectangle): Rectangle;
|
||||
intersects(rect: Rectangle): boolean;
|
||||
isEmpty(): boolean;
|
||||
setValues(x?: number, y?: number, width?: number, height?: number): Rectangle;
|
||||
toString(): string;
|
||||
union(rect: Rectangle): Rectangle;
|
||||
}
|
||||
|
||||
|
||||
@@ -579,6 +792,13 @@ declare module createjs {
|
||||
|
||||
}
|
||||
|
||||
export class SpriteContainer extends Container
|
||||
{
|
||||
constructor(spriteSheet?: SpriteSheet);
|
||||
|
||||
spriteSheet: SpriteSheet;
|
||||
}
|
||||
|
||||
// what is returned from SpriteSheet.getAnimation(string)
|
||||
interface SpriteSheetAnimation {
|
||||
frames: number[];
|
||||
@@ -597,12 +817,16 @@ declare module createjs {
|
||||
constructor(data: Object);
|
||||
|
||||
// properties
|
||||
animations: string[];
|
||||
complete: boolean;
|
||||
framerate: number;
|
||||
|
||||
// methods
|
||||
clone(): SpriteSheet;
|
||||
getAnimation(name: string): SpriteSheetAnimation;
|
||||
/**
|
||||
* @deprecated - use the 'animations' property instead
|
||||
*/
|
||||
getAnimations(): string[];
|
||||
getFrame(frameIndex: number): SpriteSheetFrame;
|
||||
getFrameBounds(frameIndex: number, rectangle?: Rectangle): Rectangle;
|
||||
@@ -624,14 +848,12 @@ declare module createjs {
|
||||
|
||||
// methods
|
||||
addAnimation(name: string, frames: number[], next?: string, frequency?: number): void;
|
||||
addFrame(source: DisplayObject, sourceRect?: Rectangle, scale?: number, setupFunction?: () => any, setupParams?: any[], setupScope?: Object): number;
|
||||
addMovieClip(source: MovieClip, sourceRect?: Rectangle, scale?: number): void;
|
||||
addFrame(source: DisplayObject, sourceRect?: Rectangle, scale?: number, setupFunction?: () => any, setupData?: Object): number;
|
||||
addMovieClip(source: MovieClip, sourceRect?: Rectangle, scale?: number, setupFunction?: () => any, setupData?: Object, labelFunction?: () => any): void;
|
||||
build(): SpriteSheet;
|
||||
buildAsync(timeSlice?: number): void;
|
||||
clone(): void; // throw error
|
||||
stopAsync(): void;
|
||||
|
||||
|
||||
}
|
||||
|
||||
export class SpriteSheetUtils {
|
||||
@@ -647,6 +869,25 @@ declare module createjs {
|
||||
static mergeAlpha(rgbImage: HTMLImageElement, alphaImage: HTMLImageElement, canvas?: HTMLCanvasElement): HTMLCanvasElement; // deprecated
|
||||
}
|
||||
|
||||
export class SpriteStage extends Stage
|
||||
{
|
||||
constructor(canvas: HTMLCanvasElement, preserveDrawingBuffer?: boolean, antialias?: boolean);
|
||||
constructor(canvas: string, preserveDrawingBuffer?: boolean, antialias?: boolean);
|
||||
|
||||
// properties
|
||||
static INDICES_PER_BOX: number;
|
||||
isWebGL: boolean;
|
||||
static MAX_BOXES_POINTS_INCREMENT: number;
|
||||
static MAX_INDEX_SIZE: number;
|
||||
static NUM_VERTEX_PROPERTIES: number;
|
||||
static NUM_VERTEX_PROPERTIES_PER_BOX: number;
|
||||
static POINTS_PER_BOX: number;
|
||||
|
||||
// methods
|
||||
clearImageTexture(image: Object): void;
|
||||
updateViewport(width: number, height: number): void;
|
||||
}
|
||||
|
||||
export class Stage extends Container {
|
||||
constructor(canvas: HTMLCanvasElement);
|
||||
constructor(canvas: string);
|
||||
@@ -655,6 +896,7 @@ declare module createjs {
|
||||
// properties
|
||||
autoClear: boolean;
|
||||
canvas: any; // HTMLCanvasElement or Object
|
||||
drawRect: Rectangle;
|
||||
handleEvent: Function;
|
||||
mouseInBounds: boolean;
|
||||
mouseMoveOutside: boolean;
|
||||
@@ -664,6 +906,7 @@ declare module createjs {
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
preventSelection: boolean;
|
||||
snapToPixelEnabled: boolean; // deprecated
|
||||
tickOnUpdate: boolean;
|
||||
|
||||
@@ -672,6 +915,7 @@ declare module createjs {
|
||||
clone(): Stage;
|
||||
enableDOMEvents(enable?: boolean): void;
|
||||
enableMouseOver(frequency?: number): void;
|
||||
tick(props?: Object): void;
|
||||
toDataURL(backgroundColor: string, mimeType: string): string;
|
||||
update(...arg: any[]): void;
|
||||
|
||||
@@ -697,13 +941,17 @@ declare module createjs {
|
||||
getMeasuredHeight(): number;
|
||||
getMeasuredLineHeight(): number;
|
||||
getMeasuredWidth(): number;
|
||||
getMetrics(): Object;
|
||||
set(props: Object): Text;
|
||||
setTransform(x?: number, y?: number, scaleX?: number, scaleY?: number, rotation?: number, skewX?: number, skewY?: number, regX?: number, regY?: number): Text;
|
||||
}
|
||||
|
||||
export class Ticker {
|
||||
// properties
|
||||
static framerate: number;
|
||||
static interval: number;
|
||||
static maxDelta: number;
|
||||
static paused: number;
|
||||
static RAF: string;
|
||||
static RAF_SYNCHED: string;
|
||||
static TIMEOUT: string;
|
||||
@@ -715,17 +963,35 @@ declare module createjs {
|
||||
|
||||
// methods
|
||||
static getEventTime(runTime?: boolean): number;
|
||||
/**
|
||||
* @deprecated - use the 'framerate' property instead
|
||||
*/
|
||||
static getFPS(): number;
|
||||
/**
|
||||
* @deprecated - use the 'interval' property instead
|
||||
*/
|
||||
static getInterval(): number;
|
||||
static getMeasuredFPS(ticks?: number): number;
|
||||
static getMeasuredTickTime(ticks?: number): number;
|
||||
/**
|
||||
* @deprecated - use the 'paused' property instead
|
||||
*/
|
||||
static getPaused(): boolean;
|
||||
static getTicks(pauseable?: boolean): number;
|
||||
static getTime(runTime?: boolean): number;
|
||||
static init(): void;
|
||||
static reset(): void;
|
||||
/**
|
||||
* @deprecated - use the 'framerate' property instead
|
||||
*/
|
||||
static setFPS(value: number): void;
|
||||
/**
|
||||
* @deprecated - use the 'interval' property instead
|
||||
*/
|
||||
static setInterval(interval: number): void;
|
||||
/**
|
||||
* @deprecated - use the 'paused' property instead
|
||||
*/
|
||||
static setPaused(value: boolean): void;
|
||||
|
||||
// EventDispatcher mixins
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
/// <reference path="ejs-locals.d.ts" />
|
||||
|
||||
import express = require('express');
|
||||
import ejsLocals = require('ejs-locals');
|
||||
|
||||
var app: express.Express = express();
|
||||
app.engine('ejs', ejsLocals);
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// Type definitions for ejs-locals
|
||||
// Project: https://github.com/randometc/ejs-locals
|
||||
// Definitions by: jt000 <https://github.com/jt000>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "ejs-locals" {
|
||||
|
||||
function ejsLocals(): Function;
|
||||
|
||||
export = ejsLocals;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/// <reference path="element-resize-event.d.ts" />
|
||||
|
||||
import ere = require("element-resize-event");
|
||||
|
||||
var domNode: Element = null;
|
||||
ere(domNode, (): void => {
|
||||
});
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// Type definitions for element-resize-event 1.0.1
|
||||
// Project: https://github.com/KyleAMathews/element-resize-event
|
||||
// Definitions by: Rogier Schouten <https://github.com/rogierschouten>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "element-resize-event" {
|
||||
function elementResizeEvent(domNode: Element, callback: () => void): void;
|
||||
export = elementResizeEvent;
|
||||
}
|
||||
Vendored
+45
-7
@@ -253,6 +253,20 @@ declare module Ember {
|
||||
**/
|
||||
function A(arr?: any[]): NativeArray;
|
||||
/**
|
||||
The Ember.ActionHandler mixin implements support for moving an actions property to an _actions
|
||||
property at extend time, and adding _actions to the object's mergedProperties list.
|
||||
**/
|
||||
class ActionHandlerMixin {
|
||||
/**
|
||||
Triggers a named action on the ActionHandler
|
||||
**/
|
||||
send(name: string, ...args: any[]): void;
|
||||
/**
|
||||
The collection of functions, keyed by name, available on this ActionHandler as action targets.
|
||||
**/
|
||||
actions: ActionsHash;
|
||||
}
|
||||
/**
|
||||
An instance of Ember.Application is the starting point for every Ember application. It helps to
|
||||
instantiate, initialize and coordinate the many objects that make up your app.
|
||||
**/
|
||||
@@ -446,6 +460,11 @@ declare module Ember {
|
||||
controllers: {};
|
||||
needs: string[];
|
||||
target: any;
|
||||
model: any;
|
||||
queryParams: any;
|
||||
send(name: string, ...args: any[]): void;
|
||||
actions: {};
|
||||
|
||||
}
|
||||
/**
|
||||
Array polyfills to support ES5 features in older browsers.
|
||||
@@ -719,15 +738,27 @@ declare module Ember {
|
||||
static isClass: boolean;
|
||||
static isMethod: boolean;
|
||||
}
|
||||
class Controller extends Object { }
|
||||
/**
|
||||
Additional methods for the ControllerMixin.
|
||||
**/
|
||||
class ControllerMixin {
|
||||
class Controller extends Object implements ControllerMixin {
|
||||
replaceRoute(name: string, ...args: any[]): void;
|
||||
transitionToRoute(name: string, ...args: any[]): void;
|
||||
controllers: {};
|
||||
model: any;
|
||||
needs: string[];
|
||||
queryParams: any;
|
||||
target: any;
|
||||
send(name: string, ...args: any[]): void;
|
||||
actions: ActionsHash;
|
||||
}
|
||||
/**
|
||||
Additional methods for the ControllerMixin.
|
||||
**/
|
||||
class ControllerMixin extends ActionHandlerMixin {
|
||||
replaceRoute(name: string, ...args: any[]): void;
|
||||
transitionToRoute(name: string, ...args: any[]): void;
|
||||
controllers: {};
|
||||
model : any;
|
||||
needs: string[];
|
||||
queryParams: any;
|
||||
target: any;
|
||||
}
|
||||
/**
|
||||
@@ -790,7 +821,7 @@ declare module Ember {
|
||||
and other classes like Ember._SimpleMetamorphView that don't need the fully functionaltiy of Ember.View.
|
||||
Unless you have specific needs for CoreView, you will use Ember.View in your applications.
|
||||
**/
|
||||
class CoreView extends Object {
|
||||
class CoreView extends Object implements ActionHandlerMixin {
|
||||
static detect(obj: any): boolean;
|
||||
static detectInstance(obj: any): boolean;
|
||||
/**
|
||||
@@ -805,6 +836,8 @@ declare module Ember {
|
||||
static metaForProperty(key: string): {};
|
||||
static isClass: boolean;
|
||||
static isMethod: boolean;
|
||||
send(name: string, ...args: any[]): void;
|
||||
actions: ActionsHash;
|
||||
parentView: CoreView;
|
||||
}
|
||||
class DAG {
|
||||
@@ -1449,6 +1482,10 @@ declare module Ember {
|
||||
controllers: Object;
|
||||
needs: string[];
|
||||
target: any;
|
||||
model: any;
|
||||
queryParams: any;
|
||||
send(name: string, ...args: any[]): void;
|
||||
actions: {};
|
||||
}
|
||||
class ObjectProxy extends Object {
|
||||
static detect(obj: any): boolean;
|
||||
@@ -1527,7 +1564,7 @@ declare module Ember {
|
||||
elementTag: string;
|
||||
parentBuffer: RenderBuffer;
|
||||
}
|
||||
class Route extends Object {
|
||||
class Route extends Object implements ActionHandlerMixin {
|
||||
static detect(obj: any): boolean;
|
||||
static detectInstance(obj: any): boolean;
|
||||
/**
|
||||
@@ -2181,6 +2218,7 @@ declare module Em {
|
||||
**/
|
||||
var $: typeof Ember.$;
|
||||
var A: typeof Ember.A;
|
||||
class ActionHandlerMixin extends Ember.ActionHandlerMixin { }
|
||||
class Application extends Ember.Application { }
|
||||
class Array extends Ember.Array { }
|
||||
class ArrayController extends Ember.ArrayController { }
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
/// <reference path="express-partials.d.ts" />
|
||||
|
||||
import express = require('express');
|
||||
import partials = require('express-partials');
|
||||
|
||||
var app: express.Express = express();
|
||||
app.use(partials());
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// Type definitions for express-partials
|
||||
// Project: https://github.com/publicclass/express-partials
|
||||
// Definitions by: jt000 <https://github.com/jt000>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
|
||||
declare module "express-partials" {
|
||||
import express = require('express');
|
||||
|
||||
function expressPartials(options?: any): express.RequestHandler;
|
||||
|
||||
export = expressPartials;
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
Vendored
+1
-1
@@ -438,7 +438,7 @@ declare module "express" {
|
||||
*
|
||||
* @param code
|
||||
*/
|
||||
sendStatus(code: number): Send;
|
||||
sendStatus(code: number): Response;
|
||||
|
||||
/**
|
||||
* Set Link header field with the given `links`.
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/// <reference path="fast-stats.d.ts" />
|
||||
|
||||
import faststats = require("fast-stats");
|
||||
import Stats = faststats.Stats;
|
||||
|
||||
var s: Stats;
|
||||
var n: number;
|
||||
var ns: number[];
|
||||
var buckets: faststats.Bucket[];
|
||||
|
||||
var stats: Stats = new Stats({ bucket_precision: 10 });
|
||||
|
||||
stats.push(1, 2, 3);
|
||||
stats.push([1, 2, 3]);
|
||||
stats.unshift(1, 2, 3);
|
||||
|
||||
n = stats.pop();
|
||||
n = stats.shift();
|
||||
|
||||
stats.reset();
|
||||
|
||||
s = stats.copy();
|
||||
s = stats.band_pass(1, 2);
|
||||
s = stats.band_pass(1, 2, true);
|
||||
s = stats.iqr();
|
||||
|
||||
n = stats.length;
|
||||
n = stats.amean();
|
||||
n = stats.gmean();
|
||||
n = stats.median();
|
||||
n = stats.percentile(1);
|
||||
n = stats.stddev();
|
||||
n = stats.gstddev();
|
||||
n = stats.moe();
|
||||
ns = stats.range();
|
||||
buckets = stats.distribution();
|
||||
|
||||
|
||||
Vendored
+186
@@ -0,0 +1,186 @@
|
||||
// Type definitions for fast-stats 0.0.2
|
||||
// Project: https://github.com/bluesmoon/node-faststats
|
||||
// Definitions by: Rogier Schouten <https://github.com/rogierschouten>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module 'fast-stats' {
|
||||
|
||||
export interface StatsOpts {
|
||||
/**
|
||||
* Tells fast-stats to maintain a histogram of your dataset using this parameter as the least count, or precision.
|
||||
* By default, fast-stats will not maintain buckets since it does not know the least count and range of your dataset in advance.
|
||||
* This option is required if you need to use the distribution() method.
|
||||
*/
|
||||
bucket_precision?: number;
|
||||
|
||||
/**
|
||||
* Tells fast-stats to maintain a histogram of your dataset using these custom buckets.
|
||||
* Each number in the array is the upper limit of a bucket. The lower limit of the first bucket is 0, the lower limit for all other buckets is the upper limit of the previous bucket.
|
||||
* If you use both bucket_precision and buckets, buckets takes precedence.
|
||||
*/
|
||||
buckets?: number[];
|
||||
|
||||
/**
|
||||
* Tells fast-stats how to extend the pre-defined buckets if data exceeding the range is added. This is useful to capture data above your range, in multiple buckets, but with low precision so you do not end up with a large number of empty buckets.
|
||||
* By default this is not defined, so buckets will not be extended and all data beyond the end range will end up in the last bucket.
|
||||
*/
|
||||
bucket_extension_interval?: number;
|
||||
|
||||
/**
|
||||
* Tells fast-stats not to store actual data values. This is useful to reduce memory utilisation for large datasets, however it comes with a few caveats.
|
||||
* - You can no longer get an exact median or other percentile value out of your dataset, however you could use bucketing (see bucket_precision above) to get an approximate percentile value.
|
||||
* - You can no longer run an exact iqr filter or a band_pass filter on the data, however you could use bucketing to get an approximate filtered object.
|
||||
* - You can no longer get at the entire dataset or remove data from the dataset.
|
||||
* The mean, standard deviation and margin of error calculations are unaffected by this parameter. If you use bucketing, and only care about the mean, standard deviation and margin of error or an approximate median or percentile value, set this option to false.
|
||||
* By default, store_data is true.
|
||||
*/
|
||||
store_data?: boolean;
|
||||
|
||||
/**
|
||||
* Tells fast-stats whether the data you pass in is a sample (true) or the entire (false default) population.
|
||||
* The standard deviation algorithm differs for populations v/s samples.
|
||||
*/
|
||||
sampling?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Distribution bucket
|
||||
*/
|
||||
export interface Bucket {
|
||||
/**
|
||||
* Bucket midpoint
|
||||
*/
|
||||
bucket: number;
|
||||
/**
|
||||
* [<bucket low>, <bucket high>],
|
||||
*/
|
||||
range: number[];
|
||||
/**
|
||||
* Number of datapoints
|
||||
*/
|
||||
count: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* A NodeJS library to do statistical analysis of numeric datasets.
|
||||
* When doing statistical analysis of data, the most common usage pattern is to run multiple statistical methods on the same set of data. Some of these methods use others. For example, to calculate the standard deviation of a dataset, we first need the mean.
|
||||
* Additionally, some methods can be calculated quickly as data is inserted, thereby reducing the number of loops required to run through the data during processing.
|
||||
* Fast stats maintains a running cache of several summary values as data is inserted making final calculation very fast. It trades off a small amount of additional memory usage for a large reduction in execution time.
|
||||
*/
|
||||
export class Stats {
|
||||
constructor(opts?: StatsOpts);
|
||||
|
||||
/**
|
||||
* Add elements to back
|
||||
*/
|
||||
push(...args: number[]): void;
|
||||
push(args: number[]): void;
|
||||
|
||||
/**
|
||||
* Remove element from back
|
||||
*/
|
||||
pop(): number;
|
||||
|
||||
/**
|
||||
* Remove element from front
|
||||
*/
|
||||
shift(): number;
|
||||
|
||||
/**
|
||||
* Add elements to front
|
||||
*/
|
||||
unshift(...args: number[]): void;
|
||||
|
||||
/**
|
||||
* Number of elements
|
||||
*/
|
||||
length: number;
|
||||
|
||||
/**
|
||||
* Clear all data
|
||||
*/
|
||||
reset(): void;
|
||||
|
||||
/**
|
||||
* Fresh copy
|
||||
*/
|
||||
copy(): Stats;
|
||||
|
||||
|
||||
/**
|
||||
* Arithmetic Mean
|
||||
* The arithmetic mean is calculated as the sum of all data points divided by the number of data points. This is useful for data sets that are fairly uniform, following a linear or binomial distribution. Use the amean() method or the `µ()? method to get at it:
|
||||
*/
|
||||
amean(): number;
|
||||
|
||||
/**
|
||||
* Geometric Mean
|
||||
* The geometric mean is the nth root of the product of all data points where n is the number of data points. This is useful for data sets that follow an exponential or log-normal distribution. Use the gmean() method to get at it:
|
||||
*/
|
||||
gmean(): number;
|
||||
|
||||
/**
|
||||
* Median
|
||||
* The median is the middle point of the dataset when sorted in ascending order. This is useful if your dataset has a lot of outliers and noise that would not normally be found in a complete population. Use the median() method to get at it:
|
||||
* If your data set contains an odd number of points, the median will be the middle point. If it contains an even number of points, then the median will be the arithmetic mean of the two middle points.
|
||||
* If your Stats object is configured to use buckets and has store_data set to false, then the median will be an approximation of the actual median.
|
||||
*/
|
||||
median(): number;
|
||||
|
||||
/**
|
||||
* Any Percentile
|
||||
* You can also get at any percentile value within the data. Use the percentile() method to get at this data. The percentile() method takes in a single argument. This is a number between 0 and 100 (both inclusive) that specifies which percentile point you want.
|
||||
* Passing in 50 as an argument will return the median, while 25 and 75 will return the first and third quartiles respectively. These three special values may be arithmetic means of two other values within the set. All other arguments will return a number from the data set.
|
||||
* If your Stats object is configured to use buckets and has store_data set to false, then the percentile value returned will be an approximation of the actual percentile based on the configured bucket_precision or buckets.
|
||||
*/
|
||||
percentile(n: number): number;
|
||||
|
||||
/**
|
||||
* Range
|
||||
* The range() method tells you the minimum and maximum values of your data set. It returns an array of two values. The first is the lower bound and the second is the upper bound.
|
||||
*/
|
||||
range(): number[];
|
||||
|
||||
/**
|
||||
* The distribution() method tells you how your data is distributed. You need to set the bucket_precision or buckets configuration options if you plan on using this method. It will then split your data into buckets based on the value of bucket_precision or buckets and tell you how many data points fall into each bucket. You can use this to plot a histogram of your data, or to compare it to commonly known distribution functions.
|
||||
* The return value is a sparse array of buckets with counts of datapoints per bucket. To save on memory, any empty buckets are undefined. You should treat an undefined bucket as if it had 0 datapoints.
|
||||
*/
|
||||
distribution(): Bucket[];
|
||||
|
||||
/**
|
||||
* Arithmetic Standard Deviation
|
||||
* Also commonly just called the Standard Deviation, with the symbol s. This tells you the spread of your data if it follows a normal (or close to normal) distribution, ie, the bell curve. fast-stats is really fast at calculating the standard deviation of a dataset
|
||||
* The arithmetic standard deviation is used in conjunction with the arithmetic mean to tell you the spread of your dataset: [amean-stddev, amean+stddev]. Note that you could also use 2 or 3 standard deviations for different spreads.
|
||||
*/
|
||||
stddev(): number;
|
||||
|
||||
/**
|
||||
* Geometric Standard Deviation
|
||||
* The geometric standard deviation tells you the spread of your data if it follows a log-normal or exponential distribution. Use the gstddev() method to get at it.
|
||||
*/
|
||||
gstddev(): number;
|
||||
|
||||
/**
|
||||
* 95% Confidence Margin of Error
|
||||
* The Margin of Error value tells you the range within which the real arithmetic mean of the population is likely to be with 95% confidence. Use the moe() method to get at it.
|
||||
* This value suggests that we are 95% certain that the real mean of the population is within 2.60 of the calculated arithmetic mean of 4.67. We could use this to find out the percent error in our sample. In this case there is a 55.71% error.
|
||||
* The margin of error is inversely proportional to the square root of the number of data points, so increasing the size of your sample will reduce the margin of error. It is good to strive for a margin of error of less than 5%.
|
||||
*/
|
||||
moe(): number;
|
||||
|
||||
/**
|
||||
* Band-pass filtering
|
||||
* The band_pass() filter method returns a new Stats object with all its data points within the specified range. This method takes in three arguments. The first is the lower bound of the range, the second is the upper bound of the range. Both these arguments are required.
|
||||
* The third argument specifies whether the range is open or closed. An open range does not include the upper and lower bounds while a closed range includes them. If not specified (or set to false), the range is closed. If set to true the range is open.
|
||||
* Band pass filtering should be used if the range for your data is rigid and never changes.
|
||||
*/
|
||||
band_pass(low: number, high: number, open?: boolean): Stats
|
||||
|
||||
/**
|
||||
* IQR Filtering
|
||||
* IQR, or Inter Quartile Range filtering filters data based on the spread of the data. It is much more adaptive to changes in data ranges. Use the iqr() method to IQR filter a dataset. The iqr() method does not accept any arguments.
|
||||
* In some cases, IQR filtering may not filter out anything. This can happen if the acceptable range is wider than the bounds of your dataset.
|
||||
*/
|
||||
iqr(): Stats;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
/// <reference path="./formidable.d.ts" />
|
||||
|
||||
import formidable = require('formidable');
|
||||
import http = require('http');
|
||||
import util = require('util');
|
||||
|
||||
http.createServer((req, res) => {
|
||||
if (req.url == '/upload' && req.method.toLowerCase() == 'post') {
|
||||
// parse a file upload
|
||||
var form = new formidable.IncomingForm();
|
||||
|
||||
form.parse(req, (err, fields, files) => {
|
||||
res.writeHead(200, {'content-type': 'text/plain'});
|
||||
res.write('received upload:\n\n');
|
||||
res.end(util.inspect({fields: fields, files: files}));
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// show a file upload form
|
||||
res.writeHead(200, {'content-type': 'text/html'});
|
||||
res.end(
|
||||
'<form action="/upload" enctype="multipart/form-data" method="post">'+
|
||||
'<input type="text" name="title"><br>'+
|
||||
'<input type="file" name="upload" multiple="multiple"><br>'+
|
||||
'<input type="submit" value="Upload">'+
|
||||
'</form>'
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
var form = new formidable.IncomingForm();
|
||||
|
||||
form.encoding = 'utf-8';
|
||||
form.uploadDir = '/my/dir';
|
||||
form.keepExtensions = false;
|
||||
form.maxFieldsSize = 2 * 1024 * 1024;
|
||||
form.maxFields = 1000;
|
||||
form.hash = false;
|
||||
form.hash = 'sha1';
|
||||
form.multiples = false;
|
||||
|
||||
if (form.type === 'multipart') {
|
||||
}
|
||||
if (form.bytesReceived > 100) {
|
||||
}
|
||||
if (form.bytesExpected > 100) {
|
||||
}
|
||||
|
||||
var req: http.ServerRequest;
|
||||
|
||||
form.parse(req);
|
||||
form.parse(req, (err: any, fields: formidable.Fields, files: formidable.Files) => {
|
||||
var key: string;
|
||||
for (key in fields) {
|
||||
console.log(key, '=', fields[key]);
|
||||
}
|
||||
|
||||
for (key in files) {
|
||||
console.log('file', key, 'is', files[key].type);
|
||||
}
|
||||
});
|
||||
|
||||
form.onPart = function (part: formidable.Part) {
|
||||
if (!part.filename) {
|
||||
form.handlePart(part);
|
||||
}
|
||||
};
|
||||
|
||||
var file: formidable.File;
|
||||
|
||||
file.size = 0;
|
||||
file.path = '/tmp/whatever';
|
||||
file.name = 'a_file';
|
||||
file.type = 'application/json';
|
||||
file.lastModifiedDate = new Date();
|
||||
file.hash = '12345';
|
||||
JSON.stringify(file.toJSON());
|
||||
|
||||
form.on('progess', (bytesReceived: number, bytesExpected: number) => {});
|
||||
Vendored
+56
@@ -0,0 +1,56 @@
|
||||
// Type definitions for Formidable 1.0.16
|
||||
// Project: https://github.com/felixge/node-formidable/
|
||||
// Definitions by: Wim Looman <https://github.com/Nemo157>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
declare module "formidable" {
|
||||
import http = require("http");
|
||||
import stream = require("stream");
|
||||
import events = require("events");
|
||||
|
||||
export class IncomingForm extends events.EventEmitter {
|
||||
encoding: string;
|
||||
uploadDir: string;
|
||||
keepExtensions: boolean;
|
||||
maxFieldsSize: number;
|
||||
maxFields: number;
|
||||
hash: string | boolean;
|
||||
multiples: boolean;
|
||||
type: string;
|
||||
bytesReceived: number;
|
||||
bytesExpected: number;
|
||||
|
||||
onPart: (part: Part) => void;
|
||||
|
||||
handlePart(part: Part): void;
|
||||
parse(req: http.ServerRequest, callback?: (err: any, fields: Fields, files: Files) => any): void;
|
||||
}
|
||||
|
||||
export interface Fields {
|
||||
[key: string]: string;
|
||||
}
|
||||
|
||||
export interface Files {
|
||||
[key: string]: File; // | File[];
|
||||
}
|
||||
|
||||
export interface Part extends stream.Stream {
|
||||
headers: { [key: string]: string };
|
||||
name: string;
|
||||
filename?: string;
|
||||
mime?: string;
|
||||
}
|
||||
|
||||
export interface File {
|
||||
size: number;
|
||||
path: string;
|
||||
name: string;
|
||||
type: string;
|
||||
lastModifiedDate?: Date;
|
||||
hash?: string;
|
||||
|
||||
toJSON(): Object;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user