mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-10 11:40:16 +08:00
Merge branch 'master' of https://github.com/borisyankov/DefinitelyTyped
This commit is contained in:
+113
-28
@@ -13,9 +13,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [: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:](angular2/router.d.ts) [Angular](http://angular.io) by [angular team](https://github.com/angular)
|
||||
* [:link:](amqplib/amqplib.d.ts) [amqplib 0.3.x](https://github.com/squaremo/amqp.node) by [Michael Nahkies](https://github.com/mnahkies)
|
||||
* [:link:](angular2/angular2.d.ts) [Angular](http://angular.io) by [angular team](https://github.com/angular)
|
||||
* [:link:](angular2/router.d.ts) [Angular](http://angular.io) by [angular team](https://github.com/angular)
|
||||
* [:link:](angular-file-upload/angular-file-upload.d.ts) [Angular File Upload](https://github.com/danialfarid/ng-file-upload) by [John Reilly](https://github.com/johnnyreilly)
|
||||
* [:link:](ng-file-upload/ng-file-upload.d.ts) [Angular File Upload](https://github.com/danialfarid/ng-file-upload) by [John Reilly](https://github.com/johnnyreilly)
|
||||
* [:link:](angular-growl-v2/angular-growl-v2.d.ts) [Angular Growl 2 v.0.7.3](http://janstevens.github.io/angular-growl-2) by [Tadeusz Hucal](https://github.com/mkp05)
|
||||
* [: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), [Raphael Schweizer](https://github.com/rasch), [Cody Schaaf](https://github.com/codyschaaf)
|
||||
@@ -29,18 +31,22 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](angular-material/angular-material.d.ts) [Angular Material (angular.material module)](https://github.com/angular/material) by [Matt Traynham](https://github.com/mtraynham)
|
||||
* [:link:](angular-protractor/angular-protractor.d.ts) [Angular Protractor](https://github.com/angular/protractor) by [Bill Armstrong](https://github.com/BillArmstrong)
|
||||
* [:link:](angular-scenario/angular-scenario.d.ts) [Angular Scenario Testing (ngScenario module)](http://angularjs.org) by [RomanoLindano](https://github.com/RomanoLindano)
|
||||
* [:link:](angular-toasty/angular-toasty.d.ts) [Angular Toasty](https://github.com/invertase/angular-toasty) by [Dominik Muench](https://github.com/muenchdo)
|
||||
* [:link:](angular-translate/angular-translate.d.ts) [Angular Translate (pascalprecht.translate module)](https://github.com/PascalPrecht/angular-translate) by [Michel Salib](https://github.com/michelsalib)
|
||||
* [:link:](angular-ui-bootstrap/angular-ui-bootstrap.d.ts) [Angular UI Bootstrap](https://github.com/angular-ui/bootstrap) by [Brian Surowiec](https://github.com/xt0rted)
|
||||
* [:link:](angular-wizard/angular-wizard.d.ts) [Angular Wizard](https://github.com/mgonto/angular-wizard) by [Marko Jurisic](https://github.com/mjurisic)
|
||||
* [:link:](angular-bootstrap-lightbox/angular-bootstrap-lightbox.d.ts) [angular-bootstrap-lightbox](https://github.com/compact/angular-bootstrap-lightbox) by [Roland Zwaga](https://github.com/rolandzwaga)
|
||||
* [:link:](angular-dynamic-locale/angular-dynamic-locale.d.ts) [angular-dynamic-locale](https://github.com/lgalfaso/angular-dynamic-locale) by [Stephen Lautier](https://github.com/stephenlautier)
|
||||
* [:link:](angular-formly/angular-formly.d.ts) [angular-formly](https://github.com/formly-js/angular-formly) by [Scott Hatcher](https://github.com/scatcher)
|
||||
* [:link:](angular-hotkeys/angular-hotkeys.d.ts) [angular-hotkeys](https://github.com/chieffancypants/angular-hotkeys) by [Jason Zhao](https://github.com/jlz27), [Stefan Steinhart](https://github.com/reppners)
|
||||
* [:link:](angular-http-auth/angular-http-auth.d.ts) [angular-http-auth](https://github.com/witoldsz/angular-http-auth) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](angular-jwt/angular-jwt.d.ts) [angular-jwt](https://github.com/auth0/angular-jwt) by [Reto Rezzonico](https://github.com/rerezz)
|
||||
* [: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-localForage/angular-localForage.d.ts) [angular-localForage](https://github.com/ocombe/angular-localForage) by [Stefan Steinhart](https://github.com/reppners)
|
||||
* [:link:](angular-notifications/angular-notifications.d.ts) [angular-notifications](https://github.com/DerekRies/angular-notifications) by [Tomasz Ducin](https://github.com/ducin/DefinitelyTyped)
|
||||
* [: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-signalr-hub/angular-signalr-hub.d.ts) [angular-signalr-hub](https://github.com/JustMaier/angular-signalr-hub) by [Adam Santaniello](https://github.com/AdamSantaniello)
|
||||
* [: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-storage/angular-storage.d.ts) [angular-storage](https://github.com/auth0/angular-storage) by [Matthew DeKrey](https://github.com/mdekrey)
|
||||
* [:link:](angular.throttle/angular.throttle.d.ts) [angular.throttle](https://github.com/BaggersIO/angular.throttle) by [Stefan Steinhart](https://github.com/reppners)
|
||||
@@ -50,6 +56,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](rx-angular/rx.angular.d.ts) [angularjs extensions to rxjs](http://reactivex.io) by [Mick Delaney](https://github.com/mickdelaney)
|
||||
* [:link:](angularjs-toaster/angularjs-toaster.d.ts) [angularjs-toaster](https://github.com/jirikavi/AngularJS-Toaster) by [Ben Tesser](https://github.com/btesser)
|
||||
* [:link:](angularLocalStorage/angularLocalStorage.d.ts) [AngularLocalStorage](https://github.com/agrublev/angularLocalStorage) by [Horiuchi_H](https://github.com/horiuchi)
|
||||
* [:link:](angulartics/angulartics.d.ts) [Angulartics](http://luisfarzati.github.io/angulartics) by [Steven Fan](https://github.com/stevenfan)
|
||||
* [:link:](animation-frame/animation-frame.d.ts) [animation-frame](https://github.com/kof/animation-frame) by [Qinfeng Chen](https://github.com/qinfchen)
|
||||
* [:link:](ansi-styles/ansi-styles.d.ts) [ansi-styles](https://github.com/sindresorhus/ansi-styles) by [bryn austin bellomy](https://github.com/brynbellomy)
|
||||
* [:link:](ansicolors/ansicolors.d.ts) [ansicolors](https://github.com/thlorenz/ansicolors) by [rogierschouten](https://github.com/rogierschouten)
|
||||
@@ -77,7 +84,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](auth0/auth0.d.ts) [Auth0.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
|
||||
* [:link:](auth0.lock/auth0.lock.d.ts) [Auth0Widget.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
|
||||
* [:link:](auth0.widget/auth0.widget.d.ts) [Auth0Widget.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
|
||||
* [:link:](autobahn/autobahn.d.ts) [AutobahnJS](http://autobahn.ws/js) by [Elad Zelingher](https://github.com/darkl)
|
||||
* [:link:](autobahn/autobahn.d.ts) [AutobahnJS](http://autobahn.ws/js) by [Elad Zelingher](https://github.com/darkl), [Andy Hawkins](https://github.com/a904guy/,http://a904guy.com/,http://www.bmbsqd.com)
|
||||
* [:link:](autoprefixer-core/autoprefixer-core.d.ts) [Autoprefixer Core](https://github.com/postcss/autoprefixer-core) by [Asana](https://asana.com)
|
||||
* [:link:](aws-sdk/aws-sdk.d.ts) [aws-sdk](https://github.com/aws/aws-sdk-js) by [midknight41](https://github.com/midknight41)
|
||||
* [:link:](axios/axios.d.ts) [axios](https://github.com/mzabriskie/axios) by [Marcel Buesing](https://github.com/marcelbuesing)
|
||||
@@ -89,7 +96,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](backbone.paginator/backbone.paginator.d.ts) [backbone.paginator](https://github.com/backbone-paginator/backbone.paginator) by [Nyamazing](https://github.com/Nyamazing)
|
||||
* [:link:](backbone.radio/backbone.radio.d.ts) [Backbone.Radio](https://github.com/marionettejs/backbone.radio) by [Peter Palotas](https://github.com/alphaleonis)
|
||||
* [:link:](backgrid/backgrid.d.ts) [Backgrid](http://backgridjs.com) by [Jeremy Lujan](https://github.com/jlujan)
|
||||
* [:link:](baconjs/baconjs.d.ts) [Bacon.js](https://baconjs.github.io) by [Alexander Matsievsky](https://github.com/alexander-matsievsky)
|
||||
* [:link:](bardjs/bardjs.d.ts) [bardjs](https://github.com/wardbell/bardjs) by [Andrew Archibald](https://github.com/TepigMC)
|
||||
* [:link:](batch-stream/batch-stream.d.ts) [batch-stream](https://github.com/segmentio/batch-stream) by [Nicholas Penree](http://github.com/drudge)
|
||||
* [:link:](bcrypt/bcrypt.d.ts) [bcrypt](https://www.npmjs.org/package/bcrypt) by [Peter Harris](https://github.com/codeanimal)
|
||||
* [:link:](bgiframe/typescript.bgiframe.d.ts) [bgiframe](https://github.com/sumegizoltan/BgiFrame) by [Zoltan Sumegi](https://github.com/sumegizoltan)
|
||||
* [:link:](big.js/big.js.d.ts) [big.js](https://github.com/MikeMcl/big.js) by [Steve Ognibene](https://github.com/nycdotnet)
|
||||
@@ -102,7 +111,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](blueimp-md5/blueimp-md5.d.ts) [blueimp-md5](https://github.com/blueimp/JavaScript-MD5) by [Ray Martone](https://github.com/rmartone)
|
||||
* [:link:](body-parser/body-parser.d.ts) [body-parser](http://expressjs.com) by [Santi Albo](https://github.com/santialbo), [VILIC VANE](https://vilic.info), [Jonathan Häberle](https://github.com/dreampulse)
|
||||
* [:link:](boom/boom.d.ts) [boom](http://github.com/hapijs/boom) by [Igor Rogatty](http://github.com/rogatty)
|
||||
* [:link:](bootbox/bootbox.d.ts) [Bootbox](https://github.com/makeusabrew/bootbox) by [Vincent Bortone](https://github.com/vbortone), [Kon Pik](https://github.com/konpikwastaken), [Anup Kattel](https://github.com/kanup)
|
||||
* [:link:](bootbox/bootbox.d.ts) [Bootbox](https://github.com/makeusabrew/bootbox) by [Vincent Bortone](https://github.com/vbortone), [Kon Pik](https://github.com/konpikwastaken), [Anup Kattel](https://github.com/kanup), [Dominik Schroeter](https://github.com/icereed)
|
||||
* [:link:](bootstrap/bootstrap.d.ts) [Bootstrap](http://twitter.github.com/bootstrap) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker.d.ts) [Bootstrap datetimepicker v3](http://eonasdan.github.io/bootstrap-datetimepicker) by [Jesica N. Fera](https://github.com/bayitajesi)
|
||||
* [:link:](bootstrap-touchspin/bootstrap-touchspin.d.ts) [Bootstrap TouchSpin](http://www.virtuosoft.eu/code/bootstrap-touchspin) by [Albin Sunnanbo](https://github.com/albinsunnanbo)
|
||||
@@ -110,8 +119,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](bootstrap-slider/bootstrap-slider.d.ts) [bootstrap-slider.js](https://github.com/seiyria/bootstrap-slider) by [Daniel Beckwith](https://github.com/dbeckwith)
|
||||
* [:link:](bootstrap.datepicker/bootstrap.datepicker.d.ts) [bootstrap.datepicker](https://github.com/eternicode/bootstrap-datepicker) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](bootstrap.paginator/bootstrap.paginator.d.ts) [bootstrap.paginator](https://github.com/lyonlai/bootstrap-paginator) by [derikwhittaker](https://github.com/derikwhittaker)
|
||||
* [:link:](bootstrap.timepicker/bootstrap.timepicker.d.ts) [bootstrap.timepicker](https://github.com/jdewit/bootstrap-timepicker) by [derikwhittaker](https://github.com/derikwhittaker)
|
||||
* [:link:](box2d/box2dweb.d.ts) [bootstrap.timepicker](http://code.google.com/p/box2dweb) by [jbaldwin](https://github.com/jbaldwin)
|
||||
* [:link:](bootstrap.timepicker/bootstrap.timepicker.d.ts) [bootstrap.timepicker](https://github.com/jdewit/bootstrap-timepicker) by [derikwhittaker](https://github.com/derikwhittaker)
|
||||
* [:link:](breeze/breeze.d.ts) [Breeze 1.5.x](http://www.breezejs.com) by [Boris Yankov](https://github.com/borisyankov), [IdeaBlade](https://github.com/IdeaBlade/Breeze)
|
||||
* [:link:](browser-harness/browser-harness.d.ts) [Browser Harness](https://github.com/scriby/browser-harness) by [Chris Scribner](https://github.com/scriby)
|
||||
* [:link:](browser-sync/browser-sync.d.ts) [browser-sync](http://www.browsersync.io) by [Asana](https://asana.com)
|
||||
@@ -123,8 +132,10 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](bufferstream/bufferstream.d.ts) [bufferstream](https://github.com/dodo/node-bufferstream) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](bunyan-prettystream/bunyan-prettystream.d.ts) [bunyan-prettystream](https://www.npmjs.com/package/bunyan-prettystream) by [Jason Swearingen](https://github.com/jasonswearingen), [Vadim Macagon](https://github.com/enlight)
|
||||
* [:link:](business-rules-engine/business-rules-engine.d.ts) [business-rules-engine](https://github.com/rsamec/form) by [Roman Samec](https://github.com/rsamec)
|
||||
* [:link:](dw-bxslider-4/dw-bxslider-4.d.ts) [bxSlider](https://github.com/stevenwanderski/bxslider-4) by [Piotr Sałkowski](https://github.com/namerci)
|
||||
* [:link:](byline/byline.d.ts) [byline](https://github.com/jahewson/node-byline) by [Stefan Steinhart](https://github.com/reppners)
|
||||
* [:link:](calq/calq.d.ts) [calq](https://calq.io/docs/client/javascript/reference) by [Eirik Hoem](https://github.com/eirikhm)
|
||||
* [:link:](camel-case/camel-case.d.ts) [camel-case](https://github.com/blakeembrey/camel-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](camljs/camljs.d.ts) [camljs](http://camljs.codeplex.com) by [Andrey Markeev](http://markeev.com)
|
||||
* [:link:](canvasjs/canvasjs.d.ts) [CanvasJS](http://canvasjs.com) by [Mark Overholt](https://github.com/mover5)
|
||||
* [:link:](casperjs/casperjs.d.ts) [CasperJS](http://casperjs.org) by [Jed Mao](https://github.com/jedmao)
|
||||
@@ -163,8 +174,10 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](compression/compression.d.ts) [compression](https://github.com/expressjs/compression) by [Santi Albo](https://github.com/santialbo)
|
||||
* [:link:](configstore/configstore.d.ts) [configstore](https://github.com/yeoman/configstore) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](connect-flash/connect-flash.d.ts) [connect-flash](https://github.com/jaredhanson/connect-flash) by [Andreas Gassmann](https://github.com/AndreasGassmann)
|
||||
* [:link:](connect-modrewrite/connect-modrewrite.d.ts) [connect-modrewrite](https://github.com/tinganho/connect-modrewrite) by [Tingan Ho](https://github.com/tinganho)
|
||||
* [:link:](connect-slashes/connect-slashes.d.ts) [connect-slashes](https://github.com/avinoamr/connect-slashes) by [Sam Herrmann](https://github.com/samherrmann)
|
||||
* [:link:](consolidate/consolidate.d.ts) [consolidate](https://github.com/visionmedia/consolidate.js) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
* [:link:](constant-case/constant-case.d.ts) [constant-case](https://github.com/blakeembrey/constant-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](content-type/content-type.d.ts) [content-type](https://github.com/deoxxa/content-type) by [Pine Mizune](https://github.com/pine613)
|
||||
* [:link:](contextjs/contextjs.d.ts) [contextjs](https://github.com/jakiestfu/Context.js) by [Kern Handa](https://github.com/kernhanda)
|
||||
* [:link:](convert-source-map/convert-source-map.d.ts) [convert-source-map](https://github.com/thlorenz/convert-source-map) by [Andrew Gaspar](https://github.com/AndrewGaspar)
|
||||
@@ -173,6 +186,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](cookiejs/cookiejs.d.ts) [cookie.js](https://github.com/js-coder/cookie.js) by [Boltmade](https://github.com/Boltmade)
|
||||
* [:link:](cordova-ionic/plugins/keyboard.d.ts) [Cordova Keyboard plugin](https://github.com/driftyco/ionic-plugins-keyboard) by [Hendrik Maus](https://github.com/hendrikmaus)
|
||||
* [:link:](cordovarduino/cordovarduino.d.ts) [Cordovarduino plugin](https://github.com/stereolux/cordovarduino) by [Hendrik Maus](https://github.com/hendrikmaus)
|
||||
* [:link:](core-js/core-js.d.ts) [core-js](https://github.com/zloirock/core-js) by [Ron Buckton](http://github.com/rbuckton)
|
||||
* [:link:](cors/cors.d.ts) [cors](https://github.com/troygoode/node-cors) by [Mihhail Lapushkin](https://github.com/mihhail-lapushkin)
|
||||
* [:link:](couchbase/couchbase.d.ts) [Couchbase Couchnode](https://github.com/couchbase/couchnode) by [Basarat Ali Syed](https://github.com/basarat)
|
||||
* [:link:](createjs/createjs.d.ts) [CreateJS](http://www.createjs.com) by [Pedro Ferreira](https://bitbucket.org/drk4), [Chris Smith](https://github.com/evilangelist), [Satoru Kimura](https://github.com/gyohk)
|
||||
* [:link:](cron/cron.d.ts) [cron](https://www.npmjs.com/package/cron) by [Hiroki Horiuchi](https://github.com/horiuchi)
|
||||
@@ -192,6 +207,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](dagre/dagre.d.ts) [dagre](https://github.com/cpettitt/dagre) by [Qinfeng Chen](https://github.com/qinfchen)
|
||||
* [:link:](dagre-d3/dagre-d3.d.ts) [dagre-d3.core.js](https://github.com/cpettitt/dagre-d3) by [Mark Wong Siang Kai](https://github.com/markwongsk)
|
||||
* [:link:](dat-gui/dat-gui.d.ts) [dat.GUI](https://github.com/dataarts/dat.gui) by [Satoru Kimura](https://github.com/gyohk)
|
||||
* [:link:](data-driven/data-driven.d.ts) [data-driven.js](https://github.com/fluentsoftware/data-driven) by [Adam Babcock](https://github.com/mrhen)
|
||||
* [:link:](DataStream.js/DataStream.js.d.ts) [DataStream.js](https://github.com/kig/DataStream.js) by [Tat](https://github.com/tatchx)
|
||||
* [:link:](date.format.js/date.format.d.ts) [Date Format](http://blog.stevenlevithan.com/archives/date-time-format) by [Rob Stutton](https://github.com/balrob)
|
||||
* [:link:](datejs/datejs.d.ts) [DateJS](http://www.datejs.com) by [David Khristepher Santos](http://github.com/rupertavery)
|
||||
@@ -209,6 +225,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [: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:](diff-match-patch/diff-match-patch.d.ts) [diff-match-patch](https://www.npmjs.com/package/diff-match-patch) by [Asana](https://asana.com)
|
||||
* [:link:](docCookies/docCookies.d.ts) [docCookies](https://developer.mozilla.org/en-US/docs/Web/API/document.cookie) by [Jon Egerton](https://github.com/jonegerton)
|
||||
* [:link:](dock-spawn/dock-spawn.d.ts) [Dock Spawn](http://dockspawn.com) by [Drew Noakes](https://drewnoakes.com)
|
||||
* [:link:](documentdb/documentdb.d.ts) [DocumentDB](https://github.com/Azure/azure-documentdb-node) by [Noel Abrahams](https://github.com/NoelAbrahams), [Brett Gutstein](https://github.com/brettferdosi)
|
||||
@@ -218,11 +235,13 @@ 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:](donna/donna.d.ts) [donna](https://github.com/atom/donna) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](dot/dot.d.ts) [doT](https://github.com/olado/doT) by [ZombieHunter](https://github.com/ZombieHunter)
|
||||
* [:link:](dot-case/dot-case.d.ts) [dot-case](https://github.com/blakeembrey/dot-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](dotdotdot/dotdotdot.d.ts) [dotdotdot](http://dotdotdot.frebsite.nl) by [Milan Jaros](https://github.com/milanjaros)
|
||||
* [:link:](doublearray/doublearray.d.ts) [doublearray](https://github.com/takuyaa/doublearray) by [MIZUSHIMA Junki](https://github.com/mzsm)
|
||||
* [:link:](dragula/dragula.d.ts) [dragula](http://bevacqua.github.io/dragula) by [Paul Welter](https://github.com/pwelter34)
|
||||
* [:link:](drop/drop.d.ts) [Drop](http://github.hubspot.com/drop) by [Adi Dahiya](https://github.com/adidahiya)
|
||||
* [:link:](dropboxjs/dropboxjs.d.ts) [dropbox-js](https://github.com/dropbox/dropbox-js) by [Steve Fenton](https://github.com/Steve-Fenton), [Pedro Casaubon](https://github.com/xperiments)
|
||||
* [:link:](dropzone/dropzone.d.ts) [Dropzone](http://www.dropzonejs.com) by [Natan Vivo](https://github.com/nvivo)
|
||||
* [:link:](dropzone/dropzone.d.ts) [Dropzone](http://www.dropzonejs.com) by [Natan Vivo](https://github.com/nvivo), [Andy Hawkins](https://github.com/a904guy/,http://a904guy.com/,http://www.bmbsqd.com)
|
||||
* [:link:](dsv/dsv.d.ts) [dsv](https://www.npmjs.com/package/dsv) by [Jason Swearingen](https://jasonswearingen.github.io)
|
||||
* [:link:](dts-bundle/dts-bundle.d.ts) [dts-bundle](https://github.com/TypeStrong/dts-bundle) by [Asana](https://asana.com)
|
||||
* [:link:](durandal/durandal.d.ts) [Durandal](http://durandaljs.com) by [Blue Spire](https://github.com/BlueSpire)
|
||||
@@ -240,6 +259,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [: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:](github-electron/github-electron.d.ts) [Electron (shared between main and rederer processes)](http://electron.atom.io) by [jedmao](https://github.com/jedmao)
|
||||
* [:link:](github-electron/electron-prebuilt.d.ts) [electron-prebuilt](https://github.com/mafintosh/electron-prebuilt) by [rhysd](https://github.com/rhysd)
|
||||
* [: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)
|
||||
@@ -249,16 +269,20 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](epiceditor/epiceditor.d.ts) [EpicEditor](http://epiceditor.com) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](eq.js/eq.js.d.ts) [eq.js](https://github.com/Snugug/eq.js) by [Stephen Lautier](https://github.com/stephenlautier)
|
||||
* [:link:](errorhandler/errorhandler.d.ts) [errorhandler](https://github.com/expressjs/errorhandler) by [Santi Albo](https://github.com/santialbo)
|
||||
* [:link:](es6-collections/es6-collections.d.ts) [es6-collections](https://github.com/WebReflection/es6-collections) by [Ron Buckton](http://github.com/rbuckton)
|
||||
* [:link:](es6-promise/es6-promise.d.ts) [es6-promise](https://github.com/jakearchibald/ES6-Promise) by [François de Campredon](https://github.com/fdecampredon), [vvakame](https://github.com/vvakame)
|
||||
* [:link:](es6-shim/es6-shim.d.ts) [es6-shim](https://github.com/paulmillr/es6-shim) by [Ron Buckton](http://github.com/rbuckton)
|
||||
* [:link:](escape-latex/escape-latex.d.ts) [escape-latex](https://github.com/dangmai/escape-latex) by [Oliver Schneider](https://github.com/olsio)
|
||||
* [:link:](esprima/esprima.d.ts) [Esprima](http://esprima.org) by [teppeis](https://github.com/teppeis), [RReverser](https://github.com/RReverser)
|
||||
* [:link:](estree/flow.d.ts) [ESTree AST extensions for Facebook Flow](https://github.com/estree/estree) by [RReverser](https://github.com/RReverser)
|
||||
* [:link:](estree/estree.d.ts) [ESTree AST specification](https://github.com/estree/estree) by [RReverser](https://github.com/RReverser)
|
||||
* [:link:](event-kit/event-kit.d.ts) [event-kit](https://github.com/atom/event-kit) by [Vadim Macagon](https://github.com/enlight)
|
||||
* [:link:](event-loop-lag/event-loop-lag.d.ts) [event-loop-lag](https://github.com/pebble/event-loop-lag) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](eventemitter2/eventemitter2.d.ts) [EventEmitter2](https://github.com/asyncly/EventEmitter2) by [ryiwamoto](https://github.com/ryiwamoto)
|
||||
* [:link:](eventemitter3/eventemitter3.d.ts) [EventEmitter3](https://github.com/primus/eventemitter3) by [Yuichi Murata](https://github.com/mrk21)
|
||||
* [:link:](evernote/evernote.d.ts) [evernote v](https://www.npmjs.com/package/evernote) by [Zachary Collins](https://github.com/corps)
|
||||
* [:link:](exit/exit.d.ts) [exit](https://github.com/cowboy/node-exit) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](expect.js/expect.js.d.ts) [expect.js](https://github.com/LearnBoost/expect.js) by [Teppei Sato](https://github.com/teppeis)
|
||||
* [:link:](expect.js/expect.js.d.ts) [expect.js](https://github.com/Automattic/expect.js) by [Teppei Sato](https://github.com/teppeis)
|
||||
* [:link:](expectations/expectations.d.ts) [expectations.js](https://github.com/spmason/expectations) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](express/express.d.ts) [Express 4.x](http://expressjs.com) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](express-debug/express-debug.d.ts) [express-debug](https://github.com/devoidfury/express-debug) by [Federico Bond](https://github.com/federicobond)
|
||||
@@ -273,6 +297,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](eyes/eyes.d.ts) [eyes](https://github.com/cloudhead/eyes.js) by [bryn austin bellomy](https://github.com/brynbellomy)
|
||||
* [:link:](fabricjs/fabricjs.d.ts) [FabricJS](http://fabricjs.com) by [Oliver Klemencic](https://github.com/oklemencic), [Joseph Livecchi](https://github.com/joewashear007)
|
||||
* [:link:](fbsdk/fbsdk.d.ts) [Facebook Javascript SDK](https://developers.facebook.com/docs/javascript) by [Joshua Strobl](https://github.com/JoshStrobl)
|
||||
* [:link:](famous/famous.d.ts) [Famous Engine](http://famous.org) by [Boris Vasilenko](https://github.com/borisvasilenko)
|
||||
* [:link:](fancybox/fancybox.d.ts) [fancyBox](https://github.com/fancyapps/fancyBox) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](farbtastic/farbtastic.d.ts) [Farbtastic: jQuery Color Wheel](http://mattfarina.github.io/farbtastic) by [Matt Brooks](https://github.com/EnableSoftware)
|
||||
* [:link:](fast-stats/fast-stats.d.ts) [fast-stats](https://github.com/bluesmoon/node-faststats) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
@@ -288,6 +313,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](fingerprintjs/fingerprint.d.ts) [fingerprintjs](https://github.com/Valve/fingerprintjs) by [Shunsuke Ohtani](https://github.com/zaneli)
|
||||
* [:link:](state-machine/state-machine.d.ts) [Finite State Machine](https://github.com/jakesgordon/javascript-state-machine) by [Boris Yankov](https://github.com/borisyankov), [Maarten Docter](https://github.com/mdocter), [William Sears](https://github.com/MrBigDog2U)
|
||||
* [:link:](firebase/firebase.d.ts) [Firebase API](https://www.firebase.com/docs/javascript/firebase) by [Vincent Botone](https://github.com/vbortone), [Shin1 Kashimura](https://github.com/in-async)
|
||||
* [:link:](firebase-client/firebase-client.d.ts) [Firebase Client](https://www.github.com/jpstevens/firebase-client) by [Andrew Breen](https://github.com/fpsscarecrow)
|
||||
* [:link:](firebase/firebase-simplelogin.d.ts) [Firebase Simple Login](https://www.firebase.com/docs/security/simple-login-overview.html) by [Wilker Lucio](http://github.com/wilkerlucio)
|
||||
* [:link:](first-mate/first-mate.d.ts) [first-mate](https://github.com/atom/first-mate) by [Vadim Macagon](https://github.com/enlight)
|
||||
* [:link:](flexSlider/flexSlider.d.ts) [FlexSlider 2 jquery plugin](https://github.com/woothemes/FlexSlider) by [Diullei Gomes](https://github.com/diullei)
|
||||
@@ -318,6 +344,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](geojson/geojson.d.ts) [GeoJSON Format Specification](http://geojson.org) by [Jacob Bruun](https://github.com/cobster)
|
||||
* [:link:](geometry-dom/geometry-dom.d.ts) [Geometry Format Specification](http://www.w3.org/TR/geometry-1) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
* [:link:](giraffe/giraffe.d.ts) [Giraffe](https://github.com/barc/backbone.giraffe) by [Matt McCray](https://github.com/darthapo)
|
||||
* [:link:](git-config/git-config.d.ts) [git-config](https://github.com/eugeneware/git-config) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](gl-matrix/gl-matrix.d.ts) [gl-matrix](https://github.com/toji/gl-matrix) by [Tat](https://github.com/tatchx)
|
||||
* [:link:](gldatepicker/gldatepicker.d.ts) [glDatePicker](http://glad.github.com/glDatePicker) by [Dániel Tar](https://github.com/qcz)
|
||||
* [:link:](glidejs/glidejs.d.ts) [Glide.js](http://glide.jedrzejchalubek.com) by [Milan Jaros](https://github.com/milanjaros)
|
||||
@@ -350,6 +377,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](gsap/Core.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
|
||||
* [:link:](gulp/gulp.d.ts) [Gulp v3.8.x](http://gulpjs.com) by [Drew Noakes](https://drewnoakes.com)
|
||||
* [:link:](gulp-autoprefixer/gulp-autoprefixer.d.ts) [gulp-autoprefixer](https://github.com/sindresorhus/gulp-autoprefixer) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-cached/gulp-cached.d.ts) [gulp-cached](https://github.com/wearefractal/gulp-cached) by [Thomas Corbière](https://github.com/tomc974)
|
||||
* [:link:](gulp-concat/gulp-concat.d.ts) [gulp-concat](http://github.com/wearefractal/gulp-concat) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
|
||||
* [:link:](gulp-rev/gulp-rev.d.ts) [gulp-csso](https://github.com/sindresorhus/gulp-rev) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](gulp-csso/gulp-csso.d.ts) [gulp-csso](https://github.com/ben-eb/gulp-csso) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
@@ -361,20 +389,23 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](gulp-istanbul/gulp-istanbul.d.ts) [gulp-istanbul](https://github.com/SBoudrias/gulp-istanbul) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-jasmine-browser/gulp-jasmine-browser.d.ts) [gulp-jasmine-browser](https://github.com/jasmine/gulp-jasmine-browser) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](gulp-less/gulp-less.d.ts) [gulp-less](https://github.com/plus3network/gulp-less) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
|
||||
* [:link:](gulp-load-plugins/gulp-load-plugins.d.ts) [gulp-load-plugins](https://github.com/jackfranklin/gulp-load-plugins) by [Joe Skeen](http://github.com/joeskeen)
|
||||
* [:link:](gulp-minify-css/gulp-minify-css.d.ts) [gulp-minify-css](https://github.com/jonathanepollack/gulp-minify-css) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
|
||||
* [:link:](gulp-minify-html/gulp-minify-html.d.ts) [gulp-minify-html](https://github.com/murphydanger/gulp-minify-html) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](gulp-mocha/gulp-mocha.d.ts) [gulp-mocha](https://github.com/sindresorhus/gulp-mocha) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-protractor/gulp-protractor.d.ts) [gulp-protractor](https://github.com/mllrsohn/gulp-protractor) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](gulp-remember/gulp-remember.d.ts) [gulp-remember](https://github.com/ahaurw01/gulp-remember) by [Thomas Corbière](https://github.com/tomc974)
|
||||
* [:link:](gulp-rename/gulp-rename.d.ts) [gulp-rename](https://github.com/hparra/gulp-rename) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-replace/gulp-replace.d.ts) [gulp-replace](https://github.com/lazd/gulp-replace) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-rev-replace/gulp-rev-replace.d.ts) [gulp-rev-replace](https://github.com/jamesknelson/gulp-rev-replace) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](gulp-ruby-sass/gulp-ruby-sass.d.ts) [gulp-ruby-sass](https://github.com/sindresorhus/gulp-ruby-sass) by [Agnislav Onufrijchuk](https://github.com/agnislav)
|
||||
* [:link:](gulp-sass/gulp-sass.d.ts) [gulp-sass](https://github.com/dlmanning/gulp-sass) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-size/gulp-size.d.ts) [gulp-size](https://github.com/sindresorhus/gulp-size) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](gulp-sourcemaps/gulp-sourcemaps.d.ts) [gulp-sourcemaps](https://github.com/floridoo/gulp-sourcemaps) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-tsd/gulp-tsd.d.ts) [gulp-tsd](https://github.com/moznion/gulp-tsd) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
|
||||
* [:link:](gulp-tslint/gulp-tslint.d.ts) [gulp-tslint](https://github.com/panuhorsmalahti/gulp-tslint) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-typedoc/gulp-typedoc.d.ts) [gulp-typedoc](https://github.com/rogierschouten/gulp-typedoc) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-typescript/gulp-typescript.d.ts) [gulp-typescript](https://github.com/ivogabe/gulp-typescript) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-typescript/gulp-typescript.d.ts) [gulp-typescript](https://github.com/ivogabe/gulp-typescript) by [Asana](https://asana.com), [Thomas Corbière](https://github.com/tomc974)
|
||||
* [:link:](gulp-uglify/gulp-uglify.d.ts) [gulp-uglify](https://github.com/terinjokes/gulp-uglify) by [Christopher Haws](https://github.com/ChristopherHaws)
|
||||
* [:link:](gulp-useref/gulp-useref.d.ts) [gulp-useref](https://github.com/jonkemp/gulp-useref) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](gulp-util/gulp-util.d.ts) [gulp-util v3.0.x](https://github.com/gulpjs/gulp-util) by [jedmao](https://github.com/jedmao)
|
||||
@@ -384,7 +415,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](hapi/hapi.d.ts) [hapi](http://github.com/spumko/hapi) by [Jason Swearingen](http://github.com/jasonswearingen)
|
||||
* [:link:](hasher/hasher.d.ts) [Hasher.js](https://github.com/millermedeiros/hasher) by [flyfishMT](https://github.com/flyfishMT)
|
||||
* [:link:](hashids/hashids.d.ts) [Hashids.js 1.x](https://github.com/ivanakimov/hashids.node.js) by [Paulo Cesar](https://github.com/pocesar)
|
||||
* [:link:](hashmap/hashmap.d.ts) [HashMap](https://github.com/flesler/hashmap) by [Rafał Wrzeszcz](http://wrzasq.pl)
|
||||
* [:link:](hashmap/hashmap.d.ts) [HashMap](https://github.com/flesler/hashmap) by [Rafał Wrzeszcz](http://wrzasq.pl), [Vasya Aksyonov](https://github.com/outring)
|
||||
* [:link:](he/he.d.ts) [he](https://github.com/mathiasbynens/he) by [Simon Edwards](https://github.com/sedwards2009)
|
||||
* [:link:](Headroom/headroom.d.ts) [headroom.js](http://wicky.nillia.ms/headroom.js) by [Jakub Olek](https://github.com/hakubo)
|
||||
* [:link:](heap/heap.d.ts) [heap](https://github.com/qiao/heap.js) by [Ryan McNamara](https://github.com/ryan10132)
|
||||
@@ -400,19 +431,20 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](html2canvas/html2canvas.d.ts) [html2canvas.js](https://github.com/niklasvh/html2canvas) by [Richard Hepburn](https://github.com/rwhepburn)
|
||||
* [:link:](htmlparser2/htmlparser2.d.ts) [htmlparser2 v3.7.x](https://github.com/fb55/htmlparser2) by [James Roland Cabresos](https://github.com/staticfunction)
|
||||
* [:link:](htmltojsx/htmltojsx.d.ts) [htmltojsx](https://www.npmjs.com/package/htmltojsx) by [Basarat Ali Syed](https://github.com/basarat)
|
||||
* [:link:](statuses/statuses.d.ts) [http-errors](https://github.com/jshttp/statuses) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](http-errors/http-errors.d.ts) [http-errors](https://github.com/jshttp/http-errors) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](statuses/statuses.d.ts) [http-errors](https://github.com/jshttp/statuses) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](http-status/http-status.d.ts) [http-status](https://github.com/wdavidw/node-http-status) by [Michael Zabka](https://github.com/misak113)
|
||||
* [:link:](http-string-parser/http-string-parser.d.ts) [http-string-parser](https://github.com/apiaryio/http-string-parser) by [MIZUNE Pine](https://github.com/pine613)
|
||||
* [:link:](humane/humane.d.ts) [Humane](http://wavded.github.com/humane-js) by [jmvrbanac](https://github.com/jmvrbanac)
|
||||
* [:link:](hypertext-application-language/hypertext-application-language.d.ts) [Hypertext Application Language Draft 6](https://tools.ietf.org/html/draft-kelly-json-hal-06) by [Maks3w](https://github.com/maks3w)
|
||||
* [:link:](i18n-node/i18n-node.d.ts) [i18n-node](https://github.com/mashpie/i18n-node) by [Maxime LUCE](https://github.com/SomaticIT)
|
||||
* [:link:](i18next/i18next.d.ts) [i18next](http://i18next.com) by [Maarten Docter](https://github.com/mdocter)
|
||||
* [:link:](ng-i18next/ng-i18next.d.ts) [i18next](https://github.com/i18next/ng-i18next) by [Cyril Schumacher](https://github.com/cyrilschumacher)
|
||||
* [:link:](i18next/i18next.d.ts) [i18next](http://i18next.com) by [Maarten Docter](https://github.com/mdocter)
|
||||
* [:link:](iban/iban.d.ts) [iban.js](https://github.com/arhs/iban.js) by [Cyril Schumacher](https://github.com/cyrilschumacher)
|
||||
* [:link:](icheck/icheck.d.ts) [iCheck](http://damirfoy.com/iCheck) by [Dániel Tar](https://github.com/qcz)
|
||||
* [:link:](imagemagick/imagemagick.d.ts) [imagemagick](http://github.com/rsms/node-imagemagick) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
* [:link:](imagemagick-native/imagemagick-native.d.ts) [imagemagick-native](https://www.npmjs.org/package/imagemagick-native) by [Hiroki Horiuchi](https://github.com/horiuchi)
|
||||
* [:link:](imagesloaded/imagesloaded.d.ts) [imagesLoaded](https://github.com/desandro/imagesloaded) by [Chris Charabaruk](http://github.com/coldacid)
|
||||
* [:link:](imap/imap.d.ts) [imap](https://www.npmjs.com/package/imap) by [Peter Snider](https://github.com/psnider)
|
||||
* [:link:](imgur-rest-api/imgur-rest-api.d.ts) [Imgur REST API v3](https://api.imgur.com) by [Luke William Westby](http://github.com/lukewestby)
|
||||
* [:link:](impress/impress.d.ts) [Impress.js](https://github.com/bartaz/impress.js) by [Boris Yankov](https://github.com/borisyankov)
|
||||
@@ -423,13 +455,17 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](interactjs/interact.d.ts) [Interacting for interact.js](https://github.com/taye/interact.js) by [Douglas Eichelberger](https://github.com/dduugg), [Adi Dahiya](https://github.com/adidahiya), [Tom Hasner](https://github.com/thasner)
|
||||
* [:link:](intercomjs/intercom.d.ts) [intercom.js](https://github.com/diy/intercom.js) by [spencerwi](http://github.com/spencerwi)
|
||||
* [:link:](inversify/inversify.d.ts) [inversify](https://github.com/inversify/InversifyJS) by [inversify](https://github.com/inversify)
|
||||
* [:link:](ionic/ionic.d.ts) [Ionic](http://ionicframework.com) by [Spencer Williams](https://github.com/spencerwi)
|
||||
* [:link:](cordova-ionic/cordova-ionic.d.ts) [Ionic Cordova plugins](https://github.com/driftyco) by [Hendrik Maus](https://github.com/hendrikmaus)
|
||||
* [:link:](irc/irc.d.ts) [irc](https://github.com/martynsmith/node-irc) by [phillips1012](https://github.com/phillips1012)
|
||||
* [:link:](is-lower-case/is-lower-case.d.ts) [is-lower-case](https://github.com/blakeembrey/is-lower-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](is-upper-case/is-upper-case.d.ts) [is-upper-case](https://github.com/blakeembrey/is-upper-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](is_js/is_js.d.ts) [is.js](http://arasatasaygin.github.io/is.js) by [Rodrigo Cabral](https://github.com/cabralRodrigo)
|
||||
* [:link:](iscroll/iscroll.d.ts) [iScroll](http://cubiq.org/iscroll-4) by [Boris Yankov](https://github.com/borisyankov), [Christiaan Rakowski](https://github.com/csrakowski)
|
||||
* [:link:](iscroll/iscroll-5.d.ts) [iScroll 5](http://cubiq.org/iscroll-5-ready-for-beta-test) by [Christiaan Rakowski](https://github.com/csrakowski)
|
||||
* [:link:](iscroll/iscroll-lite.d.ts) [iScroll Lite](http://cubiq.org/iscroll-4) by [Boris Yankov](https://github.com/borisyankov), [Christiaan Rakowski](https://github.com/csrakowski)
|
||||
* [:link:](iscroll/iscroll-5-lite.d.ts) [iScroll Lite 5](http://cubiq.org/iscroll-5-ready-for-beta-test) by [Christiaan Rakowski](https://github.com/csrakowski)
|
||||
* [:link:](iso8601-localizer/iso8601-localizer.d.ts) [ISO8601-Localizer](https://github.com/avielfedida/ISO8601-Localizer) by [Aviel Fedida](https://github.com/avielfedida)
|
||||
* [:link:](ix.js/ix.d.ts) [IxJS 1.0.6 / ix.js](https://github.com/Reactive-Extensions/IxJS) by [Igor Oleinikov](https://github.com/Igorbek)
|
||||
* [:link:](ix.js/l2o.d.ts) [IxJS 1.0.6 / l2o.js](https://github.com/Reactive-Extensions/IxJS) by [Igor Oleinikov](https://github.com/Igorbek)
|
||||
* [:link:](jake/jake.d.ts) [jake](https://github.com/mde/jake) by [Kon](http://phyzkit.net)
|
||||
@@ -450,7 +486,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](jjve/jjve.d.ts) [JJVE](https://github.com/silas/jjve) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](joData/joData.d.ts) [joData](https://github.com/mccow002/joData) by [Chris Wrench](https://github.com/cgwrench)
|
||||
* [:link:](johnny-five/johnny-five.d.ts) [johnny-five](https://github.com/rwaldron/johnny-five) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
* [:link:](joi/joi.d.ts) [joi](https://github.com/spumko/joi) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](joi/joi.d.ts) [joi](https://github.com/spumko/joi) by [Bart van der Schoor](https://github.com/Bartvds), [Laurence Dougal Myers](https://github.com/laurence-myers)
|
||||
* [:link:](jointjs/jointjs.d.ts) [Joint JS](http://www.jointjs.com) by [Aidan Reel](http://github.com/areel), [David Durman](http://github.com/DavidDurman), [Ewout Van Gossum](https://github.com/DenEwout)
|
||||
* [:link:](jqrangeslider/jqrangeslider.d.ts) [jQRangeSlider](http://ghusse.github.com/jQRangeSlider) by [Dániel Tar](https://github.com/qcz)
|
||||
* [:link:](jquery/jquery.d.ts) [jQuery 1.10.x / 2.0.x](http://jquery.com) by [Boris Yankov](https://github.com/borisyankov), [Christian Hoffmeister](https://github.com/choffmeister), [Steve Fenton](https://github.com/Steve-Fenton), [Diullei Gomes](https://github.com/Diullei), [Tass Iliopoulos](https://github.com/tasoili), [Jason Swearingen](https://github.com/jasons-novaleaf), [Sean Hill](https://github.com/seanski), [Guus Goossens](https://github.com/Guuz), [Kelly Summerlin](https://github.com/ksummerlin), [Basarat Ali Syed](https://github.com/basarat), [Nicholas Wolverson](https://github.com/nwolverson), [Derek Cicerone](https://github.com/derekcicerone), [Andrew Gaspar](https://github.com/AndrewGaspar), [James Harrison Fisher](https://github.com/jameshfisher), [Seikichi Kondo](https://github.com/seikichi), [Benjamin Jackman](https://github.com/benjaminjackman), [Poul Sorensen](https://github.com/s093294), [Josh Strobl](https://github.com/JoshStrobl), [John Reilly](https://github.com/johnnyreilly), [Dick van den Brink](https://github.com/DickvdBrink)
|
||||
@@ -464,6 +500,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](jquery.fileupload/jquery.fileupload.d.ts) [jQuery File Upload Plugin](https://github.com/blueimp/jQuery-File-Upload) by [Rob Alarcon](https://github.com/rob-alarcon)
|
||||
* [:link:](jquery.joyride/jquery.joyride.d.ts) [jQuery JoyRide Plugin](https://github.com/zurb/joyride) by [Vincent Bortone](https://github.com/vbortone)
|
||||
* [:link:](jqgrid/jqgrid.d.ts) [jQuery jqgrid Plugin](https://github.com/tonytomov/jqGrid) by [Lokesh Peta](https://github.com/lokeshpeta)
|
||||
* [:link:](jquery-knob/jquery-knob.d.ts) [jQuery Knob](http://anthonyterrien.com/knob) by [Iain Buchanan](https://github.com/iain8)
|
||||
* [:link:](jquerymobile/jquerymobile.d.ts) [jQuery Mobile](http://jquerymobile.com) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](jquery.notifyBar/jquery.notifyBar.d.ts) [jQuery Notify Bar](http://www.whoop.ee/posts/2013-04-05-the-resurrection-of-jquery-notify-bar) by [Shunsuke Ohtani](https://github.com/zaneli)
|
||||
* [:link:](jquery.base64/jquery.base64.d.ts) [jQuery Plugin - base64 codec](https://github.com/yatt/jquery.base64) by [Shinya Mochizuki](https://github.com/enrapt-mochizuki)
|
||||
@@ -504,7 +541,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](jquery.jsignature/jquery.jsignature.d.ts) [jQuery.jsignature v2](https://github.com/willowsystems/jSignature) by [Patrick Magee](https://github.com/pjmagee)
|
||||
* [:link:](jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts) [jquery.jsonrpc](https://github.com/Textalk/jquery.jsonrpcclient.js) by [Maksim Karelov](https://github.com/Ty3uK)
|
||||
* [:link:](jquery.noty/jquery.noty.d.ts) [jQuery.noty](http://needim.github.io/noty) by [Aaron King](https://github.com/kingdango)
|
||||
* [:link:](jquery.payment/jquery.payment.d.ts) [jQuery.payment](https://github.com/stripe/jquery.payment) by [Eric J. Smith](https://github.com/ejsmith)
|
||||
* [:link:](jquery.payment/jquery.payment.d.ts) [jQuery.payment](https://github.com/stripe/jquery.payment) by [Eric J. Smith](https://github.com/ejsmith), [John Rutherford](https://github.com/johnrutherford)
|
||||
* [:link:](jquery.pjax.falsandtru/jquery.pjax.d.ts) [jquery.pjax.ts by falsandtru](https://github.com/falsandtru/jquery.pjax.js) by [新ゝ月 NewNotMoon](http://new.not-moon.net)
|
||||
* [:link:](jquery.placeholder/jquery.placeholder.d.ts) [jquery.placeholder.js](https://github.com/mathiasbynens/jquery-placeholder) by [Peter Gill](https://github.com/majorsilence), [Neil Culver](https://github.com/EnableSoftware)
|
||||
* [:link:](jquery.pnotify/jquery.pnotify.d.ts) [jquery.pnotify 2.x](https://github.com/sciactive/pnotify) by [David Sichau](https://github.com/DavidSichau)
|
||||
@@ -522,6 +559,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](jquery.total-storage/jquery.total-storage.d.ts) [jQueryTotalStorage](https://github.com/Upstatement/jquery-total-storage) by [Jeremy Brooks](https://github.com/JeremyCBrooks)
|
||||
* [:link:](jqueryui/jqueryui.d.ts) [jQueryUI](http://jqueryui.com) by [Boris Yankov](https://github.com/borisyankov), [John Reilly](https://github.com/johnnyreilly)
|
||||
* [:link:](js-cookie/js-cookie.d.ts) [js-cookie](https://github.com/js-cookie/js-cookie) by [Theodore Brown](https://github.com/theodorejb)
|
||||
* [:link:](ua-parser-js/ua-parser-js.d.ts) [js-cookie](https://github.com/faisalman/ua-parser-js) by [Viktor Miroshnikov](https://github.com/superduper)
|
||||
* [:link:](js-fixtures/fixtures.d.ts) [js-fixtures](https://github.com/badunk/js-fixtures) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid)
|
||||
* [:link:](js-git/js-git.d.ts) [js-git](https://github.com/creationix/js-git) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](js-signals/js-signals.d.ts) [JS-Signals](http://millermedeiros.github.io/js-signals) by [Diullei Gomes](https://github.com/diullei)
|
||||
@@ -560,6 +598,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](kafka-node/kafka-node.d.ts) [kafka-node](https://github.com/SOHU-Co/kafka-node) by [Daniel Imrie-Situnayake](https://github.com/dansitu)
|
||||
* [:link:](karma/karma.d.ts) [karma](https://github.com/karma-runner/karma) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](karma-jasmine/karma-jasmine.d.ts) [karma-jasmine plugin](https://github.com/karma-runner/karma-jasmine) by [Michel Salib](https://github.com/michelsalib)
|
||||
* [:link:](katex/katex.d.ts) [KaTeX v.0.5.0](http://khan.github.io/KaTeX) by [Michael Randolph](https://github.com/mrand01)
|
||||
* [:link:](kendo-ui/kendo-ui.d.ts) [Kendo UI Professional](http://www.telerik.com/kendo-ui) by [Telerik](https://github.com/telerik)
|
||||
* [:link:](keyboardjs/keyboardjs.d.ts) [KeyboardJS](https://github.com/RobertWHurst/KeyboardJS) by [Vincent Bortone](https://github.com/vbortone)
|
||||
* [:link:](keymaster/keymaster.d.ts) [keymaster](https://github.com/madrobby/keymaster) by [Martin W. Kirst](https://github.com/nitram509)
|
||||
@@ -593,6 +632,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](ladda/ladda.d.ts) [Ladda](https://github.com/hakimel/Ladda) by [Danil Flores](https://github.com/dflor003), [Michael Lee](https://github.com/leemicw)
|
||||
* [:link:](later/later.d.ts) [LaterJS](http://bunkat.github.io/later) by [Jason D Dryhurst-Smith](http://jasonds.co.uk)
|
||||
* [:link:](lazy.js/lazy.js.d.ts) [Lazy.js](https://github.com/dtao/lazy.js) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](lazypipe/lazypipe.d.ts) [lazypipe](https://github.com/OverZealous/lazypipe) by [Thomas Corbière](https://github.com/tomc974)
|
||||
* [:link:](leaflet/leaflet.d.ts) [Leaflet.js](https://github.com/Leaflet/Leaflet) by [Vladimir Zotov](https://github.com/rgripper)
|
||||
* [:link:](leaflet-label/leaflet-label.d.ts) [Leaflet.label](https://github.com/Leaflet/Leaflet.label) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](jquery.leanModal/jquery.leanModal.d.ts) [leanModal.js](http://leanmodal.finelysliced.com.au) by [FinelySliced](https://github.com/FinelySliced)
|
||||
@@ -605,7 +645,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](linq/linq.jquery.d.ts) [linq.jquery (from linq.js)](http://linqjs.codeplex.com) by [neuecc](http://www.codeplex.com/site/users/view/neuecc)
|
||||
* [:link:](linq/linq.d.ts) [linq.js](http://linqjs.codeplex.com) by [Marcin Najder](https://github.com/marcinnajder), [Sebastiaan Dammann](https://github.com/Sebazzz)
|
||||
* [:link:](jquery.livestampjs/jquery.livestampjs.d.ts) [Livestamp.js](http://mattbradley.github.com/livestampjs) by [Vincent Bortone](https://github.com/vbortone)
|
||||
* [:link:](lodash/lodash.d.ts) [Lo-Dash](http://lodash.com) by [Brian Zengel](https://github.com/bczengel)
|
||||
* [:link:](lodash/lodash.d.ts) [Lo-Dash](http://lodash.com) by [Brian Zengel](https://github.com/bczengel), [Ilya Mochalov](https://github.com/chrootsu)
|
||||
* [:link:](lockfile/lockfile.d.ts) [lockfile](https://github.com/isaacs/lockfile) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](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)
|
||||
@@ -618,13 +658,17 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](long/long.d.ts) [Long.js](https://github.com/dcodeIO/Long.js) by [Peter Kooijmans](https://github.com/peterkooijmans)
|
||||
* [:link:](lory.js/lory.js.d.ts) [lory](https://github.com/meandmax/lory) by [kubosho](https://github.com/kubosho)
|
||||
* [:link:](lovefield/lovefield.d.ts) [Lovefield](http://google.github.io/lovefield) by [freshp86](https://github.com/freshp86)
|
||||
* [:link:](lower-case/lower-case.d.ts) [lower-case](https://github.com/blakeembrey/lower-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](lower-case-first/lower-case-first.d.ts) [lower-case-first](https://github.com/blakeembrey/lower-case-first) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](lru-cache/lru-cache.d.ts) [lru-cache](https://github.com/isaacs/node-lru-cache) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](lscache/lscache.d.ts) [lscache](https://github.com/pamelafox/lscache) by [Chris Martinez](https://github.com/Chris-Martinezz)
|
||||
* [:link:](luaparse/luaparse.d.ts) [luaparse](https://github.com/oxyc/luaparse) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](lunr/lunr.d.ts) [lunr.js](https://github.com/olivernn/lunr.js) by [Sebastian Lenz](https://github.com/sebastian-lenz)
|
||||
* [:link:](lz-string/lz-string.d.ts) [lz-string](https://github.com/pieroxy/lz-string) by [Roman Nikitin](https://github.com/M0ns1gn0r)
|
||||
* [:link:](magic-number/magic-number.d.ts) [magic-number](https://github.com/stpettersens/node-magic-number) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](magicsuggest/magicsuggest.d.ts) [MagicSuggest](http://nicolasbize.com/magicsuggest) by [Leonardo Chaia](http://github.com/leonardochaia)
|
||||
* [:link:](mailcheck/mailcheck.d.ts) [Mailcheck](https://github.com/mailcheck/mailcheck) by [Paulo Cesar](http://github.com/pocesar)
|
||||
* [:link:](maildev/maildev.d.ts) [maildev](https://github.com/djfarrelly/maildev) by [Cyril Schumacher](https://github.com/cyrilschumacher)
|
||||
* [:link:](main-bower-files/main-bower-files.d.ts) [main-bower-files](https://github.com/ck86/main-bower-files) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
|
||||
* [:link:](maker.js/makerjs.d.ts) [Maker.js](https://github.com/Microsoft/maker.js) by [Dan Marshall](https://github.com/danmarshall)
|
||||
* [:link:](mandrill-api/mandrill-api.d.ts) [Mandrill API 1.x](http://mandrill.com) by [Paulo Cesar](https://github.com/pocesar)
|
||||
@@ -646,10 +690,10 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](messenger/messenger.d.ts) [Messenger.js](https://github.com/HubSpot/messenger) by [Derek Cicerone](https://github.com/derekcicerone)
|
||||
* [:link:](meteor/meteor.d.ts) [Meteor](http://www.meteor.com) by [Dave Allen](https://github.com/fullflavedave)
|
||||
* [:link:](method-override/method-override.d.ts) [method-override](https://github.com/expressjs/method-override) by [Santi Albo](https://github.com/santialbo)
|
||||
* [:link:](metismenu/metismenu.d.ts) [metisMenu](http://github.com/onokumus/metisMenu) by [onokums](https://github.com/onokumus)
|
||||
* [:link:](microsoft-ajax/microsoft.ajax.d.ts) [Microsoft ASP.NET Ajax client side library](http://msdn.microsoft.com/en-us/library/ee341002(v=vs.100).aspx) by [Patrick Magee](https://github.com/pjmagee)
|
||||
* [:link:](xrm/xrm.d.ts) [Microsoft Dynamics xRM API](http://www.microsoft.com/en-us/download/details.aspx?id=44567) by [David Berry](https://github.com/6ix4our), [Matt Ngan](https://github.com/mattngan)
|
||||
* [:link:](xrm/xrm-6.d.ts) [Microsoft Dynamics xRM API v6](http://msdn.microsoft.com/en-us/library/gg328255.aspx) by [David Berry](https://github.com/6ix4our)
|
||||
* [:link:](xrm/clientglobalcontext.d.ts) [Microsoft Dynamics xRM ClientGlobalContext.js.aspx](http://msdn.microsoft.com/en-us/library/gg328255.aspx) by [David Berry](https://github.com/6ix4our)
|
||||
* [:link:](jquery-validation-unobtrusive/jquery-validation-unobtrusive.d.ts) [Microsoft jQuery Unobtrusive Validation](http://aspnetwebstack.codeplex.com) by [Matt Brooks](https://github.com/EnableSoftware)
|
||||
* [: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:](xrm/parature.d.ts) [Microsoft Parature extentions to Xrm.Page - available for CRM Online Only](http://msdn.microsoft.com/en-us/library/gg328255.aspx) by [David Berry](https://github.com/6ix4our)
|
||||
@@ -672,15 +716,16 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](mkdirp/mkdirp.d.ts) [mkdirp](http://github.com/substack/node-mkdirp) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](mkpath/mkpath.d.ts) [mkpath](https://www.npmjs.com/package/mkpath) by [Jared Klopper](https://github.com/optical)
|
||||
* [:link:](mobile-detect/mobile-detect.d.ts) [mobile-detect](http://hgoebl.github.io/mobile-detect.js) by [Martin McWhorter](https://github.com/martinmcwhorter)
|
||||
* [:link:](mocha/mocha.d.ts) [mocha](http://mochajs.org) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid), [otiai10](https://github.com/otiai10), [jt000](https://github.com/jt000), [Vadim Macagon](https://github.com/enlight)
|
||||
* [:link:](mocha/mocha-node.d.ts) [mocha](http://mochajs.org) by [Vadim Macagon](https://github.com/enlight), [vvakame](https://github.com/vvakame)
|
||||
* [:link:](mocha/mocha.d.ts) [mocha](http://mochajs.org) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid), [otiai10](https://github.com/otiai10), [jt000](https://github.com/jt000), [Vadim Macagon](https://github.com/enlight)
|
||||
* [:link:](mocha-phantomjs/mocha-phantomjs.d.ts) [mocha-phantomjs](http://metaskills.net/mocha-phantomjs) by [Erik Schierboom](https://github.com/ErikSchierboom)
|
||||
* [:link:](mock-fs/mock-fs.d.ts) [mock-fs](https://github.com/tschaub/mock-fs) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](mockery/mockery.d.ts) [mockery](https://github.com/mfncooper/mockery) by [jt000](https://github.com/jt000)
|
||||
* [:link:](modernizr/modernizr.d.ts) [Modernizr](http://modernizr.com) by [Boris Yankov](https://github.com/borisyankov), [Theodore Brown](https://github.com/theodorejb)
|
||||
* [:link:](moment-timezone/moment-timezone.d.ts) [moment-timezone.js](http://momentjs.com/timezone) by [Michel Salib](https://github.com/michelsalib)
|
||||
* [:link:](moment/moment-node.d.ts) [Moment.js](https://github.com/timrwood/moment) by [Michael Lakerveld](https://github.com/Lakerfield), [Aaron King](https://github.com/kingdango), [Hiroki Horiuchi](https://github.com/horiuchi), [Dick van den Brink](https://github.com/DickvdBrink), [Adi Dahiya](https://github.com/adidahiya)
|
||||
* [: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:](moment/moment-node.d.ts) [Moment.js](https://github.com/timrwood/moment) by [Michael Lakerveld](https://github.com/Lakerfield), [Aaron King](https://github.com/kingdango), [Hiroki Horiuchi](https://github.com/horiuchi), [Dick van den Brink](https://github.com/DickvdBrink), [Adi Dahiya](https://github.com/adidahiya), [Matt Brooks](https://github.com/EnableSoftware)
|
||||
* [:link:](moment/moment.d.ts) [Moment.js](https://github.com/timrwood/moment) by [Michael Lakerveld](https://github.com/Lakerfield), [Aaron King](https://github.com/kingdango), [Hiroki Horiuchi](https://github.com/horiuchi), [Dick van den Brink](https://github.com/DickvdBrink), [Adi Dahiya](https://github.com/adidahiya), [Matt Brooks](https://github.com/EnableSoftware)
|
||||
* [:link:](moment-range/moment-range.d.ts) [Moment.js](https://github.com/gf3/moment-range) by [Bart van den Burg](https://github.com/Burgov), [Wilgert Velinga](https://github.com/wilgert)
|
||||
* [:link:](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)
|
||||
@@ -705,8 +750,10 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](nedb/nedb.d.ts) [NeDB](https://github.com/louischatriot/nedb) by [Stefan Steinhart](https://github.com/reppners)
|
||||
* [:link:](needle/needle.d.ts) [needle](https://github.com/tomas/needle) by [San Chen](https://github.com/bigsan)
|
||||
* [:link:](nexpect/nexpect.d.ts) [nexpect](https://github.com/nodejitsu/nexpect) by [vvakame](http://github.com/vvakame)
|
||||
* [:link:](ng-command/ng-command.d.ts) [ng-command](https://github.com/stephenlautier/ng-command) by [Stephen Lautier](https://github.com/stephenlautier)
|
||||
* [:link:](ng-grid/ng-grid.d.ts) [ng-grid](http://angular-ui.github.io/ng-grid) by [Ken Smith](https://github.com/smithkl42), [Roland Zwaga](https://github.com/rolandzwaga), [Kent Cooper](https://github.com/kentcooper)
|
||||
* [:link:](angular-idle/angular-idle.d.ts) [ng-idle](http://hackedbychinese.github.io/ng-idle) by [mthamil](https://github.com/mthamil)
|
||||
* [:link:](ngkookies/ngkookies.d.ts) [ngKookes](https://github.com/voronianski/ngKookies) by [Martin McWhorter](https://github.com/martinmcwhorter)
|
||||
* [: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)
|
||||
@@ -722,22 +769,24 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [: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-gcm/node-gcm.d.ts) [node-gcm](https://www.npmjs.org/package/node-gcm) by [Hiroki Horiuchi](https://github.com/horiuchi)
|
||||
* [:link:](node-getopt/node-getopt.d.ts) [node-getopt](https://github.com/jiangmiao/node-getopt) by [Karl.M.Cauchy](https://github.com/kcauchy)
|
||||
* [: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:](node-mysql-wrapper/node-mysql-wrapper.d.ts) [node-mysql-wrapper](https://github.com/kataras/node-mysql-wrapper) by [Makis Maropoulos](https://github.com/kataras)
|
||||
* [:link:](node-persist/node-persist.d.ts) [node-persist](https://github.com/simonlast/node-persist) by [Spencer Williams](http://spencerwi.com)
|
||||
* [:link:](node-polyglot/node-polyglot.d.ts) [node-polyglot](https://github.com/airbnb/polyglot.js) by [Tim Jackson-Kiely](https://github.com/timjk)
|
||||
* [:link:](promptly/promptly.d.ts) [node-promptly](https://github.com/IndigoUnited/node-promptly) by [Dan Spencer](https://github.com/danrspencer)
|
||||
* [:link:](radius/radius.d.ts) [node-radius](https://github.com/retailnext/node-radius) by [Peter Harris](https://github.com/codeanimal)
|
||||
* [:link:](node-schedule/node-schedule.d.ts) [node-schedule](https://github.com/tejasmanohar/node-schedule) by [Cyril Schumacher](https://github.com/cyrilschumacher)
|
||||
* [:link:](stack-trace/stack-trace.d.ts) [node-stack-trace](https://github.com/felixge/node-stack-trace) by [Exceptionless](https://github.com/exceptionless)
|
||||
* [:link:](node-uuid/node-uuid.d.ts) [node-uuid.js](https://github.com/broofa/node-uuid) by [Jeff May](https://github.com/jeffmay)
|
||||
* [:link:](node-webkit/node-webkit.d.ts) [node-webkit](https://github.com/rogerwang/node-webkit) by [Pedro Casaubon](https://github.com/xperiments)
|
||||
* [:link:](xml2js/xml2js.d.ts) [node-xml2js](https://github.com/Leonidas-from-XIV/node-xml2js) by [Michel Salib](https://github.com/michelsalib), [Jason McNeil](https://github.com/jasonrm)
|
||||
* [:link:](node/node.d.ts) [Node.js](http://nodejs.org) by [Microsoft TypeScript](http://typescriptlang.org), [DefinitelyTyped](https://github.com/borisyankov/DefinitelyTyped)
|
||||
* [:link:](_debugger/_debugger.d.ts) [Node.js debugger API](http://nodejs.org) by [Basarat Ali Syed](https://github.com/basarat)
|
||||
* [:link:](restify/restify.d.ts) [node.js REST framework](https://github.com/mcavage/node-restify) by [Bret Little](https://github.com/blittle)
|
||||
* [:link:](acl/acl-redisBackend.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo)
|
||||
* [:link:](acl/acl-mongodbBackend.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo)
|
||||
* [:link:](acl/acl.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo)
|
||||
* [:link:](mdns/mdns.d.ts) [node_mdns](https://github.com/agnat/node_mdns) by [Stefan Steinhart](https://github.com/reppners)
|
||||
* [:link:](node_redis/node_redis.d.ts) [node_redis](https://github.com/mranney/node_redis) by [Boris Yankov](https://github.com/borisyankov)
|
||||
@@ -745,14 +794,15 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](nodemailer/nodemailer-types.d.ts) [Nodemailer](https://github.com/andris9/Nodemailer) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](nodemailer/nodemailer.d.ts) [Nodemailer](https://github.com/andris9/Nodemailer) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](nodemailer-direct-transport/nodemailer-direct-transport.d.ts) [nodemailer-direct-transport](https://github.com/andris9/nodemailer-direct-transport) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](nodemailer-pickup-transport/nodemailer-pickup-transport.d.ts) [nodemailer-pickup-transport](https://www.npmjs.com/package/nodemailer-pickup-transport) by [Peter Snider](https://github.com/psnider)
|
||||
* [:link:](nodemailer-smtp-pool/nodemailer-smtp-pool.d.ts) [nodemailer-smtp-pool](https://github.com/andris9/nodemailer-smtp-pool) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](nodemailer-smtp-transport/nodemailer-smtp-transport.d.ts) [nodemailer-smtp-transport](https://github.com/andris9/nodemailer-smtp-transport) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](nodeunit/nodeunit.d.ts) [nodeunit](https://github.com/caolan/nodeunit) by [Jeff Goddard](https://github.com/jedigo)
|
||||
* [:link:](nomnom/nomnom.d.ts) [nomnom](https://github.com/harthur/nomnom) by [Paul Vick](https://github.com/panopticoncentral)
|
||||
* [:link:](nopt/nopt.d.ts) [nopt](https://github.com/npm/nopt) by [jbondc](https://github.com/jbondc)
|
||||
* [:link:](notify/notify.d.ts) [Notify.js](https://github.com/jpillora/notifyjs) by [Xiaohan Zhang](https://github.com/hellochar)
|
||||
* [:link:](notifyjs/notifyjs.d.ts) [notify.js](https://github.com/alexgibson/notify.js) by [soundTricker](https://github.com/soundTricker)
|
||||
* [:link:](nouislider/nouislider.d.ts) [nouislider](https://github.com/leongersen/noUiSlider) by [Corey Jepperson](https://github.com/acoreyj)
|
||||
* [:link:](notify/notify.d.ts) [Notify.js](https://github.com/jpillora/notifyjs) by [Xiaohan Zhang](https://github.com/hellochar)
|
||||
* [:link:](nouislider/nouislider.d.ts) [nouislider](https://github.com/leongersen/noUiSlider) by [Patrick Davies](https://github.com/bleuarg)
|
||||
* [:link:](wnumb/wnumb.d.ts) [nouislider](https://github.com/leongersen/wnumb) by [Corey Jepperson](https://github.com/acoreyj)
|
||||
* [:link:](noVNC/noVNC.d.ts) [noVNC](https://github.com/kanaka/noVNC) by [Ken Smith](https://github.com/smithkl42)
|
||||
* [:link:](npm/npm.d.ts) [npm](https://github.com/npm/npm) by [Maxime LUCE](https://github.com/SomaticIT)
|
||||
@@ -770,21 +820,28 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](openlayers/openlayers.d.ts) [OpenLayers](http://openlayers.org) by [Wouter Goedhart](https://github.com/woutergd)
|
||||
* [:link:](opn/opn.d.ts) [opn](https://github.com/sindresorhus/opn) by [Shinnosuke Watanabe](https://github.com/shinnn)
|
||||
* [:link:](optimist/optimist.d.ts) [optimist](https://github.com/substack/node-optimist) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
* [:link:](owlcarousel/owlcarousel.d.ts) [OwlCarousel v.1.3.3](https://github.com/OwlFonk/OwlCarousel) by [Damian Piątkowski](https://github.com/dpiatkowski)
|
||||
* [:link:](packery/packery.d.ts) [Packery](http://packery.metafizzy.co) by [Piraveen Kamalathas from Kilix](https://github.com/piraveen)
|
||||
* [:link:](page/page.d.ts) [page](http://visionmedia.github.io/page.js) by [Alan Norbauer](http://alan.norbauer.com)
|
||||
* [:link:](papaparse/papaparse.d.ts) [PapaParse](https://github.com/mholt/PapaParse) by [Pedro Flemming](https://github.com/torpedro)
|
||||
* [:link:](parallel/parallel.d.ts) [parallel.js](http://adambom.github.io/parallel.js) by [Josh Baldwin](https://github.com/jbaldwin)
|
||||
* [:link:](param-case/param-case.d.ts) [param-case](https://github.com/blakeembrey/param-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](parse/parse.d.ts) [Parse](https://parse.com) by [Ullisen Media Group](http://ullisenmedia.com)
|
||||
* [:link:](parsimmon/parsimmon.d.ts) [Parsimmon](https://github.com/jneen/parsimmon) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](pascal-case/pascal-case.d.ts) [pascal-case](https://github.com/blakeembrey/pascal-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](passport/passport.d.ts) [Passport](http://passportjs.org) by [Horiuchi_H](https://github.com/horiuchi)
|
||||
* [:link:](passport-strategy/passport-strategy.d.ts) [Passport Strategy module](https://github.com/jaredhanson/passport-strategy) by [Lior Mualem](https://github.com/liorm)
|
||||
* [:link:](passport-twitter/passport-twitter.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
|
||||
* [:link:](passport-facebook/passport-facebook.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
|
||||
* [:link:](passport-google-oauth/passport-google-oauth.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
|
||||
* [:link:](passport-facebook/passport-facebook.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
|
||||
* [:link:](passport-facebook-token/passport-facebook-token.d.ts) [passport-facebook-token](https://github.com/drudge/passport-facebook-token) by [Ray Martone](https://github.com/rmartone)
|
||||
* [:link:](passport-local/passport-local.d.ts) [passport-local](https://github.com/jaredhanson/passport-local) by [Maxime LUCE](https://github.com/SomaticIT)
|
||||
* [:link:](path-case/path-case.d.ts) [path-case](https://github.com/blakeembrey/path-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](path-exists/path-exists.d.ts) [path-exists](https://github.com/sindresorhus/path-exists) by [Shogo Iwano](https://github.com/shiwano)
|
||||
* [:link:](path-to-regexp/path-to-regexp.d.ts) [path-to-regexp](https://github.com/pillarjs/path-to-regexp) by [xica](https://github.com/xica)
|
||||
* [:link:](pathjs/pathjs.d.ts) [Pathjs](https://github.com/mtrpcic/pathjs) by [Lokesh Peta](https://github.com/lokeshpeta)
|
||||
* [:link:](pathwatcher/pathwatcher.d.ts) [pathwatcher](https://github.com/atom/node-pathwatcher) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](PayPal-Cordova-Plugin/PayPal-Cordova-Plugin.d.ts) [PayPal-Cordova-Plugin](https://github.com/paypal/PayPal-Cordova-Plugin) by [Justin Unterreiner](https://github.com/Justin-Credible)
|
||||
* [:link:](pdf/pdf.d.ts) [PDF.js](https://github.com/mozilla/pdf.js) by [Josh Baldwin](https://github.com/jbaldwin)
|
||||
* [:link:](pdfkit/pdfkit.d.ts) [Pdfkit](http://pdfkit.org) by [Eric Hillah](https://github.com/erichillah)
|
||||
* [:link:](peerjs/peerjs.d.ts) [PeerJS](http://peerjs.com) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
@@ -795,12 +852,14 @@ 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:](photonui/photonui.d.ts) [PhotonUI](https://github.com/wanadev/PhotonUI) by [Florent Poujol](https://github.com/florentpoujol)
|
||||
* [:link:](photoswipe/photoswipe.d.ts) [PhotoSwipe](http://photoswipe.com) by [Xiaohan Zhang](https://github.com/hellochar)
|
||||
* [:link:](physijs/physijs.d.ts) [Physijs](http://chandlerprall.github.io/Physijs) by [Satoru Kimura](https://github.com/gyohk)
|
||||
* [:link:](pickadate/pickadate.d.ts) [pickadate.js](https://github.com/amsul/pickadate.js) by [Theodore Brown](https://github.com/theodorejb)
|
||||
* [:link:](pikaday/pikaday.d.ts) [pikaday](https://github.com/dbushell/Pikaday) by [Rudolph Gottesheim](http://midnight-design.at)
|
||||
* [:link:](piwik-tracker/piwik-tracker.d.ts) [PiwikTracker](https://www.npmjs.com/package/piwik-tracker) by [Guilherme Bernal](https://github.com/lbguilherme)
|
||||
* [:link:](pixi/pixi.d.ts) [PIXI](https://github.com/GoodBoyDigital/pixi.js) by [xperiments](http://github.com/xperiments)
|
||||
* [:link:](pixi-spine/pixi-spine.d.ts) [pixi-spine](https://github.com/pixijs/pixi-spine) by [martijncroezen](https://github.com/pixijs/pixi-typescript)
|
||||
* [:link:](pixi.js/pixi.js.d.ts) [Pixi.js](https://github.com/GoodBoyDigital/pixi.js) by [clark-stevenson](https://github.com/pixijs/pixi-typescript)
|
||||
* [:link:](platform/platform.d.ts) [Platform](https://github.com/bestiejs/platform.js) by [Jake Hickman](https://github.com/JakeH)
|
||||
* [:link:](playerframework/playerFramework.d.ts) [Player Framework (MMPPF)](https://playerframework.codeplex.com) by [Ricardo Sabino](https://github.com/ricardosabino)
|
||||
* [:link:](pleasejs/please.d.ts) [PleaseJS](http://www.checkman.io/please) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
@@ -812,6 +871,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](polyline/polyline.d.ts) [Polyline](https://github.com/mapbox/polyline) by [Arseniy Maximov](https://github.com/Kern0)
|
||||
* [:link:](polymer/polymer.d.ts) [polymer](https://github.com/Polymer/polymer) by [Louis Grignon](https://github.com/lgrignon), [Suguru Inatomi](https://github.com/laco0416)
|
||||
* [:link:](popcorn/popcorn.d.ts) [Popcorn](https://github.com/mozilla/popcorn-js) by [grapswiz](https://github.com/grapswiz)
|
||||
* [:link:](postal/postal.d.ts) [Postal](https://github.com/postaljs/postal.js) by [Lokesh Peta](https://github.com/lokeshpeta), [Paul Jolly](https://github.com/myitcv)
|
||||
* [:link:](pouchDB/pouch.d.ts) [Pouch](http://pouchdb.com) by [Bill Sears](https://github.com/MrBigDog2U)
|
||||
* [:link:](power-assert/power-assert.d.ts) [power-assert](https://github.com/twada/power-assert) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](power-assert-formatter/power-assert-formatter.d.ts) [power-assert-formatter](https://github.com/twada/power-assert-formatter) by [vvakame](https://github.com/vvakame)
|
||||
@@ -843,12 +903,15 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](raygun4js/raygun4js.d.ts) [raygun4js](https://github.com/MindscapeHQ/raygun4js) by [Brian Surowiec](https://github.com/xt0rted)
|
||||
* [:link:](react/react.d.ts) [React (external module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com)
|
||||
* [:link:](react/react-global.d.ts) [React (internal module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com)
|
||||
* [:link:](react-dnd/react-dnd.d.ts) [React DnD](https://github.com/gaearon/react-dnd) by [Asana](https://asana.com)
|
||||
* [:link:](react-router/react-router.d.ts) [React Router](https://github.com/rackt/react-router) by [Yuichi Murata](https://github.com/mrk21), [Václav Ostrožlík](https://github.com/vasek17)
|
||||
* [:link:](react-swf/react-swf.d.ts) [react-swf](https://github.com/syranide/react-swf) by [Stepan Mikhaylyuk](https://github.com/stepancar)
|
||||
* [:link:](react/react-addons.d.ts) [ReactWithAddons (external module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com)
|
||||
* [:link:](react/react-addons-global.d.ts) [ReactWithAddons (internal module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com)
|
||||
* [:link:](readdir-stream/readdir-stream.d.ts) [readdir-stream](https://github.com/logicalparadox/readdir-stream) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](recursive-readdir/recursive-readdir.d.ts) [recursive-readdir](https://github.com/jergason/recursive-readdir) by [Elisée Maurer](https://github.com/elisee)
|
||||
* [:link:](redis/redis.d.ts) [redis](https://github.com/mranney/node_redis) by [Carlos Ballesteros Velasco](https://github.com/soywiz), [Peter Harris](https://github.com/CodeAnimal)
|
||||
* [:link:](redux/redux.d.ts) [Redux](https://github.com/rackt/redux) by [William Buchwalter](https://github.com/wbuchwalter), [Vincent Prouillet](https://github.com/Keats)
|
||||
* [:link:](ref/ref.d.ts) [ref](https://github.com/TooTallNate/ref) by [Paul Loyd](https://github.com/loyd)
|
||||
* [:link:](ref-array/ref-array.d.ts) [ref-array](https://github.com/TooTallNate/ref-array) by [Paul Loyd](https://github.com/loyd)
|
||||
* [:link:](ref-struct/ref-struct.d.ts) [ref-struct](https://github.com/TooTallNate/ref-struct) by [Paul Loyd](https://github.com/loyd)
|
||||
@@ -856,6 +919,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](request/request.d.ts) [request](https://github.com/mikeal/request) by [Carlos Ballesteros Velasco](https://github.com/soywiz), [bonnici](https://github.com/bonnici), [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](request-promise/request-promise.d.ts) [request-promise](https://www.npmjs.com/package/request-promise) by [Christopher Glantschnig](https://github.com/cglantschnig)
|
||||
* [:link:](requirejs/require.d.ts) [RequireJS](http://requirejs.org) by [Josh Baldwin](https://github.com/jbaldwin)
|
||||
* [:link:](resemblejs/resemblejs.d.ts) [Resemble.js](http://huddle.github.io/Resemble.js) by [Tim Perry](https://github.com/pimterry)
|
||||
* [:link:](response-time/response-time.d.ts) [response-time](https://github.com/expressjs/response-time) by [Uros Smolnik](https://github.com/urossmolnik)
|
||||
* [:link:](rest/rest.d.ts) [rest.js](https://github.com/cujojs/rest) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](restangular/restangular.d.ts) [Restangular](https://github.com/mgonto/restangular) by [Boris Yankov](https://github.com/borisyankov)
|
||||
@@ -867,6 +931,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](rivets/rivets.d.ts) [rivets](http://rivetsjs.com) by [Trevor Baron](https://github.com/TrevorDev)
|
||||
* [:link:](route-recognizer/route-recognizer.d.ts) [route-recognizer](https://github.com/tildeio/route-recognizer) by [Dave Keen](http://www.keendevelopment.ch)
|
||||
* [:link:](routie/routie.d.ts) [routie](https://github.com/jgallen23/routie) by [Adilson](https://github.com/Adilson)
|
||||
* [:link:](rsmq/rsmq.d.ts) [rsmq](http://smrchy.github.io/rsmq) by [Qubo](https://github.com/MugeSo)
|
||||
* [:link:](rsmq-worker/rsmq-worker.d.ts) [rsmq-worker](http://smrchy.github.io/rsmq/rsmq-worker) by [Qubo](https://github.com/MugeSo)
|
||||
* [:link:](rtree/rtree.d.ts) [rtree](https://github.com/leaflet-extras/RTree) by [Omede Firouz](https://github.com/oefirouz)
|
||||
* [:link:](run-sequence/run-sequence.d.ts) [run-sequence](https://github.com/OverZealous/run-sequence) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
|
||||
* [:link:](rx/rx.d.ts) [RxJS](http://rx.codeplex.com) by [gsino](http://www.codeplex.com/site/users/view/gsino), [Igor Oleinikov](https://github.com/Igorbek)
|
||||
@@ -897,11 +963,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](selenium-webdriver/selenium-webdriver.d.ts) [Selenium WebDriverJS](https://code.google.com/p/selenium) by [Bill Armstrong](https://github.com/BillArmstrong)
|
||||
* [:link:](semver/semver.d.ts) [semver](https://github.com/isaacs/node-semver) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](sendgrid/sendgrid.d.ts) [sendgrid](https://github.com/sendgrid/sendgrid-nodejs) by [Maxime LUCE](https://github.com/SomaticIT)
|
||||
* [:link:](sentence-case/sentence-case.d.ts) [sentence-case](https://github.com/blakeembrey/sentence-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](sequelize/sequelize.d.ts) [Sequelize 2.0.0 dev13](http://sequelizejs.com) by [samuelneff](https://github.com/samuelneff), [Peter Harris](https://github.com/codeanimal)
|
||||
* [:link:](sequelize-fixtures/sequelize-fixtures.d.ts) [Sequelize-Fixtures](https://github.com/domasx2/sequelize-fixtures) by [Christian Schwarz](https://github.com/cschwarz)
|
||||
* [:link:](on-headers/on-headers.d.ts) [serve-favicon](https://github.com/jshttp/on-headers) by [John Jeffery](https://github.com/jjeffery)
|
||||
* [:link:](serve-favicon/serve-favicon.d.ts) [serve-favicon](https://github.com/expressjs/serve-favicon) by [Uros Smolnik](https://github.com/urossmolnik)
|
||||
* [:link:](serve-static/serve-static.d.ts) [serve-static](https://github.com/expressjs/serve-static) by [Uros Smolnik](https://github.com/urossmolnik)
|
||||
* [:link:](sharedworker/SharedWorker.d.ts) [SharedWorker](http://www.w3.org/TR/workers) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
* [:link:](sharepoint/SharePoint.d.ts) [SharePoint 2010 and 2013](http://sptypescript.codeplex.com) by [Stanislav Vyshchepan](http://blog.gandjustas.ru), [Andrey Markeev](http://markeev.com)
|
||||
* [:link:](shelljs/shelljs.d.ts) [ShellJS](http://shelljs.org) by [Niklas Mollenhauer](https://github.com/nikeee)
|
||||
* [:link:](shortid/shortid.d.ts) [shortid](https://github.com/dylang/shortid) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](should-promised/should-promised.d.ts) [should-promised](https://github.com/shouldjs/promised) by [Yaroslav Admin](https://github.com/devoto13)
|
||||
@@ -915,6 +984,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](jquery.simplemodal/jquery.simplemodal.d.ts) [SimpleModal](http://www.ericmmartin.com/projects/simplemodal) by [Friedrich von Never](https://github.com/ForNeVeR)
|
||||
* [:link:](sinon/sinon.d.ts) [Sinon](http://sinonjs.org) by [William Sears](https://github.com/mrbigdog2u)
|
||||
* [:link:](sinon-chai/sinon-chai.d.ts) [sinon-chai](https://github.com/domenic/sinon-chai) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid), [Jed Mao](https://github.com/jedmao)
|
||||
* [:link:](sinon-chrome/sinon-chrome.d.ts) [Sinon-Chrome](https://github.com/vitalets/sinon-chrome) by [Tim Perry](https://github.com/pimterry)
|
||||
* [:link:](sipml/sipml.d.ts) [SIPml5](http://sipml5.org) by [A. Groenenboom](https://github.com/chookies)
|
||||
* [:link:](sjcl/sjcl.d.ts) [sjcl](http://crypto.stanford.edu/sjcl) by [Eugene Chernyshov](https://github.com/Evgenus)
|
||||
* [:link:](skyway/skyway.d.ts) [SkyWay](http://nttcom.github.io/skyway) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
@@ -923,9 +993,10 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](slickgrid/slick.headerbuttons.d.ts) [SlickGrid HeaderButtons Plugin](https://github.com/mleibman/SlickGrid) by [Derek Cicerone](https://github.com/derekcicerone)
|
||||
* [:link:](slickgrid/slick.rowselectionmodel.d.ts) [SlickGrid RowSelectionModel Plugin](https://github.com/mleibman/SlickGrid) by [Derek Cicerone](https://github.com/derekcicerone)
|
||||
* [:link:](smoothie/smoothie.d.ts) [Smoothie Charts](https://github.com/joewalnes/smoothie) by [Drew Noakes](https://drewnoakes.com), [Mike H. Hawley](https://github.com/mikehhawley)
|
||||
* [:link:](snake-case/snake-case.d.ts) [snake-case](https://github.com/blakeembrey/snake-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](snapsvg/snapsvg.d.ts) [Snap-SVG](https://github.com/adobe-webplatform/Snap.svg) by [Lars Klein](https://github.com/lhk)
|
||||
* [:link:](socket.io/socket.io.d.ts) [socket.io](http://socket.io) by [PROGRE](https://github.com/progre)
|
||||
* [:link:](socket.io-client/socket.io-client.d.ts) [socket.io-client](http://socket.io) by [PROGRE](https://github.com/progre)
|
||||
* [:link:](socket.io/socket.io.d.ts) [socket.io](http://socket.io) by [PROGRE](https://github.com/progre), [Damian Connolly](https://github.com/divillysausages)
|
||||
* [:link:](socket.io-client/socket.io-client.d.ts) [socket.io-client](http://socket.io) by [PROGRE](https://github.com/progre), [Damian Connolly](https://github.com/divillysausages)
|
||||
* [:link:](sockjs/sockjs.d.ts) [SockJS 0.3.x](https://github.com/sockjs/sockjs-client) by [Emil Ivanov](https://github.com/vladev)
|
||||
* [:link:](sockjs-node/sockjs-node.d.ts) [sockjs-node 0.3.x](https://github.com/sockjs/sockjs-node) by [Phil McCloghry-Laing](https://github.com/pmccloghrylaing)
|
||||
* [:link:](soundjs/soundjs.d.ts) [SoundJS](http://www.createjs.com/#!/SoundJS) by [Pedro Ferreira](https://bitbucket.org/drk4)
|
||||
@@ -937,7 +1008,6 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](split/split.d.ts) [split](https://github.com/dominictarr/split) by [Marcin Porębski](https://github.com/marcinporebski)
|
||||
* [:link:](sprintf-js/sprintf-js.d.ts) [sprintf-js](https://www.npmjs.com/package/sprintf-js) by [Jason Swearingen](https://jasonswearingen.github.io)
|
||||
* [:link:](sprintf/sprintf.d.ts) [sprintff](https://github.com/maritz/node-sprintff) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
* [:link:](sharepoint/SharePoint.d.ts) [sptypescript](http://sptypescript.codeplex.com) by [Stanislav Vyshchepan](http://gandjustas.blogspot.ru), [Andrey Markeev](http://markeev.com)
|
||||
* [:link:](sqlite3/sqlite3.d.ts) [sqlite3](https://github.com/mapbox/node-sqlite3) by [Nick Malaguti](https://github.com/nmalaguti)
|
||||
* [:link:](squirejs/squirejs.d.ts) [Squire](https://github.com/iammerrick/Squire.js) by [Bradley Ayers](https://github.com/bradleyayers)
|
||||
* [:link:](stack-mapper/stack-mapper.d.ts) [stack-mapper](https://github.com/thlorenz/stack-mapper) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
@@ -964,22 +1034,27 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](svg2png/svg2png.d.ts) [svg2png node package](https://github.com/domenic/svg2png) by [hans windhoff](https://github.com/hansrwindhoff)
|
||||
* [:link:](svgjs.draggable/svgjs.draggable.d.ts) [svgjs.draggable](http://www.svgjs.com) by [Luigi Trabacchin](https://github.com/LiFeleSs)
|
||||
* [:link:](swag/swag.d.ts) [swag](https://github.com/elving/swag) by [Shogo Iwano](https://github.com/shiwano)
|
||||
* [:link:](swap-case/swap-case.d.ts) [swap-case](https://github.com/blakeembrey/swap-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](sweetalert/sweetalert.d.ts) [SweetAlert](https://github.com/t4t5/sweetalert) by [Markus Peloso](https://github.com/ToastHawaii)
|
||||
* [:link:](swfobject/swfobject.d.ts) [swfobject](https://code.google.com/p/swfobject) by [rou](https://github.com/rou)
|
||||
* [: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:](swig-email-templates/swig-email-templates.d.ts) [swig-email-templates](https://github.com/andrewrk/swig-email-templates) by [Adam Babcock](https://github.com/mrhen)
|
||||
* [:link:](swipe/swipe.d.ts) [Swipe](https://github.com/thebird/Swipe) by [Andrey Kurdyumov](https://github.com/kant2002)
|
||||
* [:link:](swiper/swiper.d.ts) [Swiper](https://github.com/nolimits4web/Swiper) by [Sebastián Galiano](https://github.com/sgaliano)
|
||||
* [:link:](swipeview/swipeview.d.ts) [SwipeView](http://cubiq.org/swipeview) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](switchery/switchery.d.ts) [switchery](https://github.com/abpetkov/switchery) by [Bruno Grieder](https://github.com/bgrieder)
|
||||
* [:link:](swiz/swiz.d.ts) [swiz](https://github.com/racker/node-swiz) by [Jeff Goddard](https://github.com/jedigo)
|
||||
* [:link:](systemjs/systemjs.d.ts) [System.js](https://github.com/systemjs/systemjs) by [Ludovic HENIN](https://github.com/ludohenin), [Nathan Walker](https://github.com/NathanWalker)
|
||||
* [:link:](tabtab/tabtab.d.ts) [tabtab](https://github.com/mklabs/node-tabtab) by [Vojtěch Habarta](https://github.com/vojtechhabarta)
|
||||
* [:link:](tape/tape.d.ts) [tape](https://github.com/substack/tape) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](tar/tar.d.ts) [tar](https://github.com/npm/node-tar) by [Maxime LUCE](https://github.com/SomaticIT)
|
||||
* [:link:](tcomb/tcomb.d.ts) [tcomb](http://gcanti.github.io/tcomb/guide/index.html) by [Hans Windhoff](https://github.com/hansrwindhoff)
|
||||
* [:link:](tea-merge/tea-merge.d.ts) [tea-merge](https://github.com/qualiancy/tea-merge) by [Mihhail Lapushkin](https://github.com/mihhail-lapushkin)
|
||||
* [:link:](tedious/tedious.d.ts) [tedious](https://pekim.github.io/tedious) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](tedious-connection-pool/tedious-connection-pool.d.ts) [tedious-connection-pool](https://github.com/pekim/tedious-connection-pool) by [Cyprien Autexier](https://github.com/sandorfr)
|
||||
* [:link:](teechart/teechart.d.ts) [TeeChart](http://www.steema.com) by [Steema Software](https://steema.com)
|
||||
* [:link:](tether/tether.d.ts) [Tether](http://github.hubspot.com/tether) by [Adi Dahiya](https://github.com/adidahiya)
|
||||
* [:link:](tether-shepherd/tether-shepherd.d.ts) [Tether-Shepherd](http://github.hubspot.com/shepherd) by [Matt Gibbs](https://github.com/mtgibbs)
|
||||
* [:link:](text-buffer/text-buffer.d.ts) [text-buffer](https://github.com/atom/text-buffer) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](text-encoding/text-encoding.d.ts) [text-encoding](https://github.com/inexorabletash/text-encoding) by [MIZUNE Pine](https://github.com/pine613)
|
||||
* [:link:](github-electron/github-electron-main.d.ts) [the Electron 0.25.2 main process](http://electron.atom.io) by [jedmao](https://github.com/jedmao)
|
||||
@@ -995,9 +1070,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](threejs/three-renderpass.d.ts) [three.js (RenderPass.js)](https://github.com/mrdoob/three.js/blob/r68/examples/js/postprocessing/RenderPass.js) by [Satoru Kimura](https://github.com/gyohk)
|
||||
* [:link:](threejs/three-shaderpass.d.ts) [three.js (ShaderPass.js)](https://github.com/mrdoob/three.js/blob/r68/examples/js/postprocessing/ShaderPass.js) by [Satoru Kimura](https://github.com/gyohk)
|
||||
* [:link:](threejs/three-trackballcontrols.d.ts) [three.js (TrackballControls.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/controls/TrackballControls.js) by [Satoru Kimura](https://github.com/gyohk)
|
||||
* [:link:](threejs/three-transformcontrols.d.ts) [three.js (TransformControls.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/controls/TransformControls.js) by [Stefan Profanter](https://github.com/Pro)
|
||||
* [:link:](threejs/three-vrcontrols.d.ts) [three.js (VRControls.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/controls/VRControls.js) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
* [:link:](threejs/three-vreffect.d.ts) [three.js (VREffect.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/effects/VREffect.js) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
* [:link:](threejs/three.d.ts) [three.js r71](http://mrdoob.github.com/three.js) by [Kon](http://phyzkit.net), [Satoru Kimura](https://github.com/gyohk)
|
||||
* [:link:](thrift/thrift.d.ts) [thrift](https://www.npmjs.com/package/thrift) by [Zachary Collins](https://github.com/corps)
|
||||
* [:link:](through/through.d.ts) [through](https://github.com/dominictarr/through) by [Andrew Gaspar](https://github.com/AndrewGaspar)
|
||||
* [:link:](through2/through2.d.ts) [through2 v](https://github.com/rvagg/through2) by [Bart van der Schoor](https://github.com/Bartvds), [jedmao](https://github.com/jedmao)
|
||||
* [:link:](timelinejs/timelinejs.d.ts) [timelinejs](https://github.com/NUKnightLab/TimelineJS) by [Roland Zwaga](https://github.com/rolandzwaga)
|
||||
@@ -1008,9 +1085,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](titanium/titanium.d.ts) [Titanium Mobile](http://www.appcelerator.com) by [Craig Younkins](https://github.com/cyounkins)
|
||||
* [:link:](title-case/title-case.d.ts) [title-case](https://github.com/blakeembrey/title-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](tmp/tmp.d.ts) [tmp](https://www.npmjs.com/package/tmp) by [Jared Klopper](https://github.com/optical)
|
||||
* [:link:](to-title-case-gouch/to-title-case-gouch.d.ts) [to-title-case](https://github.com/gouch/to-title-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](toastr/toastr.d.ts) [Toastr](https://github.com/CodeSeven/toastr) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](sencha_touch/SenchaTouch.d.ts) [Touch](http://www.sencha.com/products/touch) by [Brian Kotek](https://github.com/brian428)
|
||||
* [:link:](traceback/traceback.d.ts) [Traceback](http://github.com/iriscouch/traceback) by [Michael Zabka](https://github.com/misak113)
|
||||
* [:link:](traverson/traverson.d.ts) [Traverson](https://github.com/basti1302/traverson) by [Marcin Porębski](https://github.com/marcinporebski)
|
||||
* [:link:](trunk8/trunk8.d.ts) [trunk8](https://github.com/rviscomi/trunk8) by [Blake Niemyjski](https://github.com/niemyjski)
|
||||
* [:link:](tsmonad/tsmonad.d.ts) [TsMonad](https://github.com/cbowdon/TsMonad) by [Chris Bowdon](https://github.com/cbowdon)
|
||||
* [:link:](tspromise/tspromise.d.ts) [tspromise](https://github.com/soywiz/tspromise) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
@@ -1024,11 +1103,15 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](type-detect/type-detect.d.ts) [type-detect](https://github.com/chaijs/type-detect) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](type-name/type-name.d.ts) [type-name](https://github.com/twada/type-name) by [OKUNOKENTARO](https://github.com/armorik83)
|
||||
* [:link:](typeahead/typeahead.d.ts) [typeahead.js](http://twitter.github.io/typeahead.js) by [Ivaylo Gochkov](https://github.com/igochkov), [Gidon Junge](https://github.com/gjunge)
|
||||
* [:link:](webfontloader/webfontloader.d.ts) [typekit-webfontloader](https://github.com/typekit/webfontloader) by [doskallemaskin](https://github.com/doskallemaskin)
|
||||
* [:link:](typescript/typescript.d.ts) [TypeScript API](http://www.typescriptlang.org) by [Microsoft TypeScript](http://typescriptlang.org)
|
||||
* [:link:](typescript-deferred/typescript-deferred.d.ts) [typescript-deferred](https://github.com/DirtyHairy/typescript-deferred) by [Christian Speckner](https://github.com/DirtyHairy)
|
||||
* [:link:](typescript-services/typescriptServices.d.ts) [TypeScript-Services](https://www.npmjs.org/package/typescript-services) by [Basarat Ali Syed](http://github.com/basarat)
|
||||
* [:link:](unity-webapi/unity-webapi.d.ts) [Ubuntu Unity Web API](https://launchpad.net/libunity-webapps) by [John Vrbanac](jhttps://github.com/jmvrbanac)
|
||||
* [:link:](ui-grid/ui-grid.d.ts) [ui-grid](http://www.ui-grid.info) by [Ben Tesser](https://github.com/btesser)
|
||||
* [:link:](umbraco/umbraco-resources.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland)
|
||||
* [:link:](umbraco/umbraco-services.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland)
|
||||
* [:link:](umbraco/umbraco.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland)
|
||||
* [:link:](underscore/underscore.d.ts) [Underscore](http://underscorejs.org) by [Boris Yankov](https://github.com/borisyankov), [Josh Baldwin](https://github.com/jbaldwin)
|
||||
* [:link:](underscore-ko/underscore-ko.d.ts) [Underscore-ko 1.2.2 with underscore](https://github.com/kamranayub/UnderscoreKO) by [Maurits Elbers](https://github.com/MagicMau)
|
||||
* [:link:](underscore.string/underscore.string.d.ts) [underscore.string](https://github.com/epeli/underscore.string) by [Ry Racherbaumer](http://github.com/rygine)
|
||||
@@ -1042,12 +1125,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](js-url/js-url.d.ts) [url](https://github.com/websanova/js-url) by [MIZUNE Pine](https://github.com/pine613)
|
||||
* [:link:](urlrouter/urlrouter.d.ts) [urlrouter](https://github.com/fengmk2/urlrouter) by [soywiz](https://github.com/soywiz)
|
||||
* [:link:](urlsafe-base64/urlsafe-base64.d.ts) [urlsafe-base64](https://github.com/RGBboy/urlsafe-base64) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](usage/usage.d.ts) [usage](https://github.com/arunoda/node-usage) by [Pascal Vomhoff](https://github.com/pvomhoff)
|
||||
* [:link:](UUID/UUID.d.ts) [UUID.js core](https://github.com/LiosK/UUID.js) by [Jason Jarrett](https://github.com/staxmanade)
|
||||
* [:link:](valerie/valerie.d.ts) [valerie](https://github.com/davewatts/valerie) by [Howard Richards](https://github.com/conficient)
|
||||
* [:link:](validator/validator.d.ts) [validator.js](https://github.com/chriso/validator.js) by [tgfjt](https://github.com/tgfjt)
|
||||
* [:link:](vega/vega.d.ts) [Vega](http://trifacta.github.io/vega) by [Tom Crockett](http://github.com/pelotom)
|
||||
* [:link:](velocity-animate/velocity-animate.d.ts) [Velocity](http://velocityjs.org) by [Greg Smith](https://github.com/smrq)
|
||||
* [:link:](vex-js/vex-js.d.ts) [Vex](https://github.com/HubSpot/vex) by [Greg Cohan](https://github.com/gdcohan)
|
||||
* [:link:](vexflow/vexflow.d.ts) [VexFlow](http://vexflow.com) by [Roman Quiring](https://github.com/rquiring)
|
||||
* [:link:](victor/victor.d.ts) [Victor.js](http://victorjs.org) by [Ivane Gegia](https://twitter.com/ivanegegia)
|
||||
* [:link:](videojs/videojs.d.ts) [Video.js](https://github.com/zencoder/video-js) by [Vincent Bortone](https://github.com/vbortone)
|
||||
* [:link:](vimeo/froogaloop.d.ts) [Vimeo](http://developer.vimeo.com/player/js-api) by [Daz Wilkin](https://github.com/DazWilkin)
|
||||
@@ -1056,11 +1141,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](vinyl-source-stream/vinyl-source-stream.d.ts) [vinyl-source-stream](https://github.com/hughsk/vinyl-source-stream) by [Asana](https://asana.com)
|
||||
* [:link:](virtual-dom/virtual-dom.d.ts) [virtual-dom](https://github.com/Matt-Esch/virtual-dom) by [Christopher Brown](https://github.com/chbrown)
|
||||
* [:link:](vortex-web-client/vortex-web-client.d.ts) [Vortex Web 1.2.0p1](http://www.prismtech.com/vortex/vortex-web) by [Stefan Profanter](https://github.com/Pro)
|
||||
* [:link:](vso-node-api/vso-node-api.d.ts) [vso-node-api](https://github.com/Microsoft/vso-node-api) by [Teddy Ward](https://github.com/teddyward)
|
||||
* [: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:](webspeechapi/webspeechapi.d.ts) [Web Speech API](https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html) by [SaschaNaz](https://github.com/saschanaz)
|
||||
* [:link:](webcola/webcola.d.ts) [webcola](https://github.com/tgdwyer/WebCola) by [Qinfeng Chen](https://github.com/qinfchen)
|
||||
@@ -1104,7 +1189,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](node_zeromq/zmq.d.ts) [ZeroMQ Node](https://github.com/JustinTulloss/zeromq.node) by [Dave McKeown](http://github.com/davemckeown)
|
||||
* [:link:](zip.js/zip.js.d.ts) [zip.js 2.x](https://github.com/gildas-lormeau/zip.js) by [Louis Grignon](https://github.com/lgrignon)
|
||||
* [:link:](scroller/easyscroller.d.ts) [Zynga EasyScroller](https://github.com/zynga/scroller) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](zynga-scroller/zynga-scroller.d.ts) [Zynga Scroller](http://zynga.github.com/scroller) by [Marcelo Haskell Camargo](https://github.com/haskellcamargo)
|
||||
* [:link:](scroller/scroller.d.ts) [Zynga Scroller](https://github.com/zynga/scroller) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](zynga-scroller/zynga-scroller.d.ts) [Zynga Scroller](http://zynga.github.com/scroller) by [Marcelo Haskell Camargo](https://github.com/haskellcamargo)
|
||||
* [:link:](viewporter/viewporter.d.ts) [Zynga Viewporter](https://github.com/zynga/viewporter) by [Boris Yankov](https://github.com/borisyankov)
|
||||
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
|
||||
/// <reference path="PayPal-Cordova-Plugin.d.ts"/>
|
||||
|
||||
var item: PayPalItem;
|
||||
item = new PayPalItem("name", 10, "25.00", "USD");
|
||||
item = new PayPalItem("name", 10, "25.00", "USD", null);
|
||||
item = new PayPalItem("name", 10, "25.00", "USD", "SKU_ID");
|
||||
|
||||
var item_name: string = item.name;
|
||||
var item_quantity: number = item.quantity;
|
||||
var item_price: string = item.price;
|
||||
var item_currency: string = item.currency;
|
||||
var item_sku: string = item.sku;
|
||||
|
||||
|
||||
|
||||
var paymentDetails: PayPalPaymentDetails;
|
||||
paymentDetails = new PayPalPaymentDetails("10.50", "2.50", "1.25");
|
||||
|
||||
var paymentDetails_subtotal: string = paymentDetails.subtotal;
|
||||
var paymentDetails_shipping: string = paymentDetails.shipping;
|
||||
var paymentDetails_tax: string = paymentDetails.tax;
|
||||
|
||||
|
||||
|
||||
var shippingAddress: PayPalShippingAddress;
|
||||
shippingAddress = new PayPalShippingAddress("name", "line1", "line2", "city", "state", "postalCode", "countryCode");
|
||||
|
||||
var shippingAddress_recipientName: string = shippingAddress.recipientName;
|
||||
var shippingAddress_line1: string = shippingAddress.line1;
|
||||
var shippingAddress_line2: string = shippingAddress.line2;
|
||||
var shippingAddress_city: string = shippingAddress.city;
|
||||
var shippingAddress_state: string = shippingAddress.state;
|
||||
var shippingAddress_postalCode: string = shippingAddress.postalCode;
|
||||
var shippingAddress_countryCode: string = shippingAddress.countryCode;
|
||||
|
||||
|
||||
|
||||
var payment: PayPalPayment;
|
||||
payment = new PayPalPayment("10.00", "USD", "description", "Auth");
|
||||
payment = new PayPalPayment("10.00", "USD", "description", "Auth", paymentDetails);
|
||||
|
||||
var payment_amount: string = payment.amount;
|
||||
var payment_currency: string = payment.currency;
|
||||
var payment_shortDescription: string = payment.shortDescription;
|
||||
var payment_intent: string = payment.intent;
|
||||
var payment_details: PayPalPaymentDetails = payment.details;
|
||||
var payment_invoiceNumber: string = payment.invoiceNumber;
|
||||
var payment_custom: string = payment.custom;
|
||||
var payment_softDescriptor: string = payment.softDescriptor;
|
||||
var payment_bnCode: string = payment.bnCode;
|
||||
var payment_items: PayPalItem[] = [item, item, item];
|
||||
var payment_shippingAddress: PayPalShippingAddress = shippingAddress;
|
||||
|
||||
|
||||
|
||||
var configOptions: PayPalConfigurationOptions = {
|
||||
defaultUserEmail: "email",
|
||||
defaultUserPhoneCountryCode: "countryCode",
|
||||
defaultUserPhoneNumber: "phoneNumber",
|
||||
merchantName: "merchantName",
|
||||
merchantPrivacyPolicyURL: "merchantPrivacyPolicyURL",
|
||||
merchantUserAgreementURL: "merchantUserAgreementURL",
|
||||
acceptCreditCards: true,
|
||||
payPalShippingAddressOption: 10,
|
||||
rememberUser: true,
|
||||
languageOrLocale: "languageOrLocal",
|
||||
disableBlurWhenBackgrounding: true,
|
||||
presentingInPopover: true,
|
||||
forceDefaultsInSandbox: true,
|
||||
sandboxUserPassword: "sandboxUserPassword",
|
||||
sandboxUserPin: "sandboxUserPin"
|
||||
};
|
||||
|
||||
|
||||
|
||||
var config: PayPalConfiguration;
|
||||
config = new PayPalConfiguration();
|
||||
config = new PayPalConfiguration(null);
|
||||
config = new PayPalConfiguration(configOptions);
|
||||
|
||||
var config_defaultUserEmail: string = config.defaultUserEmail;
|
||||
var config_defaultUserPhoneCountryCode: string = config.defaultUserPhoneCountryCode;
|
||||
var config_defaultUserPhoneNumber: string = config.defaultUserPhoneNumber;
|
||||
var config_merchantName: string = config.merchantName;
|
||||
var config_merchantPrivacyPolicyURL: string = config.merchantPrivacyPolicyURL;
|
||||
var config_merchantUserAgreementURL: string = config.merchantUserAgreementURL;
|
||||
var config_acceptCreditCards: boolean = config.acceptCreditCards;
|
||||
var config_payPalShippingAddressOption: number = config.payPalShippingAddressOption;
|
||||
var config_rememberUser: boolean = config.rememberUser;
|
||||
var config_languageOrLocale: string = config.languageOrLocale;
|
||||
var config_disableBlurWhenBackgrounding: boolean = config.disableBlurWhenBackgrounding;
|
||||
var config_presentingInPopover: boolean = config.presentingInPopover;
|
||||
var config_forceDefaultsInSandbox: boolean = config.forceDefaultsInSandbox;
|
||||
var config_sandboxUserPasword: string = config.sandboxUserPassword;
|
||||
var config_sandboxUserPin: string = config.sandboxUserPin;
|
||||
|
||||
|
||||
|
||||
var clientIds: PayPalCordovaPlugin.PayPalClientIds = {
|
||||
PayPalEnvironmentProduction: "",
|
||||
PayPalEnvironmentSandbox: ""
|
||||
};
|
||||
|
||||
|
||||
|
||||
var apiModule: PayPalCordovaPlugin.PayPalMobileStatic = PayPalMobile;
|
||||
apiModule.version((result: string) => {});
|
||||
apiModule.init(clientIds, () => {});
|
||||
apiModule.prepareToRender("environment", config, () => {});
|
||||
apiModule.renderSinglePaymentUI(payment, (result: any) => {}, (cancelReason: string) => {});
|
||||
apiModule.applicationCorrelationIDForEnvironment("environment", (applicationCorrelationId: string) => {});
|
||||
apiModule.clientMetadataID((clientMetadataId: string) => {});
|
||||
apiModule.renderFuturePaymentUI((result: any) => {}, (cancelReason: string) => {});
|
||||
apiModule.renderProfileSharingUI(["openid", "profile", "email"], (result: any) => {}, (cancelReason: string) => {});
|
||||
+615
@@ -0,0 +1,615 @@
|
||||
// Type definitions for PayPal-Cordova-Plugin 3.1.10
|
||||
// Project: https://github.com/paypal/PayPal-Cordova-Plugin
|
||||
// Definitions by: Justin Unterreiner <https://github.com/Justin-Credible>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
//#region paypal-mobile-js-helper.js
|
||||
|
||||
/**
|
||||
* The PayPalItem class defines an optional itemization for a payment.
|
||||
*
|
||||
* @see https://developer.paypal.com/docs/api/#item-object for more details.
|
||||
*/
|
||||
declare class PayPalItem {
|
||||
|
||||
/**
|
||||
* @param name Name of the item. 127 characters max.
|
||||
* @param quantity Number of units. 10 characters max.
|
||||
* @param price Unit price for this item 10 characters max.
|
||||
* May be negative for "coupon" etc.
|
||||
* @param currency ISO standard currency code.
|
||||
* @param sku The stock keeping unit for this item. 50 characters max (optional).
|
||||
*/
|
||||
constructor(name: string, quantity: number, price: string, currency: string, sku?: string);
|
||||
|
||||
/**
|
||||
* Name of the item. 127 characters max.
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* Number of units. 10 characters max.
|
||||
*/
|
||||
quantity: number;
|
||||
|
||||
/**
|
||||
* Unit price for this item 10 characters max.
|
||||
* May be negative for "coupon" etc.
|
||||
*/
|
||||
price: string;
|
||||
|
||||
/**
|
||||
* ISO standard currency code.
|
||||
*/
|
||||
currency: string;
|
||||
|
||||
/**
|
||||
* The stock keeping unit for this item. 50 characters max (optional).
|
||||
*/
|
||||
sku: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* The PayPalPaymentDetails class defines optional amount details.
|
||||
*
|
||||
* @see https://developer.paypal.com/webapps/developer/docs/api/#details-object for more details.
|
||||
*/
|
||||
declare class PayPalPaymentDetails {
|
||||
|
||||
/**
|
||||
* @param subtotal Sub-total (amount) of items being paid for. 10 characters max with support for 2 decimal places.
|
||||
* @param shipping Amount charged for shipping. 10 characters max with support for 2 decimal places.
|
||||
* @param tax Amount charged for tax. 10 characters max with support for 2 decimal places.
|
||||
*/
|
||||
constructor(subtotal: string, shipping: string, tax: string);
|
||||
|
||||
/**
|
||||
* Sub-total (amount) of items being paid for. 10 characters max with support for 2 decimal places.
|
||||
*/
|
||||
subtotal: string;
|
||||
|
||||
/**
|
||||
* Amount charged for shipping. 10 characters max with support for 2 decimal places.
|
||||
*/
|
||||
shipping: string;
|
||||
|
||||
/**
|
||||
* Amount charged for tax. 10 characters max with support for 2 decimal places.
|
||||
*/
|
||||
tax: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience constructor. Returns a PayPalPayment with the specified amount, currency code, and short description.
|
||||
*/
|
||||
declare class PayPalPayment {
|
||||
|
||||
/**
|
||||
* @param amount The amount of the payment.
|
||||
* @param currencyCode The ISO 4217 currency for the payment.
|
||||
* @param shortDescription A short descripton of the payment.
|
||||
* @param intent • "Sale" for an immediate payment.
|
||||
* • "Auth" for payment authorization only, to be captured separately at a later time.
|
||||
* • "Order" for taking an order, with authorization and capture to be done separately at a later time.
|
||||
* @param details PayPalPaymentDetails object (optional).
|
||||
*/
|
||||
constructor(amount: string, currency: string, shortDescription: string, intent: string, details?: PayPalPaymentDetails);
|
||||
|
||||
/**
|
||||
* The amount of the payment.
|
||||
*/
|
||||
amount: string;
|
||||
|
||||
/**
|
||||
* The ISO 4217 currency for the payment.
|
||||
*/
|
||||
currency: string;
|
||||
|
||||
/**
|
||||
* A short descripton of the payment.
|
||||
*/
|
||||
shortDescription: string;
|
||||
|
||||
/**
|
||||
* • "Sale" for an immediate payment.
|
||||
* • "Auth" for payment authorization only, to be captured separately at a later time.
|
||||
* • "Order" for taking an order, with authorization and capture to be done separately at a later time.
|
||||
*/
|
||||
intent: string;
|
||||
|
||||
/**
|
||||
* PayPalPaymentDetails object (optional).
|
||||
*/
|
||||
details: PayPalPaymentDetails;
|
||||
|
||||
/**
|
||||
* Optional invoice number, for your tracking purposes. (up to 256 characters).
|
||||
*/
|
||||
invoiceNumber: string;
|
||||
|
||||
/**
|
||||
* Optional text, for your tracking purposes. (up to 256 characters).
|
||||
*/
|
||||
custom: string;
|
||||
|
||||
/**
|
||||
* Optional text which will appear on the customer's credit card statement. (up to 22 characters).
|
||||
*/
|
||||
softDescriptor: string;
|
||||
|
||||
/**
|
||||
* Optional Build Notation code ("BN code"), obtained from partnerprogram@paypal.com, for your tracking purposes.
|
||||
*/
|
||||
bnCode: string;
|
||||
|
||||
/**
|
||||
* Optional array of PayPalItem objects.
|
||||
* @see PayPalItem
|
||||
* @note If you provide one or more items, be sure that the various prices correctly sum to the payment `amount` or to `paymentDetails.subtotal`.
|
||||
*/
|
||||
items: PayPalItem[];
|
||||
|
||||
/**
|
||||
* Optional customer shipping address, if your app wishes to provide this to the SDK.
|
||||
* @note make sure to set `payPalShippingAddressOption` in PayPalConfiguration to 1 or 3.
|
||||
*/
|
||||
shippingAddress: PayPalShippingAddress;
|
||||
}
|
||||
|
||||
declare class PayPalShippingAddress {
|
||||
|
||||
/**
|
||||
* @param recipientName Name of the recipient at this address. 50 characters max.
|
||||
* @param line1 Line 1 of the address (e.g., Number, street, etc). 100 characters max.
|
||||
* @param line2 Line 2 of the address (e.g., Suite, apt #, etc). 100 characters max. Optional.
|
||||
* @param city City name. 50 characters max.
|
||||
* @param state 2-letter code for US states, and the equivalent for other countries. 100 characters max. Required in certain countries.
|
||||
* @param postalCode ZIP code or equivalent is usually required for countries that have them. 20 characters max. Required in certain countries.
|
||||
* @param countryCode 2-letter country code. 2 characters max.
|
||||
*/
|
||||
constructor(recipientName: string, line1: string, line2: string, city: string, state: string, postalCode: string, countryCode: string);
|
||||
|
||||
/**
|
||||
* Name of the recipient at this address. 50 characters max.
|
||||
*/
|
||||
recipientName: string;
|
||||
|
||||
/**
|
||||
* Line 1 of the address (e.g., Number, street, etc). 100 characters max.
|
||||
*/
|
||||
line1: string;
|
||||
|
||||
/**
|
||||
* Line 2 of the address (e.g., Suite, apt #, etc). 100 characters max. Optional.
|
||||
*/
|
||||
line2: string;
|
||||
|
||||
/**
|
||||
* City name. 50 characters max.
|
||||
*/
|
||||
city: string;
|
||||
|
||||
/**
|
||||
* 2-letter code for US states, and the equivalent for other countries. 100 characters max. Required in certain countries.
|
||||
*/
|
||||
state: string;
|
||||
|
||||
/**
|
||||
* ZIP code or equivalent is usually required for countries that have them. 20 characters max. Required in certain countries.
|
||||
*/
|
||||
postalCode: string;
|
||||
|
||||
/**
|
||||
* 2-letter country code. 2 characters max.
|
||||
*/
|
||||
countryCode: string;
|
||||
}
|
||||
|
||||
declare class PayPalConfiguration {
|
||||
|
||||
/**
|
||||
* @param options A set of options to use. Any options not specified will assume default values.
|
||||
*/
|
||||
constructor(options?: PayPalConfigurationOptions);
|
||||
|
||||
/**
|
||||
* Will be overridden by email used in most recent PayPal login.
|
||||
*/
|
||||
defaultUserEmail: string;
|
||||
|
||||
/**
|
||||
* Will be overridden by phone country code used in most recent PayPal login
|
||||
*/
|
||||
defaultUserPhoneCountryCode: string;
|
||||
|
||||
/**
|
||||
* Will be overridden by phone number used in most recent PayPal login.
|
||||
* @note If you set defaultUserPhoneNumber, be sure to also set defaultUserPhoneCountryCode.
|
||||
*/
|
||||
defaultUserPhoneNumber: string;
|
||||
|
||||
/**
|
||||
* Your company name, as it should be displayed to the user
|
||||
* when requesting consent via a PayPalFuturePaymentViewController.
|
||||
*/
|
||||
merchantName: string;
|
||||
|
||||
/**
|
||||
* URL of your company's privacy policy, which will be offered to the user
|
||||
* when requesting consent via a PayPalFuturePaymentViewController.
|
||||
*/
|
||||
merchantPrivacyPolicyURL: string;
|
||||
|
||||
/**
|
||||
* URL of your company's user agreement, which will be offered to the user
|
||||
* when requesting consent via a PayPalFuturePaymentViewController.
|
||||
*/
|
||||
merchantUserAgreementURL: string;
|
||||
|
||||
/**
|
||||
* If set to false, the SDK will only support paying with PayPal, not with credit cards.
|
||||
* This applies only to single payments (via PayPalPaymentViewController).
|
||||
* Future payments (via PayPalFuturePaymentViewController) always use PayPal.
|
||||
* Defaults to true.
|
||||
*/
|
||||
acceptCreditCards: boolean;
|
||||
|
||||
/**
|
||||
* For single payments, options for the shipping address.
|
||||
*
|
||||
* - 0 - PayPalShippingAddressOptionNone: no shipping address applies.
|
||||
*
|
||||
* - 1 - PayPalShippingAddressOptionProvided: shipping address will be provided by your app,
|
||||
* in the shippingAddress property of PayPalPayment.
|
||||
*
|
||||
* - 2 - PayPalShippingAddressOptionPayPal: user will choose from shipping addresses on file
|
||||
* for their PayPal account.
|
||||
*
|
||||
* - 3 - PayPalShippingAddressOptionBoth: user will choose from the shipping address provided by your app,
|
||||
* in the shippingAddress property of PayPalPayment, plus the shipping addresses on file for the user's PayPal account.
|
||||
*
|
||||
* Defaults to 0 (PayPalShippingAddressOptionNone).
|
||||
*/
|
||||
payPalShippingAddressOption: number;
|
||||
|
||||
/**
|
||||
* If set to true, then if the user pays via their PayPal account,
|
||||
* the SDK will remember the user's PayPal username or phone number;
|
||||
* if the user pays via their credit card, then the SDK will remember
|
||||
* the PayPal Vault token representing the user's credit card.
|
||||
*
|
||||
* If set to false, then any previously-remembered username, phone number, or
|
||||
* credit card token will be erased, and subsequent payment information will
|
||||
* not be remembered.
|
||||
*
|
||||
* Defaults to true.
|
||||
*/
|
||||
rememberUser: boolean;
|
||||
|
||||
/**
|
||||
* If not set, or if set to nil, defaults to the device's current language setting.
|
||||
*
|
||||
* Can be specified as a language code ("en", "fr", "zh-Hans", etc.) or as a locale ("en_AU", "fr_FR", "zh-Hant_HK", etc.).
|
||||
* If the library does not contain localized strings for a specified locale, then will fall back to the language. E.g., "es_CO" -> "es".
|
||||
* If the library does not contain localized strings for a specified language, then will fall back to American English.
|
||||
*
|
||||
* If you specify only a language code, and that code matches the device's currently preferred language,
|
||||
* then the library will attempt to use the device's current region as well.
|
||||
* E.g., specifying "en" on a device set to "English" and "United Kingdom" will result in "en_GB".
|
||||
*
|
||||
* These localizations are currently included:
|
||||
* da,de,en,en_AU,en_GB,en_SV,es,es_MX,fr,he,it,ja,ko,nb,nl,pl,pt,pt_BR,ru,sv,tr,zh-Hans,zh-Hant_HK,zh-Hant_TW.
|
||||
*/
|
||||
languageOrLocale: string;
|
||||
|
||||
/**
|
||||
* Normally, the SDK blurs the screen when the app is backgrounded,
|
||||
* to obscure credit card or PayPal account details in the iOS-saved screenshot.
|
||||
* If your app already does its own blurring upon backgrounding, you might choose to disable this.
|
||||
* Defaults to false.
|
||||
*/
|
||||
disableBlurWhenBackgrounding: boolean;
|
||||
|
||||
/**
|
||||
* If you will present the SDK's view controller within a popover, then set this property to true.
|
||||
* Defaults to false. (iOS only)
|
||||
*/
|
||||
presentingInPopover: boolean;
|
||||
|
||||
/**
|
||||
* Sandbox credentials can be difficult to type on a mobile device. Setting this flag to true will
|
||||
* cause the sandboxUserPassword and sandboxUserPin to always be pre-populated into login fields.
|
||||
*
|
||||
* This setting will have no effect if the operation mode is production.
|
||||
* Defaults to false.
|
||||
*/
|
||||
forceDefaultsInSandbox: boolean;
|
||||
|
||||
/**
|
||||
* Password to use for sandbox if 'forceDefaultsInSandbox' is set.
|
||||
*/
|
||||
sandboxUserPassword: string;
|
||||
|
||||
/**
|
||||
* PIN to use for sandbox if 'forceDefaultsInSandbox' is set.
|
||||
*/
|
||||
sandboxUserPin: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the options that can be passed into the PayPalConfiguration class constructor.
|
||||
*/
|
||||
interface PayPalConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Will be overridden by email used in most recent PayPal login.
|
||||
*/
|
||||
defaultUserEmail?: string;
|
||||
|
||||
/**
|
||||
* Will be overridden by phone country code used in most recent PayPal login
|
||||
*/
|
||||
defaultUserPhoneCountryCode?: string;
|
||||
|
||||
/**
|
||||
* Will be overridden by phone number used in most recent PayPal login.
|
||||
* @note If you set defaultUserPhoneNumber, be sure to also set defaultUserPhoneCountryCode.
|
||||
*/
|
||||
defaultUserPhoneNumber?: string;
|
||||
|
||||
/**
|
||||
* Your company name, as it should be displayed to the user
|
||||
* when requesting consent via a PayPalFuturePaymentViewController.
|
||||
*/
|
||||
merchantName?: string;
|
||||
|
||||
/**
|
||||
* URL of your company's privacy policy, which will be offered to the user
|
||||
* when requesting consent via a PayPalFuturePaymentViewController.
|
||||
*/
|
||||
merchantPrivacyPolicyURL?: string;
|
||||
|
||||
/**
|
||||
* URL of your company's user agreement, which will be offered to the user
|
||||
* when requesting consent via a PayPalFuturePaymentViewController.
|
||||
*/
|
||||
merchantUserAgreementURL?: string;
|
||||
|
||||
/**
|
||||
* If set to false, the SDK will only support paying with PayPal, not with credit cards.
|
||||
* This applies only to single payments (via PayPalPaymentViewController).
|
||||
* Future payments (via PayPalFuturePaymentViewController) always use PayPal.
|
||||
* Defaults to true.
|
||||
*/
|
||||
acceptCreditCards?: boolean;
|
||||
|
||||
/**
|
||||
* For single payments, options for the shipping address.
|
||||
*
|
||||
* - 0 - PayPalShippingAddressOptionNone?: no shipping address applies.
|
||||
*
|
||||
* - 1 - PayPalShippingAddressOptionProvided?: shipping address will be provided by your app,
|
||||
* in the shippingAddress property of PayPalPayment.
|
||||
*
|
||||
* - 2 - PayPalShippingAddressOptionPayPal?: user will choose from shipping addresses on file
|
||||
* for their PayPal account.
|
||||
*
|
||||
* - 3 - PayPalShippingAddressOptionBoth?: user will choose from the shipping address provided by your app,
|
||||
* in the shippingAddress property of PayPalPayment, plus the shipping addresses on file for the user's PayPal account.
|
||||
*
|
||||
* Defaults to 0 (PayPalShippingAddressOptionNone).
|
||||
*/
|
||||
payPalShippingAddressOption?: number;
|
||||
|
||||
/**
|
||||
* If set to true, then if the user pays via their PayPal account,
|
||||
* the SDK will remember the user's PayPal username or phone number;
|
||||
* if the user pays via their credit card, then the SDK will remember
|
||||
* the PayPal Vault token representing the user's credit card.
|
||||
*
|
||||
* If set to false, then any previously-remembered username, phone number, or
|
||||
* credit card token will be erased, and subsequent payment information will
|
||||
* not be remembered.
|
||||
*
|
||||
* Defaults to true.
|
||||
*/
|
||||
rememberUser?: boolean;
|
||||
|
||||
/**
|
||||
* If not set, or if set to nil, defaults to the device's current language setting.
|
||||
*
|
||||
* Can be specified as a language code ("en", "fr", "zh-Hans", etc.) or as a locale ("en_AU", "fr_FR", "zh-Hant_HK", etc.).
|
||||
* If the library does not contain localized strings for a specified locale, then will fall back to the language. E.g., "es_CO" -> "es".
|
||||
* If the library does not contain localized strings for a specified language, then will fall back to American English.
|
||||
*
|
||||
* If you specify only a language code, and that code matches the device's currently preferred language,
|
||||
* then the library will attempt to use the device's current region as well.
|
||||
* E.g., specifying "en" on a device set to "English" and "United Kingdom" will result in "en_GB".
|
||||
*
|
||||
* These localizations are currently included:
|
||||
* da,de,en,en_AU,en_GB,en_SV,es,es_MX,fr,he,it,ja,ko,nb,nl,pl,pt,pt_BR,ru,sv,tr,zh-Hans,zh-Hant_HK,zh-Hant_TW.
|
||||
*/
|
||||
languageOrLocale?: string;
|
||||
|
||||
/**
|
||||
* Normally, the SDK blurs the screen when the app is backgrounded,
|
||||
* to obscure credit card or PayPal account details in the iOS-saved screenshot.
|
||||
* If your app already does its own blurring upon backgrounding, you might choose to disable this.
|
||||
* Defaults to false.
|
||||
*/
|
||||
disableBlurWhenBackgrounding?: boolean;
|
||||
|
||||
/**
|
||||
* If you will present the SDK's view controller within a popover, then set this property to true.
|
||||
* Defaults to false. (iOS only)
|
||||
*/
|
||||
presentingInPopover?: boolean;
|
||||
|
||||
/**
|
||||
* Sandbox credentials can be difficult to type on a mobile device. Setting this flag to true will
|
||||
* cause the sandboxUserPassword and sandboxUserPin to always be pre-populated into login fields.
|
||||
*
|
||||
* This setting will have no effect if the operation mode is production.
|
||||
* Defaults to false.
|
||||
*/
|
||||
forceDefaultsInSandbox?: boolean;
|
||||
|
||||
/**
|
||||
* Password to use for sandbox if 'forceDefaultsInSandbox' is set.
|
||||
*/
|
||||
sandboxUserPassword?: string;
|
||||
|
||||
/**
|
||||
* PIN to use for sandbox if 'forceDefaultsInSandbox' is set.
|
||||
*/
|
||||
sandboxUserPin?: string;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region cdv-plugin-paypal-mobile-sdk.js
|
||||
|
||||
declare module PayPalCordovaPlugin {
|
||||
|
||||
export interface PayPalClientIds {
|
||||
PayPalEnvironmentProduction: string;
|
||||
PayPalEnvironmentSandbox: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the portion of an object that is common to all responses.
|
||||
*/
|
||||
export interface BaseResult {
|
||||
client: Client;
|
||||
response_type: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the client portion of the response.
|
||||
*/
|
||||
export interface Client {
|
||||
paypal_sdk_version: string;
|
||||
environment: string;
|
||||
platform: string;
|
||||
product_name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the response for a successful callback from renderSinglePaymentUI().
|
||||
*/
|
||||
export interface SinglePaymentResult extends BaseResult {
|
||||
response: {
|
||||
intent: string;
|
||||
id: string;
|
||||
state: string;
|
||||
authorization_id: string;
|
||||
create_time: string;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the response for a successful callback from renderFuturePaymentUI().
|
||||
*/
|
||||
export interface FuturePaymentResult extends BaseResult {
|
||||
response: {
|
||||
code: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface PayPalMobileStatic {
|
||||
/**
|
||||
* Retrieve the version of the PayPal iOS SDK library. Useful when contacting support.
|
||||
*
|
||||
* @param completionCallback a callback function accepting a string
|
||||
*/
|
||||
version(completionCallback: (result: string) => void): void;
|
||||
|
||||
/**
|
||||
* You MUST call this method to initialize the PayPal Mobile SDK.
|
||||
*
|
||||
* The PayPal Mobile SDK can operate in different environments to facilitate development and testing.
|
||||
*
|
||||
* @param clientIdsForEnvironments set of client ids for environments
|
||||
* Example: var clientIdsForEnvironments = {
|
||||
* PayPalEnvironmentProduction : @"my-client-id-for-Production",
|
||||
* PayPalEnvironmentSandbox : @"my-client-id-for-Sandbox"
|
||||
* }
|
||||
* @param completionCallback a callback function on success
|
||||
*/
|
||||
init(clientIdsForEnvironments: PayPalCordovaPlugin.PayPalClientIds, completionCallback: () => void): void;
|
||||
|
||||
/**
|
||||
* You must preconnect to PayPal to prepare the device for processing payments.
|
||||
* This improves the user experience, by making the presentation of the
|
||||
* UI faster. The preconnect is valid for a limited time, so
|
||||
* the recommended time to preconnect is on page load.
|
||||
*
|
||||
* @param environment available options are "PayPalEnvironmentNoNetwork", "PayPalEnvironmentProduction" and "PayPalEnvironmentSandbox"
|
||||
* @param configuration PayPalConfiguration object, for Future Payments merchantName, merchantPrivacyPolicyURL
|
||||
* and merchantUserAgreementURL must be set be set
|
||||
* @param completionCallback a callback function on success
|
||||
*/
|
||||
prepareToRender(environment: string, configuration: PayPalConfiguration, completionCallback: () => void): void;
|
||||
|
||||
/**
|
||||
* Start PayPal UI to collect payment from the user.
|
||||
* See https://developer.paypal.com/webapps/developer/docs/integration/mobile/ios-integration-guide/
|
||||
* for more documentation of the params.
|
||||
*
|
||||
* @param payment PayPalPayment object
|
||||
* @param completionCallback a callback function accepting a js object, called when the user has completed payment
|
||||
* @param cancelCallback a callback function accepting a reason string, called when the user cancels the payment
|
||||
*/
|
||||
renderSinglePaymentUI(payment: PayPalPayment, completionCallback: (result: PayPalCordovaPlugin.SinglePaymentResult) => void, cancelCallback: (cancelReason: string) => void): void;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* Once a user has consented to future payments, when the user subsequently initiates a PayPal payment
|
||||
* from their device to be completed by your server, PayPal uses a Correlation ID to verify that the
|
||||
* payment is originating from a valid, user-consented device+application.
|
||||
* This helps reduce fraud and decrease declines.
|
||||
* This method MUST be called prior to initiating a pre-consented payment (a "future payment") from a mobile device.
|
||||
* Pass the result to your server, to include in the payment request sent to PayPal.
|
||||
* Do not otherwise cache or store this value.
|
||||
*
|
||||
* @param environment available options are "PayPalEnvironmentNoNetwork", "PayPalEnvironmentProduction" and "PayPalEnvironmentSandbox"
|
||||
* @param callback applicationCorrelationID Your server will send this to PayPal in a 'Paypal-Application-Correlation-Id' header.
|
||||
*/
|
||||
applicationCorrelationIDForEnvironment(environment: string, completionCallback: (applicationCorrelationId: string) => void): void;
|
||||
|
||||
/**
|
||||
* Once a user has consented to future payments, when the user subsequently initiates a PayPal payment
|
||||
* from their device to be completed by your server, PayPal uses a Correlation ID to verify that the
|
||||
* payment is originating from a valid, user-consented device+application.
|
||||
* This helps reduce fraud and decrease declines.
|
||||
* This method MUST be called prior to initiating a pre-consented payment (a "future payment") from a mobile device.
|
||||
* Pass the result to your server, to include in the payment request sent to PayPal.
|
||||
* Do not otherwise cache or store this value.
|
||||
*
|
||||
* @param callback clientMetadataID Your server will send this to PayPal in a 'PayPal-Client-Metadata-Id' header.
|
||||
*/
|
||||
clientMetadataID(completionCallback: (clientMetadataId: string) => void): void;
|
||||
|
||||
/**
|
||||
* Please Read Docs on Future Payments at https://github.com/paypal/PayPal-iOS-SDK#future-payments
|
||||
*
|
||||
* @param completionCallback a callback function accepting a js object with future payment authorization
|
||||
* @param cancelCallback a callback function accepting a reason string, called when the user canceled without agreement
|
||||
*/
|
||||
renderFuturePaymentUI(completionCallback: (result: PayPalCordovaPlugin.FuturePaymentResult) => void, cancelCallback: (cancelReason: string) => void): void;
|
||||
|
||||
/**
|
||||
* Please Read Docs on Profile Sharing at https://github.com/paypal/PayPal-iOS-SDK#profile-sharing
|
||||
*
|
||||
* @param scopes scopes Set of requested scope-values. Accepted scopes are: openid, profile, address, email, phone, futurepayments and paypalattributes
|
||||
* See https://developer.paypal.com/docs/integration/direct/identity/attributes/ for more details
|
||||
* @param completionCallback a callback function accepting a js object with future payment authorization
|
||||
* @param cancelCallback a callback function accepting a reason string, called when the user canceled without agreement
|
||||
*/
|
||||
renderProfileSharingUI(scopes: string[], completionCallback: (result: any) => void, cancelCallback: (cancelReason: string) => void): void;
|
||||
}
|
||||
}
|
||||
|
||||
declare var PayPalMobile: PayPalCordovaPlugin.PayPalMobileStatic;
|
||||
|
||||
//#endregion
|
||||
Vendored
+13
-1
@@ -47,7 +47,19 @@ interface AccWizardOptions {
|
||||
nextText: string;
|
||||
|
||||
/**
|
||||
* @summary Text for back button
|
||||
* @summary Text for back button.
|
||||
* @type {string}
|
||||
*/
|
||||
backText: string;
|
||||
|
||||
/**
|
||||
* @summary HTML input type for next button. (default: "submit")
|
||||
* @type {string}
|
||||
*/
|
||||
nextType: string;
|
||||
|
||||
/**
|
||||
* @summary HTML input type for back button. (default: "reset")
|
||||
* @type {string}
|
||||
*/
|
||||
backType: string;
|
||||
|
||||
@@ -14,7 +14,7 @@ var string: string;
|
||||
// acorn
|
||||
string = acorn.version;
|
||||
program = acorn.parse('code');
|
||||
program = acorn.parse('code', {range: true, onToken: tokens, onComment: comments});
|
||||
program = acorn.parse('code', {ranges: true, onToken: tokens, onComment: comments});
|
||||
program = acorn.parse('code', {
|
||||
ranges: true,
|
||||
onToken: (token) => tokens.push(token),
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/// <reference path="amqplib.d.ts" />
|
||||
|
||||
import amqp = require("amqplib");
|
||||
|
||||
var msg = "Hello World";
|
||||
|
||||
amqp.connect("amqp://localhost")
|
||||
.then(connection => {
|
||||
return connection.createChannel()
|
||||
.tap(channel => channel.checkQueue("myQueue"))
|
||||
.then(channel => channel.sendToQueue("myQueue", new Buffer(msg)))
|
||||
.ensure(() => connection.close());
|
||||
});
|
||||
|
||||
amqp.connect("amqp://localhost")
|
||||
.then(connection => {
|
||||
return connection.createChannel()
|
||||
.tap(channel => channel.checkQueue("myQueue"))
|
||||
.then(channel => channel.consume("myQueue", newMsg => console.log("New Message: " + newMsg.content.toString())))
|
||||
.ensure(() => connection.close());
|
||||
});
|
||||
Vendored
+144
@@ -0,0 +1,144 @@
|
||||
// Type definitions for amqplib 0.3.x
|
||||
// Project: https://github.com/squaremo/amqp.node
|
||||
// Definitions by: Michael Nahkies <https://github.com/mnahkies>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../when/when.d.ts" />
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
declare module "amqplib" {
|
||||
|
||||
import events = require("events");
|
||||
import when = require("when");
|
||||
|
||||
interface Connection extends events.EventEmitter {
|
||||
close(): when.Promise<void>;
|
||||
createChannel(): when.Promise<Channel>;
|
||||
createConfirmChannel(): when.Promise<Channel>;
|
||||
}
|
||||
|
||||
module Replies {
|
||||
interface Empty {
|
||||
}
|
||||
interface AssertQueue {
|
||||
queue: string;
|
||||
messageCount: number;
|
||||
consumerCount: number;
|
||||
}
|
||||
interface DeleteQueue {
|
||||
messageCount: number;
|
||||
}
|
||||
interface AssertExchange {
|
||||
exchange: string;
|
||||
}
|
||||
interface Consume {
|
||||
consumerTag: string;
|
||||
}
|
||||
}
|
||||
|
||||
module Options {
|
||||
interface AssertQueue {
|
||||
exclusive?: boolean;
|
||||
durable?: boolean;
|
||||
autoDelete?: boolean;
|
||||
arguments?: any;
|
||||
messageTtl?: number;
|
||||
expires?: number;
|
||||
deadLetterExchange?: string;
|
||||
maxLength?: number;
|
||||
}
|
||||
interface DeleteQueue {
|
||||
ifUnused?: boolean;
|
||||
ifEmpty?: boolean;
|
||||
}
|
||||
interface AssertExchange {
|
||||
durable?: boolean;
|
||||
internal?: boolean;
|
||||
autoDelete?: boolean;
|
||||
alternateExchange?: string;
|
||||
arguments?: any;
|
||||
}
|
||||
interface DeleteExchange {
|
||||
ifUnused?: boolean;
|
||||
}
|
||||
interface Publish {
|
||||
expiration?: string;
|
||||
userId?: string;
|
||||
CC?: string | string[];
|
||||
|
||||
mandatory?: boolean;
|
||||
persistent?: boolean;
|
||||
deliveryMode?: boolean | number;
|
||||
BCC?: string | string[];
|
||||
|
||||
contentType?: string;
|
||||
contentEncoding?: string;
|
||||
headers?: Object;
|
||||
priority?: number;
|
||||
correlationId?: string;
|
||||
replyTo?: string;
|
||||
messageId?: string;
|
||||
timestamp?: number;
|
||||
type?: string;
|
||||
appId?: string;
|
||||
}
|
||||
interface Consume {
|
||||
consumerTag?: string;
|
||||
noLocal?: boolean;
|
||||
noAck?: boolean;
|
||||
exclusive?: boolean;
|
||||
priority?: number;
|
||||
arguments?: Object;
|
||||
}
|
||||
interface Get {
|
||||
noAck?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
interface Message {
|
||||
content: Buffer;
|
||||
fields: Object;
|
||||
properties: Object;
|
||||
}
|
||||
|
||||
interface Channel extends events.EventEmitter {
|
||||
close(): when.Promise<void>;
|
||||
|
||||
assertQueue(queue: string, options?: Options.AssertQueue): when.Promise<Replies.AssertQueue>;
|
||||
checkQueue(queue: string): when.Promise<Replies.AssertQueue>;
|
||||
|
||||
deleteQueue(queue: string, options?: Options.DeleteQueue): when.Promise<Replies.DeleteQueue>;
|
||||
purgeQueue(queue: string): when.Promise<Replies.DeleteQueue>;
|
||||
|
||||
bindQueue(queue: string, source: string, pattern: string, args?: any): when.Promise<Replies.Empty>;
|
||||
unbindQueue(queue: string, source: string, pattern: string, args?: any): when.Promise<Replies.Empty>;
|
||||
|
||||
assertExchange(exchange: string, type: string, options?: Options.AssertExchange): when.Promise<Replies.AssertExchange>;
|
||||
checkExchange(exchange: string): when.Promise<Replies.Empty>;
|
||||
|
||||
deleteExchange(exchange: string, options?: Options.DeleteExchange): when.Promise<Replies.Empty>;
|
||||
|
||||
bindExchange(destination: string, source: string, pattern: string, args?: any): when.Promise<Replies.Empty>;
|
||||
unbindExchange(destination: string, source: string, pattern: string, args?: any): when.Promise<Replies.Empty>;
|
||||
|
||||
publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish): boolean;
|
||||
sendToQueue(queue: string, content: Buffer, options?: Options.Publish): boolean;
|
||||
|
||||
consume(queue: string, onMessage: (msg: Message) => any, options?: Options.Consume): when.Promise<Replies.Consume>;
|
||||
|
||||
cancel(consumerTag: string): when.Promise<Replies.Empty>;
|
||||
get(queue: string, options?: Options.Get): when.Promise<Message | boolean>;
|
||||
|
||||
ack(message: Message, allUpTo?: boolean): void;
|
||||
ackAll(): void;
|
||||
|
||||
nack(message: Message, allUpTo?: boolean, requeue?: boolean): void;
|
||||
nackAll(requeue?: boolean): void;
|
||||
reject(message: Message, requeue?: boolean): void;
|
||||
|
||||
prefetch(count: number, global?: boolean): when.Promise<Replies.Empty>;
|
||||
recover(): when.Promise<Replies.Empty>;
|
||||
}
|
||||
|
||||
function connect(url: string, socketOptions?: any): when.Promise<Connection>;
|
||||
}
|
||||
+2
-26
@@ -3,30 +3,6 @@
|
||||
// Definitions by: John Reilly <https://github.com/johnnyreilly>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
/// <reference path="../ng-file-upload/ng-file-upload.d.ts" />
|
||||
|
||||
declare module angular.angularFileUpload {
|
||||
|
||||
interface IUploadService {
|
||||
|
||||
http<T>(config: IRequestConfig): IUploadPromise<T>;
|
||||
upload<T>(config: IFileUploadConfig): IUploadPromise<T>;
|
||||
}
|
||||
|
||||
interface IUploadPromise<T> extends IHttpPromise<T> {
|
||||
abort(): IUploadPromise<T>;
|
||||
progress(callback: IHttpPromiseCallback<T>): IUploadPromise<T>;
|
||||
xhr(callback: IHttpPromiseCallback<T>): IUploadPromise<T>;
|
||||
}
|
||||
|
||||
interface IFileUploadConfig extends IRequestConfig {
|
||||
|
||||
file: File;
|
||||
fileName?: string;
|
||||
}
|
||||
|
||||
interface IFileProgressEvent extends ProgressEvent {
|
||||
|
||||
config: IFileUploadConfig;
|
||||
}
|
||||
}
|
||||
// THIS FILE WILL REMOVE IF angular-file-upload.d.ts incoming.
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/// <reference path="angular-formly.d.ts" />
|
||||
|
||||
var app = angular.module('app', ['formly']);
|
||||
|
||||
interface IScope extends ng.IScope {
|
||||
to: { label: string; }
|
||||
}
|
||||
|
||||
class FormConfig {
|
||||
constructor(formlyConfig: AngularFormly.IFormlyConfig, formlyValidationMessages: AngularFormly.IValidationMessages) {
|
||||
formlyConfig.setWrapper({
|
||||
name: 'validation',
|
||||
types: ['input', 'customInput'],
|
||||
templateUrl: 'my-messages.html'
|
||||
});
|
||||
|
||||
formlyValidationMessages.addStringMessage('required', 'This field is required');
|
||||
|
||||
formlyConfig.setType({
|
||||
name: 'customInput',
|
||||
extends: 'input'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
class AppController {
|
||||
fields: AngularFormly.IFieldConfigurationObject[];
|
||||
constructor() {
|
||||
var vm = this;
|
||||
vm.fields = [
|
||||
{
|
||||
key: 'firstName',
|
||||
type: 'customInput',
|
||||
templateOptions: {
|
||||
required: true,
|
||||
label: 'First Name',
|
||||
foo: 'hi'
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'email',
|
||||
type: 'input',
|
||||
templateOptions: {
|
||||
label: 'Email',
|
||||
required: true,
|
||||
type: 'email',
|
||||
maxlength: 10,
|
||||
minlength: 6,
|
||||
placeholder: 'example@example.com'
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'ip',
|
||||
type: 'input',
|
||||
validators: {
|
||||
ipAddress: {
|
||||
expression: function(viewValue, modelValue) {
|
||||
var value = modelValue || viewValue;
|
||||
return /(\d{1,3}\.){3}\d{1,3}/.test(value);
|
||||
},
|
||||
message: '$viewValue + " is not a valid IP Address"'
|
||||
}
|
||||
},
|
||||
templateOptions: {
|
||||
label: 'IP Address',
|
||||
required: true,
|
||||
type: 'text',
|
||||
placeholder: '127.0.0.1',
|
||||
},
|
||||
validation: {
|
||||
messages: {
|
||||
required: function($viewValue: any, $modelValue: any, scope: AngularFormly.ITemplateScope) {
|
||||
return scope.to.label + ' is required'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'mac',
|
||||
type: 'input',
|
||||
templateOptions: {
|
||||
label: 'MAC Address',
|
||||
required: true,
|
||||
placeholder: '49-8A-BD-4E-00-1D',
|
||||
pattern: '([0-9A-F]{2}[:-]){5}([0-9A-F]{2})'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'checkbox',
|
||||
key: 'checked',
|
||||
templateOptions: {
|
||||
label: 'Check this'
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'checked2',
|
||||
type: 'checkbox',
|
||||
wrapper: null,
|
||||
templateOptions: {
|
||||
label: 'no wrapper here...'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
app.controller("AppController", AppController);
|
||||
|
||||
Vendored
+574
@@ -0,0 +1,574 @@
|
||||
// Type definitions for angular-formly 6.18.0
|
||||
// Project: https://github.com/formly-js/angular-formly
|
||||
// Definitions by: Scott Hatcher <https://github.com/scatcher>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
|
||||
declare module 'AngularFormly' {
|
||||
export = AngularFormly;
|
||||
}
|
||||
|
||||
declare module AngularFormly {
|
||||
|
||||
|
||||
interface IFieldGroup {
|
||||
data?: Object;
|
||||
className?: string;
|
||||
elementAttributes?: { [key: string]: string };
|
||||
fieldGroup: IFieldConfigurationObject[];
|
||||
form?: Object;
|
||||
hide?: boolean;
|
||||
hideExpression?: string | IExpresssionFunction;
|
||||
key?: string | number;
|
||||
model?: string | Object;
|
||||
options?: IFormOptionsAPI
|
||||
}
|
||||
|
||||
|
||||
interface IFormOptionsAPI {
|
||||
data?: Object;
|
||||
fieldTransform?: Function;
|
||||
formState?: Object;
|
||||
removeChromeAutoComplete?: boolean;
|
||||
resetModel?: Function;
|
||||
templateManipulators?: ITemplateManipulators;
|
||||
updateInitialValue?: Function;
|
||||
wrapper?: string | string[];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* see http://docs.angular-formly.com/docs/formly-expressions#expressionproperties-validators--messages
|
||||
*/
|
||||
interface IExpresssionFunction {
|
||||
($viewValue: any, $modelValue: any, scope: ITemplateScope): any;
|
||||
}
|
||||
|
||||
|
||||
interface IModelOptions {
|
||||
updateOn?: string;
|
||||
debounce?: number;
|
||||
allowInvalid?: boolean;
|
||||
getterSetter?: string;
|
||||
timezone?: string;
|
||||
}
|
||||
|
||||
|
||||
interface ITemplateManipulator {
|
||||
(template: string | HTMLElement, options: Object, scope: ITemplateScope): string | HTMLElement;
|
||||
}
|
||||
|
||||
|
||||
interface ITemplateManipulators {
|
||||
preWrapper?: ITemplateManipulator[];
|
||||
postWrapper?: ITemplateManipulator[];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* see http://docs.angular-formly.com/docs/ngmodelattrstemplatemanipulator
|
||||
*/
|
||||
interface ITemplateOptions {
|
||||
|
||||
// both attribute or regular attribute
|
||||
disabled?: boolean;
|
||||
maxlength?: number;
|
||||
minlength?: number;
|
||||
pattern?: string;
|
||||
required?: boolean;
|
||||
|
||||
//attribute only
|
||||
max?: number;
|
||||
min?: number;
|
||||
placeholder?: number | string;
|
||||
tabindex?: number;
|
||||
type?: string;
|
||||
|
||||
//expression types
|
||||
onBlur?: string;
|
||||
onChange?: string;
|
||||
onClick?: string;
|
||||
onFocus?: string;
|
||||
onKeydown?: string;
|
||||
onKeypress?: string;
|
||||
onKeyup?: string;
|
||||
|
||||
//Bootstrap types
|
||||
label?: string;
|
||||
description?: string;
|
||||
[key: string]: any;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#validators-object
|
||||
*/
|
||||
interface IValidator {
|
||||
expression: string | IExpresssionFunction;
|
||||
message?: string | IExpresssionFunction;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* An object which has at least two properties called expression and listener. The watch.expression
|
||||
* is added to the formly-form directive's scope (to allow it to run even when hide is true). You
|
||||
* can specify a type ($watchCollection or $watchGroup) via the watcher.type property (defaults to
|
||||
* $watch) and whether you want it to be a deep watch via the watcher.deep property (defaults to false).
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#watcher-objectarray-of-watches
|
||||
*/
|
||||
interface IWatcher {
|
||||
deep?: boolean; //Defaults to false
|
||||
expression?: string | { (field: string, scope: ITemplateScope): boolean };
|
||||
listener: (field: string, newValue: any, oldValue: any, scope: ITemplateScope, stopWatching: Function) => void;
|
||||
type?: string; //Defaults to $watch but can be set to $watchCollection or $watchGroup
|
||||
}
|
||||
|
||||
|
||||
// see http://docs.angular-formly.com/docs/field-configuration-object
|
||||
interface IFieldConfigurationObject {
|
||||
|
||||
|
||||
/**
|
||||
* Added in 6.18.0
|
||||
*
|
||||
* Demo
|
||||
* see http://angular-formly.com/#/example/other/unique-value-async-validation
|
||||
*/
|
||||
asyncValidators?: {
|
||||
[key: string]: string | IExpresssionFunction | IValidator;
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a great way to add custom behavior to a specific field. It is injectable with the $scope of the
|
||||
* field, and anything else you have in your injector.
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#controller-controller-name-as-string--controller-f
|
||||
*/
|
||||
controller?: string | Function;
|
||||
|
||||
|
||||
/**
|
||||
* This is reserved for the developer. You have our guarantee to be able to use this and not worry about
|
||||
* future versions of formly overriding your usage and preventing you from upgrading :-)
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#data-object
|
||||
*/
|
||||
data?: Object;
|
||||
|
||||
|
||||
/**
|
||||
* Use defaultValue to initialize it the model. If this is provided and the value of the
|
||||
* model at compile-time is undefined, then the value of the model will be assigned to defaultValue.
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#defaultvalue-any
|
||||
*/
|
||||
defaultValue?: any;
|
||||
|
||||
|
||||
/**
|
||||
* You can specify your own class that will be applied to the formly-field directive (or ng-form of
|
||||
* a fieldGroup).
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#classname-string
|
||||
*/
|
||||
className?: string;
|
||||
|
||||
|
||||
elementAttributes?: string;
|
||||
|
||||
|
||||
/**
|
||||
* An object where the key is a property to be set on the main field config and the value is an
|
||||
* expression used to assign that property. The value is a formly expressions. The returned value is
|
||||
* wrapped in $q.when so you can return a promise from your function :-)
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#expressionproperties-object
|
||||
*/
|
||||
expressionProperties?: {
|
||||
[key: string]: string | IExpresssionFunction | IValidator;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Uses ng-if. Whether to hide the field. Defaults to false. If you wish this to be conditional, use
|
||||
* hideExpression. See below.
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#hide-boolean
|
||||
*/
|
||||
hide?: boolean
|
||||
|
||||
|
||||
/**
|
||||
* This is similar to expressionProperties with a slight difference. You should (hopefully) never
|
||||
* notice the difference with the most common use case. This is available due to limitations with
|
||||
* expressionProperties and ng-if not working together very nicely.
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#hideexpression-string--function
|
||||
*/
|
||||
hideExpression?: string | IExpresssionFunction;
|
||||
|
||||
|
||||
/**
|
||||
* This allows you to specify the id of your field (which will be used for its name as well unless
|
||||
* a name is provided). Note, you can also override the id generation code using the formlyConfig
|
||||
* extra called getFieldId.
|
||||
*
|
||||
* AVOID THIS
|
||||
* If you don't have to do this, don't. Specifying IDs makes it harder to re-use things and it's
|
||||
* just extra work. Part of the beauty that angular-formly provides is the fact that you don't need
|
||||
* to concern yourself with making sure that this is unique.
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#id-string
|
||||
*/
|
||||
id?: string;
|
||||
|
||||
|
||||
initialValue?: any;
|
||||
|
||||
|
||||
/**
|
||||
* Can be set instead of type or template to use a custom html template form field. Works
|
||||
* just like a directive templateUrl and uses the $templateCache
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#key-string
|
||||
*/
|
||||
key?: string | number;
|
||||
|
||||
|
||||
/**
|
||||
* This allows you to specify a link function. It is invoked after your template has finished compiling.
|
||||
* You are passed the normal arguments for a normal link function.
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#link-link-function
|
||||
*/
|
||||
link?: ng.IDirectiveLinkFn;
|
||||
|
||||
|
||||
/**
|
||||
* By default, the model passed to the formly-field directive is the same as the model passed to the
|
||||
* formly-form. However, if the field has a model specified, then it is used for that field (and that
|
||||
* field only). In addition, a deep watch is added to the formly-field directive's scope to run the
|
||||
* expressionProperties when the specified model changes.
|
||||
*
|
||||
* Note, the formly-form directive will allow you to specify a string which is an (almost) formly
|
||||
* expression which allows you to define the model as relative to the scope of the form.
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#model-object--string
|
||||
*/
|
||||
model?: Object | string;
|
||||
|
||||
|
||||
/**
|
||||
* Allows you to take advantage of ng-model-options directive. Formly's built-in templateManipulator (see
|
||||
* below) will add this attribute to your ng-model element automatically if this property exists. Note,
|
||||
* if you use the getter/setter option, formly's templateManipulator will change the value of ng-model
|
||||
* to options.value which is a getterSetter that formly adds to field options.
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#modeloptions
|
||||
*/
|
||||
modelOptions?: IModelOptions;
|
||||
|
||||
|
||||
/**
|
||||
* If you wish to, you can specify a specific name for your ng-model. This is useful if you're posting
|
||||
* the form to a server using techniques of yester-year.
|
||||
*
|
||||
* AVOID THIS
|
||||
* If you don't have to do this, don't. It's just extra work. Part of the beauty that angular-formly
|
||||
* provides is the fact that you don't need to concern yourself with stuff like this.
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#name-string
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
|
||||
/**
|
||||
* This is used by ngModelAttrsTemplateManipulator to automatically add attributes to the ng-model element
|
||||
* of field templates. You will likely not use this often. This object is a little complex, but extremely
|
||||
* powerful. It's best to explain this api via an example. For more information, see the guide on ngModelAttrs.
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#ngmodelattrs-object
|
||||
*/
|
||||
ngModelAttrs?: {
|
||||
attribute?: any;
|
||||
bound?: any;
|
||||
expression?: any;
|
||||
value?: any;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Used to tell angular-formly to not attempt to add the formControl property to your object. This is useful
|
||||
* for things like validation, but not necessary if your "field" doesn't use ng-model (if it's just a horizontal
|
||||
* line for example). Defaults to undefined.
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#noformcontrol-boolean
|
||||
*/
|
||||
noFormControl?: boolean;
|
||||
|
||||
|
||||
/**
|
||||
* Allows you to specify extra types to get options from. Duplicate options are overridden in later priority
|
||||
* (index 1 will override index 0 properties). Also, these are applied after the type's defaultOptions and
|
||||
* hence will override any duplicates of those properties as well.
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#optionstypes-string--array-of-strings
|
||||
*/
|
||||
optionsTypes?: string | string[];
|
||||
|
||||
|
||||
/**
|
||||
* Can be set instead of type or templateUrl to use a custom html
|
||||
* template form field. Recommended to be used with one-liners mostly
|
||||
* (like a directive), or if you're using webpack with the ability to require templates :-)
|
||||
*
|
||||
* If a function is passed, it is invoked with the field configuration object and can return
|
||||
* either a string for the template or a promise that resolves to a string.
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#template-string--function
|
||||
*/
|
||||
template?: string | { (fieldConfiguration: IFieldConfigurationObject): string | ng.IPromise<string> };
|
||||
|
||||
|
||||
/**
|
||||
* Allows you to specify custom template manipulators for this specific field. (use defaultOptions in a
|
||||
* type configuration if you want it to apply to all fields of a certain type).
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#templatemanipulator-object-of-arrays-of-functions
|
||||
*/
|
||||
templateManipulators?: ITemplateManipulators;
|
||||
|
||||
|
||||
/**
|
||||
* This is reserved for the templates. Any template-specific options go in here. Look at your specific
|
||||
* template implementation to know the options required for this.
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#templateoptions-object
|
||||
*/
|
||||
templateOptions?: ITemplateOptions;
|
||||
|
||||
|
||||
/**
|
||||
* Can be set instead of type or template to use a custom html template form field. Works
|
||||
* just like a directive templateUrl and uses the $templateCache
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#templateurl-string--function
|
||||
*/
|
||||
templateUrl?: string | { (fieldConfiguration: IFieldConfigurationObject): string | ng.IPromise<string> };
|
||||
|
||||
|
||||
/**
|
||||
* The type of field to be rendered. This is the recommended method
|
||||
* for defining fields. Types must be pre-defined using formlyConfig.
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#type-string
|
||||
*/
|
||||
type?: string;
|
||||
|
||||
|
||||
/**
|
||||
* An object with a few useful properties mostly handy when used in combination with ng-messages
|
||||
*/
|
||||
validation?: {
|
||||
|
||||
/**
|
||||
* This is set by angular-formly. This is a boolean indicating whether an error message should be shown. Because
|
||||
* you generally only want to show error messages when the user has interacted with a specific field, this value
|
||||
* is set to true based on this rule: field invalid && (field touched || validation.show) (with slight difference
|
||||
* for pre-angular 1.3 because it doesn't have touched support).
|
||||
*/
|
||||
errorExistsAndShouldBeVisible?: boolean;
|
||||
|
||||
|
||||
/**
|
||||
* A map of Formly Expressions mapped to message names. This is really useful when you're using ng-messages
|
||||
* like in this example.
|
||||
*/
|
||||
messages?: {
|
||||
[key: string]: IExpresssionFunction | string;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A boolean you as the developer can set to specify to force options.validation.errorExistsAndShouldBeVisible
|
||||
* to be set to true when there are $errors. This is useful when you're trying to call the user's attention to
|
||||
* some fields for some reason.
|
||||
*/
|
||||
show?: boolean;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* An object where the keys are the name of the validator and the values are Formly Expressions;
|
||||
*
|
||||
* Async Validation
|
||||
* All function validators can return true/false/Promise. A validator passes if it returns true or a promise
|
||||
* that is resolved. A validator fails if it returns false or a promise that is rejected.
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#validators-object
|
||||
*/
|
||||
validators?: {
|
||||
[key: string]: string | IExpresssionFunction | IValidator;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is a getter/setter function for the value that your field is representing. Useful when using getterSetter: true
|
||||
* in the modelOptions (in fact, if you don't disable the ngModelAttrsTemplateManipulator that comes built-in with formly,
|
||||
* it will automagically change your field's ng-model attribute to use options.value.
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#value-gettersetter-function
|
||||
*/
|
||||
value?(): any; //Getter
|
||||
value?(val: any): void; //Setter
|
||||
|
||||
|
||||
/**
|
||||
* An object which has at least two properties called expression and listener. The watch.expression is added
|
||||
* to the formly-form directive's scope (to allow it to run even when hide is true). You can specify a type
|
||||
* ($watchCollection or $watchGroup) via the watcher.type property (defaults to $watch) and whether you want
|
||||
* it to be a deep watch via the watcher.deep property (defaults to false).
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#watcher-objectarray-of-watches
|
||||
*/
|
||||
watcher?: IWatcher | IWatcher[];
|
||||
|
||||
|
||||
/**
|
||||
* This makes reference to setWrapper in formlyConfig. It is expected to be the name of the wrapper. If
|
||||
* given an array, the formly field template will be wrapped by the first wrapper, then the second, then
|
||||
* the third, etc. You can also specify these as part of a type (which is the recommended approach).
|
||||
* Specifying this property will override the wrappers for the type for this field.
|
||||
*
|
||||
* http://docs.angular-formly.com/docs/field-configuration-object#wrapper-string--array-of-strings
|
||||
*/
|
||||
wrapper?: string | string[];
|
||||
|
||||
|
||||
//ALL PROPERTIES BELOW ARE ADDED (So you should not be setting them yourself.)
|
||||
|
||||
|
||||
/**
|
||||
* This is the NgModelController for the field. It provides you with awesome stuff like $errors :-)
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#formcontrol-ngmodelcontroller
|
||||
*/
|
||||
formControl?: ng.IFormController | ng.IFormController[];
|
||||
|
||||
|
||||
/**
|
||||
* Will reset the field's model and the field control to the last initialValue. This is used by the
|
||||
* formly-form's options.resetModel function.
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#resetmodel-function
|
||||
*/
|
||||
resetModel?: () => void;
|
||||
|
||||
|
||||
/**
|
||||
* It is not likely that you'll ever want to invoke this function. It simply runs the expressionProperties expressions.
|
||||
* It is used internally and you shouldn't have to use it, but you can if you want to, and any breaking changes to the
|
||||
* way it works will result in a major version change, so you can rely on its api.
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#runexpressions-function
|
||||
*/
|
||||
runExpressions?: () => void;
|
||||
|
||||
|
||||
/**
|
||||
* Will reset the field's initialValue to the current state of the model. Useful if you load the model asynchronously.
|
||||
* Invoke this when the model gets set. This is used by the formly-form's options.updateInitialValue function.
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/field-configuration-object#updateinitialvalue-function
|
||||
*/
|
||||
updateInitialValue?: () => void;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* see http://docs.angular-formly.com/docs/custom-templates#section-formlyconfig-settype-options
|
||||
*/
|
||||
interface ITypeOptions {
|
||||
apiCheck?: { [key: string]: Function };
|
||||
apiCheckFunction?: string; //'throw' or 'warn
|
||||
apiCheckInstance?: any;
|
||||
apiCheckOptions?: Object;
|
||||
defaultOptions?: IFieldConfigurationObject | Function;
|
||||
controller?: Function | string | any[];
|
||||
data?: Object;
|
||||
extends?: string;
|
||||
link?: ng.IDirectiveLinkFn;
|
||||
overwriteOk?: boolean;
|
||||
name: string;
|
||||
template?: Function | string;
|
||||
templateUrl?: Function | string;
|
||||
validateOptions?: Function;
|
||||
wrapper?: string | string[];
|
||||
}
|
||||
|
||||
interface IWrapperOptions {
|
||||
apiCheck?: { [key: string]: Function };
|
||||
apiCheckFunction?: string; //'throw' or 'warn
|
||||
apiCheckInstance?: any;
|
||||
apiCheckOptions?: Object;
|
||||
overwriteOk?: boolean;
|
||||
name?: string;
|
||||
template?: string;
|
||||
templateUrl?: string;
|
||||
types?: string[];
|
||||
validateOptions?: Function;
|
||||
}
|
||||
|
||||
interface IFormlyConfig {
|
||||
setType(typeOptions: ITypeOptions): void;
|
||||
setWrapper(wrapperOptions: IWrapperOptions): void;
|
||||
|
||||
}
|
||||
|
||||
interface ITemplateScopeOptions {
|
||||
formControl: ng.IFormController | ng.IFormController[];
|
||||
templateOptions: ITemplateOptions;
|
||||
validation: Object;
|
||||
}
|
||||
|
||||
/**
|
||||
* see http://docs.angular-formly.com/docs/custom-templates#templates-scope
|
||||
*/
|
||||
interface ITemplateScope {
|
||||
options: ITemplateScopeOptions;
|
||||
//Shortcut to options.formControl
|
||||
fc: ng.IFormController | ng.IFormController[];
|
||||
//all the fields for the form
|
||||
fields: IFieldConfigurationObject[];
|
||||
//the form controller the field is in
|
||||
form: any;
|
||||
//The object passed as options.formState to the formly-form directive. Use this to share state between fields.
|
||||
formState: Object;
|
||||
//The id of the field. You shouldn't have to use this.
|
||||
id: string;
|
||||
//The index of the field the form is on (in ng-repeat)
|
||||
index: number;
|
||||
//the model of the form (or the model specified by the field if it was specified).
|
||||
model: Object | string;
|
||||
//Shortcut to options.validation.errorExistsAndShouldBeVisible
|
||||
showError: boolean;
|
||||
//Shortcut to options.templateOptions
|
||||
to: ITemplateOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
* see http://docs.angular-formly.com/docs/formlyvalidationmessages#addtemplateoptionvaluemessage
|
||||
*/
|
||||
interface IValidationMessages {
|
||||
addTemplateOptionValueMessage(name: string, prop: string, prefix: string, suffix: string, alternate: string): void;
|
||||
addStringMessage(name: string, string: string): void;
|
||||
messages: { [key: string]: ($viewValue: any, $modelValue: any, scope: ITemplateScope) => string };
|
||||
}
|
||||
|
||||
}
|
||||
@@ -124,3 +124,18 @@ $localForage.iterate(function (value, key) {
|
||||
}
|
||||
}).then(function (data) {
|
||||
});
|
||||
|
||||
$localForage.bind($rootScope, 'key').then(function(data) {
|
||||
});
|
||||
|
||||
$localForage.bind($rootScope, {key: 'key'}).then(function(data) {
|
||||
});
|
||||
|
||||
$localForage.bind($rootScope, {key: 'key', defaultValue: 'defaultValue'}).then(function(data) {
|
||||
});
|
||||
|
||||
$localForage.bind($rootScope, {key: 'key', scopeKey: 'scopeKey'}).then(function(data) {
|
||||
});
|
||||
|
||||
$localForage.bind($rootScope, {key: 'key', name: 'name'}).then(function(data) {
|
||||
});
|
||||
|
||||
+5
-5
@@ -46,14 +46,14 @@ declare module angular.localForage {
|
||||
|
||||
iterate<T>(iteratorCallback:(value:string | number, key:string)=>T):angular.IPromise<T>;
|
||||
|
||||
bind($scope:ng.IScope, key:string):void;
|
||||
bind($scope:ng.IScope, key:string):angular.IPromise<any>;
|
||||
|
||||
bind($scope:ng.IScope, config:{
|
||||
key:string;
|
||||
defaultValue:any;
|
||||
scopeKey:string;
|
||||
name:string;
|
||||
}):void;
|
||||
defaultValue?:any;
|
||||
scopeKey?:string;
|
||||
name?:string;
|
||||
}):angular.IPromise<any>;
|
||||
|
||||
unbind($scope:ng.IScope, key:string, scopeKey?:string):void;
|
||||
|
||||
|
||||
+1
@@ -122,6 +122,7 @@ declare module angular.material {
|
||||
theme(theme: string): T;
|
||||
hideDelay(delay: number): T;
|
||||
position(position: string): T;
|
||||
parent(parent?: string|Element|JQuery): T; // default: root node
|
||||
}
|
||||
|
||||
interface ISimpleToastPreset extends IToastPreset<ISimpleToastPreset> {
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/// <reference path="angular-notifications.d.ts" />
|
||||
|
||||
var myapp = angular.module("myapp", ["notifications"]);
|
||||
|
||||
myapp.controller("MyController", ["$scope", "notifications",
|
||||
function ($scope:ng.IScope, notifications:angular.notifications.INotificationFactory) { // <-- Inject notifications
|
||||
|
||||
var userData = {'some': 'data', 'optional': true};
|
||||
notifications.info("Something happened", "here is the content of what happened", userData);
|
||||
|
||||
}
|
||||
]);
|
||||
@@ -0,0 +1,82 @@
|
||||
// Type definitions for angular-notifications
|
||||
// Project: https://github.com/DerekRies/angular-notifications
|
||||
// Definitions by: Tomasz Ducin <https://github.com/ducin/DefinitelyTyped>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
|
||||
declare module angular.notifications {
|
||||
|
||||
interface IAnimation {
|
||||
duration: number;
|
||||
enabled: boolean;
|
||||
}
|
||||
|
||||
interface ISettings {
|
||||
info: IAnimation;
|
||||
warning: IAnimation;
|
||||
error: IAnimation;
|
||||
success: IAnimation;
|
||||
progress: IAnimation;
|
||||
custom: IAnimation;
|
||||
details: boolean;
|
||||
localStorage: boolean;
|
||||
html5Mode: boolean;
|
||||
html5DefaultIcon: string;
|
||||
}
|
||||
|
||||
interface INotification {
|
||||
type: string;
|
||||
image: string;
|
||||
icon: string;
|
||||
title: string;
|
||||
content: string;
|
||||
timestamp: string;
|
||||
userData: string;
|
||||
}
|
||||
|
||||
interface INotificationFactory extends angular.IModule {
|
||||
|
||||
/* ========== SETTINGS RELATED METHODS =============*/
|
||||
|
||||
disableHtml5Mode(): void;
|
||||
disableType(notificationType: string): void;
|
||||
enableHtml5Mode(): void;
|
||||
enableType(notificationType: string): void;
|
||||
getSettings(): ISettings;
|
||||
toggleType(notificationType: string): void;
|
||||
toggleHtml5Mode(): void;
|
||||
requestHtml5ModePermissions(): boolean;
|
||||
|
||||
/* ============ QUERYING RELATED METHODS ============*/
|
||||
|
||||
getAll(): Array<INotification>;
|
||||
getQueue(): Array<INotification>;
|
||||
|
||||
/* ============== NOTIFICATION METHODS ==============*/
|
||||
|
||||
info(title: string): INotification;
|
||||
info(title: string, content: string): INotification;
|
||||
info(title: string, content: string, userData: any): INotification;
|
||||
error(title: string): INotification;
|
||||
error(title: string, content: string): INotification;
|
||||
error(title: string, content: string, userData: any): INotification;
|
||||
success(title: string): INotification;
|
||||
success(title: string, content: string): INotification;
|
||||
success(title: string, content: string, userData: any): INotification;
|
||||
warning(title: string): INotification;
|
||||
warning(title: string, content: string): INotification;
|
||||
warning(title: string, content: string, userData: any): INotification;
|
||||
awesomeNotify(type: string, icon: string, title: string, content: string, userData: any): INotification;
|
||||
notify(image: string, title: string, content: string, userData: any): INotification;
|
||||
makeNotification(type: string, image: string, icon: string, title: string, content: string, userData: any): INotification;
|
||||
|
||||
/* ============ PERSISTENCE METHODS ============ */
|
||||
|
||||
save(): void;
|
||||
restore(): void;
|
||||
clear(): void;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -374,7 +374,7 @@ function TestElementArrayFinder() {
|
||||
var b: boolean = elementArrayFinder.isPending();
|
||||
var locator: webdriver.Locator = elementArrayFinder.locator();
|
||||
|
||||
var findersArray: protractor.ElementFinder[] = elementArrayFinder.asElementFinders_();
|
||||
var findersArrayPromise: protractor.promise.Promise<protractor.ElementFinder[]> = elementArrayFinder.asElementFinders_();
|
||||
|
||||
var driverElementArray: webdriver.WebElement[] = elementArrayFinder.getWebElements();
|
||||
var elementFinder: protractor.ElementFinder = elementArrayFinder.get(42);
|
||||
|
||||
+1
-1
@@ -927,7 +927,7 @@ declare module protractor {
|
||||
* @return {Array.<ElementFinder>} Return a promise, which resolves to a list
|
||||
* of ElementFinders specified by the locator.
|
||||
*/
|
||||
asElementFinders_(): ElementFinder[];
|
||||
asElementFinders_(): webdriver.promise.Promise<ElementFinder[]>;
|
||||
|
||||
/**
|
||||
* Create a shallow copy of ElementArrayFinder.
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
/// <reference path='angular-signalr-hub.d.ts' />
|
||||
/// <reference path='../angularjs/angular.d.ts' />
|
||||
|
||||
angular
|
||||
.module('app', ['SignalR'])
|
||||
.factory('Employees', ngSignalrTest.EmployeesFactory);
|
||||
|
||||
module ngSignalrTest {
|
||||
export class EmployeesFactory {
|
||||
static $inject = ['$rootScope', 'Hub', '$timeout'];
|
||||
private hub: ngSignalr.Hub;
|
||||
public all: Array<Employee>;
|
||||
|
||||
constructor($rootScope: ng.IRootScopeService, Hub: ngSignalr.HubFactory, $timeout: ng.ITimeoutService) {
|
||||
// declaring the hub connection
|
||||
this.hub = new Hub('employee', {
|
||||
// client-side methods
|
||||
listeners: {
|
||||
'lockEmployee': (id: number) => {
|
||||
var employee = this.find(id);
|
||||
employee.Locked = true;
|
||||
$rootScope.$apply();
|
||||
},
|
||||
'unlockEmployee': (id: number) => {
|
||||
var employee = this.find(id);
|
||||
employee.Locked = false;
|
||||
$rootScope.$apply();
|
||||
}
|
||||
},
|
||||
|
||||
// server-side methods
|
||||
methods: ['lock', 'unlock'],
|
||||
|
||||
// query params sent on initial connection
|
||||
queryParams:{
|
||||
'token': 'exampletoken'
|
||||
},
|
||||
|
||||
// handle connection error
|
||||
errorHandler: (message: string) => {
|
||||
console.error(message);
|
||||
},
|
||||
|
||||
stateChanged: (state: SignalRStateChange) => {
|
||||
// your code here
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private find(id: number) {
|
||||
for (var i = 0; i < this.all.length; i++) {
|
||||
if (this.all[i].Id === id) return this.all[i];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public edit = (employee: Employee) => {
|
||||
employee.Edit = true;
|
||||
this.hub.invoke('lock', employee.Id);
|
||||
};
|
||||
|
||||
public done = (employee: Employee) => {
|
||||
employee.Edit = false;
|
||||
this.hub.invoke('unlock', employee.Id);
|
||||
}
|
||||
}
|
||||
|
||||
interface Employee {
|
||||
Id: number;
|
||||
Name: string;
|
||||
Email: string;
|
||||
Salary: number;
|
||||
Edit: boolean;
|
||||
Locked: boolean;
|
||||
}
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
// Type definitions for angular-signalr-hub v1.5.0
|
||||
// Project: https://github.com/JustMaier/angular-signalr-hub
|
||||
// Definitions by: Adam Santaniello <https://github.com/AdamSantaniello>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path='../signalr/signalr.d.ts' />
|
||||
|
||||
declare module ngSignalr {
|
||||
interface HubFactory {
|
||||
/**
|
||||
* Creates a new Hub connection
|
||||
*/
|
||||
new(hubName: string, options: HubOptions) : Hub
|
||||
}
|
||||
|
||||
class Hub {
|
||||
hubName: string;
|
||||
connection: SignalR;
|
||||
proxy: HubProxy;
|
||||
|
||||
on(event: string, fn: ((...args: any[]) => void)): void;
|
||||
invoke(method: string, ...args: any[]): JQueryDeferred<any>;
|
||||
disconnect(): void;
|
||||
connect(): JQueryPromise<any>;
|
||||
}
|
||||
|
||||
interface HubOptions {
|
||||
/**
|
||||
* Collection of client side callbacks
|
||||
*/
|
||||
listeners?: { [index: string] : (...args: any[]) => void };
|
||||
|
||||
/**
|
||||
* String array of server side methods which the client can call
|
||||
*/
|
||||
methods?: Array<string>;
|
||||
|
||||
/**
|
||||
* Sets the root path for the SignalR web service
|
||||
*/
|
||||
rootPath?: string;
|
||||
|
||||
/**
|
||||
* Object representing additional query params to be sent on connection
|
||||
*/
|
||||
queryParams?: { [index: string] : string };
|
||||
|
||||
/**
|
||||
* Function to handle hub connection errors
|
||||
*/
|
||||
errorHandler?: (error: string) => void;
|
||||
|
||||
/**
|
||||
* Enable/disable logging
|
||||
*/
|
||||
logging?: boolean;
|
||||
|
||||
/**
|
||||
* Use a shared global connection or create a new one just for this hub, defaults to true
|
||||
*/
|
||||
useSharedConnection?: boolean;
|
||||
|
||||
/**
|
||||
* Sets transport method (e.g 'longPolling' or ['webSockets', 'longPolling'] )
|
||||
*/
|
||||
transport?: any;
|
||||
|
||||
/**
|
||||
* Function to handle hub connection state changed event
|
||||
*/
|
||||
stateChanged?: (state: SignalRStateChange) => void;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
/// <reference path="angular-toasty.d.ts" />
|
||||
|
||||
interface AngularToastyTestControllerScope extends ng.IScope {
|
||||
button:string;
|
||||
options:toasty.IToastyConfig;
|
||||
runToasts(): void;
|
||||
runQuickToasts(): void;
|
||||
newToast(): void;
|
||||
clearToasts(): void;
|
||||
}
|
||||
|
||||
class AngularToastyTestController {
|
||||
|
||||
static $inject = ['$scope', 'toasty'];
|
||||
|
||||
constructor($scope:AngularToastyTestControllerScope, toasty:toasty.IToastyService) {
|
||||
|
||||
var options: toasty.IToastyConfig = {
|
||||
title: 'Toast It!',
|
||||
msg: 'Mmmm, tasties...',
|
||||
showClose: true,
|
||||
clickToClose: false,
|
||||
timeout: 5000,
|
||||
sound: true,
|
||||
html: false,
|
||||
shake: false,
|
||||
theme: 'bootstrap',
|
||||
onAdd: function () {
|
||||
console.log('Toasty ' + this.id + ' has been added!', this);
|
||||
},
|
||||
onRemove: function () {
|
||||
console.log('Toasty ' + this.id + ' has been removed!', this);
|
||||
},
|
||||
onClick: function () {
|
||||
console.log('Toasty ' + this.id + ' has been clicked!', this);
|
||||
}
|
||||
};
|
||||
|
||||
$scope.runToasts = function () {
|
||||
toasty(options);
|
||||
toasty.default(options);
|
||||
toasty.info(options);
|
||||
toasty.success(options);
|
||||
toasty.wait(options);
|
||||
toasty.error(options);
|
||||
toasty.warning(options);
|
||||
};
|
||||
|
||||
$scope.runQuickToasts = function () {
|
||||
var title = 'Toast it!'
|
||||
toasty(title);
|
||||
toasty.default(title);
|
||||
toasty.info(title);
|
||||
toasty.success(title);
|
||||
toasty.wait(title);
|
||||
toasty.error(title);
|
||||
toasty.warning(title);
|
||||
};
|
||||
|
||||
$scope.clearToasts = function () {
|
||||
toasty.clear();
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
angular
|
||||
.module('main', ['angular-toasty'])
|
||||
.config(['toastyConfigProvider', (toastyConfigProvider:toasty.IToastyConfigProvider) => {
|
||||
toastyConfigProvider.setConfig({
|
||||
title: 'global',
|
||||
limit: 10,
|
||||
sound: false,
|
||||
shake: true
|
||||
});
|
||||
}])
|
||||
.controller('MainController', AngularToastyTestController);
|
||||
Vendored
+251
@@ -0,0 +1,251 @@
|
||||
// Type definitions for Angular Toasty v1.0.2
|
||||
// Project: https://github.com/invertase/angular-toasty
|
||||
// Definitions by: Dominik Muench <https://github.com/muenchdo>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
|
||||
declare module toasty {
|
||||
|
||||
interface IToastyService {
|
||||
/**
|
||||
* Create a toast with the given options and type.
|
||||
* @param options
|
||||
* @param type
|
||||
*/
|
||||
(options: IToastyConfig, type?: string): void;
|
||||
|
||||
/**
|
||||
* Create a default "quick toast" with the given title.
|
||||
* @param title
|
||||
*/
|
||||
(title: string|number): void;
|
||||
|
||||
/**
|
||||
* Create a default toast with the given options.
|
||||
* @param options
|
||||
*/
|
||||
default(options: IToastyConfig): void;
|
||||
|
||||
/**
|
||||
* Create a default "quick toast" with the given title.
|
||||
* @param title
|
||||
*/
|
||||
default(title: string|number): void;
|
||||
|
||||
/**
|
||||
* Create an info toast with the given options.
|
||||
* @param options
|
||||
*/
|
||||
info(options: IToastyConfig): void;
|
||||
|
||||
/**
|
||||
* Create an info "quick toast" with the given title.
|
||||
* @param title
|
||||
*/
|
||||
info(title: string|number): void;
|
||||
|
||||
/**
|
||||
* Create a wait toast with the given options.
|
||||
* @param options
|
||||
*/
|
||||
wait(options: IToastyConfig): void;
|
||||
|
||||
/**
|
||||
* Create a wait "quick toast" with the given title.
|
||||
* @param title
|
||||
*/
|
||||
wait(title: string|number): void;
|
||||
|
||||
/**
|
||||
* Create a success toast with the given options.
|
||||
* @param options
|
||||
*/
|
||||
success(options: IToastyConfig): void;
|
||||
|
||||
/**
|
||||
* Create a success "quick toast" with the given title.
|
||||
* @param title
|
||||
*/
|
||||
success(title: string|number): void;
|
||||
|
||||
/**
|
||||
* Create an error toast with the given options.
|
||||
* @param options
|
||||
*/
|
||||
error(options: IToastyConfig): void;
|
||||
|
||||
/**
|
||||
* Create an error "quick toast" with the given title.
|
||||
* @param title
|
||||
*/
|
||||
error(title: string|number): void;
|
||||
|
||||
/**
|
||||
* Create a warning toast with the given options.
|
||||
* @param options
|
||||
*/
|
||||
warning(options: IToastyConfig): void;
|
||||
|
||||
/**
|
||||
* Create a warning "quick toast" with the given title.
|
||||
* @param title
|
||||
*/
|
||||
warning(title: string|number): void;
|
||||
|
||||
/**
|
||||
* Clear toast(s).
|
||||
* @param id Optional ID to clear a specific toast.
|
||||
*/
|
||||
clear(id?: number): void;
|
||||
|
||||
/**
|
||||
* Get the global config.
|
||||
*/
|
||||
getGlobalConfig(): IGlobalConfig;
|
||||
|
||||
}
|
||||
|
||||
interface IToastyConfig {
|
||||
/**
|
||||
* The toast's title.
|
||||
*/
|
||||
title: string;
|
||||
|
||||
/**
|
||||
* The toast's message.
|
||||
*/
|
||||
msg?: string;
|
||||
|
||||
/**
|
||||
* Whether to show the 'X' icon to close the toast.
|
||||
*/
|
||||
showClose?: boolean;
|
||||
|
||||
/**
|
||||
* Whether clicking the toast closes it.
|
||||
*/
|
||||
clickToClose?: boolean;
|
||||
|
||||
/**
|
||||
* How long (in milliseconds) the toast shows before it's removed. Set to false to disable.
|
||||
*/
|
||||
timeout?: number;
|
||||
|
||||
/**
|
||||
* Whether to play a sound when a toast is added.
|
||||
*/
|
||||
sound?: boolean;
|
||||
|
||||
/**
|
||||
* Whether HTML is allowed in toasts.
|
||||
*/
|
||||
html?: boolean;
|
||||
|
||||
/**
|
||||
* Whether to shake the toasts.
|
||||
*/
|
||||
shake?: boolean;
|
||||
|
||||
/**
|
||||
* What theme to use.
|
||||
* - 'default'
|
||||
* - 'material'
|
||||
* - 'bootstrap'
|
||||
*/
|
||||
theme?: string;
|
||||
|
||||
/**
|
||||
* The toast's type:
|
||||
* - 'default'
|
||||
* - 'info'
|
||||
* - 'success'
|
||||
* - 'wait'
|
||||
* - 'error'
|
||||
* - 'warning'
|
||||
*/
|
||||
type?: string;
|
||||
|
||||
/**
|
||||
* Add event handler.
|
||||
*/
|
||||
onAdd?: Function;
|
||||
|
||||
/**
|
||||
* Remove event handler.
|
||||
*/
|
||||
onRemove?: Function;
|
||||
|
||||
/**
|
||||
* Click event handler.
|
||||
*/
|
||||
onClick?: Function;
|
||||
}
|
||||
|
||||
interface IGlobalConfig {
|
||||
|
||||
/**
|
||||
* Maximum number of toasts to show at once.
|
||||
*/
|
||||
limit?: number;
|
||||
|
||||
/**
|
||||
* The toast's title.
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* The toast's message.
|
||||
*/
|
||||
msg?: string;
|
||||
|
||||
/**
|
||||
* Whether to show the 'X' icon to close the toast.
|
||||
*/
|
||||
showClose?: boolean;
|
||||
|
||||
/**
|
||||
* Whether clicking the toast closes it.
|
||||
*/
|
||||
clickToClose?: boolean;
|
||||
|
||||
/**
|
||||
* The window position where the toast pops up.
|
||||
*
|
||||
*/
|
||||
position?: string;
|
||||
|
||||
/**
|
||||
* How long (in miliseconds) the toast shows before it's removed. Set to false to disable.
|
||||
*/
|
||||
timeout?: number|boolean;
|
||||
|
||||
/**
|
||||
* Whether to play a sound when a toast is added.
|
||||
*/
|
||||
sound?: boolean;
|
||||
|
||||
/**
|
||||
* Whether HTML is allowed in toast.
|
||||
*/
|
||||
html?: boolean;
|
||||
|
||||
/**
|
||||
* Whether to shake the toast.
|
||||
*/
|
||||
shake?: boolean;
|
||||
|
||||
/**
|
||||
* What theme to use.
|
||||
* - 'default'
|
||||
* - 'material'
|
||||
* - 'bootstrap'
|
||||
*/
|
||||
theme?: string;
|
||||
}
|
||||
|
||||
interface IToastyConfigProvider {
|
||||
setConfig(override: IGlobalConfig): void;
|
||||
$get(): IGlobalConfig;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,14 @@
|
||||
|
||||
var app = angular.module('at', ['pascalprecht.translate']);
|
||||
|
||||
app.factory('customLoader', ($q:angular.IQService) => {
|
||||
return (options:any) => {
|
||||
var dfd:angular.IDeferred<string> = $q.defer();
|
||||
dfd.resolve('whatever you wanted to translate, I simply know nothing about the language with the key ' + options.key);
|
||||
return dfd.promise;
|
||||
}
|
||||
});
|
||||
|
||||
app.config(($translateProvider: angular.translate.ITranslateProvider) => {
|
||||
$translateProvider.translations('en', {
|
||||
TITLE: 'Hello',
|
||||
@@ -16,6 +24,8 @@ app.config(($translateProvider: angular.translate.ITranslateProvider) => {
|
||||
BUTTON_LANG_DE: 'deutsch'
|
||||
});
|
||||
$translateProvider.preferredLanguage('en');
|
||||
|
||||
$translateProvider.useLoader('customLoader');
|
||||
});
|
||||
|
||||
interface Scope extends ng.IScope {
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@ declare module "angular-translate" {
|
||||
declare module angular.translate {
|
||||
|
||||
interface ITranslationTable {
|
||||
[key: string]: string;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
interface ILanguageKeyAlias {
|
||||
@@ -93,7 +93,7 @@ declare module angular.translate {
|
||||
storageKey(key: string): void; // JeroMiya - the library should probably return ITranslateProvider but it doesn't here
|
||||
useUrlLoader(url: string): ITranslateProvider;
|
||||
useStaticFilesLoader(options: IStaticFilesLoaderOptions): ITranslateProvider;
|
||||
useLoader(loaderFactory: string, options: any): ITranslateProvider;
|
||||
useLoader(loaderFactory: string, options?: any): ITranslateProvider;
|
||||
useLocalStorage(): ITranslateProvider;
|
||||
useCookieStorage(): ITranslateProvider;
|
||||
useStorage(storageFactory: any): ITranslateProvider;
|
||||
|
||||
@@ -7,6 +7,7 @@ testApp.config((
|
||||
$buttonConfig: ng.ui.bootstrap.IButtonConfig,
|
||||
$datepickerConfig: ng.ui.bootstrap.IDatepickerConfig,
|
||||
$datepickerPopupConfig: ng.ui.bootstrap.IDatepickerPopupConfig,
|
||||
$modalProvider: ng.ui.bootstrap.IModalProvider,
|
||||
$paginationConfig: ng.ui.bootstrap.IPaginationConfig,
|
||||
$pagerConfig: ng.ui.bootstrap.IPagerConfig,
|
||||
$progressConfig: ng.ui.bootstrap.IProgressConfig,
|
||||
@@ -30,19 +31,25 @@ testApp.config((
|
||||
/**
|
||||
* $datepickerConfig tests
|
||||
*/
|
||||
$datepickerConfig.dayFormat = 'd';
|
||||
$datepickerConfig.dayHeaderFormat = 'E';
|
||||
$datepickerConfig.dayTitleFormat = 'dd-MM-yyyy';
|
||||
$datepickerConfig.datepickerMode = 'month';
|
||||
$datepickerConfig.formatDay = 'd';
|
||||
$datepickerConfig.formatDayHeader = 'E';
|
||||
$datepickerConfig.formatDayTitle = 'dd-MM-yyyy';
|
||||
$datepickerConfig.formatMonth = 'M';
|
||||
$datepickerConfig.formatMonthTitle = 'yy';
|
||||
$datepickerConfig.formatYear = 'y';
|
||||
$datepickerConfig.maxDate = '1389586124979';
|
||||
$datepickerConfig.maxMode = 'month';
|
||||
$datepickerConfig.minDate = '1389586124979';
|
||||
$datepickerConfig.monthFormat = 'M';
|
||||
$datepickerConfig.monthTitleFormat = 'yy';
|
||||
$datepickerConfig.minMode = 'month';
|
||||
$datepickerConfig.shortcutPropagation = true;
|
||||
$datepickerConfig.showWeeks = false;
|
||||
$datepickerConfig.startingDay = 1;
|
||||
$datepickerConfig.yearFormat = 'y';
|
||||
$datepickerConfig.yearRange = 10;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* $datepickerPopupConfig tests
|
||||
*/
|
||||
@@ -51,9 +58,18 @@ testApp.config((
|
||||
$datepickerPopupConfig.clearText = 'Reset Selection';
|
||||
$datepickerPopupConfig.closeOnDateSelection = false;
|
||||
$datepickerPopupConfig.closeText = 'Finished';
|
||||
$datepickerPopupConfig.dateFormat = 'dd-MM-yyyy';
|
||||
$datepickerPopupConfig.datepickerPopup = 'dd-MM-yyyy';
|
||||
$datepickerPopupConfig.datepickerPopupTemplateUrl = 'template.html';
|
||||
$datepickerPopupConfig.datepickerTemplateUrl = 'template.html';
|
||||
$datepickerPopupConfig.html5Types.date = 'MM-dd-yyyy';
|
||||
$datepickerPopupConfig.onOpenFocus = false;
|
||||
$datepickerPopupConfig.showButtonBar = false;
|
||||
$datepickerPopupConfig.toggleWeeksText = 'Show Weeks';
|
||||
|
||||
|
||||
/**
|
||||
* $modalProvider tests
|
||||
*/
|
||||
$modalProvider.options.animation = false;
|
||||
|
||||
|
||||
/**
|
||||
@@ -64,9 +80,13 @@ testApp.config((
|
||||
$paginationConfig.firstText = 'First Page';
|
||||
$paginationConfig.itemsPerPage = 25;
|
||||
$paginationConfig.lastText = 'Last Page';
|
||||
$paginationConfig.maxSize = 13;
|
||||
$paginationConfig.numPages = 13;
|
||||
$paginationConfig.nextText = 'Next Page';
|
||||
$paginationConfig.previousText = 'Previous Page';
|
||||
$paginationConfig.rotate = false;
|
||||
$paginationConfig.templateUrl = 'template.html';
|
||||
$paginationConfig.totalItems = 13;
|
||||
|
||||
|
||||
/**
|
||||
@@ -91,6 +111,7 @@ testApp.config((
|
||||
$ratingConfig.max = 10;
|
||||
$ratingConfig.stateOff = 'rating-state-off';
|
||||
$ratingConfig.stateOn = 'rating-state-on';
|
||||
$ratingConfig.titles = ['1', '2', '3', '4', '5'];
|
||||
|
||||
|
||||
/**
|
||||
@@ -102,6 +123,8 @@ testApp.config((
|
||||
$timepickerConfig.mousewheel = false;
|
||||
$timepickerConfig.readonlyInput = true;
|
||||
$timepickerConfig.showMeridian = false;
|
||||
$timepickerConfig.arrowkeys = false;
|
||||
$timepickerConfig.showSpinners = false;
|
||||
|
||||
/**
|
||||
* $tooltipProvider tests
|
||||
@@ -110,7 +133,9 @@ testApp.config((
|
||||
placement: 'bottom',
|
||||
animation: false,
|
||||
popupDelay: 1000,
|
||||
appendtoBody: true
|
||||
appendToBody: true,
|
||||
trigger: 'mouseenter hover',
|
||||
useContentExp: true
|
||||
});
|
||||
$tooltipProvider.setTriggers({
|
||||
'customOpenTrigger': 'customCloseTrigger'
|
||||
@@ -129,10 +154,14 @@ testApp.controller('TestCtrl', (
|
||||
* test the $modal service
|
||||
*/
|
||||
var modalInstance = $modal.open({
|
||||
animation: false,
|
||||
backdrop: 'static',
|
||||
backdropClass: 'modal-backdrop-test',
|
||||
bindToController: true,
|
||||
controller: 'ModalTestCtrl',
|
||||
controllerAs: 'vm',
|
||||
keyboard: true,
|
||||
openedClass: 'modal-open my-modal',
|
||||
resolve: {
|
||||
items: ()=> {
|
||||
return [1, 2, 3, 4, 5];
|
||||
@@ -141,7 +170,6 @@ testApp.controller('TestCtrl', (
|
||||
scope: $scope,
|
||||
template: "<div>i'm a template!</div>",
|
||||
templateUrl: '/templates/modal.html',
|
||||
backdropClass: 'modal-backdrop-test',
|
||||
windowClass: 'modal-test'
|
||||
});
|
||||
|
||||
@@ -149,12 +177,23 @@ testApp.controller('TestCtrl', (
|
||||
$log.log('modal opened');
|
||||
});
|
||||
|
||||
modalInstance.rendered.then(() => {
|
||||
$log.log('modal rendered');
|
||||
});
|
||||
|
||||
modalInstance.result.then((closeResult:any)=> {
|
||||
$log.log('modal closed', closeResult);
|
||||
}, (dismissResult:any)=> {
|
||||
$log.log('modal dismissed', dismissResult);
|
||||
});
|
||||
|
||||
$modal.open({
|
||||
backdrop: 'static'
|
||||
});
|
||||
|
||||
$modal.open({
|
||||
templateUrl: () => '/templates/modal.html'
|
||||
});
|
||||
|
||||
/**
|
||||
* test the $modalStack service
|
||||
|
||||
+157
-69
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Angular UI Bootstrap 0.11.0
|
||||
// Type definitions for Angular UI Bootstrap 0.13.3
|
||||
// Project: https://github.com/angular-ui/bootstrap
|
||||
// Definitions by: Brian Surowiec <https://github.com/xt0rted>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
@@ -36,42 +36,63 @@ declare module angular.ui.bootstrap {
|
||||
*
|
||||
* @default 'dd'
|
||||
*/
|
||||
dayFormat?: string;
|
||||
formatDay?: string;
|
||||
|
||||
/**
|
||||
* Format of month in year.
|
||||
*
|
||||
* @default 'MMM'
|
||||
*/
|
||||
monthFormat?: string;
|
||||
formatMonth?: string;
|
||||
|
||||
/**
|
||||
* Format of year in year range.
|
||||
*
|
||||
* @default 'yyyy'
|
||||
*/
|
||||
yearFormat?: string;
|
||||
formatYear?: string;
|
||||
|
||||
/**
|
||||
* Format of day in week header.
|
||||
*
|
||||
* @default 'EEE'
|
||||
*/
|
||||
dayHeaderFormat?: string;
|
||||
formatDayHeader?: string;
|
||||
|
||||
/**
|
||||
* Format of title when selecting day.
|
||||
*
|
||||
* @default 'MMM yyyy'
|
||||
*/
|
||||
dayTitleFormat?: string;
|
||||
formatDayTitle?: string;
|
||||
|
||||
/**
|
||||
* Format of title when selecting month.
|
||||
*
|
||||
* @default 'yyyy'
|
||||
*/
|
||||
monthTitleFormat?: string;
|
||||
formatMonthTitle?: string;
|
||||
|
||||
/**
|
||||
* Current mode of the datepicker (day|month|year). Can be used to initialize datepicker to specific mode.
|
||||
*
|
||||
* @default 'day'
|
||||
*/
|
||||
datepickerMode?: string;
|
||||
|
||||
/**
|
||||
* Set a lower limit for mode.
|
||||
*
|
||||
* @default 'day'
|
||||
*/
|
||||
minMode?: string;
|
||||
|
||||
/**
|
||||
* Set an upper limit for mode.
|
||||
*
|
||||
* @default 'year'
|
||||
*/
|
||||
maxMode?: string;
|
||||
|
||||
/**
|
||||
* Whether to display week numbers.
|
||||
@@ -107,6 +128,13 @@ declare module angular.ui.bootstrap {
|
||||
* @default null
|
||||
*/
|
||||
maxDate?: any;
|
||||
|
||||
/**
|
||||
* An option to disable or enable shortcut's event propagation
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
shortcutPropagation?: boolean;
|
||||
}
|
||||
|
||||
interface IDatepickerPopupConfig {
|
||||
@@ -115,7 +143,30 @@ declare module angular.ui.bootstrap {
|
||||
*
|
||||
* @default 'yyyy-MM-dd'
|
||||
*/
|
||||
dateFormat?: string;
|
||||
datepickerPopup?: string;
|
||||
|
||||
/**
|
||||
* Allows overriding of default template of the popup.
|
||||
*
|
||||
* @default 'template/datepicker/popup.html'
|
||||
*/
|
||||
datepickerPopupTemplateUrl?: string;
|
||||
|
||||
/**
|
||||
* Allows overriding of default template of the datepicker used in popup.
|
||||
*
|
||||
* @default 'template/datepicker/popup.html'
|
||||
*/
|
||||
datepickerTemplateUrl?: string;
|
||||
|
||||
/**
|
||||
* Allows overriding of the default format for html5 date inputs.
|
||||
*/
|
||||
html5Types?: {
|
||||
date?: string;
|
||||
'datetime-local'?: string;
|
||||
month?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* The text to display for the current day button.
|
||||
@@ -124,13 +175,6 @@ declare module angular.ui.bootstrap {
|
||||
*/
|
||||
currentText?: string;
|
||||
|
||||
/**
|
||||
* The text to display for the toggling week numbers button.
|
||||
*
|
||||
* @default 'Weeks'
|
||||
*/
|
||||
toggleWeeksText?: string;
|
||||
|
||||
/**
|
||||
* The text to display for the clear button.
|
||||
*
|
||||
@@ -165,9 +209,23 @@ declare module angular.ui.bootstrap {
|
||||
* @default true
|
||||
*/
|
||||
showButtonBar?: boolean;
|
||||
|
||||
/**
|
||||
* Whether to focus the datepicker popup upon opening.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
onOpenFocus?: boolean;
|
||||
}
|
||||
|
||||
|
||||
interface IModalProvider {
|
||||
/**
|
||||
* Default options all modals will use.
|
||||
*/
|
||||
options: IModalSettings;
|
||||
}
|
||||
|
||||
interface IModalService {
|
||||
/**
|
||||
* @param {IModalSettings} options
|
||||
@@ -178,47 +236,52 @@ declare module angular.ui.bootstrap {
|
||||
|
||||
interface IModalServiceInstance {
|
||||
/**
|
||||
* a method that can be used to close a modal, passing a result
|
||||
* A method that can be used to close a modal, passing a result. If `preventDefault` is called on the `modal.closing` event then the modal will remain open.
|
||||
*/
|
||||
close(result?: any): void;
|
||||
|
||||
/**
|
||||
* a method that can be used to dismiss a modal, passing a reason
|
||||
* A method that can be used to dismiss a modal, passing a reason. If `preventDefault` is called on the `modal.closing` event then the modal will remain open.
|
||||
*/
|
||||
dismiss(reason?: any): void;
|
||||
|
||||
/**
|
||||
* a promise that is resolved when a modal is closed and rejected when a modal is dismissed
|
||||
* A promise that is resolved when a modal is closed and rejected when a modal is dismissed.
|
||||
*/
|
||||
result: angular.IPromise<any>;
|
||||
|
||||
/**
|
||||
* a promise that is resolved when a modal gets opened after downloading content's template and resolving all variables
|
||||
* A promise that is resolved when a modal gets opened after downloading content's template and resolving all variables.
|
||||
*/
|
||||
opened: angular.IPromise<any>;
|
||||
|
||||
/**
|
||||
* A promise that is resolved when a modal is rendered.
|
||||
*/
|
||||
rendered: angular.IPromise<any>;
|
||||
}
|
||||
|
||||
interface IModalScope extends angular.IScope {
|
||||
/**
|
||||
* Those methods make it easy to close a modal window without a need to create a dedicated controller
|
||||
* Dismiss the dialog without assigning a value to the promise output. If `preventDefault` is called on the `modal.closing` event then the modal will remain open.
|
||||
*
|
||||
* @returns true if the modal was closed; otherwise false
|
||||
*/
|
||||
$dismiss(reason?: any): boolean;
|
||||
|
||||
/**
|
||||
* Dismiss the dialog without assigning a value to the promise output
|
||||
* Close the dialog resolving the promise to the given value. If `preventDefault` is called on the `modal.closing` event then the modal will remain open.
|
||||
*
|
||||
* @returns true if the modal was closed; otherwise false
|
||||
*/
|
||||
$dismiss(reason?: any): void;
|
||||
|
||||
/**
|
||||
* Close the dialog resolving the promise to the given value
|
||||
*/
|
||||
$close(result?: any): void;
|
||||
$close(result?: any): boolean;
|
||||
}
|
||||
|
||||
interface IModalSettings {
|
||||
/**
|
||||
* a path to a template representing modal's content
|
||||
*/
|
||||
templateUrl?: string;
|
||||
templateUrl?: string | (() => string);
|
||||
|
||||
/**
|
||||
* inline template representing the modal's content
|
||||
@@ -243,11 +306,25 @@ declare module angular.ui.bootstrap {
|
||||
*/
|
||||
controllerAs?: string;
|
||||
|
||||
/**
|
||||
* When used with controllerAs and set to true, it will bind the controller properties onto the $scope directly.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
bindToController?: boolean;
|
||||
|
||||
/**
|
||||
* members that will be resolved and passed to the controller as locals; it is equivalent of the `resolve` property for AngularJS routes
|
||||
*/
|
||||
resolve?: any;
|
||||
|
||||
/**
|
||||
* Set to false to disable animations on new modal/backdrop. Does not toggle animations for modals/backdrops that are already displayed.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
animation?: boolean;
|
||||
|
||||
/**
|
||||
* controls the presence of a backdrop
|
||||
* Allowed values:
|
||||
@@ -257,10 +334,12 @@ declare module angular.ui.bootstrap {
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
backdrop?: any;
|
||||
backdrop?: boolean | string;
|
||||
|
||||
/**
|
||||
* indicates whether the dialog should be closable by hitting the ESC key, defaults to true
|
||||
* indicates whether the dialog should be closable by hitting the ESC key
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
keyboard?: boolean;
|
||||
|
||||
@@ -275,7 +354,7 @@ declare module angular.ui.bootstrap {
|
||||
windowClass?: string;
|
||||
|
||||
/**
|
||||
* optional size of modal window. Allowed values: 'sm' (small) or 'lg' (large). Requires Bootstrap 3.1.0 or later
|
||||
* Optional suffix of modal window class. The value used is appended to the `modal-` class, i.e. a value of `sm` gives `modal-sm`.
|
||||
*/
|
||||
size?: string;
|
||||
|
||||
@@ -283,6 +362,13 @@ declare module angular.ui.bootstrap {
|
||||
* a path to a template overriding modal's window template
|
||||
*/
|
||||
windowTemplateUrl?: string;
|
||||
|
||||
/**
|
||||
* The class added to the body element when the modal is opened.
|
||||
*
|
||||
* @default 'model-open'
|
||||
*/
|
||||
openedClass?: string;
|
||||
}
|
||||
|
||||
interface IModalStackService {
|
||||
@@ -319,11 +405,6 @@ declare module angular.ui.bootstrap {
|
||||
|
||||
|
||||
interface IPaginationConfig {
|
||||
/**
|
||||
* Current page number. First page is 1.
|
||||
*/
|
||||
page?: number;
|
||||
|
||||
/**
|
||||
* Total number of items in all pages.
|
||||
*/
|
||||
@@ -357,13 +438,6 @@ declare module angular.ui.bootstrap {
|
||||
*/
|
||||
rotate?: boolean;
|
||||
|
||||
/**
|
||||
* An optional expression called when a page is selected having the page number as argument.
|
||||
*
|
||||
* @default null
|
||||
*/
|
||||
onSelectPage?(page: number): void;
|
||||
|
||||
/**
|
||||
* Whether to display Previous / Next buttons.
|
||||
*
|
||||
@@ -405,6 +479,13 @@ declare module angular.ui.bootstrap {
|
||||
* @default 'Last'
|
||||
*/
|
||||
lastText?: string;
|
||||
|
||||
/**
|
||||
* Override the template for the component with a custom provided template.
|
||||
*
|
||||
* @default 'template/pagination/pagination.html'
|
||||
*/
|
||||
templateUrl?: string;
|
||||
}
|
||||
|
||||
interface IPagerConfig {
|
||||
@@ -415,16 +496,6 @@ declare module angular.ui.bootstrap {
|
||||
*/
|
||||
align?: boolean;
|
||||
|
||||
/**
|
||||
* Current page number. First page is 1.
|
||||
*/
|
||||
page?: number;
|
||||
|
||||
/**
|
||||
* Total number of items in all pages.
|
||||
*/
|
||||
totalItems?: number;
|
||||
|
||||
/**
|
||||
* Maximum number of items per page. A value less than one indicates all items on one page.
|
||||
*
|
||||
@@ -432,20 +503,6 @@ declare module angular.ui.bootstrap {
|
||||
*/
|
||||
itemsPerPage?: number;
|
||||
|
||||
/**
|
||||
* An optional expression assigned the total number of pages to display.
|
||||
*
|
||||
* @default angular.noop
|
||||
*/
|
||||
numPages?: number;
|
||||
|
||||
/**
|
||||
* An optional expression called when a page is selected having the page number as argument.
|
||||
*
|
||||
* @default null
|
||||
*/
|
||||
onSelectPage?(page: number): void;
|
||||
|
||||
/**
|
||||
* Text for Previous button.
|
||||
*
|
||||
@@ -520,6 +577,13 @@ declare module angular.ui.bootstrap {
|
||||
* @default: null
|
||||
*/
|
||||
stateOff?: string;
|
||||
|
||||
/**
|
||||
* An array of strings defining titles for all icons.
|
||||
*
|
||||
* @default: ["one", "two", "three", "four", "five"]
|
||||
*/
|
||||
titles?: Array<string>;
|
||||
}
|
||||
|
||||
|
||||
@@ -565,6 +629,20 @@ declare module angular.ui.bootstrap {
|
||||
* @default true
|
||||
*/
|
||||
mousewheel?: boolean;
|
||||
|
||||
/**
|
||||
* Whether the user can use up/down arrowkeys inside the hours & minutes input to increase or decrease it's values.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
arrowkeys?: boolean;
|
||||
|
||||
/**
|
||||
* Shows spinner arrows above and below the inputs.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
showSpinners?: boolean;
|
||||
}
|
||||
|
||||
|
||||
@@ -577,7 +655,7 @@ declare module angular.ui.bootstrap {
|
||||
placement?: string;
|
||||
|
||||
/**
|
||||
* Should it fade in and out?
|
||||
* Should the modal fade in and out?
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
@@ -598,11 +676,18 @@ declare module angular.ui.bootstrap {
|
||||
appendToBody?: boolean;
|
||||
|
||||
/**
|
||||
* Determines the default open triggers for tooltips and popovers
|
||||
* What should trigger a show of the tooltip? Supports a space separated list of event names.
|
||||
*
|
||||
* @default 'mouseenter' for tooltip, 'click' for popover
|
||||
*/
|
||||
trigger?: string;
|
||||
|
||||
/**
|
||||
* Should an expression on the scope be used to load the content?
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
useContentExp?: boolean;
|
||||
}
|
||||
|
||||
interface ITooltipProvider {
|
||||
@@ -618,6 +703,9 @@ declare module angular.ui.bootstrap {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* WARNING: $transition is now deprecated. Use $animate from ngAnimate instead.
|
||||
*/
|
||||
interface ITransitionService {
|
||||
/**
|
||||
* The browser specific animation event name.
|
||||
|
||||
@@ -50,7 +50,7 @@ myApp.config((
|
||||
.state('state1.list', {
|
||||
url: "/list",
|
||||
templateUrl: "partials/state1.list.html",
|
||||
controller: function ($scope: MyAppScope) {
|
||||
controller: function ($scope: MyAppScope) {
|
||||
$scope.items = ["A", "List", "Of", "Items"];
|
||||
}
|
||||
})
|
||||
@@ -61,7 +61,7 @@ myApp.config((
|
||||
.state('state2.list', {
|
||||
url: "/list",
|
||||
templateUrl: "partials/state2.list.html",
|
||||
controller: function ($scope: MyAppScope) {
|
||||
controller: function ($scope: MyAppScope) {
|
||||
$scope.things = ["A", "Set", "Of", "Things"];
|
||||
}
|
||||
})
|
||||
@@ -70,7 +70,14 @@ myApp.config((
|
||||
url: "/list",
|
||||
templateUrl: "partials/state3.list.html",
|
||||
controller: function ($scope: MyAppScope) {
|
||||
$scope.things = ["A", "Set", "Of", "Things"];
|
||||
$scope.things = ["A", "Set", "Of", "Things"];
|
||||
}
|
||||
})
|
||||
.state('state4', {
|
||||
url: "/state4",
|
||||
templateUrl: function($stateParams: ng.ui.IStateParamsService){
|
||||
//Logic could go here based on $stateParams
|
||||
return "partials/state4.html";
|
||||
}
|
||||
})
|
||||
.state('index', {
|
||||
@@ -148,6 +155,10 @@ class UrlLocatorTestService implements IUrlLocatorTestService {
|
||||
this.$state.get("myState");
|
||||
this.$state.get();
|
||||
this.$state.reload();
|
||||
|
||||
// Accesses the currently resolved values for the current state
|
||||
// http://stackoverflow.com/questions/28026620/is-there-a-way-to-access-resolved-state-dependencies-besides-injecting-them-into/28027023#28027023
|
||||
var resolvedValues = this.$state.$current.locals.globals;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+21
-4
@@ -5,6 +5,12 @@
|
||||
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
|
||||
// Support for AMD require
|
||||
declare module 'angular-ui-router' {
|
||||
var _: string;
|
||||
export = _;
|
||||
}
|
||||
|
||||
declare module angular.ui {
|
||||
|
||||
interface IState {
|
||||
@@ -16,7 +22,7 @@ declare module angular.ui {
|
||||
/**
|
||||
* String URL path to template file OR Function, returns URL path string
|
||||
*/
|
||||
templateUrl?: string | {(): string};
|
||||
templateUrl?: string | {(params: IStateParamsService): string};
|
||||
/**
|
||||
* Function, returns HTML content string
|
||||
*/
|
||||
@@ -53,12 +59,12 @@ declare module angular.ui {
|
||||
abstract?: boolean;
|
||||
/**
|
||||
* Callback function for when a state is entered. Good way to trigger an action or dispatch an event, such as opening a dialog.
|
||||
* If minifying your scripts, make sure to explictly annotate this function, because it won't be automatically annotated by your build tools.
|
||||
* If minifying your scripts, make sure to explicitly annotate this function, because it won't be automatically annotated by your build tools.
|
||||
*/
|
||||
onEnter?: Function|(string|Function)[];
|
||||
/**
|
||||
* Callback functions for when a state is entered and exited. Good way to trigger an action or dispatch an event, such as opening a dialog.
|
||||
* If minifying your scripts, make sure to explictly annotate this function, because it won't be automatically annotated by your build tools.
|
||||
* If minifying your scripts, make sure to explicitly annotate this function, because it won't be automatically annotated by your build tools.
|
||||
*/
|
||||
onExit?: Function|(string|Function)[];
|
||||
/**
|
||||
@@ -66,7 +72,7 @@ declare module angular.ui {
|
||||
*/
|
||||
data?: any;
|
||||
/**
|
||||
* Boolean (default true). If false will not retrigger the same state just because a search/query parameter has changed. Useful for when you'd like to modify $location.search() without triggering a reload.
|
||||
* Boolean (default true). If false will not re-trigger the same state just because a search/query parameter has changed. Useful for when you'd like to modify $location.search() without triggering a reload.
|
||||
*/
|
||||
reloadOnSearch?: boolean;
|
||||
}
|
||||
@@ -168,6 +174,17 @@ declare module angular.ui {
|
||||
current: IState;
|
||||
params: IStateParamsService;
|
||||
reload(): void;
|
||||
|
||||
$current: IResolvedState;
|
||||
}
|
||||
|
||||
interface IResolvedState {
|
||||
locals: {
|
||||
/**
|
||||
* Currently resolved "resolve" values from the current state
|
||||
*/
|
||||
globals: { [key: string]: any; };
|
||||
};
|
||||
}
|
||||
|
||||
interface IStateParamsService {
|
||||
|
||||
+6043
File diff suppressed because it is too large
Load Diff
+6310
File diff suppressed because it is too large
Load Diff
+6564
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,7 @@
|
||||
/// <reference path="angular2.d.ts"/>
|
||||
/// <reference path="router.d.ts"/>
|
||||
|
||||
// Use Typescript 1.4 style imports
|
||||
import ng = require("angular2/angular2");
|
||||
import {Component, View, Directive, bootstrap, bind, NgFor, NgIf} from "angular2/angular2";
|
||||
|
||||
class Service {
|
||||
|
||||
@@ -15,15 +14,15 @@ class Cmp {
|
||||
static annotations: any[];
|
||||
}
|
||||
Cmp.annotations = [
|
||||
ng.Component({
|
||||
Component({
|
||||
selector: 'cmp',
|
||||
injectables: [Service, ng.bind(Service2).toValue(null)]
|
||||
injectables: [Service, bind(Service2).toValue(null)]
|
||||
}),
|
||||
ng.View({
|
||||
View({
|
||||
template: '{{greeting}} world!',
|
||||
directives: [ng.NgFor, ng.NgIf]
|
||||
directives: [NgFor, NgIf]
|
||||
}),
|
||||
ng.Directive({
|
||||
Directive({
|
||||
selector: '[tooltip]',
|
||||
properties: [
|
||||
'text: tooltip'
|
||||
@@ -35,4 +34,10 @@ Cmp.annotations = [
|
||||
})
|
||||
];
|
||||
|
||||
ng.bootstrap(Cmp);
|
||||
@Component({selector: 'cmp2'})
|
||||
@View({templateUrl: '/index.html'})
|
||||
class Cmp2 {
|
||||
|
||||
}
|
||||
|
||||
bootstrap(Cmp);
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
--experimentalDecorators --target ES5
|
||||
Vendored
+3269
-2842
File diff suppressed because it is too large
Load Diff
Vendored
+469
@@ -0,0 +1,469 @@
|
||||
// Type definitions for Angular v2.0.0-alpha.34
|
||||
// Project: http://angular.io/
|
||||
// Definitions by: angular team <https://github.com/angular/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// ***********************************************************
|
||||
// This file is generated by the Angular build process.
|
||||
// Please do not create manual edits or send pull requests
|
||||
// modifying this file.
|
||||
// ***********************************************************
|
||||
///<reference path="./angular2-2.0.0-alpha.34.d.ts"/>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @module
|
||||
* @description
|
||||
* Maps application URLs into application states, to support deep-linking and navigation.
|
||||
*/
|
||||
declare module ng {
|
||||
|
||||
/**
|
||||
* # Router
|
||||
* The router is responsible for mapping URLs to components.
|
||||
*
|
||||
* You can see the state of the router by inspecting the read-only field `router.navigating`.
|
||||
* This may be useful for showing a spinner, for instance.
|
||||
*
|
||||
* ## Concepts
|
||||
* Routers and component instances have a 1:1 correspondence.
|
||||
*
|
||||
* The router holds reference to a number of "outlets." An outlet is a placeholder that the
|
||||
* router dynamically fills in depending on the current URL.
|
||||
*
|
||||
* When the router navigates from a URL, it must first recognizes it and serialize it into an
|
||||
* `Instruction`.
|
||||
* The router uses the `RouteRegistry` to get an `Instruction`.
|
||||
*/
|
||||
class Router {
|
||||
|
||||
navigating: boolean;
|
||||
|
||||
lastNavigationAttempt: string;
|
||||
|
||||
registry: RouteRegistry;
|
||||
|
||||
parent: Router;
|
||||
|
||||
hostComponent: any;
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a child router. You probably don't need to use this unless you're writing a reusable
|
||||
* component.
|
||||
*/
|
||||
childRouter(hostComponent: any): Router;
|
||||
|
||||
|
||||
/**
|
||||
* Register an object to notify of route changes. You probably don't need to use this unless
|
||||
* you're writing a reusable component.
|
||||
*/
|
||||
registerOutlet(outlet: RouterOutlet): Promise<boolean>;
|
||||
|
||||
|
||||
/**
|
||||
* Dynamically update the routing configuration and trigger a navigation.
|
||||
*
|
||||
* # Usage
|
||||
*
|
||||
* ```
|
||||
* router.config([
|
||||
* { 'path': '/', 'component': IndexComp },
|
||||
* { 'path': '/user/:id', 'component': UserComp },
|
||||
* ]);
|
||||
* ```
|
||||
*/
|
||||
config(definitions: List<RouteDefinition>): Promise<any>;
|
||||
|
||||
|
||||
/**
|
||||
* Navigate to a URL. Returns a promise that resolves when navigation is complete.
|
||||
*
|
||||
* If the given URL begins with a `/`, router will navigate absolutely.
|
||||
* If the given URL does not begin with `/`, the router will navigate relative to this component.
|
||||
*/
|
||||
navigate(url: string, _skipLocationChange?: boolean): Promise<any>;
|
||||
|
||||
|
||||
/**
|
||||
* Updates this router and all descendant routers according to the given instruction
|
||||
*/
|
||||
commit(instruction: Instruction, _skipLocationChange?: boolean): Promise<any>;
|
||||
|
||||
|
||||
/**
|
||||
* Subscribe to URL updates from the router
|
||||
*/
|
||||
subscribe(onNext: (value: any) => void): void;
|
||||
|
||||
|
||||
/**
|
||||
* Removes the contents of this router's outlet and all descendant outlets
|
||||
*/
|
||||
deactivate(instruction: Instruction): Promise<any>;
|
||||
|
||||
|
||||
/**
|
||||
* Given a URL, returns an instruction representing the component graph
|
||||
*/
|
||||
recognize(url: string): Promise<Instruction>;
|
||||
|
||||
|
||||
/**
|
||||
* Navigates to either the last URL successfully navigated to, or the last URL requested if the
|
||||
* router has yet to successfully navigate.
|
||||
*/
|
||||
renavigate(): Promise<any>;
|
||||
|
||||
|
||||
/**
|
||||
* Generate a URL from a component name and optional map of parameters. The URL is relative to the
|
||||
* app's base href.
|
||||
*/
|
||||
generate(linkParams: List<any>): string;
|
||||
}
|
||||
|
||||
class RootRouter extends Router {
|
||||
|
||||
commit(instruction: Instruction, _skipLocationChange?: boolean): Promise<any>;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A router outlet is a placeholder that Angular dynamically fills based on the application's route.
|
||||
*
|
||||
* ## Use
|
||||
*
|
||||
* ```
|
||||
* <router-outlet></router-outlet>
|
||||
* ```
|
||||
*/
|
||||
class RouterOutlet {
|
||||
|
||||
childRouter: Router;
|
||||
|
||||
|
||||
/**
|
||||
* Given an instruction, update the contents of this outlet.
|
||||
*/
|
||||
commit(instruction: Instruction): Promise<any>;
|
||||
|
||||
|
||||
/**
|
||||
* Called by Router during recognition phase
|
||||
*/
|
||||
canDeactivate(nextInstruction: Instruction): Promise<boolean>;
|
||||
|
||||
|
||||
/**
|
||||
* Called by Router during recognition phase
|
||||
*/
|
||||
canReuse(nextInstruction: Instruction): Promise<boolean>;
|
||||
|
||||
deactivate(nextInstruction: Instruction): Promise<any>;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The RouterLink directive lets you link to specific parts of your app.
|
||||
*
|
||||
* Consider the following route configuration:
|
||||
*
|
||||
* ```
|
||||
* @RouteConfig([
|
||||
* { path: '/user', component: UserCmp, as: 'user' }
|
||||
* ]);
|
||||
* class MyComp {}
|
||||
* ```
|
||||
*
|
||||
* When linking to this `user` route, you can write:
|
||||
*
|
||||
* ```
|
||||
* <a [router-link]="['./user']">link to user component</a>
|
||||
* ```
|
||||
*
|
||||
* RouterLink expects the value to be an array of route names, followed by the params
|
||||
* for that level of routing. For instance `['/team', {teamId: 1}, 'user', {userId: 2}]`
|
||||
* means that we want to generate a link for the `team` route with params `{teamId: 1}`,
|
||||
* and with a child route `user` with params `{userId: 2}`.
|
||||
*
|
||||
* The first route name should be prepended with `/`, `./`, or `../`.
|
||||
* If the route begins with `/`, the router will look up the route from the root of the app.
|
||||
* If the route begins with `./`, the router will instead look in the current component's
|
||||
* children for the route. And if the route begins with `../`, the router will look at the
|
||||
* current component's parent.
|
||||
*/
|
||||
class RouterLink {
|
||||
|
||||
visibleHref: string;
|
||||
|
||||
routeParams: void;
|
||||
|
||||
onClick(): boolean;
|
||||
}
|
||||
|
||||
class RouteParams {
|
||||
|
||||
params: StringMap<string, string>;
|
||||
|
||||
get(param: string): string;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The RouteRegistry holds route configurations for each component in an Angular app.
|
||||
* It is responsible for creating Instructions from URLs, and generating URLs based on route and
|
||||
* parameters.
|
||||
*/
|
||||
class RouteRegistry {
|
||||
|
||||
|
||||
/**
|
||||
* Given a component and a configuration object, add the route to this registry
|
||||
*/
|
||||
config(parentComponent: any, config: RouteDefinition, isRootLevelRoute?: boolean): void;
|
||||
|
||||
|
||||
/**
|
||||
* Reads the annotations of a component and configures the registry based on them
|
||||
*/
|
||||
configFromComponent(component: any, isRootComponent?: boolean): void;
|
||||
|
||||
|
||||
/**
|
||||
* Given a URL and a parent component, return the most specific instruction for navigating
|
||||
* the application into the state specified by the url
|
||||
*/
|
||||
recognize(url: string, parentComponent: any): Promise<Instruction>;
|
||||
|
||||
|
||||
/**
|
||||
* Given a normalized list with component names and params like: `['user', {id: 3 }]`
|
||||
* generates a url with a leading slash relative to the provided `parentComponent`.
|
||||
*/
|
||||
generate(linkParams: List<any>, parentComponent: any): string;
|
||||
}
|
||||
|
||||
class LocationStrategy {
|
||||
|
||||
path(): string;
|
||||
|
||||
pushState(ctx: any, title: string, url: string): void;
|
||||
|
||||
forward(): void;
|
||||
|
||||
back(): void;
|
||||
|
||||
onPopState(fn: (_: any) => any): void;
|
||||
|
||||
getBaseHref(): string;
|
||||
}
|
||||
|
||||
class HashLocationStrategy extends LocationStrategy {
|
||||
|
||||
onPopState(fn: EventListener): void;
|
||||
|
||||
getBaseHref(): string;
|
||||
|
||||
path(): string;
|
||||
|
||||
pushState(state: any, title: string, url: string): void;
|
||||
|
||||
forward(): void;
|
||||
|
||||
back(): void;
|
||||
}
|
||||
|
||||
class HTML5LocationStrategy extends LocationStrategy {
|
||||
|
||||
onPopState(fn: EventListener): void;
|
||||
|
||||
getBaseHref(): string;
|
||||
|
||||
path(): string;
|
||||
|
||||
pushState(state: any, title: string, url: string): void;
|
||||
|
||||
forward(): void;
|
||||
|
||||
back(): void;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is the service that an application developer will directly interact with.
|
||||
*
|
||||
* Responsible for normalizing the URL against the application's base href.
|
||||
* A normalized URL is absolute from the URL host, includes the application's base href, and has no
|
||||
* trailing slash:
|
||||
* - `/my/app/user/123` is normalized
|
||||
* - `my/app/user/123` **is not** normalized
|
||||
* - `/my/app/user/123/` **is not** normalized
|
||||
*/
|
||||
class Location {
|
||||
|
||||
path(): string;
|
||||
|
||||
normalize(url: string): string;
|
||||
|
||||
normalizeAbsolutely(url: string): string;
|
||||
|
||||
go(url: string): void;
|
||||
|
||||
forward(): void;
|
||||
|
||||
back(): void;
|
||||
|
||||
subscribe(onNext: (value: any) => void, onThrow?: (exception: any) => void, onReturn?: () => void): void;
|
||||
}
|
||||
|
||||
const appBaseHrefToken : OpaqueToken ;
|
||||
|
||||
|
||||
/**
|
||||
* Responsible for performing each step of navigation.
|
||||
* "Steps" are conceptually similar to "middleware"
|
||||
*/
|
||||
class Pipeline {
|
||||
|
||||
steps: List<Function>;
|
||||
|
||||
process(instruction: Instruction): Promise<any>;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Defines route lifecycle method [onActivate]
|
||||
*/
|
||||
interface OnActivate {
|
||||
|
||||
onActivate(nextInstruction: Instruction, prevInstruction: Instruction): any;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Defines route lifecycle method [onDeactivate]
|
||||
*/
|
||||
interface OnDeactivate {
|
||||
|
||||
onDeactivate(nextInstruction: Instruction, prevInstruction: Instruction): any;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Defines route lifecycle method [onReuse]
|
||||
*/
|
||||
interface OnReuse {
|
||||
|
||||
onReuse(nextInstruction: Instruction, prevInstruction: Instruction): any;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Defines route lifecycle method [canDeactivate]
|
||||
*/
|
||||
interface CanDeactivate {
|
||||
|
||||
canDeactivate(nextInstruction: Instruction, prevInstruction: Instruction): any;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Defines route lifecycle method [canReuse]
|
||||
*/
|
||||
interface CanReuse {
|
||||
|
||||
canReuse(nextInstruction: Instruction, prevInstruction: Instruction): any;
|
||||
}
|
||||
|
||||
var CanActivate : (hook: (next: Instruction, prev: Instruction) => Promise<boolean>| boolean) => ClassDecorator ;
|
||||
|
||||
|
||||
/**
|
||||
* An `Instruction` represents the component hierarchy of the application based on a given route
|
||||
*/
|
||||
class Instruction {
|
||||
|
||||
accumulatedUrl: string;
|
||||
|
||||
reuse: boolean;
|
||||
|
||||
specificity: number;
|
||||
|
||||
component: any;
|
||||
|
||||
capturedUrl: string;
|
||||
|
||||
child: Instruction;
|
||||
|
||||
params(): StringMap<string, string>;
|
||||
}
|
||||
|
||||
const routerDirectives : List<any> ;
|
||||
|
||||
var routerInjectables : List<any> ;
|
||||
|
||||
class Route implements RouteDefinition {
|
||||
|
||||
path: string;
|
||||
|
||||
component: Type;
|
||||
|
||||
as: string;
|
||||
|
||||
loader: Function;
|
||||
|
||||
redirectTo: string;
|
||||
}
|
||||
|
||||
class Redirect implements RouteDefinition {
|
||||
|
||||
path: string;
|
||||
|
||||
redirectTo: string;
|
||||
|
||||
as: string;
|
||||
}
|
||||
|
||||
class AsyncRoute implements RouteDefinition {
|
||||
|
||||
path: string;
|
||||
|
||||
loader: Function;
|
||||
|
||||
as: string;
|
||||
}
|
||||
|
||||
interface RouteDefinition {
|
||||
|
||||
path: string;
|
||||
|
||||
component?: Type | ComponentDefinition;
|
||||
|
||||
loader?: Function;
|
||||
|
||||
redirectTo?: string;
|
||||
|
||||
as?: string;
|
||||
}
|
||||
|
||||
var RouteConfig : (configs: List<RouteDefinition>) => ClassDecorator ;
|
||||
|
||||
interface ComponentDefinition {
|
||||
|
||||
type: string;
|
||||
|
||||
loader?: Function;
|
||||
|
||||
component?: Type;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
declare module "angular2/router" {
|
||||
export = ng;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+191
-181
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Angular v2.0.0-alpha.31
|
||||
// Type definitions for Angular v2.0.0-alpha.34
|
||||
// Project: http://angular.io/
|
||||
// Definitions by: angular team <https://github.com/angular/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
@@ -18,120 +18,56 @@
|
||||
* Maps application URLs into application states, to support deep-linking and navigation.
|
||||
*/
|
||||
declare module ng {
|
||||
interface List<T> extends Array<T> {}
|
||||
interface Map<K,V> {}
|
||||
interface StringMap<K,V> extends Map<K,V> {}
|
||||
|
||||
export class Instruction {
|
||||
// "capturedUrl" is the part of the URL captured by this instruction
|
||||
// "accumulatedUrl" is the part of the URL captured by this instruction and all children
|
||||
accumulatedUrl: string;
|
||||
reuse: boolean;
|
||||
specificity: number;
|
||||
|
||||
private _params: StringMap<string, string>;
|
||||
|
||||
constructor (component: any, capturedUrl: string,
|
||||
_recognizer: PathRecognizer, child: Instruction);
|
||||
|
||||
params(): StringMap<string, string>;
|
||||
}
|
||||
|
||||
class TouchMap {
|
||||
map: StringMap<string, string>;
|
||||
keys: StringMap<string, boolean>;
|
||||
|
||||
constructor(map: StringMap<string, any>);
|
||||
|
||||
get(key: string): string;
|
||||
|
||||
getUnused(): StringMap<string, any>;
|
||||
}
|
||||
|
||||
export class Segment {
|
||||
name: string;
|
||||
regex: string;
|
||||
generate(params: TouchMap): string;
|
||||
}
|
||||
|
||||
export class PathRecognizer {
|
||||
segments: List<Segment>;
|
||||
regex: RegExp;
|
||||
specificity: number;
|
||||
terminal: boolean;
|
||||
path: string;
|
||||
handler: RouteHandler;
|
||||
|
||||
constructor(path: string, handler: RouteHandler);
|
||||
|
||||
parseParams(url: string): StringMap<string, string>;
|
||||
|
||||
generate(params: StringMap<string, any>): string;
|
||||
|
||||
resolveComponentType(): Promise<any>;
|
||||
}
|
||||
|
||||
|
||||
export interface RouteHandler {
|
||||
componentType: Function;
|
||||
resolveComponentType(): Promise<any>;
|
||||
}
|
||||
|
||||
/**
|
||||
* # Router
|
||||
* The router is responsible for mapping URLs to components.
|
||||
*
|
||||
*
|
||||
* You can see the state of the router by inspecting the read-only field `router.navigating`.
|
||||
* This may be useful for showing a spinner, for instance.
|
||||
*
|
||||
*
|
||||
* ## Concepts
|
||||
* Routers and component instances have a 1:1 correspondence.
|
||||
*
|
||||
*
|
||||
* The router holds reference to a number of "outlets." An outlet is a placeholder that the
|
||||
* router dynamically fills in depending on the current URL.
|
||||
*
|
||||
*
|
||||
* When the router navigates from a URL, it must first recognizes it and serialize it into an
|
||||
* `Instruction`.
|
||||
* The router uses the `RouteRegistry` to get an `Instruction`.
|
||||
*/
|
||||
class Router {
|
||||
|
||||
|
||||
navigating: boolean;
|
||||
|
||||
|
||||
lastNavigationAttempt: string;
|
||||
|
||||
|
||||
registry: RouteRegistry;
|
||||
|
||||
|
||||
parent: Router;
|
||||
|
||||
|
||||
hostComponent: any;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a child router. You probably don't need to use this unless you're writing a reusable
|
||||
* component.
|
||||
*/
|
||||
childRouter(hostComponent: any): Router;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Register an object to notify of route changes. You probably don't need to use this unless
|
||||
* you're writing a reusable component.
|
||||
*/
|
||||
registerOutlet(outlet: RouterOutlet): Promise<boolean>;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Dynamically update the routing configuration and trigger a navigation.
|
||||
*
|
||||
*
|
||||
* # Usage
|
||||
*
|
||||
* ```
|
||||
* router.config({ 'path': '/', 'component': IndexCmp});
|
||||
* ```
|
||||
*
|
||||
* Or:
|
||||
*
|
||||
*
|
||||
* ```
|
||||
* router.config([
|
||||
* { 'path': '/', 'component': IndexComp },
|
||||
@@ -139,48 +75,48 @@ declare module ng {
|
||||
* ]);
|
||||
* ```
|
||||
*/
|
||||
config(config: StringMap<string, any>| List<StringMap<string, any>>): Promise<any>;
|
||||
|
||||
config(definitions: List<RouteDefinition>): Promise<any>;
|
||||
|
||||
|
||||
/**
|
||||
* Navigate to a URL. Returns a promise that resolves when navigation is complete.
|
||||
*
|
||||
*
|
||||
* If the given URL begins with a `/`, router will navigate absolutely.
|
||||
* If the given URL does not begin with `/`, the router will navigate relative to this component.
|
||||
*/
|
||||
navigate(url: string): Promise<any>;
|
||||
|
||||
navigate(url: string, _skipLocationChange?: boolean): Promise<any>;
|
||||
|
||||
|
||||
/**
|
||||
* Updates this router and all descendant routers according to the given instruction
|
||||
*/
|
||||
commit(instruction: Instruction): Promise<any>;
|
||||
|
||||
commit(instruction: Instruction, _skipLocationChange?: boolean): Promise<any>;
|
||||
|
||||
|
||||
/**
|
||||
* Subscribe to URL updates from the router
|
||||
*/
|
||||
subscribe(onNext: any): void;
|
||||
|
||||
subscribe(onNext: (value: any) => void): void;
|
||||
|
||||
|
||||
/**
|
||||
* Removes the contents of this router's outlet and all descendant outlets
|
||||
*/
|
||||
deactivate(instruction: Instruction): Promise<any>;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Given a URL, returns an instruction representing the component graph
|
||||
*/
|
||||
recognize(url: string): Promise<Instruction>;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Navigates to either the last URL successfully navigated to, or the last URL requested if the
|
||||
* router has yet to successfully navigate.
|
||||
*/
|
||||
renavigate(): Promise<any>;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Generate a URL from a component name and optional map of parameters. The URL is relative to the
|
||||
@@ -188,71 +124,71 @@ declare module ng {
|
||||
*/
|
||||
generate(linkParams: List<any>): string;
|
||||
}
|
||||
|
||||
|
||||
class RootRouter extends Router {
|
||||
|
||||
commit(instruction: any): Promise<any>;
|
||||
|
||||
commit(instruction: Instruction, _skipLocationChange?: boolean): Promise<any>;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* A router outlet is a placeholder that Angular dynamically fills based on the application's route.
|
||||
*
|
||||
*
|
||||
* ## Use
|
||||
*
|
||||
*
|
||||
* ```
|
||||
* <router-outlet></router-outlet>
|
||||
* ```
|
||||
*/
|
||||
class RouterOutlet {
|
||||
|
||||
|
||||
childRouter: Router;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Given an instruction, update the contents of this outlet.
|
||||
*/
|
||||
commit(instruction: Instruction): Promise<any>;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Called by Router during recognition phase
|
||||
*/
|
||||
canDeactivate(nextInstruction: Instruction): Promise<boolean>;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Called by Router during recognition phase
|
||||
*/
|
||||
canReuse(nextInstruction: Instruction): Promise<boolean>;
|
||||
|
||||
|
||||
deactivate(nextInstruction: Instruction): Promise<any>;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The RouterLink directive lets you link to specific parts of your app.
|
||||
*
|
||||
*
|
||||
* Consider the following route configuration:
|
||||
*
|
||||
*
|
||||
* ```
|
||||
* @RouteConfig({
|
||||
* path: '/user', component: UserCmp, as: 'user'
|
||||
* });
|
||||
* @RouteConfig([
|
||||
* { path: '/user', component: UserCmp, as: 'user' }
|
||||
* ]);
|
||||
* class MyComp {}
|
||||
* ```
|
||||
*
|
||||
*
|
||||
* When linking to this `user` route, you can write:
|
||||
*
|
||||
*
|
||||
* ```
|
||||
* <a [router-link]="['./user']">link to user component</a>
|
||||
* ```
|
||||
*
|
||||
*
|
||||
* RouterLink expects the value to be an array of route names, followed by the params
|
||||
* for that level of routing. For instance `['/team', {teamId: 1}, 'user', {userId: 2}]`
|
||||
* means that we want to generate a link for the `team` route with params `{teamId: 1}`,
|
||||
* and with a child route `user` with params `{userId: 2}`.
|
||||
*
|
||||
*
|
||||
* The first route name should be prepended with `/`, `./`, or `../`.
|
||||
* If the route begins with `/`, the router will look up the route from the root of the app.
|
||||
* If the route begins with `./`, the router will instead look in the current component's
|
||||
@@ -260,21 +196,21 @@ declare module ng {
|
||||
* current component's parent.
|
||||
*/
|
||||
class RouterLink {
|
||||
|
||||
|
||||
visibleHref: string;
|
||||
|
||||
|
||||
routeParams: void;
|
||||
|
||||
|
||||
onClick(): boolean;
|
||||
}
|
||||
|
||||
|
||||
class RouteParams {
|
||||
|
||||
|
||||
params: StringMap<string, string>;
|
||||
|
||||
|
||||
get(param: string): string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The RouteRegistry holds route configurations for each component in an Angular app.
|
||||
@@ -282,26 +218,26 @@ declare module ng {
|
||||
* parameters.
|
||||
*/
|
||||
class RouteRegistry {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Given a component and a configuration object, add the route to this registry
|
||||
*/
|
||||
config(parentComponent: any, config: StringMap<string, any>): void;
|
||||
|
||||
config(parentComponent: any, config: RouteDefinition, isRootLevelRoute?: boolean): void;
|
||||
|
||||
|
||||
/**
|
||||
* Reads the annotations of a component and configures the registry based on them
|
||||
*/
|
||||
configFromComponent(component: any): void;
|
||||
|
||||
configFromComponent(component: any, isRootComponent?: boolean): void;
|
||||
|
||||
|
||||
/**
|
||||
* Given a URL and a parent component, return the most specific instruction for navigating
|
||||
* the application into the state specified by the url
|
||||
*/
|
||||
recognize(url: string, parentComponent: any): Promise<Instruction>;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Given a normalized list with component names and params like: `['user', {id: 3 }]`
|
||||
@@ -309,56 +245,56 @@ declare module ng {
|
||||
*/
|
||||
generate(linkParams: List<any>, parentComponent: any): string;
|
||||
}
|
||||
|
||||
|
||||
class LocationStrategy {
|
||||
|
||||
|
||||
path(): string;
|
||||
|
||||
|
||||
pushState(ctx: any, title: string, url: string): void;
|
||||
|
||||
|
||||
forward(): void;
|
||||
|
||||
|
||||
back(): void;
|
||||
|
||||
onPopState(fn: any): void;
|
||||
|
||||
|
||||
onPopState(fn: (_: any) => any): void;
|
||||
|
||||
getBaseHref(): string;
|
||||
}
|
||||
|
||||
|
||||
class HashLocationStrategy extends LocationStrategy {
|
||||
|
||||
|
||||
onPopState(fn: EventListener): void;
|
||||
|
||||
|
||||
getBaseHref(): string;
|
||||
|
||||
|
||||
path(): string;
|
||||
|
||||
|
||||
pushState(state: any, title: string, url: string): void;
|
||||
|
||||
|
||||
forward(): void;
|
||||
|
||||
|
||||
back(): void;
|
||||
}
|
||||
|
||||
|
||||
class HTML5LocationStrategy extends LocationStrategy {
|
||||
|
||||
|
||||
onPopState(fn: EventListener): void;
|
||||
|
||||
|
||||
getBaseHref(): string;
|
||||
|
||||
|
||||
path(): string;
|
||||
|
||||
|
||||
pushState(state: any, title: string, url: string): void;
|
||||
|
||||
|
||||
forward(): void;
|
||||
|
||||
|
||||
back(): void;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This is the service that an application developer will directly interact with.
|
||||
*
|
||||
*
|
||||
* Responsible for normalizing the URL against the application's base href.
|
||||
* A normalized URL is absolute from the URL host, includes the application's base href, and has no
|
||||
* trailing slash:
|
||||
@@ -367,93 +303,167 @@ declare module ng {
|
||||
* - `/my/app/user/123/` **is not** normalized
|
||||
*/
|
||||
class Location {
|
||||
|
||||
|
||||
path(): string;
|
||||
|
||||
|
||||
normalize(url: string): string;
|
||||
|
||||
|
||||
normalizeAbsolutely(url: string): string;
|
||||
|
||||
|
||||
go(url: string): void;
|
||||
|
||||
|
||||
forward(): void;
|
||||
|
||||
|
||||
back(): void;
|
||||
|
||||
subscribe(onNext: any, onThrow?: any, onReturn?: any): void;
|
||||
|
||||
subscribe(onNext: (value: any) => void, onThrow?: (exception: any) => void, onReturn?: () => void): void;
|
||||
}
|
||||
|
||||
var appBaseHrefToken : OpaqueToken ;
|
||||
|
||||
|
||||
const appBaseHrefToken : OpaqueToken ;
|
||||
|
||||
|
||||
/**
|
||||
* Responsible for performing each step of navigation.
|
||||
* "Steps" are conceptually similar to "middleware"
|
||||
*/
|
||||
class Pipeline {
|
||||
|
||||
|
||||
steps: List<Function>;
|
||||
|
||||
|
||||
process(instruction: Instruction): Promise<any>;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Defines route lifecycle method [onActivate]
|
||||
*/
|
||||
interface OnActivate {
|
||||
|
||||
|
||||
onActivate(nextInstruction: Instruction, prevInstruction: Instruction): any;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Defines route lifecycle method [onDeactivate]
|
||||
*/
|
||||
interface OnDeactivate {
|
||||
|
||||
|
||||
onDeactivate(nextInstruction: Instruction, prevInstruction: Instruction): any;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Defines route lifecycle method [onReuse]
|
||||
*/
|
||||
interface OnReuse {
|
||||
|
||||
|
||||
onReuse(nextInstruction: Instruction, prevInstruction: Instruction): any;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Defines route lifecycle method [canDeactivate]
|
||||
*/
|
||||
interface CanDeactivate {
|
||||
|
||||
|
||||
canDeactivate(nextInstruction: Instruction, prevInstruction: Instruction): any;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Defines route lifecycle method [canReuse]
|
||||
*/
|
||||
interface CanReuse {
|
||||
|
||||
|
||||
canReuse(nextInstruction: Instruction, prevInstruction: Instruction): any;
|
||||
}
|
||||
|
||||
var CanActivate : (hook: (next: Instruction, prev: Instruction) => Promise<boolean>| boolean) => ClassDecorator ;
|
||||
|
||||
|
||||
var CanActivate:any;
|
||||
|
||||
var routerDirectives : List<any> ;
|
||||
|
||||
/**
|
||||
* An `Instruction` represents the component hierarchy of the application based on a given route
|
||||
*/
|
||||
class Instruction {
|
||||
|
||||
accumulatedUrl: string;
|
||||
|
||||
reuse: boolean;
|
||||
|
||||
specificity: number;
|
||||
|
||||
component: any;
|
||||
|
||||
capturedUrl: string;
|
||||
|
||||
child: Instruction;
|
||||
|
||||
params(): StringMap<string, string>;
|
||||
}
|
||||
|
||||
const routerDirectives : List<any> ;
|
||||
|
||||
var routerInjectables : List<any> ;
|
||||
|
||||
var RouteConfig:any;
|
||||
|
||||
|
||||
class Route implements RouteDefinition {
|
||||
|
||||
path: string;
|
||||
|
||||
component: Type;
|
||||
|
||||
as: string;
|
||||
|
||||
loader: Function;
|
||||
|
||||
redirectTo: string;
|
||||
}
|
||||
|
||||
class Redirect implements RouteDefinition {
|
||||
|
||||
path: string;
|
||||
|
||||
redirectTo: string;
|
||||
|
||||
as: string;
|
||||
}
|
||||
|
||||
class AsyncRoute implements RouteDefinition {
|
||||
|
||||
path: string;
|
||||
|
||||
loader: Function;
|
||||
|
||||
as: string;
|
||||
}
|
||||
|
||||
interface RouteDefinition {
|
||||
|
||||
path: string;
|
||||
|
||||
component?: Type | ComponentDefinition;
|
||||
|
||||
loader?: Function;
|
||||
|
||||
redirectTo?: string;
|
||||
|
||||
as?: string;
|
||||
}
|
||||
|
||||
var RouteConfig : (configs: List<RouteDefinition>) => ClassDecorator ;
|
||||
|
||||
interface ComponentDefinition {
|
||||
|
||||
type: string;
|
||||
|
||||
loader?: Function;
|
||||
|
||||
component?: Type;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
declare module "angular2/router" {
|
||||
export = ng;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Executable → Regular
+56
-2
@@ -30,7 +30,7 @@ class AuthService {
|
||||
'$rootScope', '$injector', <any>function($rootScope: ng.IScope, $injector: ng.auto.IInjectorService) {
|
||||
var $http: ng.IHttpService; //initialized later because of circular dependency problem
|
||||
function retry(config: ng.IRequestConfig, deferred: ng.IDeferred<any>) {
|
||||
$http = $http || $injector.get('$http');
|
||||
$http = $http || $injector.get<ng.IHttpService>('$http');
|
||||
$http(config).then(function (response) {
|
||||
deferred.resolve(response);
|
||||
});
|
||||
@@ -242,6 +242,18 @@ foo.then((x) => {
|
||||
x.toFixed();
|
||||
});
|
||||
|
||||
// $q signature tests
|
||||
module TestQ {
|
||||
var $q: ng.IQService;
|
||||
var promise1: ng.IPromise<any>;
|
||||
var promise2: ng.IPromise<any>;
|
||||
|
||||
// $q.all
|
||||
$q.all([promise1, promise2]).then((results: any[]) => {});
|
||||
$q.all<number>([promise1, promise2]).then((results: number[]) => {});
|
||||
$q.all({a: promise1, b: promise2}).then((results: {[id: string]: any;}) => {});
|
||||
$q.all<{a: number; b: string;}>({a: promise1, b: promise2}).then((results: {a: number; b: string;}) => {});
|
||||
}
|
||||
|
||||
var httpFoo: ng.IHttpPromise<number>;
|
||||
httpFoo.then((x) => {
|
||||
@@ -260,6 +272,48 @@ httpFoo.success((data, status, headers, config) => {
|
||||
hs["content-type"].charAt(1);
|
||||
});
|
||||
|
||||
|
||||
// Promise signature tests
|
||||
module TestPromise {
|
||||
var result: any;
|
||||
var any: any;
|
||||
|
||||
interface TResult {
|
||||
a: number;
|
||||
b: string;
|
||||
c: boolean;
|
||||
}
|
||||
|
||||
var promise: angular.IPromise<TResult>;
|
||||
interface IPromiseSuccessCallback<T, U> {
|
||||
(promiseValue: T): angular.IHttpPromise<U>|angular.IPromise<U>|U|angular.IPromise<void>;
|
||||
}
|
||||
var successCallbackAnyFn: IPromiseSuccessCallback<TResult, any>;
|
||||
var successCallbackTResultFn: IPromiseSuccessCallback<TResult, TResult>;
|
||||
interface IPromiseErrorCallback<T> {
|
||||
(error: any): angular.IHttpPromise<T>|angular.IPromise<T>|T;
|
||||
}
|
||||
var errorCallbackAnyFn: IPromiseErrorCallback<any>;
|
||||
var errorCallbackTResultFn: IPromiseErrorCallback<TResult>;
|
||||
|
||||
// promise.then
|
||||
result = <angular.IPromise<any>>promise.then(successCallbackAnyFn);
|
||||
result = <angular.IPromise<any>>promise.then(successCallbackAnyFn, (any) => any);
|
||||
result = <angular.IPromise<any>>promise.then(successCallbackAnyFn, (any) => any, (any) => any);
|
||||
result = <angular.IPromise<TResult>>promise.then<TResult>(successCallbackTResultFn);
|
||||
result = <angular.IPromise<TResult>>promise.then<TResult>(successCallbackTResultFn, (any) => any);
|
||||
result = <angular.IPromise<TResult>>promise.then<TResult>(successCallbackTResultFn, (any) => any, (any) => any);
|
||||
|
||||
// promise.catch
|
||||
result = <angular.IPromise<any>>promise.catch(errorCallbackAnyFn);
|
||||
result = <angular.IPromise<TResult>>promise.catch<TResult>(errorCallbackTResultFn);
|
||||
|
||||
// promise.finally
|
||||
result = <angular.IPromise<any>>promise.finally(() => any);
|
||||
result = <angular.IPromise<TResult>>promise.finally<TResult>(() => any);
|
||||
}
|
||||
|
||||
|
||||
function test_angular_forEach() {
|
||||
var values: { [key: string]: string } = { name: 'misko', gender: 'male' };
|
||||
var log: string[] = [];
|
||||
@@ -285,7 +339,7 @@ test_IAttributes({
|
||||
$addClass: function (classVal){},
|
||||
$removeClass: function(classVal){},
|
||||
$set: function(key, value){},
|
||||
$observe: function(name, fn){
|
||||
$observe: function(name: any, fn: any){
|
||||
return fn;
|
||||
},
|
||||
$attr: {}
|
||||
|
||||
+22
-20
@@ -237,8 +237,8 @@ declare module angular {
|
||||
forEach(obj: any, iterator: (value: any, key: any) => any, context?: any): any;
|
||||
|
||||
fromJson(json: string): any;
|
||||
identity(arg?: any): any;
|
||||
injector(modules?: any[]): auto.IInjectorService;
|
||||
identity<T>(arg?: T): T;
|
||||
injector(modules?: any[], strictDi?: boolean): auto.IInjectorService;
|
||||
isArray(value: any): boolean;
|
||||
isDate(value: any): boolean;
|
||||
isDefined(value: any): boolean;
|
||||
@@ -421,9 +421,9 @@ declare module angular {
|
||||
|
||||
/**
|
||||
* Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with x- or data-) to its normalized, camelCase form.
|
||||
*
|
||||
*
|
||||
* Also there is special case for Moz prefix starting with upper case letter.
|
||||
*
|
||||
*
|
||||
* For further information check out the guide on @see https://docs.angularjs.org/guide/directive#matching-directives
|
||||
*/
|
||||
$normalize(name: string): void;
|
||||
@@ -453,7 +453,7 @@ declare module angular {
|
||||
* following compilation. The observer is then invoked whenever the
|
||||
* interpolated value changes.
|
||||
*/
|
||||
$observe(name: string, fn: (value?: any) => any): Function;
|
||||
$observe<T>(name: string, fn: (value?: T) => any): Function;
|
||||
|
||||
/**
|
||||
* A map of DOM element attribute names to the normalized name. This is needed
|
||||
@@ -617,12 +617,12 @@ declare module angular {
|
||||
$on(name: string, listener: (event: IAngularEvent, ...args: any[]) => any): Function;
|
||||
|
||||
$watch(watchExpression: string, listener?: string, objectEquality?: boolean): Function;
|
||||
$watch(watchExpression: string, listener?: (newValue: any, oldValue: any, scope: IScope) => any, objectEquality?: boolean): Function;
|
||||
$watch<T>(watchExpression: string, listener?: (newValue: T, oldValue: T, scope: IScope) => any, objectEquality?: boolean): Function;
|
||||
$watch(watchExpression: (scope: IScope) => any, listener?: string, objectEquality?: boolean): Function;
|
||||
$watch(watchExpression: (scope: IScope) => any, listener?: (newValue: any, oldValue: any, scope: IScope) => any, objectEquality?: boolean): Function;
|
||||
$watch<T>(watchExpression: (scope: IScope) => T, listener?: (newValue: T, oldValue: T, scope: IScope) => any, objectEquality?: boolean): Function;
|
||||
|
||||
$watchCollection(watchExpression: string, listener: (newValue: any, oldValue: any, scope: IScope) => any): Function;
|
||||
$watchCollection(watchExpression: (scope: IScope) => any, listener: (newValue: any, oldValue: any, scope: IScope) => any): Function;
|
||||
$watchCollection<T>(watchExpression: string, listener: (newValue: T, oldValue: T, scope: IScope) => any): Function;
|
||||
$watchCollection<T>(watchExpression: (scope: IScope) => T, listener: (newValue: T, oldValue: T, scope: IScope) => any): Function;
|
||||
|
||||
$watchGroup(watchExpressions: any[], listener: (newValue: any, oldValue: any, scope: IScope) => any): Function;
|
||||
$watchGroup(watchExpressions: { (scope: IScope): any }[], listener: (newValue: any, oldValue: any, scope: IScope) => any): Function;
|
||||
@@ -725,7 +725,7 @@ declare module angular {
|
||||
// see http://docs.angularjs.org/api/ng.$timeout
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface ITimeoutService {
|
||||
(func: Function, delay?: number, invokeApply?: boolean): IPromise<any>;
|
||||
<T>(func: (...args: any[]) => T, delay?: number, invokeApply?: boolean): IPromise<T>;
|
||||
cancel(promise: IPromise<any>): boolean;
|
||||
}
|
||||
|
||||
@@ -862,7 +862,7 @@ declare module angular {
|
||||
warn: ILogCall;
|
||||
}
|
||||
|
||||
interface ILogProvider {
|
||||
interface ILogProvider extends IServiceProvider {
|
||||
debugEnabled(): boolean;
|
||||
debugEnabled(enabled: boolean): ILogProvider;
|
||||
}
|
||||
@@ -996,8 +996,7 @@ declare module angular {
|
||||
* See http://docs.angularjs.org/api/ng/service/$q
|
||||
*/
|
||||
interface IQService {
|
||||
new (resolver: (resolve: IQResolveReject<any>) => any): IPromise<any>;
|
||||
new (resolver: (resolve: IQResolveReject<any>, reject: IQResolveReject<any>) => any): IPromise<any>;
|
||||
new <T>(resolver: (resolve: IQResolveReject<T>) => any): IPromise<T>;
|
||||
new <T>(resolver: (resolve: IQResolveReject<T>, reject: IQResolveReject<any>) => any): IPromise<T>;
|
||||
|
||||
/**
|
||||
@@ -1007,7 +1006,7 @@ declare module angular {
|
||||
*
|
||||
* @param promises An array of promises.
|
||||
*/
|
||||
all(promises: IPromise<any>[]): IPromise<any[]>;
|
||||
all<T>(promises: IPromise<any>[]): IPromise<T[]>;
|
||||
/**
|
||||
* Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
|
||||
*
|
||||
@@ -1016,6 +1015,7 @@ declare module angular {
|
||||
* @param promises A hash of promises.
|
||||
*/
|
||||
all(promises: { [id: string]: IPromise<any>; }): IPromise<{ [id: string]: any; }>;
|
||||
all<T extends {}>(promises: { [id: string]: IPromise<any>; }): IPromise<T>;
|
||||
/**
|
||||
* Creates a Deferred object which represents a task which will finish in the future.
|
||||
*/
|
||||
@@ -1156,7 +1156,7 @@ declare module angular {
|
||||
*
|
||||
* @param key the key of the data to be retrieved
|
||||
*/
|
||||
get(key: string): any;
|
||||
get<T>(key: string): T;
|
||||
|
||||
/**
|
||||
* Removes an entry from the Cache object.
|
||||
@@ -1227,8 +1227,8 @@ declare module angular {
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IControllerService {
|
||||
// Although the documentation doesn't state this, locals are optional
|
||||
(controllerConstructor: Function, locals?: any): any;
|
||||
(controllerName: string, locals?: any): any;
|
||||
(controllerConstructor: Function, locals?: any, bindToController?: any): any;
|
||||
(controllerName: string, locals?: any, bindToController?: any): any;
|
||||
}
|
||||
|
||||
interface IControllerProvider extends IServiceProvider {
|
||||
@@ -1540,6 +1540,8 @@ declare module angular {
|
||||
interface ISCEDelegateProvider extends IServiceProvider {
|
||||
resourceUrlBlacklist(blacklist: any[]): void;
|
||||
resourceUrlWhitelist(whitelist: any[]): void;
|
||||
resourceUrlBlacklist(): any[];
|
||||
resourceUrlWhitelist(): any[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1585,7 +1587,7 @@ declare module angular {
|
||||
scope: IScope,
|
||||
instanceElement: IAugmentedJQuery,
|
||||
instanceAttributes: IAttributes,
|
||||
controller: any,
|
||||
controller: {},
|
||||
transclude: ITranscludeFunction
|
||||
): void;
|
||||
}
|
||||
@@ -1680,9 +1682,9 @@ declare module angular {
|
||||
interface IInjectorService {
|
||||
annotate(fn: Function): string[];
|
||||
annotate(inlineAnnotatedFunction: any[]): string[];
|
||||
get(name: string): any;
|
||||
get<T>(name: string): T;
|
||||
has(name: string): boolean;
|
||||
instantiate(typeConstructor: Function, locals?: any): any;
|
||||
instantiate<T>(typeConstructor: Function, locals?: any): T;
|
||||
invoke(inlineAnnotatedFunction: any[]): any;
|
||||
invoke(func: Function, context?: any, locals?: any): any;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/// <reference path="angulartics.d.ts" />
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
|
||||
module Analytics {
|
||||
angular.module("angulartics.app", ["angulartics"])
|
||||
.config(["$analyticsProvider", ($analyticsProvider: Angulartics.IAnalyticsServiceProvider) => {
|
||||
angulartics.waitForVendorApi("location", 1000, (message: string) => {
|
||||
console.log(message);
|
||||
});
|
||||
|
||||
$analyticsProvider.virtualPageviews(false);
|
||||
$analyticsProvider.firstPageview(false);
|
||||
$analyticsProvider.withAutoBase(true);
|
||||
$analyticsProvider.developerMode(true);
|
||||
|
||||
$analyticsProvider.registerEventTrack((action: string, properties?: any) => {
|
||||
console.log(action);
|
||||
});
|
||||
|
||||
$analyticsProvider.registerPageTrack((path: string, locationObj: ng.ILocationService) => {
|
||||
console.log("viewed " + path);
|
||||
});
|
||||
}]);
|
||||
}
|
||||
|
||||
Vendored
+39
@@ -0,0 +1,39 @@
|
||||
// Type definitions for Angulartics v0.19.2
|
||||
// Project: http://luisfarzati.github.io/angulartics/
|
||||
// Definitions by: Steven Fan <https://github.com/stevenfan>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
|
||||
interface Angulartics {
|
||||
waitForVendorApi(objectName: string, delay: number, containsField?: any, registerFn?: any, onTimeout?: boolean): void;
|
||||
}
|
||||
|
||||
declare module Angulartics {
|
||||
|
||||
interface IAnalyticsService {
|
||||
eventTrack(eventName: string, properties?: any): any;
|
||||
pageTrack(path: string, location?: ng.ILocationService): any;
|
||||
setAlias(alias: string): any;
|
||||
setUsername(username: string): any;
|
||||
setUserProperties(properties: any): any;
|
||||
setSuperProperties(properties: any): any;
|
||||
}
|
||||
|
||||
interface IAnalyticsServiceProvider extends angular.IServiceProvider {
|
||||
virtualPageviews(value: boolean): void;
|
||||
firstPageview(value: boolean): void;
|
||||
withBase(value: boolean): void;
|
||||
withAutoBase(value: boolean): void;
|
||||
developerMode(value: boolean): void;
|
||||
|
||||
registerPageTrack(callback: (path: string, location?: ng.ILocationService) => any): void;
|
||||
registerEventTrack(callback: (eventName: string, properties?: any) => any): void;
|
||||
registerSetAlias(callback: (alias: string) => any): void
|
||||
registerSetUsername(callback: (username: string) => any): void
|
||||
registerSetUserProperties(callback: (userProperties: any) => any): void
|
||||
registerSetSuperProperties(callback: (superProperties: any) => any): void
|
||||
}
|
||||
}
|
||||
|
||||
declare var angulartics:Angulartics;
|
||||
Vendored
+1
@@ -27,6 +27,7 @@ interface Auth0LockOptions {
|
||||
forceJSONP?: boolean;
|
||||
gravatar?: boolean;
|
||||
integratedWindowsLogin?: boolean;
|
||||
icon?: string;
|
||||
loginAfterSignup?: boolean;
|
||||
popup?: boolean;
|
||||
popupOptions?: Auth0LockPopupOptions;
|
||||
|
||||
Vendored
+1
-1
@@ -33,7 +33,7 @@ interface Auth0Static {
|
||||
interface Auth0ClientOptions {
|
||||
clientID: string;
|
||||
callbackURL: string;
|
||||
callbackOnLoactionHash?: boolean;
|
||||
callbackOnLocationHash?: boolean;
|
||||
domain: string;
|
||||
forceJSONP?: boolean;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/// <reference path="autobahn.d.ts"/>
|
||||
|
||||
import autobahn = require("autobahn");
|
||||
|
||||
class MyClass {
|
||||
add2Count: number = 0;
|
||||
session: autobahn.Session;
|
||||
@@ -44,4 +46,4 @@ function test_client() {
|
||||
};
|
||||
|
||||
connection.open();
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+153
-148
@@ -1,195 +1,200 @@
|
||||
// Type definitions for AutobahnJS v0.9.6
|
||||
// Type definitions for AutobahnJS v0.9.6
|
||||
// Project: http://autobahn.ws/js/
|
||||
// Definitions by: Elad Zelingher <https://github.com/darkl/>
|
||||
// Definitions by: Elad Zelingher <https://github.com/darkl/>, Andy Hawkins <https://github.com/a904guy/,http://a904guy.com/,http://www.bmbsqd.com>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../when/when.d.ts" />
|
||||
|
||||
declare module autobahn {
|
||||
|
||||
export class Session {
|
||||
id: number;
|
||||
realm: string;
|
||||
isOpen: boolean;
|
||||
features: any;
|
||||
caller_disclose_me: boolean;
|
||||
publisher_disclose_me: boolean;
|
||||
subscriptions: ISubscription[][];
|
||||
registrations: IRegistration[];
|
||||
export class Session {
|
||||
id: number;
|
||||
realm: string;
|
||||
isOpen: boolean;
|
||||
features: any;
|
||||
caller_disclose_me: boolean;
|
||||
publisher_disclose_me: boolean;
|
||||
subscriptions: ISubscription[][];
|
||||
registrations: IRegistration[];
|
||||
|
||||
constructor(transport: ITransport, defer: DeferFactory, challenge: OnChallengeHandler);
|
||||
constructor(transport: ITransport, defer: DeferFactory, challenge: OnChallengeHandler);
|
||||
|
||||
join(realm: string, authmethods: string[], authid: string): void;
|
||||
join(realm: string, authmethods: string[], authid: string): void;
|
||||
|
||||
leave(reason: string, message: string): void;
|
||||
leave(reason: string, message: string): void;
|
||||
|
||||
call<TResult>(procedure: string, args?: any[], kwargs?: any, options?: ICallOptions): When.Promise<TResult>;
|
||||
call<TResult>(procedure: string, args?: any[], kwargs?: any, options?: ICallOptions): When.Promise<TResult>;
|
||||
|
||||
publish(topic: string, args?: any[], kwargs?: any, options?: IPublishOptions): When.Promise<IPublication>;
|
||||
publish(topic: string, args?: any[], kwargs?: any, options?: IPublishOptions): When.Promise<IPublication>;
|
||||
|
||||
subscribe(topic: string, handler: SubscribeHandler, options?: ISubscribeOptions): When.Promise<ISubscription>;
|
||||
subscribe(topic: string, handler: SubscribeHandler, options?: ISubscribeOptions): When.Promise<ISubscription>;
|
||||
|
||||
register(procedure: string, endpoint: RegisterEndpoint, options?: IRegisterOptions): When.Promise<IRegistration>;
|
||||
register(procedure: string, endpoint: RegisterEndpoint, options?: IRegisterOptions): When.Promise<IRegistration>;
|
||||
|
||||
unsubscribe(subscription: ISubscription): When.Promise<any>;
|
||||
unsubscribe(subscription: ISubscription): When.Promise<any>;
|
||||
|
||||
unregister(registration: IRegistration): When.Promise<any>;
|
||||
unregister(registration: IRegistration): When.Promise<any>;
|
||||
|
||||
prefix(prefix: string, uri: string): void;
|
||||
prefix(prefix: string, uri: string): void;
|
||||
|
||||
resolve(curie: string): string;
|
||||
resolve(curie: string): string;
|
||||
|
||||
onjoin: (roleFeatures: any) => void;
|
||||
onleave: (reason: string, details: any) => void;
|
||||
}
|
||||
onjoin: (roleFeatures: any) => void;
|
||||
onleave: (reason: string, details: any) => void;
|
||||
}
|
||||
|
||||
interface IInvocation {
|
||||
caller?: number;
|
||||
progress?: boolean;
|
||||
procedure: string;
|
||||
}
|
||||
interface IInvocation {
|
||||
caller?: number;
|
||||
progress?: boolean;
|
||||
procedure: string;
|
||||
}
|
||||
|
||||
interface IEvent {
|
||||
publication: number;
|
||||
publisher?: number;
|
||||
topic: string;
|
||||
}
|
||||
interface IEvent {
|
||||
publication: number;
|
||||
publisher?: number;
|
||||
topic: string;
|
||||
}
|
||||
|
||||
interface IResult {
|
||||
args: any[];
|
||||
kwargs: any;
|
||||
}
|
||||
interface IResult {
|
||||
args: any[];
|
||||
kwargs: any;
|
||||
}
|
||||
|
||||
interface IError {
|
||||
error: string;
|
||||
args: any[];
|
||||
kwargs: any;
|
||||
}
|
||||
interface IError {
|
||||
error: string;
|
||||
args: any[];
|
||||
kwargs: any;
|
||||
}
|
||||
|
||||
type SubscribeHandler = (args?: any[], kwargs?: any, details?: IEvent) => void;
|
||||
type SubscribeHandler = (args?: any[], kwargs?: any, details?: IEvent) => void;
|
||||
|
||||
interface ISubscription {
|
||||
topic: string;
|
||||
handler: SubscribeHandler;
|
||||
options: ISubscribeOptions;
|
||||
session: Session;
|
||||
id: number;
|
||||
active: boolean;
|
||||
unsubscribe(): When.Promise<any>;
|
||||
}
|
||||
interface ISubscription {
|
||||
topic: string;
|
||||
handler: SubscribeHandler;
|
||||
options: ISubscribeOptions;
|
||||
session: Session;
|
||||
id: number;
|
||||
active: boolean;
|
||||
unsubscribe(): When.Promise<any>;
|
||||
}
|
||||
|
||||
type RegisterEndpoint = (args?: any[], kwargs?: any, details?: IInvocation) => void;
|
||||
type RegisterEndpoint = (args?: any[], kwargs?: any, details?: IInvocation) => void;
|
||||
|
||||
interface IRegistration {
|
||||
procedure: string;
|
||||
endpoint: RegisterEndpoint;
|
||||
options: IRegisterOptions;
|
||||
session: Session;
|
||||
id: number;
|
||||
active: boolean;
|
||||
unregister(): When.Promise<any>;
|
||||
}
|
||||
interface IRegistration {
|
||||
procedure: string;
|
||||
endpoint: RegisterEndpoint;
|
||||
options: IRegisterOptions;
|
||||
session: Session;
|
||||
id: number;
|
||||
active: boolean;
|
||||
unregister(): When.Promise<any>;
|
||||
}
|
||||
|
||||
interface IPublication {
|
||||
id: number;
|
||||
}
|
||||
interface IPublication {
|
||||
id: number;
|
||||
}
|
||||
|
||||
interface ICallOptions {
|
||||
timeout?: number;
|
||||
receive_progress?: boolean;
|
||||
disclose_me?: boolean;
|
||||
}
|
||||
interface ICallOptions {
|
||||
timeout?: number;
|
||||
receive_progress?: boolean;
|
||||
disclose_me?: boolean;
|
||||
}
|
||||
|
||||
interface IPublishOptions {
|
||||
exclude?: number[];
|
||||
eligible?: number[];
|
||||
disclose_me? : Boolean;
|
||||
}
|
||||
interface IPublishOptions {
|
||||
exclude?: number[];
|
||||
eligible?: number[];
|
||||
disclose_me? : Boolean;
|
||||
}
|
||||
|
||||
interface ISubscribeOptions {
|
||||
match? : string;
|
||||
}
|
||||
interface ISubscribeOptions {
|
||||
match? : string;
|
||||
}
|
||||
|
||||
interface IRegisterOptions {
|
||||
disclose_caller?: boolean;
|
||||
}
|
||||
interface IRegisterOptions {
|
||||
disclose_caller?: boolean;
|
||||
}
|
||||
|
||||
export class Connection {
|
||||
constructor(options?: IConnectionOptions);
|
||||
export class Connection {
|
||||
constructor(options?: IConnectionOptions);
|
||||
|
||||
open(): void;
|
||||
open(): void;
|
||||
|
||||
close(reason: string, message: string): void;
|
||||
close(reason: string, message: string): void;
|
||||
|
||||
onopen: (session: Session, details: any) => void;
|
||||
onclose: (reason: string, details: any) => boolean;
|
||||
}
|
||||
onopen: (session: Session, details: any) => void;
|
||||
onclose: (reason: string, details: any) => boolean;
|
||||
}
|
||||
|
||||
interface ITransportDefinition {
|
||||
url?: string;
|
||||
protocols?: string[];
|
||||
type: string;
|
||||
}
|
||||
interface ITransportDefinition {
|
||||
url?: string;
|
||||
protocols?: string[];
|
||||
type: string;
|
||||
}
|
||||
|
||||
type DeferFactory = () => any;
|
||||
type DeferFactory = () => any;
|
||||
|
||||
type OnChallengeHandler = (session: Session, method: string, extra: any) => When.Promise<string>;
|
||||
type OnChallengeHandler = (session: Session, method: string, extra: any) => When.Promise<string>;
|
||||
|
||||
interface IConnectionOptions {
|
||||
use_es6_promises?: boolean;
|
||||
// use explicit deferred factory, e.g. jQuery.Deferred or Q.defer
|
||||
use_deferred?: DeferFactory;
|
||||
transports?: ITransportDefinition[];
|
||||
retry_if_unreachable?: boolean;
|
||||
max_retries?: number;
|
||||
initial_retry_delay?: number;
|
||||
max_retry_delay?: number;
|
||||
retry_delay_growth?: number;
|
||||
retry_delay_jitter?: number;
|
||||
url?: string;
|
||||
protocols?: string[];
|
||||
onchallenge?: (session: Session, method: string, extra: any) => OnChallengeHandler;
|
||||
realm?: string;
|
||||
authmethods?: string[];
|
||||
authid?: string;
|
||||
}
|
||||
interface IConnectionOptions {
|
||||
use_es6_promises?: boolean;
|
||||
// use explicit deferred factory, e.g. jQuery.Deferred or Q.defer
|
||||
use_deferred?: DeferFactory;
|
||||
transports?: ITransportDefinition[];
|
||||
retry_if_unreachable?: boolean;
|
||||
max_retries?: number;
|
||||
initial_retry_delay?: number;
|
||||
max_retry_delay?: number;
|
||||
retry_delay_growth?: number;
|
||||
retry_delay_jitter?: number;
|
||||
url?: string;
|
||||
protocols?: string[];
|
||||
onchallenge?: (session: Session, method: string, extra: any) => OnChallengeHandler;
|
||||
realm?: string;
|
||||
authmethods?: string[];
|
||||
authid?: string;
|
||||
}
|
||||
|
||||
interface ICloseEventDetails {
|
||||
wasClean: boolean;
|
||||
reason: string;
|
||||
code: number;
|
||||
}
|
||||
interface ICloseEventDetails {
|
||||
wasClean: boolean;
|
||||
reason: string;
|
||||
code: number;
|
||||
}
|
||||
|
||||
interface ITransport {
|
||||
onopen: () => void;
|
||||
onmessage: (message: any[]) => void;
|
||||
onclose: (details: ICloseEventDetails) => void;
|
||||
interface ITransport {
|
||||
onopen: () => void;
|
||||
onmessage: (message: any[]) => void;
|
||||
onclose: (details: ICloseEventDetails) => void;
|
||||
|
||||
send(message: any[]): void;
|
||||
close(errorCode: number, reason?: string): void;
|
||||
}
|
||||
send(message: any[]): void;
|
||||
close(errorCode: number, reason?: string): void;
|
||||
}
|
||||
|
||||
interface ITransportFactory {
|
||||
//constructor(options: any);
|
||||
type: string;
|
||||
create(): ITransport;
|
||||
}
|
||||
interface ITransportFactory {
|
||||
//constructor(options: any);
|
||||
type: string;
|
||||
create(): ITransport;
|
||||
}
|
||||
|
||||
interface ITransports {
|
||||
register(name: string, factory: any): void;
|
||||
isRegistered(name: string): boolean;
|
||||
get(name: string): any;
|
||||
list(): any[];
|
||||
}
|
||||
interface ITransports {
|
||||
register(name: string, factory: any): void;
|
||||
isRegistered(name: string): boolean;
|
||||
get(name: string): any;
|
||||
list(): any[];
|
||||
}
|
||||
|
||||
interface ILog {
|
||||
debug(...args: any[]): void;
|
||||
}
|
||||
interface ILog {
|
||||
debug(...args: any[]): void;
|
||||
}
|
||||
|
||||
interface IUtil {
|
||||
assert(condition: boolean, message: string): void;
|
||||
}
|
||||
interface IUtil {
|
||||
assert(condition: boolean, message: string): void;
|
||||
}
|
||||
|
||||
var util: IUtil;
|
||||
var log: ILog;
|
||||
var transports: ITransports;
|
||||
}
|
||||
var util: IUtil;
|
||||
var log: ILog;
|
||||
var transports: ITransports;
|
||||
}
|
||||
|
||||
declare module "autobahn" {
|
||||
export = autobahn;
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
Vendored
+9
-12
@@ -148,7 +148,7 @@ declare module Backbone {
|
||||
unset(attribute: string, options?: Silenceable): Model;
|
||||
validate(attributes: any, options?: any): any;
|
||||
|
||||
private _validate(attrs: any, options: any): boolean;
|
||||
private _validate(attributes: any, options: any): boolean;
|
||||
|
||||
// mixins from underscore
|
||||
|
||||
@@ -173,8 +173,8 @@ declare module Backbone {
|
||||
models: TModel[];
|
||||
length: number;
|
||||
|
||||
constructor(models?: TModel[], options?: any);
|
||||
initialize(models?: TModel[], options?: any): void;
|
||||
constructor(models?: TModel[] | Object[], options?: any);
|
||||
initialize(models?: TModel[] | Object[], options?: any): void;
|
||||
|
||||
fetch(options?: CollectionFetchOptions): JQueryXHR;
|
||||
|
||||
@@ -187,9 +187,7 @@ declare module Backbone {
|
||||
/**
|
||||
* Get a model from a collection, specified by an id, a cid, or by passing in a model.
|
||||
**/
|
||||
get(id: number): TModel;
|
||||
get(id: string): TModel;
|
||||
get(id: Model): TModel;
|
||||
get(id: number|string|Model): TModel;
|
||||
create(attributes: any, options?: ModelSaveOptions): TModel;
|
||||
pluck(attribute: string): any[];
|
||||
push(model: TModel, options?: AddOptions): TModel;
|
||||
@@ -201,10 +199,10 @@ declare module Backbone {
|
||||
shift(options?: Silenceable): TModel;
|
||||
sort(options?: Silenceable): Collection<TModel>;
|
||||
unshift(model: TModel, options?: AddOptions): TModel;
|
||||
where(properies: any): TModel[];
|
||||
where(properties: any): TModel[];
|
||||
findWhere(properties: any): TModel;
|
||||
|
||||
private _prepareModel(attrs?: any, options?: any): any;
|
||||
private _prepareModel(attributes?: any, options?: any): any;
|
||||
private _removeReference(model: TModel): void;
|
||||
private _onModelEvent(event: string, model: TModel, collection: Collection<TModel>, options: any): void;
|
||||
|
||||
@@ -247,6 +245,7 @@ declare module Backbone {
|
||||
select(iterator: any, context?: any): any[];
|
||||
size(): number;
|
||||
shuffle(): any[];
|
||||
slice(min: number, max?: number): TModel[];
|
||||
some(iterator: (element: TModel, index: number) => boolean, context?: any): boolean;
|
||||
sortBy(iterator: (element: TModel, index: number) => number, context?: any): TModel[];
|
||||
sortBy(attribute: string, context?: any): TModel[];
|
||||
@@ -277,8 +276,7 @@ declare module Backbone {
|
||||
|
||||
constructor(options?: RouterOptions);
|
||||
initialize(options?: RouterOptions): void;
|
||||
route(route: string, name: string, callback?: Function): Router;
|
||||
route(route: RegExp, name: string, callback?: Function): Router;
|
||||
route(route: string|RegExp, name: string, callback?: Function): Router;
|
||||
navigate(fragment: string, options?: NavigateOptions): Router;
|
||||
navigate(fragment: string, trigger?: boolean): Router;
|
||||
|
||||
@@ -340,8 +338,7 @@ declare module Backbone {
|
||||
model: TModel;
|
||||
collection: Collection<TModel>;
|
||||
//template: (json, options?) => string;
|
||||
setElement(element: HTMLElement, delegate?: boolean): View<TModel>;
|
||||
setElement(element: JQuery, delegate?: boolean): View<TModel>;
|
||||
setElement(element: HTMLElement|JQuery, delegate?: boolean): View<TModel>;
|
||||
id: string;
|
||||
cid: string;
|
||||
className: string;
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
root = true
|
||||
|
||||
[*.ts]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
+397
-322
@@ -1,389 +1,464 @@
|
||||
/// <reference path="./baconjs.d.ts" />
|
||||
|
||||
function CreatingStreams() {
|
||||
$("#my-div").asEventStream("click");
|
||||
$("#my-div").asEventStream("click", ".more-specific-selector");
|
||||
$("#my-div").asEventStream("click", (event, args) => args[0]);
|
||||
$("#my-div").asEventStream("click", ".more-specific-selector", (event, args) => args[0]);
|
||||
$("#my-div").asEventStream("click");
|
||||
$("#my-div").asEventStream("click", ".more-specific-selector");
|
||||
$("#my-div").asEventStream("click", (event, args) => args[0]);
|
||||
$("#my-div").asEventStream("click", ".more-specific-selector", (event, args) => args[0]);
|
||||
|
||||
Bacon.fromPromise($.ajax("https://baconjs.github.io/"));
|
||||
Bacon.fromPromise(Promise.resolve(1));
|
||||
Bacon.fromPromise($.ajax("https://baconjs.github.io/"));
|
||||
Bacon.fromPromise(Promise.resolve(1));
|
||||
|
||||
Bacon.fromPromise($.ajax("https://baconjs.github.io/"), true);
|
||||
Bacon.fromPromise(Promise.resolve(1), false);
|
||||
Bacon.fromPromise($.ajax("https://baconjs.github.io/"), true);
|
||||
Bacon.fromPromise(Promise.resolve(1), false);
|
||||
|
||||
Bacon.fromPromise($.ajax("https://baconjs.github.io/"), true, (n:string) => {
|
||||
return [new Bacon.Next(n), new Bacon.Next(() => n), new Bacon.End()];
|
||||
});
|
||||
Bacon.fromPromise(Promise.resolve(1), false, n => {
|
||||
return [new Bacon.Next(n), new Bacon.Next(() => n), new Bacon.End()];
|
||||
});
|
||||
|
||||
Bacon.fromEvent(document.body, "click").onValue(() => {
|
||||
alert("Bacon!");
|
||||
});
|
||||
Bacon.fromEvent(document.body, "click", (event:MouseEvent) => event.clientX).onValue(clientX => {
|
||||
alert("Bacon!");
|
||||
});
|
||||
Bacon.fromEvent(process.stdin, "readable", () => {
|
||||
alert("Bacon!");
|
||||
});
|
||||
Bacon.fromEvent($("body"), "click").onValue(() => {
|
||||
alert("Bacon!");
|
||||
});
|
||||
|
||||
// This would create a stream that outputs a single value "Bacon!" and ends after that. The use of setTimeout causes the value to be delayed by 1 second.
|
||||
Bacon.fromCallback(callback => {
|
||||
setTimeout(() => {
|
||||
callback("Bacon!");
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
// You can also give any number of arguments to `fromCallback`, which will be passed to the function. These arguments can be simple variables, Bacon EventStreams or Properties. For example the following will output "Bacon rules":
|
||||
Bacon.fromCallback((a, b, callback) => {
|
||||
callback(a + " " + b);
|
||||
}, Bacon.constant("bacon"), "rules").log();
|
||||
|
||||
{
|
||||
var fs = require("fs"),
|
||||
read = Bacon.fromNodeCallback(fs.readFile, "input.txt");
|
||||
read.onError(error => {
|
||||
console.log("Reading failed: " + error);
|
||||
Bacon.fromPromise($.ajax("https://baconjs.github.io/"), true, (n:string) => {
|
||||
return [new Bacon.Next(n), new Bacon.Next(() => n), new Bacon.End()];
|
||||
});
|
||||
read.onValue(value => {
|
||||
console.log("Read contents: " + value);
|
||||
Bacon.fromPromise(Promise.resolve(1), false, n => {
|
||||
return [new Bacon.Next(n), new Bacon.Next(() => n), new Bacon.End()];
|
||||
});
|
||||
}
|
||||
|
||||
Bacon.once(new Bacon.Error("fail"));
|
||||
Bacon.fromEvent(document.body, "click").onValue(() => {
|
||||
alert("Bacon!");
|
||||
});
|
||||
Bacon.fromEvent(document.body, "click", (event:MouseEvent) => event.clientX).onValue(clientX => {
|
||||
alert("Bacon!");
|
||||
});
|
||||
Bacon.fromEvent(process.stdin, "readable", () => {
|
||||
alert("Bacon!");
|
||||
});
|
||||
Bacon.fromEvent($("body"), "click").onValue(() => {
|
||||
alert("Bacon!");
|
||||
});
|
||||
|
||||
// The following would lead to `1,2,3,1,2,3...` to be repeated indefinitely:
|
||||
Bacon.fromArray([1, new Bacon.Error("")]);
|
||||
// This would create a stream that outputs a single value "Bacon!" and ends after that. The use of setTimeout causes the value to be delayed by 1 second.
|
||||
Bacon.fromCallback(callback => {
|
||||
setTimeout(() => {
|
||||
callback("Bacon!");
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
Bacon.repeatedly(10, [1, 2, 3]);
|
||||
// You can also give any number of arguments to `fromCallback`, which will be passed to the function. These arguments can be simple variables, Bacon EventStreams or Properties. For example the following will output "Bacon rules":
|
||||
Bacon.fromCallback((a, b, callback) => {
|
||||
callback(a + " " + b);
|
||||
}, Bacon.constant("bacon"), "rules").log();
|
||||
|
||||
// The following will produce values `0,1,2`.
|
||||
Bacon.repeat(i => {
|
||||
if (i < 3) {
|
||||
return Bacon.once(i);
|
||||
} else {
|
||||
return false;
|
||||
{
|
||||
var fs = require("fs"),
|
||||
read = Bacon.fromNodeCallback(fs.readFile, "input.txt");
|
||||
read.onError(error => {
|
||||
console.log("Reading failed: " + error);
|
||||
});
|
||||
read.onValue(value => {
|
||||
console.log("Read contents: " + value);
|
||||
});
|
||||
}
|
||||
}).log();
|
||||
|
||||
{
|
||||
var stream = Bacon.fromBinder(sink => {
|
||||
sink("first value");
|
||||
sink([new Bacon.Next("2nd"), new Bacon.Next("3rd")]);
|
||||
sink(new Bacon.Next(() => {
|
||||
return "This one will be evaluated lazily"
|
||||
}));
|
||||
sink(new Bacon.Error("oops, an error"));
|
||||
sink(new Bacon.End());
|
||||
return () => {
|
||||
// unsub functionality here, this one's a no-op
|
||||
};
|
||||
});
|
||||
stream.log();
|
||||
}
|
||||
Bacon.once(new Bacon.Error("fail"));
|
||||
|
||||
new Bacon.Next("value");
|
||||
new Bacon.Next(() => "value");
|
||||
// The following would lead to `1,2,3,1,2,3...` to be repeated indefinitely:
|
||||
Bacon.fromArray([1, new Bacon.Error("")]);
|
||||
|
||||
Bacon.repeatedly(10, [1, 2, 3]);
|
||||
|
||||
// The following will produce values `0,1,2`.
|
||||
Bacon.repeat(i => {
|
||||
if (i < 3) {
|
||||
return Bacon.once(i);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}).log();
|
||||
|
||||
{
|
||||
var stream = Bacon.fromBinder(sink => {
|
||||
sink("first value");
|
||||
sink([new Bacon.Next("2nd"), new Bacon.Next("3rd")]);
|
||||
sink(new Bacon.Next(() => {
|
||||
return "This one will be evaluated lazily"
|
||||
}));
|
||||
sink(new Bacon.Error("oops, an error"));
|
||||
sink(new Bacon.End());
|
||||
return () => {
|
||||
// unsub functionality here, this one's a no-op
|
||||
};
|
||||
});
|
||||
stream.log();
|
||||
}
|
||||
|
||||
new Bacon.Next("value");
|
||||
new Bacon.Next(() => "value");
|
||||
}
|
||||
|
||||
function CommonMethodsInEventStreamsAndProperties() {
|
||||
// Converting strings to integers, skipping empty values:
|
||||
Bacon.once("").flatMap(text => {
|
||||
return text != "" ? parseInt(text) : Bacon.never();
|
||||
});
|
||||
// Converting strings to integers, skipping empty values:
|
||||
Bacon.once("").flatMap(text => {
|
||||
return text != "" ? parseInt(text) : Bacon.never();
|
||||
});
|
||||
|
||||
Bacon.sequentially(1, [1, 2, 3]).scan(0, (a, b) => a + b);
|
||||
Bacon.sequentially(1, [1, 2, 3]).scan(0, (a, b) => a + b);
|
||||
|
||||
Bacon.sequentially(1, [1, 2, 3]).diff(0, (a, b) => Math.abs(b - a));
|
||||
Bacon.sequentially(1, [1, 2, 3]).diff(0, (a, b) => Math.abs(b - a));
|
||||
|
||||
// If you have a EventStream `s` with a value sequence `1,2,3,4,5`, the respective values in `s.slidingWindow(2)` would be `[],[1],[1,2],[2,3],[3,4],[4,5]`:
|
||||
Bacon.fromArray([1, 2, 3, 4, 5]).slidingWindow(2);
|
||||
// The values of `s.slidingWindow(2,2)`would be `[1,2],[2,3],[3,4],[4,5]`:
|
||||
Bacon.fromArray([1, 2, 3, 4, 5]).slidingWindow(2, 2);
|
||||
// If you have a EventStream `s` with a value sequence `1,2,3,4,5`, the respective values in `s.slidingWindow(2)` would be `[],[1],[1,2],[2,3],[3,4],[4,5]`:
|
||||
Bacon.fromArray([1, 2, 3, 4, 5]).slidingWindow(2);
|
||||
// The values of `s.slidingWindow(2,2)`would be `[1,2],[2,3],[3,4],[4,5]`:
|
||||
Bacon.fromArray([1, 2, 3, 4, 5]).slidingWindow(2, 2);
|
||||
|
||||
{
|
||||
var x = Bacon.fromArray([1, 2]), y = Bacon.fromArray([3, 4]);
|
||||
x.zip(y, (x, y) => x + y);
|
||||
}
|
||||
|
||||
{
|
||||
var stream = Bacon.fromArray([1, 2]);
|
||||
stream.log("New event in myStream");
|
||||
stream.log();
|
||||
}
|
||||
|
||||
Bacon.fromArray([1, 2, 3]).withStateMachine(0, (sum, event) => {
|
||||
if (event.hasValue()) {
|
||||
// had to cast to `number` because event:Bacon.Next<number>|Bacon.Error<{}>
|
||||
return [sum + <number>event.value(), []];
|
||||
{
|
||||
var x = Bacon.fromArray([1, 2]), y = Bacon.fromArray([3, 4]);
|
||||
x.zip(y, (x, y) => x + y);
|
||||
}
|
||||
else if (event.isEnd()) {
|
||||
return [undefined, [new Bacon.Next(sum), event]];
|
||||
|
||||
{
|
||||
var stream = Bacon.fromArray([1, 2]);
|
||||
stream.log("New event in myStream");
|
||||
stream.log();
|
||||
}
|
||||
else {
|
||||
return [sum, [event]];
|
||||
|
||||
Bacon.fromArray([1, 2, 3]).withStateMachine(0, (sum, event) => {
|
||||
if (event.hasValue()) {
|
||||
// had to cast to `number` because event:Bacon.Next<number>|Bacon.Error<{}>
|
||||
return [sum + <number>event.value(), []];
|
||||
}
|
||||
else if (event.isEnd()) {
|
||||
return [undefined, [new Bacon.Next(sum), event]];
|
||||
}
|
||||
else {
|
||||
return [sum, [event]];
|
||||
}
|
||||
});
|
||||
|
||||
{
|
||||
var property = Bacon.fromArray([1, 2, 3]).toProperty(),
|
||||
who = Bacon.fromArray(["A", "B", "C"]).toProperty();
|
||||
property.decode({1: "mike", 2: who});
|
||||
|
||||
property.decode({1: {type: "mike"}, 2: {type: "other", whoThen: who}});
|
||||
}
|
||||
});
|
||||
|
||||
{
|
||||
var property = Bacon.fromArray([1, 2, 3]).toProperty(),
|
||||
who = Bacon.fromArray(["A", "B", "C"]).toProperty();
|
||||
property.decode({1: "mike", 2: who});
|
||||
|
||||
property.decode({1: {type: "mike"}, 2: {type: "other", whoThen: who}});
|
||||
}
|
||||
|
||||
{
|
||||
// This is handy for keeping track whether we are currently awaiting an AJAX response:
|
||||
var ajaxRequest = <Bacon.Observable<Error, JQueryXHR>>{},
|
||||
ajaxResponse = <Bacon.Observable<Error, JQueryXHR>>{},
|
||||
showAjaxIndicator = ajaxRequest.awaiting(ajaxResponse);
|
||||
}
|
||||
|
||||
Bacon.fromArray([1, 2, -3, 3]).withHandler(function (event) {
|
||||
if (event.hasValue() && event.value() < 0) {
|
||||
this.push(new Bacon.Error("Value below zero"));
|
||||
return this.push(new Bacon.End());
|
||||
} else {
|
||||
return this.push(event);
|
||||
{
|
||||
// This is handy for keeping track whether we are currently awaiting an AJAX response:
|
||||
var ajaxRequest = <Bacon.Observable<Error, JQueryXHR>>{},
|
||||
ajaxResponse = <Bacon.Observable<Error, JQueryXHR>>{},
|
||||
showAjaxIndicator = ajaxRequest.awaiting(ajaxResponse);
|
||||
}
|
||||
});
|
||||
|
||||
{
|
||||
var src = Bacon.once(1),
|
||||
obs = src.map(x => -x);
|
||||
console.log(obs.toString()); // > "Bacon.once(1).map(function)"
|
||||
Bacon.fromArray([1, 2, -3, 3]).withHandler(function (event) {
|
||||
if (event.hasValue() && event.value() < 0) {
|
||||
this.push(new Bacon.Error("Value below zero"));
|
||||
return this.push(new Bacon.End());
|
||||
} else {
|
||||
return this.push(event);
|
||||
}
|
||||
});
|
||||
|
||||
obs.withDescription(src, "times", -1);
|
||||
console.log(obs.toString()); // > "Bacon.once(1).times(-1)"
|
||||
}
|
||||
{
|
||||
var src = Bacon.once(1),
|
||||
obs = src.map(x => -x);
|
||||
console.log(obs.toString()); // > "Bacon.once(1).map(function)"
|
||||
|
||||
{
|
||||
// Calculator for grouped consecutive values until group is cancelled:
|
||||
var events = [
|
||||
{id: 1, type: "add", val: 3},
|
||||
{id: 2, type: "add", val: -1},
|
||||
{id: 1, type: "add", val: 2},
|
||||
{id: 2, type: "cancel"},
|
||||
{id: 3, type: "add", val: 2},
|
||||
{id: 3, type: "cancel"},
|
||||
{id: 1, type: "add", val: 1},
|
||||
{id: 1, type: "add", val: 2},
|
||||
{id: 1, type: "cancel"}
|
||||
],
|
||||
keyF = (event:{id:number}) => event.id,
|
||||
limitF = (groupedStream:Bacon.EventStream<string, {id:number; type:string; val?:number}>) => {
|
||||
var cancel = groupedStream.filter(x => x.type === "cancel").take(1),
|
||||
adds = groupedStream.filter(x => x.type === "add");
|
||||
return adds.takeUntil(cancel).map(x => x.val);
|
||||
};
|
||||
obs.withDescription(src, "times", -1);
|
||||
console.log(obs.toString()); // > "Bacon.once(1).times(-1)"
|
||||
}
|
||||
|
||||
Bacon.sequentially(2, events)
|
||||
.groupBy(keyF, limitF)
|
||||
.flatMap(groupedStream => groupedStream.fold(0, (acc, x) => acc + x))
|
||||
.onValue(sum => {
|
||||
console.log(sum); // returns [-1, 2, 8] in an order
|
||||
});
|
||||
}
|
||||
{
|
||||
// Calculator for grouped consecutive values until group is cancelled:
|
||||
var events = [
|
||||
{id: 1, type: "add", val: 3},
|
||||
{id: 2, type: "add", val: -1},
|
||||
{id: 1, type: "add", val: 2},
|
||||
{id: 2, type: "cancel"},
|
||||
{id: 3, type: "add", val: 2},
|
||||
{id: 3, type: "cancel"},
|
||||
{id: 1, type: "add", val: 1},
|
||||
{id: 1, type: "add", val: 2},
|
||||
{id: 1, type: "cancel"}
|
||||
],
|
||||
keyF = (event:{id:number}) => event.id,
|
||||
limitF = (groupedStream:Bacon.EventStream<string, {id:number; type:string; val?:number}>) => {
|
||||
var cancel = groupedStream.filter(x => x.type === "cancel").take(1),
|
||||
adds = groupedStream.filter(x => x.type === "add");
|
||||
return adds.takeUntil(cancel).map(x => x.val);
|
||||
};
|
||||
|
||||
Bacon.sequentially(2, events)
|
||||
.groupBy(keyF, limitF)
|
||||
.flatMap(groupedStream => groupedStream.fold(0, (acc, x) => acc + x))
|
||||
.onValue(sum => {
|
||||
console.log(sum); // returns [-1, 2, 8] in an order
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function EventStream() {
|
||||
// This creates the stream which doesn't produce any events and never ends:
|
||||
Bacon.interval(1e1, 0).last();
|
||||
// This creates the stream which doesn't produce any events and never ends:
|
||||
Bacon.interval(1e1, 0).last();
|
||||
|
||||
Bacon.fromArray([1, 2, 2, 1])
|
||||
.skipDuplicates().log(); // > returns [1, 2, 1] in an order
|
||||
Bacon.fromArray([1, 2, 2, 1])
|
||||
.skipDuplicates().log(); // > returns [1, 2, 1] in an order
|
||||
|
||||
// You might get two events containing [1,2,3,4] and [5,6,7] respectively, given that the flush occurs between numbers 4 and 5:
|
||||
Bacon.fromArray([1, 2, 3, 4, 5, 6, 7]).bufferWithTime(0);
|
||||
// You might get two events containing [1,2,3,4] and [5,6,7] respectively, given that the flush occurs between numbers 4 and 5:
|
||||
Bacon.fromArray([1, 2, 3, 4, 5, 6, 7]).bufferWithTime(0);
|
||||
|
||||
// Here's an equivalent to `stream.bufferWithTime(10)`:
|
||||
{
|
||||
var stream = Bacon.fromArray([1, 2, 3, 4, 5, 6, 7]);
|
||||
stream.bufferWithTime(f => {
|
||||
setTimeout(f, 10);
|
||||
});
|
||||
}
|
||||
// Here's an equivalent to `stream.bufferWithTime(10)`:
|
||||
{
|
||||
var stream = Bacon.fromArray([1, 2, 3, 4, 5, 6, 7]);
|
||||
stream.bufferWithTime(f => {
|
||||
setTimeout(f, 10);
|
||||
});
|
||||
}
|
||||
|
||||
// You will get output events with values `[1, 2]`, `[3, 4]` and `[5]`.
|
||||
Bacon.fromArray([1, 2, 3, 4, 5]).bufferWithCount(2);
|
||||
// You will get output events with values `[1, 2]`, `[3, 4]` and `[5]`.
|
||||
Bacon.fromArray([1, 2, 3, 4, 5]).bufferWithCount(2);
|
||||
}
|
||||
|
||||
function Property() {
|
||||
// This creates the property which doesn't produce any events and never ends:
|
||||
Bacon.interval(1e1, 0).toProperty().last();
|
||||
// This creates the property which doesn't produce any events and never ends:
|
||||
Bacon.interval(1e1, 0).toProperty().last();
|
||||
|
||||
{
|
||||
var property = Bacon.fromArray([1, 2, 3, 4, 5]).toProperty();
|
||||
// If you want to assign your Property to the "disabled" attribute of a JQuery object, you can do this:
|
||||
property.assign($("#my-button"), "attr", "disabled");
|
||||
{
|
||||
var property = Bacon.fromArray([1, 2, 3, 4, 5]).toProperty();
|
||||
// If you want to assign your Property to the "disabled" attribute of a JQuery object, you can do this:
|
||||
property.assign($("#my-button"), "attr", "disabled");
|
||||
|
||||
// A simpler example would be to toggle the visibility of an element based on a Property:
|
||||
property.assign($("#my-button"), "toggle");
|
||||
}
|
||||
// A simpler example would be to toggle the visibility of an element based on a Property:
|
||||
property.assign($("#my-button"), "toggle");
|
||||
}
|
||||
|
||||
Bacon.fromArray([1, 2, 2, 1]).toProperty()
|
||||
.skipDuplicates().log(); // > returns [1, 2, 1] in an order
|
||||
Bacon.fromArray([1, 2, 2, 1]).toProperty()
|
||||
.skipDuplicates().log(); // > returns [1, 2, 1] in an order
|
||||
}
|
||||
|
||||
function CombiningMultipleStreamsAndProperties() {
|
||||
{
|
||||
var property = Bacon.constant(1),
|
||||
stream = Bacon.once(2),
|
||||
constant = 3;
|
||||
Bacon.combineAsArray(property, stream, constant)
|
||||
.log(); // > returns [1, 2, 3]
|
||||
}
|
||||
{
|
||||
var property = Bacon.constant(1),
|
||||
stream = Bacon.once(2),
|
||||
constant = 3;
|
||||
Bacon.combineAsArray(property, stream, constant)
|
||||
.log(); // > returns [1, 2, 3]
|
||||
}
|
||||
|
||||
{
|
||||
// To calculate the current sum of three numeric Properties, you can do:
|
||||
var property = Bacon.constant(1),
|
||||
stream = Bacon.once(2),
|
||||
constant = 3;
|
||||
// NOTE: had to explicitly specify the typing for `x:number, y:number, z:number`
|
||||
Bacon.combineWith((x:number, y:number, z:number) => x + y + z, property, stream, constant);
|
||||
}
|
||||
{
|
||||
// To calculate the current sum of three numeric Properties, you can do:
|
||||
var property = Bacon.constant(1),
|
||||
stream = Bacon.once(2),
|
||||
constant = 3;
|
||||
// NOTE: had to explicitly specify the typing for `x:number, y:number, z:number`
|
||||
Bacon.combineWith((x:number, y:number, z:number) => x + y + z, property, stream, constant);
|
||||
}
|
||||
|
||||
{
|
||||
// Assuming you've got streams or properties named `password`, `username`, `firstname` and `lastname`, you can do:
|
||||
var password = Bacon.constant("easy"),
|
||||
username = Bacon.constant("juha"),
|
||||
firstname = Bacon.constant("juha"),
|
||||
lastname = Bacon.constant("paananen"),
|
||||
// NOTE: you should provide `combineTemplate` typing explicitly!
|
||||
loginInfo = Bacon.combineTemplate<string, {
|
||||
magicNumber:number; userid:string; passwd:string;
|
||||
name:{first:string; last:string}
|
||||
}>({
|
||||
magicNumber: 3,
|
||||
userid: username,
|
||||
passwd: password,
|
||||
name: {first: firstname, last: lastname}
|
||||
}).onValue(loginInfo => {
|
||||
// and your new `loginInfo` property will combine values from all these streams using that template, whenever any of the streams/properties get a new value. It would yield a value:
|
||||
console.log("`loginInfo` expected", {
|
||||
magicNumber: 3,
|
||||
userid: "juha",
|
||||
passwd: "easy",
|
||||
name: {first: "juha", last: "paananen"}
|
||||
});
|
||||
console.log("`loginInfo` actual", loginInfo);
|
||||
});
|
||||
{
|
||||
// Assuming you've got streams or properties named `password`, `username`, `firstname` and `lastname`, you can do:
|
||||
var password = Bacon.constant("easy"),
|
||||
username = Bacon.constant("juha"),
|
||||
firstname = Bacon.constant("juha"),
|
||||
lastname = Bacon.constant("paananen"),
|
||||
// NOTE: you should provide `combineTemplate` typing explicitly!
|
||||
loginInfo = Bacon.combineTemplate<string, {
|
||||
magicNumber:number; userid:string; passwd:string;
|
||||
name:{first:string; last:string}
|
||||
}>({
|
||||
magicNumber: 3,
|
||||
userid: username,
|
||||
passwd: password,
|
||||
name: {first: firstname, last: lastname}
|
||||
}).onValue(loginInfo => {
|
||||
// and your new `loginInfo` property will combine values from all these streams using that template, whenever any of the streams/properties get a new value. It would yield a value:
|
||||
console.log("`loginInfo` expected", {
|
||||
magicNumber: 3,
|
||||
userid: "juha",
|
||||
passwd: "easy",
|
||||
name: {first: "juha", last: "paananen"}
|
||||
});
|
||||
console.log("`loginInfo` actual", loginInfo);
|
||||
});
|
||||
|
||||
// Note that all Bacon.combine* methods produce a `Property` instead of an `EventStream`. If you need the result as an `EventStream` you might want to use `property.changes()`:
|
||||
Bacon.combineWith((firstname, lastname) => `${firstname} ${lastname}`, firstname, lastname).changes();
|
||||
}
|
||||
// Note that all Bacon.combine* methods produce a `Property` instead of an `EventStream`. If you need the result as an `EventStream` you might want to use `property.changes()`:
|
||||
Bacon.combineWith((firstname, lastname) => `${firstname} ${lastname}`, firstname, lastname).changes();
|
||||
}
|
||||
|
||||
{
|
||||
var x = Bacon.fromArray([1, 2, 3]),
|
||||
y = Bacon.fromArray([10, 20, 30]),
|
||||
z = Bacon.fromArray([100, 200, 300]);
|
||||
Bacon.zipAsArray(x, y, z)
|
||||
.log(); // > returns values `[1, 10, 100]`, `[2, 20, 200]` and `[3, 30, 300]`
|
||||
}
|
||||
{
|
||||
var x = Bacon.fromArray([1, 2, 3]),
|
||||
y = Bacon.fromArray([10, 20, 30]),
|
||||
z = Bacon.fromArray([100, 200, 300]);
|
||||
Bacon.zipAsArray(x, y, z)
|
||||
.log(); // > returns values `[1, 10, 100]`, `[2, 20, 200]` and `[3, 30, 300]`
|
||||
}
|
||||
|
||||
// The following example would log the number 3.
|
||||
// NOTE: had to explicitly specify the typing for `a:number, b:number`
|
||||
Bacon.onValues(Bacon.constant(1), Bacon.constant(2), (a:number, b:number) => {
|
||||
console.log(a + b);
|
||||
});
|
||||
// The following example would log the number 3.
|
||||
// NOTE: had to explicitly specify the typing for `a:number, b:number`
|
||||
Bacon.onValues(Bacon.constant(1), Bacon.constant(2), (a:number, b:number) => {
|
||||
console.log(a + b);
|
||||
});
|
||||
}
|
||||
|
||||
function $Event() {
|
||||
new Bacon.Next("value");
|
||||
new Bacon.Next(() => "value");
|
||||
new Bacon.Next("value");
|
||||
new Bacon.Next(() => "value");
|
||||
}
|
||||
|
||||
function Errors() {
|
||||
// In case you want to convert (some) value events into Error events, you may use `flatMap` like this:
|
||||
// NOTE: had to explicitly specify the typing for `flatMap`
|
||||
Bacon.fromArray([1, 2, 3, 4]).flatMap<number>(x => {
|
||||
return x > 2 ? new Bacon.Error("too big") : x;
|
||||
});
|
||||
// In case you want to convert (some) value events into Error events, you may use `flatMap` like this:
|
||||
// NOTE: had to explicitly specify the typing for `flatMap`
|
||||
Bacon.fromArray([1, 2, 3, 4]).flatMap<number>(x => {
|
||||
return x > 2 ? new Bacon.Error("too big") : x;
|
||||
});
|
||||
|
||||
// Conversely, if you want to convert some Error events into value events, you may use `flatMapError`:
|
||||
Bacon.fromArray<string, number>([1, 2, 3, 4]).flatMapError<number>(error => {
|
||||
var isNonCriticalError = (error:string) => Math.random() < .5,
|
||||
handleNonCriticalError = (error:string) => 42;
|
||||
return isNonCriticalError(error) ? handleNonCriticalError(error) : new Bacon.Error(error);
|
||||
});
|
||||
// Conversely, if you want to convert some Error events into value events, you may use `flatMapError`:
|
||||
Bacon.fromArray<string, number>([1, 2, 3, 4]).flatMapError<number>(error => {
|
||||
var isNonCriticalError = (error:string) => Math.random() < .5,
|
||||
handleNonCriticalError = (error:string) => 42;
|
||||
return isNonCriticalError(error) ? handleNonCriticalError(error) : new Bacon.Error(error);
|
||||
});
|
||||
|
||||
// Note also that Bacon.js combinators do not catch errors that are thrown. Especially `map` doesn't do so. If you want to map things and wrap caught errors into Error events, you can do the following:
|
||||
Bacon.fromArray([1, 2, 3, 4]).flatMap(x => {
|
||||
var dangerousFunction = (x:number) => {
|
||||
throw new Error("dangerous function!");
|
||||
};
|
||||
try {
|
||||
return dangerousFunction(x);
|
||||
} catch (e) {
|
||||
return new Bacon.Error(e);
|
||||
}
|
||||
});
|
||||
// Note also that Bacon.js combinators do not catch errors that are thrown. Especially `map` doesn't do so. If you want to map things and wrap caught errors into Error events, you can do the following:
|
||||
Bacon.fromArray([1, 2, 3, 4]).flatMap(x => {
|
||||
var dangerousFunction = (x:number) => {
|
||||
throw new Error("dangerous function!");
|
||||
};
|
||||
try {
|
||||
return dangerousFunction(x);
|
||||
} catch (e) {
|
||||
return new Bacon.Error(e);
|
||||
}
|
||||
});
|
||||
|
||||
Bacon.once("https://baconjs.github.io/").flatMap(url => {
|
||||
// `ajaxCall` gives `Error`s on network or server `Error`s.
|
||||
var ajaxCall = (url:string) => {
|
||||
return Bacon.fromPromise<JQueryXHR, JQueryXHR>($.ajax(url));
|
||||
};
|
||||
return Bacon.retry({
|
||||
source: () => ajaxCall(url),
|
||||
retries: 5,
|
||||
isRetryable: (error:JQueryXHR) => error.status !== 404,
|
||||
delay: context => 100 // Just use the same delay always
|
||||
Bacon.once("https://baconjs.github.io/").flatMap(url => {
|
||||
// `ajaxCall` gives `Error`s on network or server `Error`s.
|
||||
var ajaxCall = (url:string) => {
|
||||
return Bacon.fromPromise<JQueryXHR, JQueryXHR>($.ajax(url));
|
||||
};
|
||||
return Bacon.retry({
|
||||
source: () => ajaxCall(url),
|
||||
retries: 5,
|
||||
isRetryable: (error:JQueryXHR) => error.status !== 404,
|
||||
delay: context => 100 // Just use the same delay always
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function JoinPatterns() {
|
||||
{
|
||||
// Consider implementing a game with discrete time ticks. We want to handle key-events synchronized on tick-events, with at most one key event handled per tick. If there are no key events, we want to just process a tick:
|
||||
var tick = Bacon.interval(1e2, 0),
|
||||
keyEvent = Bacon.fromEvent(document.body, "click", _ => Date.now()),
|
||||
handleTick = (_:number) => `timestamp: NONE`,
|
||||
handleKeyEvent = (timestamp:number) => `timestamp: ${timestamp}`;
|
||||
Bacon.when(
|
||||
[tick, keyEvent], (_:number, timestamp:number) => handleKeyEvent(timestamp),
|
||||
[tick], handleTick
|
||||
);
|
||||
// Order is important here. If the [tick] patterns had been written first, this would have been tried first, and preferred at each tick.
|
||||
}
|
||||
{
|
||||
// Consider implementing a game with discrete time ticks. We want to handle key-events synchronized on tick-events, with at most one key event handled per tick. If there are no key events, we want to just process a tick:
|
||||
var tick = Bacon.interval(1e2, 0),
|
||||
keyEvent = Bacon.fromEvent(document.body, "click", _ => Date.now()),
|
||||
handleTick = (_:number) => `timestamp: NONE`,
|
||||
handleKeyEvent = (timestamp:number) => `timestamp: ${timestamp}`;
|
||||
Bacon.when(
|
||||
[tick, keyEvent], (_:number, timestamp:number) => handleKeyEvent(timestamp),
|
||||
[tick], handleTick
|
||||
);
|
||||
// Order is important here. If the [tick] patterns had been written first, this would have been tried first, and preferred at each tick.
|
||||
}
|
||||
|
||||
{
|
||||
// Join patterns are indeed a generalization of `zip`, and `zip` is equivalent to a single-rule join pattern. The following `Observable`s have the same output:
|
||||
var a = Bacon.once("a"),
|
||||
b = Bacon.once("b"),
|
||||
c = Bacon.once("c"),
|
||||
f = (a:string, b:string, c:string) => `a = ${a}; b = ${b}; c = ${c}.`;
|
||||
Bacon.zipWith(f, a, b, c);
|
||||
Bacon.when([a, b, c], f);
|
||||
}
|
||||
{
|
||||
// The inputs to `Bacon.update` are defined like this:
|
||||
var initial = 0,
|
||||
x = Bacon.interval(1e3, 1),
|
||||
y = Bacon.interval(2e3, 1),
|
||||
z = Bacon.interval(1.5e3, 1);
|
||||
// NOTE: had to explicitly specify the typing for `previous:number`
|
||||
Bacon.update(initial,
|
||||
[x, y, z], (previous:number, x:number, y:number, z:number) => previous + x + y + z,
|
||||
[x, y], (previous:number, x:number, y:number) => previous + x + y
|
||||
);
|
||||
// As input, each function above will get the previous value of the `result` Property, along with values from the listed Observables. The value returned by the function will be used as the next value of `result`. Just like in `Bacon.when`, only EventStreams will trigger an update, while Properties will be just sampled. So, if you list a single EventStream and several Properties, the value will be updated only when an event occurs in the EventStream.
|
||||
}
|
||||
{
|
||||
// Here's a simple gaming example:
|
||||
var scoreMultiplier = Bacon.constant(1),
|
||||
hitUfo = new Bacon.Bus(),
|
||||
hitMotherShip = new Bacon.Bus(),
|
||||
score = Bacon.update(0,
|
||||
[hitUfo, scoreMultiplier], (score:number, _:number, multiplier:number) => score + 100 * multiplier,
|
||||
[hitMotherShip], (score:number, _:number) => score + 2000
|
||||
);
|
||||
// In the example, the `score` property is updated when either `hitUfo` or `hitMotherShip` occur. The `scoreMultiplier` Property is sampled to take multiplier into account when `hitUfo` occurs.
|
||||
}
|
||||
{
|
||||
// Join patterns are indeed a generalization of `zip`, and `zip` is equivalent to a single-rule join pattern. The following `Observable`s have the same output:
|
||||
var a = Bacon.once("a"),
|
||||
b = Bacon.once("b"),
|
||||
c = Bacon.once("c"),
|
||||
f = (a:string, b:string, c:string) => `a = ${a}; b = ${b}; c = ${c}.`;
|
||||
Bacon.zipWith(f, a, b, c);
|
||||
Bacon.when([a, b, c], f);
|
||||
}
|
||||
{
|
||||
// The inputs to `Bacon.update` are defined like this:
|
||||
var initial = 0,
|
||||
x = Bacon.interval(1e3, 1),
|
||||
y = Bacon.interval(2e3, 1),
|
||||
z = Bacon.interval(1.5e3, 1);
|
||||
// NOTE: had to explicitly specify the typing for `previous:number`
|
||||
Bacon.update(initial,
|
||||
[x, y, z], (previous:number, x:number, y:number, z:number) => previous + x + y + z,
|
||||
[x, y], (previous:number, x:number, y:number) => previous + x + y
|
||||
);
|
||||
// As input, each function above will get the previous value of the `result` Property, along with values from the listed Observables. The value returned by the function will be used as the next value of `result`. Just like in `Bacon.when`, only EventStreams will trigger an update, while Properties will be just sampled. So, if you list a single EventStream and several Properties, the value will be updated only when an event occurs in the EventStream.
|
||||
}
|
||||
{
|
||||
// Here's a simple gaming example:
|
||||
var scoreMultiplier = Bacon.constant(1),
|
||||
hitUfo = new Bacon.Bus(),
|
||||
hitMotherShip = new Bacon.Bus(),
|
||||
score = Bacon.update(0,
|
||||
[hitUfo, scoreMultiplier], (score:number, _:number, multiplier:number) => score + 100 * multiplier,
|
||||
[hitMotherShip], (score:number, _:number) => score + 2000
|
||||
);
|
||||
// In the example, the `score` property is updated when either `hitUfo` or `hitMotherShip` occur. The `scoreMultiplier` Property is sampled to take multiplier into account when `hitUfo` occurs.
|
||||
}
|
||||
{
|
||||
// Join patterns as a "chemical machine". A quick way to get some intuition for join patterns is to understand them through an analogy in terms of atoms and molecules. A join pattern can here be regarded as a recipe for a chemical reaction. Lets say we have observables `oxygen`, `carbon` and `hydrogen`, where an event in these spawns an 'atom' of that type into a mixture. We can state reactions:
|
||||
let oxygen = Bacon.interval(1e3, "O"),
|
||||
hydrogen = Bacon.interval(2e3, "H"),
|
||||
carbon = Bacon.interval(1.5e3, "C"),
|
||||
makeWater = (oxygen:string, hydrogen1:string, hydrogen2:string) => `${hydrogen1}${[hydrogen1, hydrogen2].length}${oxygen}`,
|
||||
makeCarbonMonoxide = (oxygen:string, carbon:string) => `${carbon}${oxygen}`;
|
||||
|
||||
Bacon.when(
|
||||
[oxygen, hydrogen, hydrogen], makeWater,
|
||||
[oxygen, carbon], makeCarbonMonoxide
|
||||
);
|
||||
// Now, every time a new 'atom' is spawned from one of the observables, this atom is added to the mixture. If at any time there are two hydrogen atoms, and an oxygen atom, the corresponding atoms are *consumed*, and output is produced via `makeWater`. The same semantics apply for the second rule to create carbon monoxide. The rules are tried at each point from top to bottom.
|
||||
}
|
||||
}
|
||||
|
||||
function JoinPatternsAndProperties() {
|
||||
{
|
||||
// Join patterns and properties
|
||||
//Properties are not part of the synchronization pattern, but are instead just sampled. The following example take three input streams `$price`, `$quantity` and `$total`, e.g. coming from input fields, and defines mutally recursive behaviours in properties `price`, `quantity` and `total` such that
|
||||
// -- updating price sets total to price * quantity;
|
||||
// -- updating quantity sets total to price * quantity;
|
||||
// -- updating total sets price to total / quantity.
|
||||
let random = (x:number) => Math.round(x * Math.random()),
|
||||
id = <A>(x:A):A => x;
|
||||
let $quantity = Bacon.interval<Error, number>(1e3, 10).map(random),
|
||||
$price = Bacon.interval<Error, number>(2e3, 100).map(random),
|
||||
$total = Bacon.interval<Error, number>(1.5e3, 1000).map(random);
|
||||
let quantity = $quantity.toProperty(1),
|
||||
price = Bacon.when<Error, number, number, number>(
|
||||
[$price], id,
|
||||
[$total, quantity], (x, y) => x / y
|
||||
).toProperty(0),
|
||||
total = Bacon.when<Error, number, number, number, number>(
|
||||
[$total], id,
|
||||
[$price, quantity], (x, y) => x * y,
|
||||
[price, $quantity], (x, y) => x * y
|
||||
).toProperty(0);
|
||||
}
|
||||
}
|
||||
|
||||
function JoinPatternsAndBaconBus() {
|
||||
{
|
||||
// Join patterns and `Bacon.Bus`
|
||||
// The result functions of join patterns are allowed to push values onto a `Bus` that may in turn be in one of its patterns. For instance, an implementation of the dining philosophers problem can be written as follows:
|
||||
// Availability of chopsticks are implemented using bus.
|
||||
let chopsticks = [new Bacon.Bus(), new Bacon.Bus(), new Bacon.Bus()],
|
||||
// Hungry could be any type of observable, but we'll use bus here.
|
||||
hungry = [new Bacon.Bus(), new Bacon.Bus(), new Bacon.Bus()],
|
||||
// A philosopher eats for one second, then makes the chopsticks available again by pushing values onto their bus.
|
||||
eat = (i:number) => () => {
|
||||
setTimeout(() => {
|
||||
console.log("done!");
|
||||
chopsticks[i].push({});
|
||||
chopsticks[(i + 1) % 3].push({});
|
||||
}, 1e3);
|
||||
return `philosopher ${i} eating`;
|
||||
},
|
||||
// We use Bacon.when to make sure a hungry philosopher can eat only when both his chopsticks are available.
|
||||
dining = Bacon.when(
|
||||
[hungry[0], chopsticks[0], chopsticks[1]], eat(0),
|
||||
[hungry[1], chopsticks[1], chopsticks[2]], eat(1),
|
||||
[hungry[2], chopsticks[2], chopsticks[0]], eat(2)
|
||||
).log("dining");
|
||||
// Make all chopsticks initially available.
|
||||
chopsticks[0].push({});
|
||||
chopsticks[1].push({});
|
||||
chopsticks[2].push({});
|
||||
// Make philosophers hungry in some way, in this case we just push to their bus.
|
||||
for (var i = 0; i < 3; i++) {
|
||||
hungry[0].push({});
|
||||
hungry[1].push({});
|
||||
hungry[2].push({});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+3013
-2629
File diff suppressed because it is too large
Load Diff
+1
-14
@@ -9,7 +9,7 @@ declare module Microsoft.Maps.AdvancedShapes {
|
||||
|
||||
export class EntityCollection {
|
||||
|
||||
constructor(options: EntityCollectionOptions);
|
||||
constructor(options?: EntityCollectionOptions);
|
||||
|
||||
clear(): void;
|
||||
get(index: number): Entity;
|
||||
@@ -24,10 +24,6 @@ declare module Microsoft.Maps.AdvancedShapes {
|
||||
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 {
|
||||
@@ -43,15 +39,6 @@ declare module Microsoft.Maps.AdvancedShapes {
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
-25
@@ -79,10 +79,6 @@ declare module Microsoft.Maps.Directions {
|
||||
isExactLocation(): boolean;
|
||||
isViapoint(): boolean;
|
||||
setOptions(options: WaypointOptions): void;
|
||||
|
||||
changed: (args: WaypointEventArgs) => void;
|
||||
geocoded: (args: WaypointEventArgs) => void;
|
||||
reverseGeocoded: (args: WaypointEventArgs) => void;
|
||||
}
|
||||
|
||||
export interface DirectionsRenderOptions {
|
||||
@@ -185,27 +181,6 @@ declare module Microsoft.Maps.Directions {
|
||||
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 {
|
||||
|
||||
Vendored
+22
-22
@@ -6,7 +6,7 @@
|
||||
/// <reference path="Microsoft.Maps.d.ts"/>
|
||||
|
||||
declare module Microsoft.Maps.Search {
|
||||
|
||||
|
||||
export interface Address {
|
||||
addressLine: string;
|
||||
adminDistrict: string;
|
||||
@@ -25,12 +25,12 @@ declare module Microsoft.Maps.Search {
|
||||
}
|
||||
|
||||
export interface GeocodeRequestOptions {
|
||||
bounds: LocationRect;
|
||||
callback: (result: GeocodeResult, userData: any) => any;
|
||||
bounds?: LocationRect;
|
||||
callback?: (result: GeocodeResult, userData: any) => any;
|
||||
count: number;
|
||||
errorCallback: (options: GeocodeRequestOptions) => any;
|
||||
timeout: number;
|
||||
userData: any;
|
||||
errorCallback?: (options: GeocodeRequestOptions) => any;
|
||||
timeout?: number;
|
||||
userData?: any;
|
||||
where:string;
|
||||
}
|
||||
|
||||
@@ -71,15 +71,15 @@ declare module Microsoft.Maps.Search {
|
||||
}
|
||||
|
||||
export interface ReverseGeocodeRequestOptions {
|
||||
callback: (result: PlaceResult, userData: any) => any;
|
||||
errorCallback: (options: ReverseGeocodeRequestOptions) => any;
|
||||
location: Location;
|
||||
timeout: number;
|
||||
userData:any;
|
||||
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;
|
||||
@@ -104,16 +104,16 @@ declare module Microsoft.Maps.Search {
|
||||
}
|
||||
|
||||
export interface SearchRequestOptions {
|
||||
callback:(result: SearchResponse, userData: any)=>any;
|
||||
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;
|
||||
errorCallback?:(options: SearchRequestOptions)=>any;
|
||||
query?: string;
|
||||
startIndex?: number;
|
||||
timeout?: number;
|
||||
entityType?: string;
|
||||
userData?: any;
|
||||
what?: string;
|
||||
where?:string;
|
||||
}
|
||||
|
||||
export interface SearchResponse {
|
||||
@@ -149,4 +149,4 @@ declare module Microsoft.Maps.Search {
|
||||
website:string;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+15
-18
@@ -11,20 +11,23 @@ declare module Microsoft.Maps.VenueMaps {
|
||||
eventArgs: MouseEventArgs;
|
||||
}
|
||||
|
||||
export interface PrimitiveResponse {
|
||||
eventArgs: Primitive;
|
||||
}
|
||||
|
||||
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;
|
||||
handleMouseClick(e: (response: MouseResponse) => void): void;
|
||||
handleMouseClick(e: (response: PrimitiveResponse) => void): void;
|
||||
handleMouseOut(e: (response: MouseResponse) => void): void;
|
||||
handleMouseOut(e: (response: PrimitiveResponse) => void): void;
|
||||
handleMouseOver(e: (response: MouseResponse) => void): void;
|
||||
handleMouseOver(e: (response: PrimitiveResponse) => void): void;
|
||||
isInDOM(): boolean;
|
||||
removeFromDOM(): void;
|
||||
setHeight(height: number): void;
|
||||
|
||||
click: (eventArgs: MouseEventArgs) => any;
|
||||
mouseOut: (eventArgs: MouseEventArgs) => any;
|
||||
mouseOver: (eventArgs: MouseEventArgs) => any;
|
||||
}
|
||||
|
||||
export enum DirectoryGrouping {
|
||||
@@ -67,10 +70,10 @@ declare module Microsoft.Maps.VenueMaps {
|
||||
}
|
||||
|
||||
export interface NearbyVenueOptions {
|
||||
callback: (maps: Array<VenueMap>) => any;
|
||||
location: Location;
|
||||
map: Map;
|
||||
radius: number;
|
||||
callback?: (maps: Array<VenueMap>) => any;
|
||||
location?: Location;
|
||||
map?: Map;
|
||||
radius?: number;
|
||||
}
|
||||
|
||||
export interface Polygon {
|
||||
@@ -116,12 +119,6 @@ declare module Microsoft.Maps.VenueMaps {
|
||||
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 {
|
||||
@@ -138,4 +135,4 @@ declare module Microsoft.Maps.VenueMaps {
|
||||
getNearbyVenues(options: NearbyVenueOptions): void;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+35
-74
@@ -45,7 +45,7 @@ declare module Microsoft.Maps {
|
||||
getNorth(): number;
|
||||
getNorthwest(): Location;
|
||||
getSouth(): number;
|
||||
getSouthEast(): Location;
|
||||
getSoutheast(): Location;
|
||||
getWest(): number;
|
||||
intersects(rect: LocationRect): boolean;
|
||||
toString(): string;
|
||||
@@ -96,7 +96,8 @@ declare module Microsoft.Maps {
|
||||
|
||||
export class Map {
|
||||
|
||||
constructor(containerElement: HTMLElement, options: MapOptions);
|
||||
constructor(containerElement: HTMLElement, options?: MapOptions);
|
||||
constructor(containerElement: HTMLElement, options?: ViewOptions);
|
||||
|
||||
entities: EntityCollection;
|
||||
|
||||
@@ -137,39 +138,25 @@ declare module Microsoft.Maps {
|
||||
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;
|
||||
tryLocationToPixel(locations: Location, reference?: PixelReference): Point;
|
||||
tryLocationToPixel(locations: Array<Location>, reference?: PixelReference): Array<Point>;
|
||||
tryPixelToLocation(points: Point, reference?: PixelReference): Location;
|
||||
tryPixelToLocation(points: Array<Point>, reference?: PixelReference): Array<Location>;
|
||||
}
|
||||
|
||||
export class MapMode {
|
||||
|
||||
getDrawShapesInSingleLayer(): boolean;
|
||||
getShouldClipPolygons(): boolean;
|
||||
setOptions(options: MapOptions): void;
|
||||
setOptions(options: MapModeOptions): void;
|
||||
setViewChangeEndDelay(delay: number): void;
|
||||
}
|
||||
|
||||
export interface MapModeOptions {
|
||||
shouldClipPolygons?: boolean;
|
||||
drawShapesInSingleLayer?:boolean;
|
||||
}
|
||||
|
||||
export interface MapOptions {
|
||||
|
||||
backgroundColor?: Color;
|
||||
@@ -272,14 +259,14 @@ declare module Microsoft.Maps {
|
||||
}
|
||||
|
||||
export interface EntityCollectionOptions {
|
||||
bubble: boolean;
|
||||
visible: boolean;
|
||||
zIndex: number;
|
||||
bubble?: boolean;
|
||||
visible?: boolean;
|
||||
zIndex?: number;
|
||||
}
|
||||
|
||||
export class EntityCollection {
|
||||
|
||||
constructor(options: EntityCollectionOptions);
|
||||
constructor(options?: EntityCollectionOptions);
|
||||
|
||||
clear(): void;
|
||||
get(index: number): Entity;
|
||||
@@ -295,9 +282,6 @@ declare module Microsoft.Maps {
|
||||
setOptions(options: EntityCollectionOptions): void;
|
||||
toString(): string;
|
||||
|
||||
entityAdded: (args: EntityChangeArgs) => any;
|
||||
entityChanged: (args: EntityChangeArgs) => any;
|
||||
entityRemoved: (args: EntityChangeArgs) => any;
|
||||
}
|
||||
|
||||
export class Infobox {
|
||||
@@ -325,11 +309,6 @@ declare module Microsoft.Maps {
|
||||
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 {
|
||||
@@ -378,15 +357,11 @@ declare module Microsoft.Maps {
|
||||
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 class Position {
|
||||
coords: Coordinates;
|
||||
timestamp: string;
|
||||
}
|
||||
|
||||
export interface PolylineOptions {
|
||||
@@ -409,20 +384,11 @@ declare module Microsoft.Maps {
|
||||
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 {
|
||||
fillColor?: Color;
|
||||
infoBox?: Infobox;
|
||||
infobox?: Infobox;
|
||||
strokeColor?: Color;
|
||||
strokeDashArray?: string;
|
||||
strokeThickness?: number;
|
||||
@@ -446,18 +412,6 @@ declare module Microsoft.Maps {
|
||||
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 {
|
||||
@@ -487,13 +441,11 @@ declare module Microsoft.Maps {
|
||||
|
||||
constructor(options: TileLayerOptions);
|
||||
|
||||
getOpacty(): number;
|
||||
getOpacity(): number;
|
||||
getTileSource(projection: string): TileSource;
|
||||
getZIndex(): number;
|
||||
setOptions(options: TileLayerOptions): void;
|
||||
toString(): string;
|
||||
|
||||
tiledownloadcomplete: () => void;
|
||||
}
|
||||
|
||||
export class TileSource {
|
||||
@@ -509,7 +461,7 @@ declare module Microsoft.Maps {
|
||||
export interface TileSourceOptions {
|
||||
|
||||
height?: number;
|
||||
uriConstructor: string;
|
||||
uriConstructor: any;
|
||||
width?: number;
|
||||
}
|
||||
|
||||
@@ -550,9 +502,18 @@ declare module Microsoft.Maps {
|
||||
removeAccuracyCircle(): void;
|
||||
}
|
||||
|
||||
export interface PositionOptionsErrorCallbackResult {
|
||||
internalError: PositionError;
|
||||
errorCode:number;
|
||||
}
|
||||
export interface PositionOptions {
|
||||
enableHighAccuracy?: boolean;
|
||||
errorCallback?:(result:PositionOptionsErrorCallbackResult)=>void;
|
||||
}
|
||||
|
||||
export interface PositionCircleOptions {
|
||||
polygonOptions: PolygonOptions;
|
||||
showOnMap: boolean;
|
||||
showOnMap?: boolean;
|
||||
}
|
||||
|
||||
export class PositionError {
|
||||
@@ -567,7 +528,7 @@ declare module Microsoft.Maps {
|
||||
homeRegion?: string;
|
||||
}
|
||||
|
||||
export function loadModule(moduleKey: string, options: ModuleOptions): void;
|
||||
export function loadModule(moduleKey: string, options?: ModuleOptions): void;
|
||||
export function moduleLoaded(moduleKey: string): void;
|
||||
export function registerModule(moduleKey: string, scriptUrl: string, options?: ModuleOptions): void;
|
||||
}
|
||||
|
||||
Vendored
+1
-2
@@ -20,8 +20,7 @@ declare class Promise<R> implements Promise.Thenable<R> {
|
||||
/**
|
||||
* Create a new promise. The passed in function will receive functions `resolve` and `reject` as its arguments which can be called to seal the fate of the created promise.
|
||||
*/
|
||||
constructor(callback: (resolve: (thenable: Promise.Thenable<R>) => void, reject: (error: any) => void) => void);
|
||||
constructor(callback: (resolve: (result: R) => void, reject: (error: any) => void) => void);
|
||||
constructor(callback: (resolve: (thenableOrResult: R | Promise.Thenable<R>) => void, reject: (error: any) => void) => void);
|
||||
|
||||
/**
|
||||
* Promises/A+ `.then()` with progress handler. Returns a new promise chained from this promise. The new promise will be rejected or resolved dedefer on the passed `fulfilledHandler`, `rejectedHandler` and the state of this promise.
|
||||
|
||||
@@ -144,6 +144,10 @@ var BlueBird: typeof Promise;
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
var nodeCallbackFunc = (callback: (err: any, result: string) => void) => {}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
fooThen = fooProm;
|
||||
barThen = barProm;
|
||||
|
||||
@@ -616,6 +620,7 @@ func = Promise.promisify(f, obj);
|
||||
;
|
||||
|
||||
obj = Promise.promisifyAll(obj);
|
||||
anyProm = Promise.fromNode(callback => nodeCallbackFunc(callback));
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
|
||||
Vendored
+8
-3
@@ -20,8 +20,7 @@ declare class Promise<R> implements Promise.Thenable<R>, Promise.Inspection<R> {
|
||||
/**
|
||||
* Create a new promise. The passed in function will receive functions `resolve` and `reject` as its arguments which can be called to seal the fate of the created promise.
|
||||
*/
|
||||
constructor(callback: (resolve: (thenable: Promise.Thenable<R>) => void, reject: (error: any) => void) => void);
|
||||
constructor(callback: (resolve: (result: R) => void, reject: (error: any) => void) => void);
|
||||
constructor(callback: (resolve: (thenableOrResult: R | Promise.Thenable<R>) => void, reject: (error: any) => void) => void);
|
||||
|
||||
/**
|
||||
* Promises/A+ `.then()` with progress handler. Returns a new promise chained from this promise. The new promise will be rejected or resolved dedefer on the passed `fulfilledHandler`, `rejectedHandler` and the state of this promise.
|
||||
@@ -416,7 +415,13 @@ declare class Promise<R> implements Promise.Thenable<R>, Promise.Inspection<R> {
|
||||
* Note that the original methods on the object are not overwritten but new methods are created with the `Async`-postfix. For example, if you `promisifyAll()` the node.js `fs` object use `fs.statAsync()` to call the promisified `stat` method.
|
||||
*/
|
||||
// TODO how to model promisifyAll?
|
||||
static promisifyAll(target: Object): Object;
|
||||
static promisifyAll(target: Object, options?: Object): Object;
|
||||
|
||||
|
||||
/**
|
||||
* Returns a promise that is resolved by a node style callback function.
|
||||
*/
|
||||
static fromNode(resolver: (callback: (err: any, result: any) => void) => void): Promise<any>;
|
||||
|
||||
/**
|
||||
* Returns a function that can use `yield` to run asynchronous code synchronously. This feature requires the support of generators which are drafted in the next version of the language. Node version greater than `0.11.2` is required and needs to be executed with the `--harmony-generators` (or `--harmony`) command-line switch.
|
||||
|
||||
Vendored
+1
-1
@@ -6,7 +6,7 @@
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
|
||||
declare module "body-parser" {
|
||||
import express = require('express');
|
||||
import * as express from "express";
|
||||
|
||||
/**
|
||||
* bodyParser: use individual json/urlencoded middlewares
|
||||
|
||||
Vendored
+2
-1
@@ -6,7 +6,8 @@
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
declare module Boom {
|
||||
interface BoomError {
|
||||
|
||||
export interface BoomError {
|
||||
data: any;
|
||||
reformat: () => void;
|
||||
isBoom: boolean;
|
||||
|
||||
@@ -27,14 +27,12 @@ bootbox.prompt("Enter 'ok' to pass test", function (result) {
|
||||
console.log(result);
|
||||
});
|
||||
bootbox.prompt({
|
||||
title: "Wassup?",
|
||||
message: "Enter 'ok' to pass test", callback: function (result) {
|
||||
console.log(result);
|
||||
}
|
||||
});
|
||||
bootbox.prompt({
|
||||
size: "large",
|
||||
title: "Wassup?",
|
||||
message: "Enter 'ok' to pass test", callback: function (result) {
|
||||
console.log(result);
|
||||
}
|
||||
@@ -42,6 +40,7 @@ bootbox.prompt({
|
||||
|
||||
|
||||
bootbox.dialog({
|
||||
title: "Wassup?",
|
||||
message: "Test Dialog",
|
||||
callback: function (result) { }
|
||||
});
|
||||
|
||||
Vendored
+7
-3
@@ -1,6 +1,6 @@
|
||||
// Type definitions for Bootbox 4.4.0
|
||||
// Project: https://github.com/makeusabrew/bootbox
|
||||
// Definitions by: Vincent Bortone <https://github.com/vbortone/>, Kon Pik <https://github.com/konpikwastaken/>, Anup Kattel <https://github.com/kanup/>
|
||||
// Definitions by: Vincent Bortone <https://github.com/vbortone/>, Kon Pik <https://github.com/konpikwastaken/>, Anup Kattel <https://github.com/kanup/>, Dominik Schroeter <https://github.com/icereed/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../jquery/jquery.d.ts" />
|
||||
@@ -28,6 +28,10 @@ interface BootboxButton {
|
||||
callback?: () => any;
|
||||
}
|
||||
|
||||
interface BootboxButtonMap {
|
||||
[key: string]: BootboxButton | Function;
|
||||
}
|
||||
|
||||
interface BootboxDialogOptions {
|
||||
message: string | Element;
|
||||
title?: string | Element;
|
||||
@@ -40,7 +44,7 @@ interface BootboxDialogOptions {
|
||||
animate?: boolean;
|
||||
className?: string;
|
||||
size?: string;
|
||||
buttons?: Object; // complex object where each key is of type BootboxButton
|
||||
buttons?: BootboxButtonMap; // complex object where each key is of type BootboxButton
|
||||
}
|
||||
|
||||
interface BootboxDefaultOptions {
|
||||
@@ -69,7 +73,7 @@ interface BootboxStatic {
|
||||
dialog(options: BootboxDialogOptions): JQuery;
|
||||
setDefaults(options: BootboxDefaultOptions): void;
|
||||
hideAll(): void;
|
||||
|
||||
|
||||
addLocale(name: string, values: BootboxLocaleValues): void;
|
||||
removeLocale(name: string): void;
|
||||
setLocale(name: string): void;
|
||||
|
||||
Vendored
+1
-1
@@ -7,7 +7,7 @@
|
||||
/// <reference path="../jquery/jquery.d.ts"/>
|
||||
|
||||
interface ModalOptions {
|
||||
backdrop?: boolean;
|
||||
backdrop?: boolean|string;
|
||||
keyboard?: boolean;
|
||||
show?: boolean;
|
||||
remote?: string;
|
||||
|
||||
@@ -57,7 +57,7 @@ var log = bunyan.createLogger(options);
|
||||
log.addSerializers(bunyan.stdSerializers);
|
||||
var child = log.child({name: 'child'});
|
||||
child.reopenFileStreams();
|
||||
log.addStream({path: '/dev/null', name: 'stream1'});
|
||||
log.addStream({path: '/dev/null'});
|
||||
child.level(bunyan.DEBUG);
|
||||
child.level('debug');
|
||||
child.levels(0, bunyan.ERROR);
|
||||
|
||||
Vendored
+2
-1
@@ -18,6 +18,7 @@ declare module "bunyan" {
|
||||
child(obj:Object, simple?:boolean):Logger;
|
||||
reopenFileStreams():void;
|
||||
|
||||
level():string|number;
|
||||
level(value: number | string):void;
|
||||
levels(name: number | string, value: number | string):void;
|
||||
|
||||
@@ -50,7 +51,7 @@ declare module "bunyan" {
|
||||
interface LoggerOptions {
|
||||
name: string;
|
||||
streams?: Stream[];
|
||||
level?: string;
|
||||
level?: string | number;
|
||||
stream?: WritableStream;
|
||||
serializers?: Serializers;
|
||||
src?: boolean;
|
||||
|
||||
Vendored
+177
-160
@@ -108,7 +108,7 @@ declare module CanvasJS {
|
||||
*/
|
||||
animationEnabled?: boolean;
|
||||
/**
|
||||
* While exporting any chart, “Chart” is used as the default fine name with corresponding extension “jpg” or “png”. You can override this name using exportFileName property.
|
||||
* While exporting any chart, "Chart" is used as the default fine name with corresponding extension "jpg" or "png". You can override this name using exportFileName property.
|
||||
* Default: Chart
|
||||
*/
|
||||
exportFileName?: string;
|
||||
@@ -126,25 +126,25 @@ declare module CanvasJS {
|
||||
zoomEnabled?: boolean;
|
||||
/**
|
||||
* Sets the theme of the Chart. Various predefined themes are bundled along with the library. User can easily switch these themes by changing theme property to the below mentioned options.
|
||||
* Default: “theme1″
|
||||
* Options: “theme1″,”theme2″, “theme3″
|
||||
* Default: "theme1"
|
||||
* Options: "theme1","theme2", "theme3"
|
||||
*/
|
||||
theme?: string;
|
||||
/**
|
||||
* Sets the background color of entire Chart Area. Values can be “HTML Color Name”, “hex code” or “rgba values”
|
||||
* Default: “white”
|
||||
* Example: “yellow”, “#F5DEB3″..
|
||||
* Sets the background color of entire Chart Area. Values can be "HTML Color Name", "hex code" or "rgba values"
|
||||
* Default: "white"
|
||||
* Example: "yellow", "#F5DEB3"..
|
||||
*/
|
||||
backgroundColor?: string;
|
||||
/**
|
||||
* Sets the colorSet of the Chart. Color Set is an array of colors that are used to render data. Various predefined Color Sets are bundled along with the library. You can either choose from the pre-defined Color Sets or define your own Color Set.
|
||||
* Default: “colorset1″ or as defined in the selected theme
|
||||
* Example: “colorSet1″, “colorSet2″, “colorSet3″
|
||||
* Default: "colorset1" or as defined in the selected theme
|
||||
* Example: "colorSet1", "colorSet2", "colorSet3"
|
||||
*/
|
||||
colorSet?: string;
|
||||
/**
|
||||
* CanvasJS allows you to localize various culture / language / country specific elements in the Chart like number formatting style – where you can choose which character to use as a decimal separator and as a digit group separator (also referred to as a thousand separator). By default CanvasJS is set to Neutral English Culture – “en”.
|
||||
* Default: “en”
|
||||
* CanvasJS allows you to localize various culture / language / country specific elements in the Chart like number formatting style – where you can choose which character to use as a decimal separator and as a digit group separator (also referred to as a thousand separator). By default CanvasJS is set to Neutral English Culture – "en".
|
||||
* Default: "en"
|
||||
*/
|
||||
culture?: string;
|
||||
/**
|
||||
@@ -190,19 +190,19 @@ declare module CanvasJS {
|
||||
/**
|
||||
* Sets the Title’s text.
|
||||
* Default: null
|
||||
* Example: “Chart title”
|
||||
* Example: "Chart title"
|
||||
*/
|
||||
text?: string;
|
||||
/**
|
||||
* This property lets you align the Chart Title vertically.
|
||||
* Default: “top”
|
||||
* Options: “top”, “center”, “bottom”
|
||||
* Default: "top"
|
||||
* Options: "top", "center", "bottom"
|
||||
*/
|
||||
verticalAlign?: string;
|
||||
/**
|
||||
* This property lets you align the Chart Title horizontally.
|
||||
* Default: “center”
|
||||
* Options: “left”, “right”, “center”
|
||||
* Default: "center"
|
||||
* Options: "left", "right", "center"
|
||||
*/
|
||||
horizontalAlign?: string;
|
||||
/**
|
||||
@@ -213,26 +213,26 @@ declare module CanvasJS {
|
||||
fontSize?: number;
|
||||
/**
|
||||
* Sets the Font Family of Chart Title.
|
||||
* Default: “Calibri, Optima, Candara, Verdana, Geneva, sans-serif”
|
||||
* Example: “arial” , “tahoma”, “verdana” ..
|
||||
* Default: "Calibri, Optima, Candara, Verdana, Geneva, sans-serif"
|
||||
* Example: "arial" , "tahoma", "verdana" ..
|
||||
*/
|
||||
fontFamily?: string;
|
||||
/**
|
||||
* Sets the Font Weight used in the Chart Title.
|
||||
* Default: “bold”
|
||||
* Options: “lighter”, “normal”, “bold” , “bolder”
|
||||
* Default: "bold"
|
||||
* Options: "lighter", "normal", "bold" , "bolder"
|
||||
*/
|
||||
fontWeight?: string;
|
||||
/**
|
||||
* Sets the font color of Chart Title. The value of fontColor can be a “HTML Color Name” or “hex” code .
|
||||
* Default: “#3A3A3A”
|
||||
* Example: “red”, “#FAC003″ ..
|
||||
* Sets the font color of Chart Title. The value of fontColor can be a "HTML Color Name" or "hex" code .
|
||||
* Default: "#3A3A3A"
|
||||
* Example: "red", "#FAC003" ..
|
||||
*/
|
||||
fontColor?: string;
|
||||
/**
|
||||
* Sets the fontStyle of Chart Title. fontStyle can be set to one of the below options.
|
||||
* Default: “normal”
|
||||
* Options: “normal”, “italic” , “oblique”
|
||||
* Default: "normal"
|
||||
* Options: "normal", "italic" , "oblique"
|
||||
*/
|
||||
fontStyle?: string;
|
||||
/**
|
||||
@@ -248,15 +248,15 @@ declare module CanvasJS {
|
||||
*/
|
||||
cornerRadius?: number;
|
||||
/**
|
||||
* Sets the color of border around Chart Title. Values of borderColor can be “HTML Color Name” or “hex” code .
|
||||
* Default: “black”
|
||||
* Example: “red”, “#FF0000″ ..
|
||||
* Sets the color of border around Chart Title. Values of borderColor can be "HTML Color Name" or "hex" code .
|
||||
* Default: "black"
|
||||
* Example: "red", "#FF0000" ..
|
||||
*/
|
||||
borderColor?: string;
|
||||
/**
|
||||
* Sets the background color of Chart Title. Values can be “HTML Color Name” or “hex” code.
|
||||
* Sets the background color of Chart Title. Values can be "HTML Color Name" or "hex" code.
|
||||
* Default: null
|
||||
* Example: “red”, “#FF0000″ ..
|
||||
* Example: "red", "#FF0000" ..
|
||||
*/
|
||||
backgroundColor?: string;
|
||||
/**
|
||||
@@ -274,6 +274,13 @@ declare module CanvasJS {
|
||||
}
|
||||
|
||||
interface ChartLegendOptions {
|
||||
/**
|
||||
* Sets the cursor type for legend items.
|
||||
* Default: "default"
|
||||
* Examples: "pointer", "crosshair" ..
|
||||
*/
|
||||
cursor?: string;
|
||||
|
||||
/**
|
||||
* Sets the font Size of Legend Text in pixels.
|
||||
* Default: 12
|
||||
@@ -282,38 +289,38 @@ declare module CanvasJS {
|
||||
fontSize?: number;
|
||||
/**
|
||||
* Sets the Font Family of Legend Text.
|
||||
* Default: “calibri”
|
||||
* Example: “arial” , “tahoma”, “verdana” ..
|
||||
* Default: "calibri"
|
||||
* Example: "arial" , "tahoma", "verdana" ..
|
||||
*/
|
||||
fontFamily?: string;
|
||||
/**
|
||||
* Sets the font color of Legend Text . The value of fontColor can be a “HTML Color Name” or “hex” code .
|
||||
* Default: “black”
|
||||
* Example: “red”, “#FAC003″ ..
|
||||
* Sets the font color of Legend Text . The value of fontColor can be a "HTML Color Name" or "hex" code .
|
||||
* Default: "black"
|
||||
* Example: "red", "#FAC003" ..
|
||||
*/
|
||||
fontColor?: string;
|
||||
/**
|
||||
* Sets the Font Weight of Legend Text.
|
||||
* Default: “normal”
|
||||
* Example: “lighter”, “normal”, “bold” , “bolder”
|
||||
* Default: "normal"
|
||||
* Example: "lighter", "normal", "bold" , "bolder"
|
||||
*/
|
||||
fontWeight?: string;
|
||||
/**
|
||||
* Sets the fontStyle of Legend Text. fontStyle can be set to one of the below options.
|
||||
* Default: “normal”
|
||||
* Example: “normal”, “italic” , “oblique”
|
||||
* Default: "normal"
|
||||
* Example: "normal", "italic" , "oblique"
|
||||
*/
|
||||
fontStyle?: string;
|
||||
/**
|
||||
* This property lets you align the Legend Position vertically.
|
||||
* Default: “bottom”
|
||||
* Example: “top”, “center”, “bottom”
|
||||
* Default: "bottom"
|
||||
* Example: "top", "center", "bottom"
|
||||
*/
|
||||
verticalAlign?: string;
|
||||
/**
|
||||
* This property lets you align the Legend Position horizontally.
|
||||
* Default: “right”
|
||||
* Example: “left”, “right”, “center”
|
||||
* Default: "right"
|
||||
* Example: "left", "right", "center"
|
||||
*/
|
||||
horizontalAlign?: string;
|
||||
/**
|
||||
@@ -373,13 +380,13 @@ declare module CanvasJS {
|
||||
/**
|
||||
* Sets the Axis Title.
|
||||
* Default: null
|
||||
* Example: “Axis X Title”
|
||||
* Example: "Axis X Title"
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* Sets the Font Color of Axis Title. The value of titleFontColor can be a “HTML Color Name” or “hex” code .
|
||||
* Default: “#666666″
|
||||
* Example: “red”, “#006400″ .
|
||||
* Sets the Font Color of Axis Title. The value of titleFontColor can be a "HTML Color Name" or "hex" code .
|
||||
* Default: "#666666"
|
||||
* Example: "red", "#006400" .
|
||||
*/
|
||||
titleFontColor?: string;
|
||||
/**
|
||||
@@ -390,20 +397,20 @@ declare module CanvasJS {
|
||||
titleFontSize?: number;
|
||||
/**
|
||||
* Sets the Font Family of Axis Title.
|
||||
* Default: “Calibri, Optima, Candara, Verdana, Geneva, sans-serif”
|
||||
* Example: “calibri”, “tahoma, “verdana” ..
|
||||
* Default: "Calibri, Optima, Candara, Verdana, Geneva, sans-serif"
|
||||
* Example: "calibri", "tahoma, "verdana" ..
|
||||
*/
|
||||
titleFontFamily?: string;
|
||||
/**
|
||||
* Sets the Font Weight used in the Axis Title. It can be set to one of the options below.
|
||||
* Default: “normal”
|
||||
* Options: “lighter”, “normal”, “bold” , “bolder”
|
||||
* Default: "normal"
|
||||
* Options: "lighter", "normal", "bold" , "bolder"
|
||||
*/
|
||||
titleFontWeight?: string;
|
||||
/**
|
||||
* Sets the Font Style of Axis Title. It can be set to one of the below options.
|
||||
* Default: “normal”
|
||||
* Options: “normal”, “italic” , “oblique”
|
||||
* Default: "normal"
|
||||
* Options: "normal", "italic" , "oblique"
|
||||
*/
|
||||
titleFontStyle?: string;
|
||||
/**
|
||||
@@ -419,9 +426,9 @@ declare module CanvasJS {
|
||||
*/
|
||||
labelAngle?: number;
|
||||
/**
|
||||
* Sets the Axis Label color. The value of labelFontColor can be a “HTML Color Name” or “hex” code .
|
||||
* Default: “grey”
|
||||
* Example: “red”, “#FAC003″ ..
|
||||
* Sets the Axis Label color. The value of labelFontColor can be a "HTML Color Name" or "hex" code .
|
||||
* Default: "grey"
|
||||
* Example: "red", "#FAC003" ..
|
||||
*/
|
||||
labelFontColor?: string;
|
||||
/**
|
||||
@@ -432,32 +439,32 @@ declare module CanvasJS {
|
||||
labelFontSize?: number;
|
||||
/**
|
||||
* Sets the Font Family of Axis labels.
|
||||
* Default: “Calibri, Optima, Candara, Verdana, Geneva, sans-serif”
|
||||
* Example: “calibri”, “tahoma”, “verdana” ..
|
||||
* Default: "Calibri, Optima, Candara, Verdana, Geneva, sans-serif"
|
||||
* Example: "calibri", "tahoma", "verdana" ..
|
||||
*/
|
||||
labelFontFamily?: string;
|
||||
/**
|
||||
* Set the font Weight used in Axis Labels. It can be set to one of the options below.
|
||||
* Default: “normal”
|
||||
* Options: “lighter”, “normal”, “bold” , “bolder”
|
||||
* Default: "normal"
|
||||
* Options: "lighter", "normal", "bold" , "bolder"
|
||||
*/
|
||||
labelFontWeight?: string;
|
||||
/**
|
||||
* Sets the Font Style of Axis Labels. It can be set to one of the below options.
|
||||
* Default: “normal”
|
||||
* Options: “italic”, “oblique”, “normal”
|
||||
* Default: "normal"
|
||||
* Options: "italic", "oblique", "normal"
|
||||
*/
|
||||
labelFontStyle?: string;
|
||||
/**
|
||||
* A string that prepends all the labels on axisX.
|
||||
* Default: null
|
||||
* Example: “$”,”cat”..
|
||||
* Example: "$","cat"..
|
||||
*/
|
||||
prefix?: string;
|
||||
/**
|
||||
* A string that appends all the labels on axisX.
|
||||
* Default: null
|
||||
* Example: “$”,”cat”..
|
||||
* Example: "$","cat"..
|
||||
*/
|
||||
suffix?: string;
|
||||
/**
|
||||
@@ -483,10 +490,10 @@ declare module CanvasJS {
|
||||
*/
|
||||
interval?: number;
|
||||
/**
|
||||
* intervalType is the unit of interval property. intervalType is by default set to “number” and hence you need to specify the interval type (eg “week”, “month”, etc) depending on the type of interval you intend to set. If required interval is 3 months, you need to provide interval as 3 and intervalType as “month”
|
||||
* Default: Automatically handled when interval property is not set. Defaults to “number” when you set the interval.
|
||||
* Option: “number”,”millisecond” ,”second”,” minute”, “hour”, “day”, “month” ,”year”
|
||||
* Example: for interval as 15 minutes, set interval as 15, and set intervalType as “minute”,
|
||||
* intervalType is the unit of interval property. intervalType is by default set to "number" and hence you need to specify the interval type (eg "week", "month", etc) depending on the type of interval you intend to set. If required interval is 3 months, you need to provide interval as 3 and intervalType as "month"
|
||||
* Default: Automatically handled when interval property is not set. Defaults to "number" when you set the interval.
|
||||
* Option: "number","millisecond" ,"second"," minute", "hour", "day", "month" ,"year"
|
||||
* Example: for interval as 15 minutes, set interval as 15, and set intervalType as "minute",
|
||||
*/
|
||||
intervalType?: string;
|
||||
/**
|
||||
@@ -496,9 +503,9 @@ declare module CanvasJS {
|
||||
*/
|
||||
tickLength?: number;
|
||||
/**
|
||||
* Sets the color of Tick Marks drawn on the axis. The value of tickColor can be a “HTML Color Name” or “hex” code .
|
||||
* Default: “#BBBBBB”
|
||||
* Example: “red”, “#006400″.
|
||||
* Sets the color of Tick Marks drawn on the axis. The value of tickColor can be a "HTML Color Name" or "hex" code .
|
||||
* Default: "#BBBBBB"
|
||||
* Example: "red", "#006400".
|
||||
*/
|
||||
tickColor?: string;
|
||||
/**
|
||||
@@ -508,9 +515,9 @@ declare module CanvasJS {
|
||||
*/
|
||||
tickThickness?: number;
|
||||
/**
|
||||
* Sets the color of Axis line. Axis line color can be a “HTML Color Name” or “hex” code .
|
||||
* Default: “#BBBBBB”
|
||||
* Example: “blue”,”#21AB13″..
|
||||
* Sets the color of Axis line. Axis line color can be a "HTML Color Name" or "hex" code .
|
||||
* Default: "#BBBBBB"
|
||||
* Example: "blue","#21AB13"..
|
||||
*/
|
||||
lineColor?: string;
|
||||
/**
|
||||
@@ -520,9 +527,9 @@ declare module CanvasJS {
|
||||
*/
|
||||
lineThickness?: string;
|
||||
/**
|
||||
* Sets the Interlacing Color that alternates between the set interval. If the interval is not set explicitly, then the auto calculated interval is considered. The value of interlacedColor can be a “HTML Color Name” or “hex” code .
|
||||
* Sets the Interlacing Color that alternates between the set interval. If the interval is not set explicitly, then the auto calculated interval is considered. The value of interlacedColor can be a "HTML Color Name" or "hex" code .
|
||||
* Default: null
|
||||
* Example: “#F8F1E4″, “#FEFDDF” ….
|
||||
* Example: "#F8F1E4", "#FEFDDF" ….
|
||||
*/
|
||||
interlaceColor?: string;
|
||||
/**
|
||||
@@ -532,11 +539,21 @@ declare module CanvasJS {
|
||||
*/
|
||||
gridThickness?: number;
|
||||
/**
|
||||
* Sets the Color of Grid Lines. Value of gridColor can be a “HTML Color Name” or “hex” code .
|
||||
* Default: “#BBBBBB”
|
||||
* Example: “red”, “#FEFDDF” ..
|
||||
* Sets the Color of Grid Lines. Value of gridColor can be a "HTML Color Name" or "hex" code .
|
||||
* Default: "#BBBBBB"
|
||||
* Example: "red", "#FEFDDF" ..
|
||||
*/
|
||||
gridColor?: string;
|
||||
|
||||
/**
|
||||
* Sets the Interlacing Color that alternates between the set interval.
|
||||
* If the interval is not set explicitly, then the auto calculated interval is considered.
|
||||
* The value of interlacedColor can be an "HTML Color Name" or "hex" code.
|
||||
* Default: null
|
||||
* Example: "#F8F1E4", "#FEFDDF"
|
||||
*/
|
||||
interlacedColor?: string;
|
||||
|
||||
/**
|
||||
* Strip Lines are vertical or horizontal lines used to highlight/mark a certain region on the plot area. You can choose whether to draw a line at a specific position or shade a region on the plot area. Strip Lines are sometimes referred to as trend lines.
|
||||
* If you want to just mark a certain position on the axis, you can set the value attribute and it’ll draw a line at that position with the set thickness. If you want to shade a region instead, you need to set startValue and endValue attributes. This will fill the area within the specified range.
|
||||
@@ -573,32 +590,32 @@ declare module CanvasJS {
|
||||
thickness?: number;
|
||||
/**
|
||||
* Sets the color of the stripLine.
|
||||
* Default: “orange”
|
||||
* Example: “green”, “#23EA23″
|
||||
* Default: "orange"
|
||||
* Example: "green", "#23EA23"
|
||||
*/
|
||||
color?: string;
|
||||
/**
|
||||
* Sets the label of the stripLine. These are shown on top of axis labels.
|
||||
* Default: “” (empty string)
|
||||
* Example: “Threshold”, “Deaths in 1920″
|
||||
* Default: "" (empty string)
|
||||
* Example: "Threshold", "Deaths in 1920"
|
||||
*/
|
||||
label?: string;
|
||||
/**
|
||||
* Sets the background color of stripLine’s label.
|
||||
* Default: “#eeeeee”
|
||||
* Example: “red”,”#fabd76″
|
||||
* Default: "#eeeeee"
|
||||
* Example: "red","#fabd76"
|
||||
*/
|
||||
labelBackgroundColor?: string;
|
||||
/**
|
||||
* Sets the font-family of stripLine’s label. If the first font is not found in the system from the specified font-family list, it tries to use the next font in the list.
|
||||
* Default: “arial”
|
||||
* Example: “Arial, Trebuchet MS, Tahoma, sans-serif”
|
||||
* Default: "arial"
|
||||
* Example: "Arial, Trebuchet MS, Tahoma, sans-serif"
|
||||
*/
|
||||
labelFontFamily?: string;
|
||||
/**
|
||||
* Sets the font color of label.
|
||||
* Default: “orange”
|
||||
* Example: “blue”,”#4135e9″
|
||||
* Default: "orange"
|
||||
* Example: "blue","#4135e9"
|
||||
*/
|
||||
labelFontColor?: string;
|
||||
/**
|
||||
@@ -609,14 +626,14 @@ declare module CanvasJS {
|
||||
labelFontSize?: number;
|
||||
/**
|
||||
* Sets the font weight of stripLine’s label.
|
||||
* Default: “normal”
|
||||
* Example: “lighter”,”normal”,”bold”,”bolder”
|
||||
* Default: "normal"
|
||||
* Example: "lighter","normal","bold","bolder"
|
||||
*/
|
||||
labelFontWeight?: string;
|
||||
/**
|
||||
* Sets the font style of stripLine’s label.
|
||||
* Default: “normal”
|
||||
* Example: “normal”,”italic”,”oblique”
|
||||
* Default: "normal"
|
||||
* Example: "normal","italic","oblique"
|
||||
*/
|
||||
labelFontStyle?: string;
|
||||
}
|
||||
@@ -657,7 +674,7 @@ declare module CanvasJS {
|
||||
/**
|
||||
* Sets the border color around Tool Tip. When not set it takes the color of corresponding dataSeries or dataPoint.
|
||||
* Default: dataSeries color/ dataPoint color
|
||||
* Example: “red”, “#808080″..
|
||||
* Example: "red", "#808080"..
|
||||
*/
|
||||
borderColor?: string;
|
||||
}
|
||||
@@ -665,53 +682,53 @@ declare module CanvasJS {
|
||||
interface ChartDataCommon {
|
||||
/**
|
||||
* Sets the dataPoint Name. dataPoint name is shown in various places like toolTip & legend unless overridden.
|
||||
* Default: Automatically Named (“dataPoint 1″, “dataPoint 2″ .. )
|
||||
* Example: “apple”, “mango” ..
|
||||
* Default: Automatically Named ("dataPoint 1", "dataPoint 2" .. )
|
||||
* Example: "apple", "mango" ..
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Sets the color of dataSeries. The value of tickColor can be a “HTML Color Name” or “Hex Code”.
|
||||
* Sets the color of dataSeries. The value of tickColor can be a "HTML Color Name" or "Hex Code".
|
||||
* Default: Automatically set from Theme.
|
||||
* Example: “red”, “green” ..
|
||||
* Example: "red", "green" ..
|
||||
*/
|
||||
color?: string;
|
||||
/**
|
||||
* Instead of setting string values for all indexLabels, you can also use keywords like x, y, etc that will automatically show corresponding properties as indexLabel. This will allow you to define indexLabel at the series level once. While setting indexLabel you specify a keyword by enclosing it in flower brackets like {x}, {y}, {color}, etc.
|
||||
* Range Charts have two indexLabels – one for each y value. This requires the use of a special keyword #index to show index label on either sides of the column/bar/area.
|
||||
* eg: indexLabel: “{x}: {y[#index]}”
|
||||
* eg: indexLabel: "{x}: {y[#index]}"
|
||||
* Important keywords to keep in mind are. {x}, {y}, {name}, {label}.
|
||||
* Default: null
|
||||
* Example: “{label}”, “Win”, “x: {x}, y: {y} ”
|
||||
* Example: "{label}", "Win", "x: {x}, y: {y} "
|
||||
*/
|
||||
indexLabel?: string;
|
||||
/**
|
||||
* Using this property you can define whether to render indexLabel “inside” or “outside” the dataPoint.
|
||||
* Default: “outside”
|
||||
* Example: “outside”, “inside”
|
||||
* Using this property you can define whether to render indexLabel "inside" or "outside" the dataPoint.
|
||||
* Default: "outside"
|
||||
* Example: "outside", "inside"
|
||||
*/
|
||||
indexLabelPlacement?: string;
|
||||
/**
|
||||
* Sets the Orientation of indexLabel to “horizontal” or “vertical”.
|
||||
* Default: “horizontal”
|
||||
* Options: “horizontal”, “vertical”
|
||||
* Sets the Orientation of indexLabel to "horizontal" or "vertical".
|
||||
* Default: "horizontal"
|
||||
* Options: "horizontal", "vertical"
|
||||
*/
|
||||
indexLabelOrientation?: string;
|
||||
/**
|
||||
* Sets the Background color of Index Labels. The value of indexLabelBackgroundColor can be a “HTML Color Name” or “Hex Code”.
|
||||
* Sets the Background color of Index Labels. The value of indexLabelBackgroundColor can be a "HTML Color Name" or "Hex Code".
|
||||
* Default: null
|
||||
* Example: “red”, “#FAC003″ ..
|
||||
* Example: "red", "#FAC003" ..
|
||||
*/
|
||||
indexLabelBackgroundColor?: string;
|
||||
/**
|
||||
* Sets the Index Label’s Font Style. It can be set to one of the below options.
|
||||
* Default: “normal”
|
||||
* Options: “italic”, “oblique”, “normal”
|
||||
* Default: "normal"
|
||||
* Options: "italic", "oblique", "normal"
|
||||
*/
|
||||
indexLabelFontStyle?: string;
|
||||
/**
|
||||
* Sets the Index Label’s Font color. The value of IndexLabelFontColor can be a “HTML Color Name” or “Hex Code”.
|
||||
* Default: “grey”
|
||||
* Example: “red”, “#FAC003″ ..
|
||||
* Sets the Index Label’s Font color. The value of IndexLabelFontColor can be a "HTML Color Name" or "Hex Code".
|
||||
* Default: "grey"
|
||||
* Example: "red", "#FAC003" ..
|
||||
*/
|
||||
indexLabelFontColor?: string;
|
||||
/**
|
||||
@@ -722,24 +739,24 @@ declare module CanvasJS {
|
||||
indexLabelFontSize?: number;
|
||||
/**
|
||||
* Sets the Index Label’s Font Family.
|
||||
* Default: “Calibri, Optima, Candara, Verdana, Geneva, sans-serif”
|
||||
* Example: “calibri”, “tahoma”, “verdana”..
|
||||
* Default: "Calibri, Optima, Candara, Verdana, Geneva, sans-serif"
|
||||
* Example: "calibri", "tahoma", "verdana"..
|
||||
*/
|
||||
indexLabelFontFamily?: string;
|
||||
/**
|
||||
* Sets the Index Label’s Font Weight. It can be set to one of the below options.
|
||||
* Default: “normal”
|
||||
* Example: “lighter”, “normal” ,”bold” , “bolder”
|
||||
* Default: "normal"
|
||||
* Example: "lighter", "normal" ,"bold" , "bolder"
|
||||
*/
|
||||
indexLabelFontWeight?: string;
|
||||
/**
|
||||
* Sets the color of line connecting index labels with their dataPoint. It is only applicable for pie and doughnut chart when indexLabelPlacment is outside. The value of indexLineColor can be a “HTML Color Name” or “Hex Code”.
|
||||
* Default: “lightgrey”
|
||||
* Example: “red”, “#FAC003″ ..
|
||||
* Sets the color of line connecting index labels with their dataPoint. It is only applicable for pie and doughnut chart when indexLabelPlacment is outside. The value of indexLineColor can be a "HTML Color Name" or "Hex Code".
|
||||
* Default: "lightgrey"
|
||||
* Example: "red", "#FAC003" ..
|
||||
*/
|
||||
indexLabelLineColor?: string;
|
||||
/**
|
||||
* Sets the thickness of line connecting indexLabel with its corresponding dataPoint. It is only applicable for pie and doughnut chart when indexLabelPlacement is set to “outside”.
|
||||
* Sets the thickness of line connecting indexLabel with its corresponding dataPoint. It is only applicable for pie and doughnut chart when indexLabelPlacement is set to "outside".
|
||||
* Default: 2
|
||||
* Example: 4, 6
|
||||
*/
|
||||
@@ -752,14 +769,14 @@ declare module CanvasJS {
|
||||
/**
|
||||
* Sets marker type to be rendered at each dataPoint. While markers are helpful in highlighting individual dataPoints, they do not help much when the dataPoints are crowded. In case of large number of dataPoints it is recommended to disable markers in order to improve the appearance and performance of chart.
|
||||
* Same marker type is also used in legend unless overridden by legendMarkerType property.
|
||||
* Default: “circle”
|
||||
* Options: “none”, “circle”, “square”, “triangle” and “cross”
|
||||
* Default: "circle"
|
||||
* Options: "none", "circle", "square", "triangle" and "cross"
|
||||
*/
|
||||
markerType?: string;
|
||||
/**
|
||||
* Sets the color of marker that is displayed on the Chart. Legend Marker for the series uses the same Color as set here unless overridden using legendMarkerColor property.
|
||||
* Default: dataSeries Color
|
||||
* Example: “red”, “#008000″ ..
|
||||
* Example: "red", "#008000" ..
|
||||
*/
|
||||
markerColor?: string;
|
||||
/**
|
||||
@@ -769,9 +786,9 @@ declare module CanvasJS {
|
||||
*/
|
||||
markerSize?: number;
|
||||
/**
|
||||
* Sets the border color around marker. Value of markerBorderColor can be “HTML Color Name” or “hex code”.
|
||||
* Sets the border color around marker. Value of markerBorderColor can be "HTML Color Name" or "hex code".
|
||||
* Default: dataSeries color.
|
||||
* Example: “red”, “#008000″ ..
|
||||
* Example: "red", "#008000" ..
|
||||
*/
|
||||
markerBorderColor?: string;
|
||||
/**
|
||||
@@ -782,14 +799,14 @@ declare module CanvasJS {
|
||||
markerBorderThickness?: number;
|
||||
/**
|
||||
* Sets the text that describes the dataSeries in legend.
|
||||
* Default: “DataSeries 1″, “DataSeries 2″ ..etc
|
||||
* Example: “2010″, “2011″..
|
||||
* Default: "DataSeries 1", "DataSeries 2" ..etc
|
||||
* Example: "2010", "2011"..
|
||||
*/
|
||||
legendText?: string;
|
||||
/**
|
||||
* Sets the Legend Marker to one of the options below. This property is used to override the default marker in legend, which is same as dataSeries Marker Type.
|
||||
* Default: same as markerType
|
||||
* Options: “circle”, “square”, “cross” and “triangle”
|
||||
* Options: "circle", "square", "cross" and "triangle"
|
||||
*/
|
||||
legendMarkerType?: string;
|
||||
/**
|
||||
@@ -798,9 +815,9 @@ declare module CanvasJS {
|
||||
*/
|
||||
click?: (event: ChartEvent) => void;
|
||||
/**
|
||||
* Sets the color of marker that is displayed on legend. This property overrides default Marker’s Color in Legend, which is same as dataSeries Marker Color. Value of legendMarkerColor can be “HTML Color Name” or “hex code”.
|
||||
* Sets the color of marker that is displayed on legend. This property overrides default Marker’s Color in Legend, which is same as dataSeries Marker Color. Value of legendMarkerColor can be "HTML Color Name" or "hex code".
|
||||
* Default: dataSeries marker color
|
||||
* Example: “red”, “#008000″ ..
|
||||
* Example: "red", "#008000" ..
|
||||
*/
|
||||
legendMarkerColor?: string;
|
||||
/**
|
||||
@@ -829,39 +846,39 @@ declare module CanvasJS {
|
||||
visible?: boolean;
|
||||
/**
|
||||
* Sets the type of chart to be rendered for corresponding dataSeries. One can choose from the following options.
|
||||
* Default: “column”
|
||||
* Default: "column"
|
||||
* Options:
|
||||
* “line”
|
||||
* “column”
|
||||
* “bar”
|
||||
* “area”
|
||||
* “spline”
|
||||
* “splineArea”
|
||||
* “stepLine”
|
||||
* “scatter”
|
||||
* “bubble”
|
||||
* “stackedColumn”
|
||||
* “stackedBar”
|
||||
* “stackedArea”
|
||||
* “stackedColumn100″
|
||||
* “stackedBar100″
|
||||
* “stackedArea100″
|
||||
* “pie”
|
||||
* “doughnut”
|
||||
* "line"
|
||||
* "column"
|
||||
* "bar"
|
||||
* "area"
|
||||
* "spline"
|
||||
* "splineArea"
|
||||
* "stepLine"
|
||||
* "scatter"
|
||||
* "bubble"
|
||||
* "stackedColumn"
|
||||
* "stackedBar"
|
||||
* "stackedArea"
|
||||
* "stackedColumn100"
|
||||
* "stackedBar100"
|
||||
* "stackedArea100"
|
||||
* "pie"
|
||||
* "doughnut"
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* Setting axisYType lets you choose between primary and secondary Y Axis for a dataSeries to plot against. By choosing “secondary” Axis you can plot the series against axisY2.
|
||||
* Setting axisYType lets you choose between primary and secondary Y Axis for a dataSeries to plot against. By choosing "secondary" Axis you can plot the series against axisY2.
|
||||
* In case of Multi-Series or Combinational Charts, one can assign primary axis to some series and secondary axis to other series.
|
||||
* This is helpful when dataSeries objects use different unit of measurement or range of data. By default, all series are plotted against primary Y axis.
|
||||
* Default: “primary”
|
||||
* Options: “primary”, “secondary”
|
||||
* Default: "primary"
|
||||
* Options: "primary", "secondary"
|
||||
*/
|
||||
axisYType?: string;
|
||||
/**
|
||||
* This defines the data type of x values. Data Type is normally figured out by default based on the object type that is assigned to x. But if you are providing time stamp (which is integer) values instead of Date objects, you’ll have to explicitly set the xValueType to “dateTime”.
|
||||
* This defines the data type of x values. Data Type is normally figured out by default based on the object type that is assigned to x. But if you are providing time stamp (which is integer) values instead of Date objects, you’ll have to explicitly set the xValueType to "dateTime".
|
||||
* Default: Automatically Calculated
|
||||
* Options: “number”, “dateTime”
|
||||
* Options: "number", "dateTime"
|
||||
*/
|
||||
xValueType?: string;
|
||||
/**
|
||||
@@ -878,8 +895,8 @@ declare module CanvasJS {
|
||||
zValueFormatString?: string;
|
||||
/**
|
||||
* Sets the bevel property, which creates a chiselled effect at the corners of a Column Charts and Bar Charts.
|
||||
* Default: “true”
|
||||
* Example: “true”, “false”
|
||||
* Default: "true"
|
||||
* Example: "true", "false"
|
||||
*/
|
||||
bevelEnabled?: boolean;
|
||||
/**
|
||||
@@ -907,8 +924,8 @@ declare module CanvasJS {
|
||||
showInLegend?: boolean;
|
||||
/**
|
||||
* In candle Stick chart, when Closing Price is greater than Opening price, the body is filled with white by default and it can be overridden by risingColor property.
|
||||
* Default: “white”
|
||||
* Options: “red”, “#DD7E86″, etc.
|
||||
* Default: "white"
|
||||
* Options: "red", "#DD7E86", etc.
|
||||
*/
|
||||
risingColor?: string;
|
||||
/**
|
||||
@@ -940,7 +957,7 @@ declare module CanvasJS {
|
||||
/**
|
||||
* Sets label value of a dataPoint. The value appears next to the dataPoint on axisX Line. If not provided, it takes x value for label.
|
||||
* Default: x value
|
||||
* Example: “label1″, “label2″..
|
||||
* Example: "label1", "label2"..
|
||||
*/
|
||||
label?: string;
|
||||
/**
|
||||
@@ -950,9 +967,9 @@ declare module CanvasJS {
|
||||
*/
|
||||
exploded?: boolean;
|
||||
/**
|
||||
* Sets the color of marker that is displayed on legend. This property works only with Pie and Doughnut charts. Value of legendMarkerColor can be “HTML Color Name” or “hex” code.
|
||||
* Sets the color of marker that is displayed on legend. This property works only with Pie and Doughnut charts. Value of legendMarkerColor can be "HTML Color Name" or "hex" code.
|
||||
* Default: dataSeries marker color
|
||||
* Example: “red”, “#008000″..
|
||||
* Example: "red", "#008000"..
|
||||
*/
|
||||
legendMarkerColor?: string;
|
||||
}
|
||||
|
||||
+1
-1
@@ -115,7 +115,7 @@ function exist() {
|
||||
should.not.exist(void (0));
|
||||
}
|
||||
|
||||
function arguments() {
|
||||
function argumentsTest() {
|
||||
var args = arguments;
|
||||
expect(args).to.be.arguments;
|
||||
args.should.be.arguments;
|
||||
|
||||
Vendored
+1
-1
@@ -127,7 +127,7 @@ declare module Chance {
|
||||
guid(): string;
|
||||
hash(opts?: Options): string;
|
||||
n<T>(generator: () => T, count: number, opts?: Options): T[];
|
||||
normal(opts?: Options): string;
|
||||
normal(opts?: Options): number;
|
||||
radio(opts?: Options): string;
|
||||
rpg(dice: string): number[];
|
||||
rpg(dice: string, opts?: Options): number[]|number;
|
||||
|
||||
Vendored
+2
@@ -74,6 +74,8 @@ interface Cheerio {
|
||||
|
||||
children(selector?: string): Cheerio;
|
||||
|
||||
contents(): Cheerio;
|
||||
|
||||
each(func: (index: number, element: CheerioElement) => any): Cheerio;
|
||||
map(func: (index: number, element: CheerioElement) => any): Cheerio;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/// <reference path="chocolatechipjs.d.ts" />
|
||||
/// <reference path="../chocolatechipjs/chocolatechipjs.d.ts" />
|
||||
// ChocolateChipStatic -- DOM creation, etc.
|
||||
$(function() {
|
||||
alert('Ready to do stuff!');
|
||||
@@ -16,7 +16,6 @@ var nodeName = divTag2[0].nodeName;
|
||||
var version = $.version;
|
||||
var libraryName = $.libraryName;
|
||||
var els = $('li');
|
||||
var listItems = $.slice(els);
|
||||
var madeEls = $.make('<p>Stuff</p>');
|
||||
var moreEls = $.html('<p>Stuff</p>');
|
||||
var oldTag = $('#oldTag');
|
||||
@@ -44,7 +43,7 @@ $.isInteger(123);
|
||||
$.isInteger(123.123); // should return false
|
||||
$.isFloat(123.123); // should return true
|
||||
var newUuid = $.makeUuid();
|
||||
$.each(['a', 'b', 'c'], function(ctx, idx) {
|
||||
$.each(['a', 'b', 'c'], function(ctx: string, idx: number) {
|
||||
console.log(ctx);
|
||||
console.log(idx);
|
||||
});
|
||||
@@ -241,109 +240,145 @@ var myPromise = new Promise(function(resolve, reject) {
|
||||
myPromise.then(function(value) {
|
||||
// Success:
|
||||
console.log(value);
|
||||
},
|
||||
// Opps! There was a problem:
|
||||
function(reason) {
|
||||
console.log(reason);
|
||||
});
|
||||
},
|
||||
// Opps! There was a problem:
|
||||
function(reason) {
|
||||
console.log(reason);
|
||||
});
|
||||
|
||||
// Ajax:
|
||||
$.ajax({
|
||||
url: "announcement.html",
|
||||
dataType: "html",
|
||||
success: function(data) {
|
||||
// Insert the fragment into the page:
|
||||
$("#content").html(data);
|
||||
},
|
||||
error: function(data) {
|
||||
$("#content").html("<h4>There was an error while trying to get the file.</h4>");
|
||||
}
|
||||
// Fetch API
|
||||
//===========
|
||||
// GET:
|
||||
interface WineObject {
|
||||
data: Array<WineInterface>;
|
||||
}
|
||||
interface WineInterface {
|
||||
wine: {
|
||||
name: string;
|
||||
}
|
||||
}
|
||||
fetch('../data/wines.json')
|
||||
.then($.json)
|
||||
.then(function<WineObject>(obj: any):any {
|
||||
$('#message_ajax').empty();
|
||||
obj.data.forEach(function(wine: any) {
|
||||
$('#message_ajax').append('<li>' + wine.name + '</li>');
|
||||
})
|
||||
});
|
||||
$.ajax({
|
||||
url: "me.json",
|
||||
success: function(data) {
|
||||
// Before using a JSON object, you need to parse it.
|
||||
// Here we parse it and assign it to a variable:
|
||||
var me = JSON.parse(data);
|
||||
// Here we access the properties of the JSON object:
|
||||
$("#content").html(me.firstName + " " + me.lastName);
|
||||
},
|
||||
error: function(data) {
|
||||
$('#content').html("<h4>There was an error while trying to get the file.</h4>");
|
||||
}
|
||||
});
|
||||
var myData = {
|
||||
"name": "Bozo the Clown",
|
||||
"occupation": "Clown"
|
||||
};
|
||||
var mySuccessCallback = function() {
|
||||
console.log('The post was a success!');
|
||||
};
|
||||
var myErrorCallback = function() {
|
||||
console.log('Ooops! There was a problem posting this.');
|
||||
};
|
||||
$.ajax({
|
||||
url: "/path/to/controller",
|
||||
method: 'POST',
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
"async": true,
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
"Accept": "text/plain"
|
||||
},
|
||||
data: myData,
|
||||
success: mySuccessCallback,
|
||||
error: myErrorCallback
|
||||
});
|
||||
$.get('http://my.com/data/stuff.html')
|
||||
.then(function(response) {
|
||||
console.log("Success!", response);
|
||||
}, function(error) {
|
||||
console.error("Failed!", error);
|
||||
});
|
||||
|
||||
$.get('http://my.com/data/stuff.html')
|
||||
.then(function(response) {
|
||||
console.log("Success!", response);
|
||||
})
|
||||
.catch(function(error) {
|
||||
console.error("Failed!", error);
|
||||
});
|
||||
$.get('story.json')
|
||||
.then(JSON.parse)
|
||||
.then(function(response) {
|
||||
console.log("Yey JSON!", response);
|
||||
});
|
||||
$.getJSON('/data/deserts.json', function(desserts: Array<any>) {
|
||||
desserts.forEach(function(dessert) {
|
||||
$('#deserts').append('<li>' + dessert.name + '</li>');
|
||||
});
|
||||
});
|
||||
$.post("updateUser.php",
|
||||
{ "name": "Joe", "time": "10PM" },
|
||||
function() {
|
||||
console.log('The POST was successful.')
|
||||
},
|
||||
"json"
|
||||
);
|
||||
$.JSONP({ url: 'https://api.github.com/users/yui?callback=?' })
|
||||
.then(function(users) {
|
||||
$('.list').append('<li><h3>The name of the library</h3><h4>' + users.data.name + '</h4></li>');
|
||||
})
|
||||
.catch(function(err) {
|
||||
console.log('Unable to get data.')
|
||||
});
|
||||
|
||||
$.JSONP({
|
||||
url: 'http://www.geonames.org/postalCodeLookupJSON?postalcode=94102&'
|
||||
// POST:
|
||||
interface postData {
|
||||
email: string;
|
||||
name: string;
|
||||
msg: string;
|
||||
}
|
||||
var formData = $.serialize($('form')[0]);
|
||||
fetch('../controllers/php-post.php', {
|
||||
method: 'post',
|
||||
headers: {
|
||||
"Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||
},
|
||||
body: formData
|
||||
})
|
||||
.then(function(data) {
|
||||
$('.list').append('<li><h3>My Location</h3><h4>' + data.postalcodes[0].adminName2 + ', ' + data.postalcodes[0].adminName1 + '</h4></li>');
|
||||
.then($.json)
|
||||
.then(function<postData>(data: any): any {
|
||||
if(data.email_check == "valid"){
|
||||
$("#message_ajax").html("<div class='successMessage'>" + data.email + " is a valid e-mail address. Thank you, " + data.name + ".</div>");
|
||||
$("#message_ajax").append('<p>' + data.msg + '</p>');
|
||||
} else {
|
||||
$("#message_ajax").html("<div class='errorMessage'>Sorry " + data.name + ", " + data.email + " is NOT a valid e-mail address. Try again.</div>");
|
||||
}
|
||||
});
|
||||
// PUT:
|
||||
interface putData {
|
||||
base: string;
|
||||
result: string;
|
||||
fileName: string;
|
||||
}
|
||||
var putData = $('#fileText').val();
|
||||
fetch('../controllers/php-put.php', {
|
||||
method: 'put',
|
||||
headers: {
|
||||
"Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||
},
|
||||
body: putData
|
||||
})
|
||||
.then($.json)
|
||||
.then(function<putData>(data:any): any {
|
||||
console.dir(data.base);
|
||||
$("#message_ajax").append('<p>' + data.result + '</p>');
|
||||
$("#message_ajax").append('<p>The file name is: ' + data.fileName + '</p>');
|
||||
})
|
||||
.catch(function(error:Error) {
|
||||
console.log(error);
|
||||
$("#message_ajax").html("<div class='errorMessage'>Sorry, put was not successful.</div>");
|
||||
});
|
||||
|
||||
|
||||
// DELETE:
|
||||
interface deleteData {
|
||||
result: string;
|
||||
}
|
||||
var file = $('#fileName').val();
|
||||
fetch('../controllers/php-delete.php', {
|
||||
method: 'delete',
|
||||
headers: {
|
||||
"Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||
},
|
||||
body: file
|
||||
})
|
||||
.then($.json)
|
||||
.then(function<deleteData>(data: any): any {
|
||||
$("#message_ajax").html("<div>DELETE was sent to the server successfully.</div>");
|
||||
$("#message_ajax").append('<p>' + data.result + '</p>');
|
||||
},
|
||||
function(data: any) {
|
||||
console.log('PROBLEM')
|
||||
console.log(data);
|
||||
})
|
||||
.catch(function(error: any) {
|
||||
$("#message_ajax").html("<div class='errorMessage'>Sorry, 'DELETE' was not successful.</div>");
|
||||
error.reject();
|
||||
});
|
||||
|
||||
// Timeout:
|
||||
var formData2 = $.serialize($('form')[0]);
|
||||
fetch('../controllers/php-post.php', {
|
||||
method: 'post',
|
||||
headers: {
|
||||
"Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||
},
|
||||
body: formData,
|
||||
// Set timeout:
|
||||
timeout: 10000
|
||||
})
|
||||
.then($.json)
|
||||
.then(function <postData>(data: any): any {
|
||||
if (data.email_check == "valid") {
|
||||
$("#message_ajax").html("<div class='successMessage'>" + data.email + " is a valid e-mail address. Thank you, " + data.name + ".</div>");
|
||||
$("#message_ajax").append('<p>' + data.msg + '</p>');
|
||||
} else {
|
||||
$("#message_ajax").html("<div class='errorMessage'>Sorry " + data.name + ", " + data.email + " is NOT a valid e-mail address. Try again.</div>");
|
||||
}
|
||||
})
|
||||
.catch(function(err) {
|
||||
console.log('Unable to get data.')
|
||||
// Catch timeout:
|
||||
.catch(function(error) {
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
// $.jsonp:
|
||||
$.jsonp('https://api.github.com/users/rbiggs/repos?name=chipper', {timeout: 10000})
|
||||
.then($.json)
|
||||
.then(function(obj: any): any {
|
||||
console.log(obj);
|
||||
obj.data.forEach(function(repo: any): any {
|
||||
$('#message_ajax').append("<li>" + repo.name + "</li>");
|
||||
});
|
||||
})
|
||||
.catch(function(error: any): any {
|
||||
$('#message_ajax').append("<li>" + error.message + "</li>")
|
||||
});
|
||||
|
||||
// Templates:
|
||||
var myTemplate = '<li>Name: [[= data.name]]</li>';
|
||||
var userInfo = {
|
||||
@@ -375,13 +410,16 @@ var repeaterTmplate2 = '<li>[[= data.firstName ]], [[= data.lastName]]</li>';
|
||||
// Pass in the array of persons:
|
||||
$.template.repeater($('#objectArrayList'), repeaterTmplate2, luminaries.persons);
|
||||
|
||||
// Code for declarative repeater:
|
||||
$.template.data['myRepeater'] = [{ name: "Joe" }, { name: "Sally" }, {name: "Tom" }];
|
||||
$.template.repeater();
|
||||
|
||||
// Pub/Sub:
|
||||
var arraySubscriber = function(topic: string, data: any) {
|
||||
var arraySubscriber = function(topic: string, data: any): any {
|
||||
$('.list').append('<li><h3>' + topic + '</h3><h4>' + data + '</h4></li>');
|
||||
var newsSubscription = $.subscribe('news/update', arraySubscriber);
|
||||
};
|
||||
var newsSubscription = $.subscribe('news/update', arraySubscriber);
|
||||
$.publish('news/update', 'The New York Stock Exchange rose an unprecedented 1000 points in just three minutes. Analysts and investors are confused and uncertain how to respond.');
|
||||
$.unsubscribe('news/update');
|
||||
// Due to being unsubscribed above, this does nothing:
|
||||
$.publish('news/update', 'We have nothing further to comment at this time.');
|
||||
|
||||
|
||||
Vendored
+1410
-1322
File diff suppressed because it is too large
Load Diff
@@ -197,3 +197,55 @@ function proxySettings() {
|
||||
// clear with a scope set
|
||||
chrome.proxy.settings.clear({ scope: 'regular' });
|
||||
}
|
||||
|
||||
// https://developer.chrome.com/extensions/examples/api/contentSettings/popup.js
|
||||
function contentSettings() {
|
||||
var incognito;
|
||||
var url;
|
||||
|
||||
function settingChanged() {
|
||||
var type = this.id;
|
||||
var setting = this.value;
|
||||
var pattern = /^file:/.test(url) ? url : url.replace(/\/[^\/]*?$/, '/*');
|
||||
console.log(type+' setting for '+pattern+': '+setting);
|
||||
// HACK: [type] is not recognised by the docserver's sample crawler, so
|
||||
// mention an explicit
|
||||
// type: chrome.contentSettings.cookies.set - See http://crbug.com/299634
|
||||
chrome.contentSettings[type].set({
|
||||
'primaryPattern': pattern,
|
||||
'setting': setting,
|
||||
'scope': (incognito ? 'incognito_session_only' : 'regular')
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
chrome.tabs.query({active: true, currentWindow: true, url: ['http://*/*', 'https://*/*'] }, function(tabs) {
|
||||
var current = tabs[0];
|
||||
incognito = current.incognito;
|
||||
url = current.url;
|
||||
var types = ['cookies', 'images', 'javascript', 'location', 'plugins',
|
||||
'popups', 'notifications', 'fullscreen', 'mouselock',
|
||||
'microphone', 'camera', 'unsandboxedPlugins',
|
||||
'automaticDownloads'];
|
||||
types.forEach(function(type) {
|
||||
// HACK: [type] is not recognised by the docserver's sample crawler, so
|
||||
// mention an explicit
|
||||
// type: chrome.contentSettings.cookies.get - See http://crbug.com/299634
|
||||
chrome.contentSettings[type] && chrome.contentSettings[type].get({
|
||||
'primaryUrl': url,
|
||||
'incognito': incognito
|
||||
},
|
||||
function(details) {
|
||||
var input = <HTMLInputElement>document.getElementById(type);
|
||||
input.disabled = false;
|
||||
input.value = details.setting;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
var selects = document.querySelectorAll('select');
|
||||
for (var i = 0; i < selects.length; i++) {
|
||||
selects[i].addEventListener('change', settingChanged);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Vendored
+3
-3
@@ -869,7 +869,7 @@ declare module chrome.events {
|
||||
addListener(callback: Function): void;
|
||||
getRules(callback: (rules: Rule[]) => void): void;
|
||||
getRules(ruleIdentifiers: string[], callback: (rules: Rule[]) => void): void;
|
||||
hasListener(callback: Function): void;
|
||||
hasListener(callback: Function): boolean;
|
||||
removeRules(ruleIdentifiers?: string[], callback?: Function): void;
|
||||
addRules(rules: Rule[], callback?: (rules: Rule[]) => void): void;
|
||||
removeListener(callback: Function): void;
|
||||
@@ -1822,7 +1822,7 @@ declare module chrome.tabCapture {
|
||||
videoConstraints?: MediaTrackConstraints;
|
||||
}
|
||||
|
||||
export function capture(options: CaptureOptions, callback: (stream: LocalMediaStream) => void): void;
|
||||
export function capture(options: CaptureOptions, callback: (stream: MediaStream) => void): void;
|
||||
export function getCapturedTabs(callback: (result: CaptureInfo[]) => void): void;
|
||||
}
|
||||
|
||||
@@ -1900,7 +1900,7 @@ declare module chrome.tabs {
|
||||
active?: boolean;
|
||||
index?: number;
|
||||
title?: string;
|
||||
url?: string;
|
||||
url?: string | string[];
|
||||
currentWindow?: boolean;
|
||||
highlighted?: boolean;
|
||||
pinned?: boolean;
|
||||
|
||||
+10
-10
@@ -1,4 +1,4 @@
|
||||
/// <reference path="../chocolatechipjs/chocolatechipjs.d.ts"/>
|
||||
/// <reference path="../jquery/jquery.d.ts"/>
|
||||
/// <reference path="chui.d.ts"/>
|
||||
|
||||
$(function() {
|
||||
@@ -7,10 +7,10 @@ $(function() {
|
||||
* Test static methods:
|
||||
*/
|
||||
var concatenatedText = $.concat("This", "is", "text", "to", "contatenate.");
|
||||
$.forEach([1,2,3], function(ctx) {
|
||||
$.forEach([1,2,3], function(ctx: number) {
|
||||
return ctx;
|
||||
});
|
||||
$.forEach([1,2,3], function(ctx, idx) {
|
||||
$.forEach([1,2,3], function(ctx: number, idx: number) {
|
||||
return idx;
|
||||
});
|
||||
|
||||
@@ -41,8 +41,8 @@ $(function() {
|
||||
$.UIBlock(.5);
|
||||
$.UIUnblock();
|
||||
$.UIPopup({id: "myPopup", message: 'Hello!!!'});
|
||||
$.UIPopup({message: 'Hello!!!', title: "Whatever", callback: $.noop});
|
||||
$.UIPopup({message: 'Hello!!!', cancleButton: "Forget It!", continueButton: "OK"});
|
||||
$.UIPopup({ message: 'Hello!!!', title: "Whatever", callback: $.noop });
|
||||
$.UIPopup({ message: 'Hello!!!', cancelButton: "Forget It!", continueButton: "OK" });
|
||||
$.UIPopover({id: "myPopover"});
|
||||
$.UIPopover({callback: function() {}});
|
||||
$.UIPopover({title: "Whatever"});
|
||||
@@ -53,13 +53,13 @@ $(function() {
|
||||
$.UISheet({id: "mySheet", listClass: "specialList", background: 'red', handle: false});
|
||||
$.UIShowSheet("#mySheet");
|
||||
$.UIHideSheet();
|
||||
$.UISlideout({position: "right", dynamic: false, callback: $.noop});
|
||||
$.UISlideout({dynamic: false, callback: $.noop});
|
||||
var myStepper = $('#myStepper');
|
||||
$.UIResetStepper(myStepper);
|
||||
$.UICreateSwitch({id: "mySwitch", value: 5, checked: "true", callback: $.noop});
|
||||
$.UITabbar({tabs: 3, labels: ["one", "two", "three"], selected: 2});
|
||||
$.UISearch({articleId: "#main", placehold: "Looking?", results: 10});
|
||||
var carouselPanels = $('li');
|
||||
$.UITabbar({ tabs: 3, labels: ["one", "two", "three"], selected: 2 });
|
||||
$.UISearch({ articleId: "#main", placeholder: "Looking?", results: 10 });
|
||||
var carouselPanels = $("<li>1</li><li>2</li><li>3</li>");
|
||||
$.UISetupCarousel({target: "#carousel", panels: carouselPanels});
|
||||
$.UIBindData();
|
||||
$.UIBindData("#myBoundData");
|
||||
@@ -90,7 +90,7 @@ $(function() {
|
||||
$("#panelToggler").UIPanelToggle("#togglePanels", $.noop);
|
||||
$('#editList').UIEditList({callback: $.noop, deletable: false, movable: true});
|
||||
$('#mySelectList').UISelectList();
|
||||
$('#myStepper').UIStepper({start: 1, end: 10, defautValue: 5});
|
||||
$('#myStepper').UIStepper({ start: 1, end: 10, defaultValue: 5 });
|
||||
$('#mySwitch').UISwitch();
|
||||
$('#myRangeControl').UIRange();
|
||||
|
||||
|
||||
Vendored
+933
-716
File diff suppressed because it is too large
Load Diff
Vendored
+180
-144
@@ -7,6 +7,8 @@ declare function CodeMirror(host: HTMLElement, options?: CodeMirror.EditorConfig
|
||||
declare function CodeMirror(callback: (host: HTMLElement) => void , options?: CodeMirror.EditorConfiguration): CodeMirror.Editor;
|
||||
|
||||
declare module CodeMirror {
|
||||
export var Doc : CodeMirror.DocConstructor;
|
||||
export var Pos: CodeMirror.PositionConstructor;
|
||||
export var Pass: any;
|
||||
|
||||
function fromTextArea(host: HTMLTextAreaElement, options?: EditorConfiguration): CodeMirror.EditorFromTextArea;
|
||||
@@ -86,84 +88,84 @@ declare module CodeMirror {
|
||||
or the line the widget is on require the widget to be redrawn. */
|
||||
function on(line: LineWidget, eventName: 'redraw', handler: () => void ): void;
|
||||
function off(line: LineWidget, eventName: 'redraw', handler: () => void ): void;
|
||||
|
||||
/** Various CodeMirror-related objects emit events, which allow client code to react to various situations.
|
||||
Handlers for such events can be registered with the on and off methods on the objects that the event fires on.
|
||||
|
||||
/** Various CodeMirror-related objects emit events, which allow client code to react to various situations.
|
||||
Handlers for such events can be registered with the on and off methods on the objects that the event fires on.
|
||||
To fire your own events, use CodeMirror.signal(target, name, args...), where target is a non-DOM-node object. */
|
||||
function signal(target: any, name: string, ...args: any[]): void;
|
||||
|
||||
interface Editor {
|
||||
|
||||
|
||||
/** Tells you whether the editor currently has focus. */
|
||||
hasFocus(): boolean;
|
||||
|
||||
|
||||
/** Used to find the target position for horizontal cursor motion.start is a { line , ch } object,
|
||||
amount an integer(may be negative), and unit one of the string "char", "column", or "word".
|
||||
Will return a position that is produced by moving amount times the distance specified by unit.
|
||||
When visually is true , motion in right - to - left text will be visual rather than logical.
|
||||
When the motion was clipped by hitting the end or start of the document, the returned value will have a hitSide property set to true. */
|
||||
findPosH(start: CodeMirror.Position, amount: number, unit: string, visually: boolean): { line: number; ch: number; hitSide?: boolean; };
|
||||
|
||||
|
||||
/** Similar to findPosH , but used for vertical motion.unit may be "line" or "page".
|
||||
The other arguments and the returned value have the same interpretation as they have in findPosH. */
|
||||
findPosV(start: CodeMirror.Position, amount: number, unit: string): { line: number; ch: number; hitSide?: boolean; };
|
||||
|
||||
|
||||
|
||||
|
||||
/** Change the configuration of the editor. option should the name of an option, and value should be a valid value for that option. */
|
||||
setOption(option: string, value: any): void;
|
||||
|
||||
|
||||
/** Retrieves the current value of the given option for this editor instance. */
|
||||
getOption(option: string): any;
|
||||
|
||||
|
||||
/** Attach an additional keymap to the editor.
|
||||
This is mostly useful for add - ons that need to register some key handlers without trampling on the extraKeys option.
|
||||
Maps added in this way have a higher precedence than the extraKeys and keyMap options, and between them,
|
||||
the maps added earlier have a lower precedence than those added later, unless the bottom argument was passed,
|
||||
in which case they end up below other keymaps added with this method. */
|
||||
addKeyMap(map: any, bottom?: boolean): void;
|
||||
|
||||
|
||||
/** Disable a keymap added with addKeyMap.Either pass in the keymap object itself , or a string,
|
||||
which will be compared against the name property of the active keymaps. */
|
||||
removeKeyMap(map: any): void;
|
||||
|
||||
|
||||
/** Enable a highlighting overlay.This is a stateless mini - mode that can be used to add extra highlighting.
|
||||
For example, the search add - on uses it to highlight the term that's currently being searched.
|
||||
mode can be a mode spec or a mode object (an object with a token method). The options parameter is optional. If given, it should be an object.
|
||||
Currently, only the opaque option is recognized. This defaults to off, but can be given to allow the overlay styling, when not null,
|
||||
to override the styling of the base mode entirely, instead of the two being applied together. */
|
||||
addOverlay(mode: any, options?: any): void;
|
||||
|
||||
|
||||
/** Pass this the exact argument passed for the mode parameter to addOverlay to remove an overlay again. */
|
||||
removeOverlay(mode: any): void;
|
||||
|
||||
|
||||
|
||||
|
||||
/** Retrieve the currently active document from an editor. */
|
||||
getDoc(): CodeMirror.Doc;
|
||||
|
||||
|
||||
/** Attach a new document to the editor. Returns the old document, which is now no longer associated with an editor. */
|
||||
swapDoc(doc: CodeMirror.Doc): CodeMirror.Doc;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** Sets the gutter marker for the given gutter (identified by its CSS class, see the gutters option) to the given value.
|
||||
Value can be either null, to clear the marker, or a DOM element, to set it. The DOM element will be shown in the specified gutter next to the specified line. */
|
||||
setGutterMarker(line: any, gutterID: string, value: HTMLElement): CodeMirror.LineHandle;
|
||||
|
||||
|
||||
/** Remove all gutter markers in the gutter with the given ID. */
|
||||
clearGutter(gutterID: string): void;
|
||||
|
||||
|
||||
/** Set a CSS class name for the given line.line can be a number or a line handle.
|
||||
where determines to which element this class should be applied, can can be one of "text" (the text element, which lies in front of the selection),
|
||||
"background"(a background element that will be behind the selection),
|
||||
or "wrap" (the wrapper node that wraps all of the line's elements, including gutter elements).
|
||||
class should be the name of the class to apply. */
|
||||
addLineClass(line: any, where: string, _class_: string): CodeMirror.LineHandle;
|
||||
|
||||
|
||||
/** Remove a CSS class from a line.line can be a line handle or number.
|
||||
where should be one of "text", "background", or "wrap"(see addLineClass).
|
||||
class can be left off to remove all classes for the specified node, or be a string to remove only a specific class. */
|
||||
removeLineClass(line: any, where: string, class_: string): CodeMirror.LineHandle;
|
||||
|
||||
|
||||
/** Returns the line number, text content, and marker status of the given line, which can be either a number or a line handle. */
|
||||
lineInfo(line: any): {
|
||||
line: any;
|
||||
@@ -177,12 +179,12 @@ declare module CodeMirror {
|
||||
/** Array of line widgets attached to this line. */
|
||||
widgets: any;
|
||||
};
|
||||
|
||||
|
||||
/** Puts node, which should be an absolutely positioned DOM node, into the editor, positioned right below the given { line , ch } position.
|
||||
When scrollIntoView is true, the editor will ensure that the entire node is visible (if possible).
|
||||
To remove the widget again, simply use DOM methods (move it somewhere else, or call removeChild on its parent). */
|
||||
addWidget(pos: CodeMirror.Position, node: HTMLElement, scrollIntoView: boolean): void;
|
||||
|
||||
|
||||
/** Adds a line widget, an element shown below a line, spanning the whole of the editor's width, and moving the lines below it downwards.
|
||||
line should be either an integer or a line handle, and node should be a DOM node, which will be displayed below the given line.
|
||||
options, when given, should be an object that configures the behavior of the widget.
|
||||
@@ -197,16 +199,16 @@ declare module CodeMirror {
|
||||
/** When true, will cause the widget to be rendered even if the line it is associated with is hidden. */
|
||||
showIfHidden: boolean;
|
||||
}): CodeMirror.LineWidget;
|
||||
|
||||
|
||||
|
||||
|
||||
/** Programatically set the size of the editor (overriding the applicable CSS rules).
|
||||
width and height height can be either numbers(interpreted as pixels) or CSS units ("100%", for example).
|
||||
You can pass null for either of them to indicate that that dimension should not be changed. */
|
||||
setSize(width: any, height: any): void;
|
||||
|
||||
|
||||
/** Scroll the editor to a given(pixel) position.Both arguments may be left as null or undefined to have no effect. */
|
||||
scrollTo(x: number, y: number): void;
|
||||
|
||||
|
||||
/** Get an { left , top , width , height , clientWidth , clientHeight } object that represents the current scroll position, the size of the scrollable area,
|
||||
and the size of the visible area(minus scrollbars). */
|
||||
getScrollInfo(): {
|
||||
@@ -217,53 +219,53 @@ declare module CodeMirror {
|
||||
clientWidth: any;
|
||||
clientHeight: any;
|
||||
}
|
||||
|
||||
|
||||
/** Scrolls the given element into view. pos is a { line , ch } position, referring to a given character, null, to refer to the cursor.
|
||||
The margin parameter is optional. When given, it indicates the amount of pixels around the given area that should be made visible as well. */
|
||||
scrollIntoView(pos: CodeMirror.Position, margin?: number): void;
|
||||
|
||||
|
||||
/** Scrolls the given element into view. pos is a { left , top , right , bottom } object, in editor-local coordinates.
|
||||
The margin parameter is optional. When given, it indicates the amount of pixels around the given area that should be made visible as well. */
|
||||
scrollIntoView(pos: { left: number; top: number; right: number; bottom: number; }, margin: number): void;
|
||||
|
||||
|
||||
/** Returns an { left , top , bottom } object containing the coordinates of the cursor position.
|
||||
If mode is "local" , they will be relative to the top-left corner of the editable document.
|
||||
If it is "page" or not given, they are relative to the top-left corner of the page.
|
||||
where is a boolean indicating whether you want the start(true) or the end(false) of the selection. */
|
||||
cursorCoords(where: boolean, mode: string): { left: number; top: number; bottom: number; };
|
||||
|
||||
|
||||
/** Returns an { left , top , bottom } object containing the coordinates of the cursor position.
|
||||
If mode is "local" , they will be relative to the top-left corner of the editable document.
|
||||
If it is "page" or not given, they are relative to the top-left corner of the page.
|
||||
where specifies the precise position at which you want to measure. */
|
||||
cursorCoords(where: CodeMirror.Position, mode: string): { left: number; top: number; bottom: number; };
|
||||
|
||||
|
||||
/** Returns the position and dimensions of an arbitrary character.pos should be a { line , ch } object.
|
||||
This differs from cursorCoords in that it'll give the size of the whole character,
|
||||
rather than just the position that the cursor would have when it would sit at that position. */
|
||||
charCoords(pos: CodeMirror.Position, mode: string): { left: number; right: number; top: number; bottom: number; };
|
||||
|
||||
|
||||
/** Given an { left , top } object , returns the { line , ch } position that corresponds to it.
|
||||
The optional mode parameter determines relative to what the coordinates are interpreted. It may be "window" , "page"(the default) , or "local". */
|
||||
coordsChar(object: { left: number; top: number; }, mode?: string): CodeMirror.Position;
|
||||
|
||||
|
||||
/** Returns the line height of the default font for the editor. */
|
||||
defaultTextHeight(): number;
|
||||
|
||||
|
||||
/** Returns the pixel width of an 'x' in the default font for the editor.
|
||||
(Note that for non - monospace fonts , this is mostly useless, and even for monospace fonts, non - ascii characters might have a different width). */
|
||||
defaultCharWidth(): number;
|
||||
|
||||
|
||||
/** Returns a { from , to } object indicating the start (inclusive) and end (exclusive) of the currently rendered part of the document.
|
||||
In big documents, when most content is scrolled out of view, CodeMirror will only render the visible part, and a margin around it.
|
||||
See also the viewportChange event. */
|
||||
getViewport(): { from: number; to: number };
|
||||
|
||||
|
||||
/** If your code does something to change the size of the editor element (window resizes are already listened for), or unhides it,
|
||||
you should probably follow up by calling this method to ensure CodeMirror is still looking as intended. */
|
||||
refresh(): void;
|
||||
|
||||
|
||||
|
||||
|
||||
/** Retrieves information about the token the current mode found before the given position (a {line, ch} object). */
|
||||
getTokenAt(pos: CodeMirror.Position): {
|
||||
/** The character(on the given line) at which the token starts. */
|
||||
@@ -275,20 +277,20 @@ declare module CodeMirror {
|
||||
/** The token type the mode assigned to the token, such as "keyword" or "comment" (may also be null). */
|
||||
type: string;
|
||||
/** The mode's state at the end of this token. */
|
||||
state: any;
|
||||
state: any;
|
||||
};
|
||||
|
||||
|
||||
/** Returns the mode's parser state, if any, at the end of the given line number.
|
||||
If no line number is given, the state at the end of the document is returned.
|
||||
This can be useful for storing parsing errors in the state, or getting other kinds of contextual information for a line. */
|
||||
getStateAfter(line?: number): any;
|
||||
|
||||
|
||||
/** CodeMirror internally buffers changes and only updates its DOM structure after it has finished performing some operation.
|
||||
If you need to perform a lot of operations on a CodeMirror instance, you can call this method with a function argument.
|
||||
It will call the function, buffering up all changes, and only doing the expensive update after the function returns.
|
||||
This can be a lot faster. The return value from this method will be the return value of your function. */
|
||||
operation<T>(fn: ()=> T): T;
|
||||
|
||||
|
||||
/** Adjust the indentation of the given line.
|
||||
The second argument (which defaults to "smart") may be one of:
|
||||
"prev" Base indentation on the indentation of the previous line.
|
||||
@@ -296,35 +298,42 @@ declare module CodeMirror {
|
||||
"add" Increase the indentation of the line by one indent unit.
|
||||
"subtract" Reduce the indentation of the line. */
|
||||
indentLine(line: number, dir?: string): void;
|
||||
|
||||
|
||||
|
||||
|
||||
/** Give the editor focus. */
|
||||
focus(): void;
|
||||
|
||||
|
||||
/** Returns the hidden textarea used to read input. */
|
||||
getInputField(): HTMLTextAreaElement;
|
||||
|
||||
|
||||
/** Returns the DOM node that represents the editor, and controls its size. Remove this from your tree to delete an editor instance. */
|
||||
getWrapperElement(): HTMLElement;
|
||||
|
||||
|
||||
/** Returns the DOM node that is responsible for the scrolling of the editor. */
|
||||
getScrollerElement(): HTMLElement;
|
||||
|
||||
|
||||
/** Fetches the DOM node that contains the editor gutters. */
|
||||
getGutterElement(): HTMLElement;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** Events are registered with the on method (and removed with the off method).
|
||||
These are the events that fire on the instance object. The name of the event is followed by the arguments that will be passed to the handler.
|
||||
The instance argument always refers to the editor instance. */
|
||||
on(eventName: string, handler: (instance: CodeMirror.Editor) => void ): void;
|
||||
off(eventName: string, handler: (instance: CodeMirror.Editor) => void ): void;
|
||||
|
||||
|
||||
/** Fires every time the content of the editor is changed. */
|
||||
on(eventName: 'change', handler: (instance: CodeMirror.Editor, change: CodeMirror.EditorChangeLinkedList) => void ): void;
|
||||
off(eventName: 'change', handler: (instance: CodeMirror.Editor, change: CodeMirror.EditorChangeLinkedList) => void ): void;
|
||||
|
||||
|
||||
/** Like the "change" event, but batched per operation, passing an
|
||||
* array containing all the changes that happened in the operation.
|
||||
* This event is fired after the operation finished, and display
|
||||
* changes it makes will trigger a new operation. */
|
||||
on(eventName: 'changes', handler: (instance: CodeMirror.Editor, change: CodeMirror.EditorChangeLinkedList[]) => void ): void;
|
||||
off(eventName: 'changes', handler: (instance: CodeMirror.Editor, change: CodeMirror.EditorChangeLinkedList[]) => void ): void;
|
||||
|
||||
/** This event is fired before a change is applied, and its handler may choose to modify or cancel the change.
|
||||
The changeObj never has a next property, since this is fired for each individual change, and not batched per operation.
|
||||
Note: you may not do anything from a "beforeChange" handler that would cause changes to the document or its visualization.
|
||||
@@ -332,64 +341,67 @@ declare module CodeMirror {
|
||||
probably cause the editor to become corrupted. */
|
||||
on(eventName: 'beforeChange', handler: (instance: CodeMirror.Editor, change: CodeMirror.EditorChangeCancellable) => void ): void;
|
||||
off(eventName: 'beforeChange', handler: (instance: CodeMirror.Editor, change: CodeMirror.EditorChangeCancellable) => void ): void;
|
||||
|
||||
|
||||
/** Will be fired when the cursor or selection moves, or any change is made to the editor content. */
|
||||
on(eventName: 'cursorActivity', handler: (instance: CodeMirror.Editor) => void ): void;
|
||||
off(eventName: 'cursorActivity', handler: (instance: CodeMirror.Editor) => void ): void;
|
||||
|
||||
|
||||
/** This event is fired before the selection is moved. Its handler may modify the resulting selection head and anchor.
|
||||
Handlers for this event have the same restriction as "beforeChange" handlers � they should not do anything to directly update the state of the editor. */
|
||||
on(eventName: 'beforeSelectionChange', handler: (instance: CodeMirror.Editor, selection: { head: CodeMirror.Position; anchor: CodeMirror.Position; }) => void ): void;
|
||||
off(eventName: 'beforeSelectionChange', handler: (instance: CodeMirror.Editor, selection: { head: CodeMirror.Position; anchor: CodeMirror.Position; }) => void ): void;
|
||||
|
||||
|
||||
/** Fires whenever the view port of the editor changes (due to scrolling, editing, or any other factor).
|
||||
The from and to arguments give the new start and end of the viewport. */
|
||||
on(eventName: 'viewportChange', handler: (instance: CodeMirror.Editor, from: number, to: number) => void ): void;
|
||||
off(eventName: 'viewportChange', handler: (instance: CodeMirror.Editor, from: number, to: number) => void ): void;
|
||||
|
||||
|
||||
/** Fires when the editor gutter (the line-number area) is clicked. Will pass the editor instance as first argument,
|
||||
the (zero-based) number of the line that was clicked as second argument, the CSS class of the gutter that was clicked as third argument,
|
||||
and the raw mousedown event object as fourth argument. */
|
||||
on(eventName: 'gutterClick', handler: (instance: CodeMirror.Editor, line: number, gutter: string, clickEvent: Event) => void ): void;
|
||||
off(eventName: 'gutterClick', handler: (instance: CodeMirror.Editor, line: number, gutter: string, clickEvent: Event) => void ): void;
|
||||
|
||||
|
||||
/** Fires whenever the editor is focused. */
|
||||
on(eventName: 'focus', handler: (instance: CodeMirror.Editor) => void ): void;
|
||||
off(eventName: 'focus', handler: (instance: CodeMirror.Editor) => void ): void;
|
||||
|
||||
|
||||
/** Fires whenever the editor is unfocused. */
|
||||
on(eventName: 'blur', handler: (instance: CodeMirror.Editor) => void ): void;
|
||||
off(eventName: 'blur', handler: (instance: CodeMirror.Editor) => void ): void;
|
||||
|
||||
|
||||
/** Fires when the editor is scrolled. */
|
||||
on(eventName: 'scroll', handler: (instance: CodeMirror.Editor) => void ): void;
|
||||
off(eventName: 'scroll', handler: (instance: CodeMirror.Editor) => void ): void;
|
||||
|
||||
|
||||
/** Will be fired whenever CodeMirror updates its DOM display. */
|
||||
on(eventName: 'update', handler: (instance: CodeMirror.Editor) => void ): void;
|
||||
off(eventName: 'update', handler: (instance: CodeMirror.Editor) => void ): void;
|
||||
|
||||
|
||||
/** Fired whenever a line is (re-)rendered to the DOM. Fired right after the DOM element is built, before it is added to the document.
|
||||
The handler may mess with the style of the resulting element, or add event handlers, but should not try to change the state of the editor. */
|
||||
on(eventName: 'renderLine', handler: (instance: CodeMirror.Editor, line: number, element: HTMLElement) => void ): void;
|
||||
off(eventName: 'renderLine', handler: (instance: CodeMirror.Editor, line: number, element: HTMLElement) => void ): void;
|
||||
}
|
||||
|
||||
|
||||
interface EditorFromTextArea extends Editor {
|
||||
|
||||
|
||||
/** Copy the content of the editor into the textarea. */
|
||||
save(): void;
|
||||
|
||||
|
||||
/** Remove the editor, and restore the original textarea (with the editor's current content). */
|
||||
toTextArea(): void;
|
||||
|
||||
|
||||
/** Returns the textarea that the instance was based on. */
|
||||
getTextArea(): HTMLTextAreaElement;
|
||||
}
|
||||
|
||||
class Doc {
|
||||
constructor (text: string, mode?: any, firstLineNumber?: number);
|
||||
interface DocConstructor {
|
||||
new (text: string, mode?: any, firstLineNumber?: number, lineSep?: string): Doc;
|
||||
(text: string, mode?: any, firstLineNumber?: number, lineSep?: string): Doc;
|
||||
}
|
||||
|
||||
interface Doc {
|
||||
/** Get the current editor content. You can pass it an optional argument to specify the string to be used to separate lines (defaults to "\n"). */
|
||||
getValue(seperator?: string): string;
|
||||
|
||||
@@ -459,6 +471,10 @@ declare module CodeMirror {
|
||||
It may be "start" , "end" , "head"(the side of the selection that moves when you press shift + arrow),
|
||||
or "anchor"(the fixed side of the selection).Omitting the argument is the same as passing "head".A { line , ch } object will be returned. */
|
||||
getCursor(start?: string): CodeMirror.Position;
|
||||
|
||||
/** Retrieves a list of all current selections. These will always be sorted, and never overlap (overlapping selections are merged).
|
||||
Each object in the array contains anchor and head properties referring to {line, ch} objects. */
|
||||
listSelections(): { anchor: CodeMirror.Position; head: CodeMirror.Position }[];
|
||||
|
||||
/** Return true if any text is selected. */
|
||||
somethingSelected(): boolean;
|
||||
@@ -549,7 +565,7 @@ declare module CodeMirror {
|
||||
|
||||
/** Returns an array of all the bookmarks and marked ranges present at the given position. */
|
||||
findMarksAt(pos: CodeMirror.Position): TextMarker[];
|
||||
|
||||
|
||||
/** Returns an array containing all marked ranges in the document. */
|
||||
getAllMarks(): CodeMirror.TextMarker[];
|
||||
|
||||
@@ -600,7 +616,7 @@ declare module CodeMirror {
|
||||
/** Array of strings representing the text that replaced the changed range (split by line). */
|
||||
text: string[];
|
||||
/** Text that used to be between from and to, which is overwritten by this change. */
|
||||
removed: string;
|
||||
removed: string[];
|
||||
/** String representing the origin of the change event and wether it can be merged with history */
|
||||
origin: string;
|
||||
}
|
||||
@@ -617,6 +633,11 @@ declare module CodeMirror {
|
||||
cancel(): void;
|
||||
}
|
||||
|
||||
interface PositionConstructor {
|
||||
new (line: number, ch: number): Position;
|
||||
(line: number, ch: number): Position;
|
||||
}
|
||||
|
||||
interface Position {
|
||||
ch: number;
|
||||
line: number;
|
||||
@@ -651,7 +672,7 @@ declare module CodeMirror {
|
||||
/** Configures whether the editor should re-indent the current line when a character is typed
|
||||
that might change its proper indentation (only works if the mode supports indentation). Default is true. */
|
||||
electricChars?: boolean;
|
||||
|
||||
|
||||
/** Determines whether horizontal cursor movement through right-to-left (Arabic, Hebrew) text
|
||||
is visual (pressing the left arrow moves the cursor left)
|
||||
or logical (pressing the left arrow moves to the next lower index in the string, which is visually right in right-to-left text).
|
||||
@@ -661,16 +682,16 @@ declare module CodeMirror {
|
||||
/** Configures the keymap to use. The default is "default", which is the only keymap defined in codemirror.js itself.
|
||||
Extra keymaps are found in the keymap directory. See the section on keymaps for more information. */
|
||||
keyMap?: string;
|
||||
|
||||
|
||||
/** Can be used to specify extra keybindings for the editor, alongside the ones defined by keyMap. Should be either null, or a valid keymap value. */
|
||||
extraKeys?: any;
|
||||
|
||||
|
||||
/** Whether CodeMirror should scroll or wrap for long lines. Defaults to false (scroll). */
|
||||
lineWrapping?: boolean;
|
||||
|
||||
|
||||
/** Whether to show line numbers to the left of the editor. */
|
||||
lineNumbers?: boolean;
|
||||
|
||||
|
||||
/** At which number to start counting lines. Default is 1. */
|
||||
firstLineNumber?: number;
|
||||
|
||||
@@ -683,23 +704,23 @@ declare module CodeMirror {
|
||||
May include the CodeMirror-linenumbers class, in order to explicitly set the position of the line number gutter
|
||||
(it will default to be to the right of all other gutters). These class names are the keys passed to setGutterMarker. */
|
||||
gutters?: string[];
|
||||
|
||||
|
||||
/** Determines whether the gutter scrolls along with the content horizontally (false)
|
||||
or whether it stays fixed during horizontal scrolling (true, the default). */
|
||||
fixedGutter?: boolean;
|
||||
|
||||
|
||||
/** boolean|string. This disables editing of the editor content by the user. If the special value "nocursor" is given (instead of simply true), focusing of the editor is also disallowed. */
|
||||
readOnly?: any;
|
||||
|
||||
|
||||
/**Whether the cursor should be drawn when a selection is active. Defaults to false. */
|
||||
showCursorWhenSelecting?: boolean;
|
||||
|
||||
|
||||
/** The maximum number of undo levels that the editor stores. Defaults to 40. */
|
||||
undoDepth?: number;
|
||||
|
||||
|
||||
/** The period of inactivity (in milliseconds) that will cause a new history event to be started when typing or deleting. Defaults to 500. */
|
||||
historyEventDelay?: number;
|
||||
|
||||
|
||||
/** The tab index to assign to the editor. If not given, no tab index will be assigned. */
|
||||
tabindex?: number;
|
||||
|
||||
@@ -763,58 +784,73 @@ declare module CodeMirror {
|
||||
This affects the amount of updates needed when scrolling, and the amount of work that such an update does.
|
||||
You should usually leave it at its default, 10. Can be set to Infinity to make sure the whole document is always rendered,
|
||||
and thus the browser's text search works on it. This will have bad effects on performance of big documents. */
|
||||
viewportMargin?: number;
|
||||
|
||||
/** Optional lint configuration to be used in conjunction with CodeMirror's linter addon. */
|
||||
viewportMargin?: number;
|
||||
|
||||
/** Optional lint configuration to be used in conjunction with CodeMirror's linter addon. */
|
||||
lint?: LintOptions;
|
||||
}
|
||||
|
||||
interface TextMarkerOptions {
|
||||
/** Assigns a CSS class to the marked stretch of text. */
|
||||
className?: string;
|
||||
|
||||
|
||||
/** Determines whether text inserted on the left of the marker will end up inside or outside of it. */
|
||||
inclusiveLeft?: boolean;
|
||||
|
||||
|
||||
/** Like inclusiveLeft , but for the right side. */
|
||||
inclusiveRight?: boolean;
|
||||
|
||||
/** Atomic ranges act as a single unit when cursor movement is concerned � i.e. it is impossible to place the cursor inside of them.
|
||||
In atomic ranges, inclusiveLeft and inclusiveRight have a different meaning � they will prevent the cursor from being placed
|
||||
|
||||
/** Atomic ranges act as a single unit when cursor movement is concerned — i.e. it is impossible to place the cursor inside of them.
|
||||
In atomic ranges, inclusiveLeft and inclusiveRight have a different meaning — they will prevent the cursor from being placed
|
||||
respectively directly before and directly after the range. */
|
||||
atomic?: boolean;
|
||||
|
||||
|
||||
/** Collapsed ranges do not show up in the display.Setting a range to be collapsed will automatically make it atomic. */
|
||||
collapsed?: boolean;
|
||||
|
||||
|
||||
/** When enabled, will cause the mark to clear itself whenever the cursor enters its range.
|
||||
This is mostly useful for text - replacement widgets that need to 'snap open' when the user tries to edit them.
|
||||
The "clear" event fired on the range handle can be used to be notified when this happens. */
|
||||
clearOnEnter?: boolean;
|
||||
|
||||
|
||||
/** Determines whether the mark is automatically cleared when it becomes empty. Default is true. */
|
||||
clearWhenEmpty?: boolean;
|
||||
|
||||
/** Use a given node to display this range.Implies both collapsed and atomic.
|
||||
The given DOM node must be an inline element(as opposed to a block element). */
|
||||
replacedWith?: HTMLElement;
|
||||
|
||||
|
||||
/** When replacedWith is given, this determines whether the editor will
|
||||
* capture mouse and drag events occurring in this widget. Default is
|
||||
* false—the events will be left alone for the default browser handler,
|
||||
* or specific handlers on the widget, to capture. */
|
||||
handleMouseEvents?: boolean;
|
||||
|
||||
/** A read - only span can, as long as it is not cleared, not be modified except by calling setValue to reset the whole document.
|
||||
Note: adding a read - only span currently clears the undo history of the editor,
|
||||
because existing undo events being partially nullified by read - only spans would corrupt the history (in the current implementation). */
|
||||
readOnly?: boolean;
|
||||
|
||||
|
||||
/** When set to true (default is false), adding this marker will create an event in the undo history that can be individually undone(clearing the marker). */
|
||||
addToHistory?: boolean;
|
||||
|
||||
|
||||
/** Can be used to specify an extra CSS class to be applied to the leftmost span that is part of the marker. */
|
||||
startStyle?: string;
|
||||
|
||||
|
||||
/** Equivalent to startStyle, but for the rightmost span. */
|
||||
endStyle?: string;
|
||||
|
||||
|
||||
/** A string of CSS to be applied to the covered text. For example "color: #fe3". */
|
||||
css?: string;
|
||||
|
||||
/** When given, will give the nodes created for this span a HTML title attribute with the given value. */
|
||||
title?: string;
|
||||
|
||||
/** When the target document is linked to other documents, you can set shared to true to make the marker appear in all documents.
|
||||
By default, a marker appears only in its target document. */
|
||||
shared?: boolean;
|
||||
}
|
||||
|
||||
|
||||
interface StringStream {
|
||||
lastColumnPos: number;
|
||||
lastColumnValue: number;
|
||||
@@ -1009,48 +1045,48 @@ declare module CodeMirror {
|
||||
* Both modes get to parse all of the text, but when both assign a non-null style to a piece of code, the overlay wins, unless
|
||||
* the combine argument was true and not overridden, or state.overlay.combineTokens was true, in which case the styles are combined.
|
||||
*/
|
||||
function overlayMode<T, S>(base: Mode<T>, overlay: Mode<S>, combine?: boolean): Mode<any>
|
||||
|
||||
/**
|
||||
* async specifies that the lint process runs asynchronously. hasGutters specifies that lint errors should be displayed in the CodeMirror
|
||||
* gutter, note that you must use this in conjunction with [ "CodeMirror-lint-markers" ] as an element in the gutters argument on
|
||||
* initialization of the CodeMirror instance.
|
||||
*/
|
||||
interface LintStateOptions {
|
||||
async: boolean;
|
||||
hasGutters: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the getAnnotations callback to LintStateOptions which may be overridden by the user if they choose use their own
|
||||
* linter.
|
||||
*/
|
||||
interface LintOptions extends LintStateOptions {
|
||||
getAnnotations: AnnotationsCallback;
|
||||
}
|
||||
|
||||
/**
|
||||
* A function that calls the updateLintingCallback with any errors found during the linting process.
|
||||
*/
|
||||
interface AnnotationsCallback {
|
||||
(content: string, updateLintingCallback: UpdateLintingCallback, options: LintStateOptions, codeMirror: Editor): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* A function that, given an array of annotations, updates the CodeMirror linting GUI with those annotations
|
||||
*/
|
||||
interface UpdateLintingCallback {
|
||||
(codeMirror: Editor, annotations: Annotation[]): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* An annotation contains a description of a lint error, detailing the location of the error within the code, the severity of the error,
|
||||
* and an explaination as to why the error was thrown.
|
||||
*/
|
||||
interface Annotation {
|
||||
from: Position;
|
||||
message?: string;
|
||||
severity?: string;
|
||||
to?: Position;
|
||||
function overlayMode<T, S>(base: Mode<T>, overlay: Mode<S>, combine?: boolean): Mode<any>
|
||||
|
||||
/**
|
||||
* async specifies that the lint process runs asynchronously. hasGutters specifies that lint errors should be displayed in the CodeMirror
|
||||
* gutter, note that you must use this in conjunction with [ "CodeMirror-lint-markers" ] as an element in the gutters argument on
|
||||
* initialization of the CodeMirror instance.
|
||||
*/
|
||||
interface LintStateOptions {
|
||||
async: boolean;
|
||||
hasGutters: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the getAnnotations callback to LintStateOptions which may be overridden by the user if they choose use their own
|
||||
* linter.
|
||||
*/
|
||||
interface LintOptions extends LintStateOptions {
|
||||
getAnnotations: AnnotationsCallback;
|
||||
}
|
||||
|
||||
/**
|
||||
* A function that calls the updateLintingCallback with any errors found during the linting process.
|
||||
*/
|
||||
interface AnnotationsCallback {
|
||||
(content: string, updateLintingCallback: UpdateLintingCallback, options: LintStateOptions, codeMirror: Editor): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* A function that, given an array of annotations, updates the CodeMirror linting GUI with those annotations
|
||||
*/
|
||||
interface UpdateLintingCallback {
|
||||
(codeMirror: Editor, annotations: Annotation[]): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* An annotation contains a description of a lint error, detailing the location of the error within the code, the severity of the error,
|
||||
* and an explaination as to why the error was thrown.
|
||||
*/
|
||||
interface Annotation {
|
||||
from: Position;
|
||||
message?: string;
|
||||
severity?: string;
|
||||
to?: Position;
|
||||
}
|
||||
}
|
||||
|
||||
+6
-13
@@ -3,16 +3,9 @@
|
||||
|
||||
import colors = require("colors");
|
||||
|
||||
var test:string = 'test';
|
||||
var arr:string[] = ['color', 'odd'.italic.zebra, 'radical'.bold.rainbow, test.underline + 'super'.green];
|
||||
|
||||
colors.black("abc").trim();
|
||||
colors.red("abc").trim();
|
||||
colors.green("abc").trim();
|
||||
colors.yellow("abc").trim();
|
||||
colors.blue("abc").trim();
|
||||
colors.magenta("abc").trim();
|
||||
colors.cyan("abc").trim();
|
||||
colors.white("abc").trim();
|
||||
colors.gray("abc").trim();
|
||||
colors.grey("abc").trim();
|
||||
console.log(colors.black.underline('test'));
|
||||
console.log(colors.rainbow.black.blue.gray('test'));
|
||||
console.log(colors.random.reset.bgWhite.dim('test'));
|
||||
console.log('test'.black.underline);
|
||||
console.log('test'.rainbow.black.blue.gray);
|
||||
console.log('test'.random.reset.bgWhite.dim);
|
||||
|
||||
Vendored
+112
-26
@@ -4,34 +4,120 @@
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "colors" {
|
||||
export function setTheme(theme:any):any;
|
||||
interface Color {
|
||||
(text: string): string;
|
||||
|
||||
export function black(text: string): string;
|
||||
export function red(text: string): string;
|
||||
export function green(text: string): string;
|
||||
export function yellow(text: string): string;
|
||||
export function blue(text: string): string;
|
||||
export function magenta(text: string): string;
|
||||
export function cyan(text: string): string;
|
||||
export function white(text: string): string;
|
||||
export function gray(text: string): string;
|
||||
export function grey(text: string): string;
|
||||
black: Color;
|
||||
red: Color;
|
||||
green: Color;
|
||||
yellow: Color;
|
||||
blue: Color;
|
||||
magenta: Color;
|
||||
cyan: Color;
|
||||
white: Color;
|
||||
gray: Color;
|
||||
grey: Color;
|
||||
|
||||
bgBlack: Color;
|
||||
bgRed: Color;
|
||||
bgGreen: Color;
|
||||
bgYellow: Color;
|
||||
bgBlue: Color;
|
||||
bgMagenta: Color;
|
||||
bgCyan: Color;
|
||||
bgWhite: Color;
|
||||
|
||||
reset: Color;
|
||||
bold: Color;
|
||||
dim: Color;
|
||||
italic: Color;
|
||||
underline: Color;
|
||||
inverse: Color;
|
||||
hidden: Color;
|
||||
strikethrough: Color;
|
||||
|
||||
rainbow: Color;
|
||||
zebra: Color;
|
||||
america: Color;
|
||||
trap: Color;
|
||||
random: Color;
|
||||
}
|
||||
|
||||
module e {
|
||||
export function setTheme(theme:any): void;
|
||||
|
||||
export var black: Color;
|
||||
export var red: Color;
|
||||
export var green: Color;
|
||||
export var yellow: Color;
|
||||
export var blue: Color;
|
||||
export var magenta: Color;
|
||||
export var cyan: Color;
|
||||
export var white: Color;
|
||||
export var gray: Color;
|
||||
export var grey: Color;
|
||||
|
||||
export var bgBlack: Color;
|
||||
export var bgRed: Color;
|
||||
export var bgGreen: Color;
|
||||
export var bgYellow: Color;
|
||||
export var bgBlue: Color;
|
||||
export var bgMagenta: Color;
|
||||
export var bgCyan: Color;
|
||||
export var bgWhite: Color;
|
||||
|
||||
export var reset: Color;
|
||||
export var bold: Color;
|
||||
export var dim: Color;
|
||||
export var italic: Color;
|
||||
export var underline: Color;
|
||||
export var inverse: Color;
|
||||
export var hidden: Color;
|
||||
export var strikethrough: Color;
|
||||
|
||||
export var rainbow: Color;
|
||||
export var zebra: Color;
|
||||
export var america: Color;
|
||||
export var trap: Color;
|
||||
export var random: Color;
|
||||
}
|
||||
|
||||
export = e;
|
||||
}
|
||||
|
||||
interface String {
|
||||
bold:string;
|
||||
italic:string;
|
||||
underline:string;
|
||||
inverse:string;
|
||||
yellow:string;
|
||||
cyan:string;
|
||||
white:string;
|
||||
magenta:string;
|
||||
green:string;
|
||||
red:string;
|
||||
grey:string;
|
||||
blue:string;
|
||||
rainbow:string;
|
||||
zebra:string;
|
||||
random:string;
|
||||
black: string;
|
||||
red: string;
|
||||
green: string;
|
||||
yellow: string;
|
||||
blue: string;
|
||||
magenta: string;
|
||||
cyan: string;
|
||||
white: string;
|
||||
gray: string;
|
||||
grey: string;
|
||||
|
||||
bgBlack: string;
|
||||
bgRed: string;
|
||||
bgGreen: string;
|
||||
bgYellow: string;
|
||||
bgBlue: string;
|
||||
bgMagenta: string;
|
||||
bgCyan: string;
|
||||
bgWhite: string;
|
||||
|
||||
reset: string;
|
||||
bold: string;
|
||||
dim: string;
|
||||
italic: string;
|
||||
underline: string;
|
||||
inverse: string;
|
||||
hidden: string;
|
||||
strikethrough: string;
|
||||
|
||||
rainbow: string;
|
||||
zebra: string;
|
||||
america: string;
|
||||
trap: string;
|
||||
random: string;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ context.settings({compress: true});
|
||||
context.attach('#test', [
|
||||
{header: 'header 1'},
|
||||
{divider: true},
|
||||
{text:'foobar', submenu: [
|
||||
{text:'foobar', subMenu: [
|
||||
{text:'sub1'},
|
||||
{text:'sub2'}
|
||||
]}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
Vendored
+1
-1
@@ -32,7 +32,7 @@ interface Contacts {
|
||||
*/
|
||||
find(fields: string[],
|
||||
onSuccess: (contacts: Contact[]) => void,
|
||||
onError: (error: ContactError) => void,
|
||||
onError?: (error: ContactError) => void,
|
||||
options?: ContactFindOptions): void;
|
||||
/**
|
||||
* The navigator.contacts.pickContact method launches the Contact Picker to select a single contact.
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
/// <reference path="cors.d.ts" />
|
||||
|
||||
import express = require('express');
|
||||
import cors = require('cors');
|
||||
|
||||
var app = express();
|
||||
app.use(cors());
|
||||
app.use(cors({
|
||||
maxAge: 100,
|
||||
credentials: true
|
||||
}));
|
||||
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
// Type definitions for cors
|
||||
// Project: https://github.com/troygoode/node-cors/
|
||||
// Definitions by: Mihhail Lapushkin <https://github.com/mihhail-lapushkin/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
|
||||
declare module "cors" {
|
||||
import express = require('express');
|
||||
|
||||
module e {
|
||||
interface CorsOptions {
|
||||
origin?: any;
|
||||
methods?: any;
|
||||
allowedHeaders?: any;
|
||||
exposedHeaders?: any;
|
||||
credentials?: boolean;
|
||||
maxAge?: number;
|
||||
}
|
||||
}
|
||||
|
||||
function e(options?: e.CorsOptions): express.RequestHandler;
|
||||
export = e;
|
||||
}
|
||||
Vendored
+2
-2
@@ -6,9 +6,9 @@
|
||||
declare module "cron" {
|
||||
|
||||
interface CronJobStatic {
|
||||
new(cronTime: string|Date, onTick: () => void, onComplete?: () => void, start?: boolean, timezone?: string, context?: any): CronJob;
|
||||
new(cronTime: string|Date, onTick: () => void, onComplete?: () => void, start?: boolean, timeZone?: string, context?: any): CronJob;
|
||||
new(options: {
|
||||
cronTime: string|Date; onTick: () => void; onComplete?: () => void; start?: boolean; timezone?: string; context?: any
|
||||
cronTime: string|Date; onTick: () => void; onComplete?: () => void; start?: boolean; timeZone?: string; context?: any
|
||||
}): CronJob;
|
||||
}
|
||||
interface CronJob {
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
Vendored
+71
-71
@@ -74,16 +74,16 @@ declare module d3 {
|
||||
* Derive an attribute value for each node in the selection based on bound data.
|
||||
*
|
||||
* @param name The attribute name, optionally prefixed.
|
||||
* @param value The function of the datum (the bound data item) and index (the position in the subgrouping) which computes the attribute value. If the function returns null, the attribute is removed.
|
||||
* @param value The function of the datum (the bound data item), index (the position in the subgrouping), and outer index (overall position in nested selections) which computes the attribute value. If the function returns null, the attribute is removed.
|
||||
*/
|
||||
attr(name: string, value: (datum: Datum, index: number) => Primitive): Update<Datum>;
|
||||
attr(name: string, value: (datum: Datum, index: number, outerIndex: number) => Primitive): Update<Datum>;
|
||||
|
||||
/**
|
||||
* Set multiple properties at once using an Object. D3 iterates over all enumerable properties and either sets or computes the attribute's value based on the corresponding entry in the Object.
|
||||
*
|
||||
* @param obj A key-value mapping corresponding to attributes and values. If the value is a simple string or number, it is taken as a constant. Otherwise, it is a function that derives the attribute value.
|
||||
*/
|
||||
attr(obj: { [key: string]: Primitive | ((datum: Datum, index: number) => Primitive) }): Update<Datum>;
|
||||
attr(obj: { [key: string]: Primitive | ((datum: Datum, index: number, outerIndex: number) => Primitive) }): Update<Datum>;
|
||||
|
||||
/**
|
||||
* Returns true if the first node in this selection has the given class list. If multiple classes are specified (i.e., "foo bar"), then returns true only if all classes match.
|
||||
@@ -106,14 +106,14 @@ declare module d3 {
|
||||
* @param name The class list. Spaces separate multiple class names.
|
||||
* @param value The function to run for each node. Should return true to add the class to the node, or false to remove it.
|
||||
*/
|
||||
classed(name: string, value: (datum: Datum, index: number) => boolean): Update<Datum>;
|
||||
classed(name: string, value: (datum: Datum, index: number, outerIndex: number) => boolean): Update<Datum>;
|
||||
|
||||
/**
|
||||
* Set or derive classes for multiple class lists at once.
|
||||
*
|
||||
* @param obj An Object mapping class lists to values that are either plain booleans or functions that return booleans.
|
||||
*/
|
||||
classed(obj: { [key: string]: boolean | ((datum: Datum, index: number) => boolean) }): Update<Datum>;
|
||||
classed(obj: { [key: string]: boolean | ((datum: Datum, index: number, outerIndex: number) => boolean) }): Update<Datum>;
|
||||
|
||||
/**
|
||||
* Retrieve the computed style value for the first node in the selection.
|
||||
@@ -135,7 +135,7 @@ declare module d3 {
|
||||
* @param value the function to derive the value
|
||||
* @param priority if specified, either null or the string "important" (no exclamation mark)
|
||||
*/
|
||||
style(name: string, value: (datum: Datum, index: number) => Primitive, priority?: string): Update<Datum>;
|
||||
style(name: string, value: (datum: Datum, index: number, outerIndex: number) => Primitive, priority?: string): Update<Datum>;
|
||||
|
||||
/**
|
||||
* Set a large number of CSS properties from an object.
|
||||
@@ -143,7 +143,7 @@ declare module d3 {
|
||||
* @param obj an Object whose keys correspond to CSS property names and values are either constants or functions that derive property values
|
||||
* @param priority if specified, either null or the string "important" (no exclamation mark)
|
||||
*/
|
||||
style(obj: { [key: string]: Primitive | ((datum: Datum, index: number) => Primitive) }, priority?: string): Update<Datum>;
|
||||
style(obj: { [key: string]: Primitive | ((datum: Datum, index: number, outerIndex: number) => Primitive) }, priority?: string): Update<Datum>;
|
||||
|
||||
/**
|
||||
* Retrieve an arbitrary node property such as the 'checked' property of checkboxes, or the 'value' of text boxes.
|
||||
@@ -166,14 +166,14 @@ declare module d3 {
|
||||
* @param name the property name
|
||||
* @param value the function used to derive the property's value
|
||||
*/
|
||||
property(name: string, value: (datum: Datum, index: number) => any): Update<Datum>;
|
||||
property(name: string, value: (datum: Datum, index: number, outerIndex: number) => any): Update<Datum>;
|
||||
|
||||
/**
|
||||
* Set multiple node properties. Caveats apply: take care not to mutate special properties like __proto__.
|
||||
*
|
||||
* @param obj an Object whose keys correspond to node properties and values are either constants or functions that will compute a value.
|
||||
*/
|
||||
property(obj: { [key: string]: any | ((datum: Datum, index: number) => any) }): Update<Datum>;
|
||||
property(obj: { [key: string]: any | ((datum: Datum, index: number, outerIndex: number) => any) }): Update<Datum>;
|
||||
|
||||
/**
|
||||
* Retrieve the textContent of the first node in the selection.
|
||||
@@ -190,7 +190,7 @@ declare module d3 {
|
||||
* Compute the textContent of each node in the selection.
|
||||
* @param value the function which will compute the text
|
||||
*/
|
||||
text(value: (datum: Datum, index: number) => Primitive): Update<Datum>;
|
||||
text(value: (datum: Datum, index: number, outerIndex: number) => Primitive): Update<Datum>;
|
||||
|
||||
/**
|
||||
* Retrieve the HTML content of the first node in the selection. Uses 'innerHTML' internally and will not work with SVG or other elements without a polyfill.
|
||||
@@ -207,7 +207,7 @@ declare module d3 {
|
||||
* Compute the HTML content for each node in the selection. Uses 'innerHTML' internally and thus will not work with SVG or other elements without a polyfill.
|
||||
* @param value the function to compute HTML content
|
||||
*/
|
||||
html(value: (datum: Datum, index: number) => string): Selection<Datum>;
|
||||
html(value: (datum: Datum, index: number, outerIndex: number) => string): Selection<Datum>;
|
||||
|
||||
/**
|
||||
* Appends a new child to each node in the selection. This child will inherit the parent's data (if available). Returns a fresh selection consisting of the newly-appended children.
|
||||
@@ -221,7 +221,7 @@ declare module d3 {
|
||||
*
|
||||
* @param name the function to compute a new element
|
||||
*/
|
||||
append(name: (datum: Datum, index: number) => EventTarget): Update<Datum>;
|
||||
append(name: (datum: Datum, index: number, outerIndex: number) => EventTarget): Update<Datum>;
|
||||
|
||||
/**
|
||||
* Inserts a new child to each node in the selection. This child will inherit its parent's data (if available). Returns a fresh selection consisting of the newly-inserted children.
|
||||
@@ -235,21 +235,21 @@ declare module d3 {
|
||||
* @param name the element name to append. May be prefixed (see d3.ns.prefix).
|
||||
* @param before a function to determine the node to use as the next sibling
|
||||
*/
|
||||
insert(name: string, before: (datum: Datum, index: number) => EventTarget): Update<Datum>;
|
||||
insert(name: string, before: (datum: Datum, index: number, outerIndex: number) => EventTarget): Update<Datum>;
|
||||
|
||||
/**
|
||||
* Inserts a new child to the end of each node in the selection by computing a new node. This child will inherit its parent's data (if available). Returns a fresh selection consisting of the newly-inserted children.
|
||||
* @param name the function to compute a new child
|
||||
* @param before the selector to determine position (e.g., ":first-child")
|
||||
*/
|
||||
insert(name: (datum: Datum, index: number) => EventTarget, before: string): Update<Datum>;
|
||||
insert(name: (datum: Datum, index: number, outerIndex: number) => EventTarget, before: string): Update<Datum>;
|
||||
|
||||
/**
|
||||
* Inserts a new child to the end of each node in the selection by computing a new node. This child will inherit its parent's data (if available). Returns a fresh selection consisting of the newly-inserted children.
|
||||
* @param name the function to compute a new child
|
||||
* @param before a function to determine the node to use as the next sibling
|
||||
*/
|
||||
insert(name: (datum: Datum, index: number) => EventTarget, before: (datum: Datum, index: number) => EventTarget): Update<Datum>;
|
||||
insert(name: (datum: Datum, index: number, outerIndex: number) => EventTarget, before: (datum: Datum, index: number, outerIndex: number) => EventTarget): Update<Datum>;
|
||||
|
||||
/**
|
||||
* Removes the elements from the DOM. They are in a detached state and may be re-added (though there is currently no dedicated API for doing so).
|
||||
@@ -266,14 +266,14 @@ declare module d3 {
|
||||
* @param data the array of data to bind to this selection
|
||||
* @param key the optional function to determine the unique key for each piece of data. When unspecified, uses the index of the element.
|
||||
*/
|
||||
data<NewDatum>(data: NewDatum[], key?: (datum: NewDatum, index: number) => string): Update<NewDatum>;
|
||||
data<NewDatum>(data: NewDatum[], key?: (datum: NewDatum, index: number, outerIndex: number) => string): Update<NewDatum>;
|
||||
|
||||
/**
|
||||
* Derives data to bind to this selection.
|
||||
* @param data the function to derive data. Must return an array.
|
||||
* @param key the optional function to determine the unique key for each data item. When unspecified, uses the index of the element.
|
||||
*/
|
||||
data<NewDatum>(data: (datum: Datum, index: number) => NewDatum[], key?: (datum: NewDatum, index: number) => string): Update<NewDatum>;
|
||||
data<NewDatum>(data: (datum: Datum, index: number, outerIndex: number) => NewDatum[], key?: (datum: NewDatum, index: number, outerIndex: number) => string): Update<NewDatum>;
|
||||
|
||||
/**
|
||||
* Filters the selection, returning only those nodes that match the given CSS selector.
|
||||
@@ -285,7 +285,7 @@ declare module d3 {
|
||||
* Filters the selection, returning only those nodes for which the given function returned true.
|
||||
* @param selector the filter function
|
||||
*/
|
||||
filter(selector: (datum: Datum, index: number) => boolean): Update<Datum>;
|
||||
filter(selector: (datum: Datum, index: number, outerIndex: number) => boolean): Update<Datum>;
|
||||
|
||||
/**
|
||||
* Return the data item bound to the first element in the selection.
|
||||
@@ -302,7 +302,7 @@ declare module d3 {
|
||||
* Derive the data item for each node in the selection. Useful for situations such as the HTML5 'dataset' attribute.
|
||||
* @param value the function to compute data for each node
|
||||
*/
|
||||
datum<NewDatum>(value: (datum: Datum, index: number) => NewDatum): Update<NewDatum>;
|
||||
datum<NewDatum>(value: (datum: Datum, index: number, outerIndex: number) => NewDatum): Update<NewDatum>;
|
||||
|
||||
/**
|
||||
* Reorders nodes in the selection based on the given comparator. Nodes are re-inserted into the document once sorted.
|
||||
@@ -319,7 +319,7 @@ declare module d3 {
|
||||
* Returns the listener (if any) for the given event.
|
||||
* @param type the type of event to load the listener for. May have a namespace (e.g., ".foo") at the end.
|
||||
*/
|
||||
on(type: string): (datum: Datum, index: number) => any;
|
||||
on(type: string): (datum: Datum, index: number, outerIndex: number) => any;
|
||||
|
||||
/**
|
||||
* Adds a listener for the specified event. If one was already registered, it is removed before the new listener is added. The return value of the listener function is ignored.
|
||||
@@ -327,7 +327,7 @@ declare module d3 {
|
||||
* @param listener an event listener function, or null to unregister
|
||||
* @param capture sets the DOM useCapture flag
|
||||
*/
|
||||
on(type: string, listener: (datum: Datum, index: number) => any, capture?: boolean): Update<Datum>;
|
||||
on(type: string, listener: (datum: Datum, index: number, outerIndex: number) => any, capture?: boolean): Update<Datum>;
|
||||
|
||||
/**
|
||||
* Begins a new transition. Interrupts any active transitions of the same name.
|
||||
@@ -351,7 +351,7 @@ declare module d3 {
|
||||
* Creates a subselection by using a function to find descendent elements. Bound data is inherited.
|
||||
* @param selector the function to find matching descendants
|
||||
*/
|
||||
select(selector: (datum: Datum, index: number) => EventTarget): Update<Datum>;
|
||||
select(selector: (datum: Datum, index: number, outerIndex: number) => EventTarget): Update<Datum>;
|
||||
|
||||
/**
|
||||
* Creates a subselection by finding all descendents that match the given selector. Bound data is not inherited.
|
||||
@@ -363,13 +363,13 @@ declare module d3 {
|
||||
* Creates a subselection by using a function to find descendent elements. Bound data is not inherited.
|
||||
* @param selector the function to find matching descendents
|
||||
*/
|
||||
selectAll(selector: (datum: Datum, index: number) => Array<EventTarget> | NodeList): Update<any>;
|
||||
selectAll(selector: (datum: Datum, index: number, outerIndex: number) => Array<EventTarget> | NodeList): Update<any>;
|
||||
|
||||
/**
|
||||
* Invoke the given function for each element in the selection. The return value of the function is ignored.
|
||||
* @param func the function to invoke
|
||||
*/
|
||||
each(func: (datum: Datum, index: number) => any): Update<Datum>;
|
||||
each(func: (datum: Datum, index: number, outerIndex: number) => any): Update<Datum>;
|
||||
|
||||
/**
|
||||
* Call a function on the selection. sel.call(foo) is equivalent to foo(sel).
|
||||
@@ -406,14 +406,14 @@ declare module d3 {
|
||||
|
||||
interface Enter<Datum> {
|
||||
append(name: string): Selection<Datum>;
|
||||
append(name: (datum: Datum, index: number) => EventTarget): Selection<Datum>;
|
||||
append(name: (datum: Datum, index: number, outerIndex: number) => EventTarget): Selection<Datum>;
|
||||
|
||||
insert(name: string, before?: string): Selection<Datum>;
|
||||
insert(name: string, before: (datum: Datum, index: number) => EventTarget): Selection<Datum>;
|
||||
insert(name: (datum: Datum, index: number) => EventTarget, before?: string): Selection<Datum>;
|
||||
insert(name: (datum: Datum, index: number) => EventTarget, before: (datum: Datum, index: number) => EventTarget): Selection<Datum>;
|
||||
insert(name: string, before: (datum: Datum, index: number, outerIndex: number) => EventTarget): Selection<Datum>;
|
||||
insert(name: (datum: Datum, index: number, outerIndex: number) => EventTarget, before?: string): Selection<Datum>;
|
||||
insert(name: (datum: Datum, index: number, outerIndex: number) => EventTarget, before: (datum: Datum, index: number, outerIndex: number) => EventTarget): Selection<Datum>;
|
||||
|
||||
select(name: (datum: Datum, index: number) => EventTarget): Selection<Datum>;
|
||||
select(name: (datum: Datum, index: number, outerIndex: number) => EventTarget): Selection<Datum>;
|
||||
call(func: (selection: Enter<Datum>, ...args: any[]) => any, ...args: any[]): Enter<Datum>;
|
||||
}
|
||||
}
|
||||
@@ -464,16 +464,16 @@ declare module d3 {
|
||||
* Derive an attribute value for each node in the selection based on bound data.
|
||||
*
|
||||
* @param name The attribute name, optionally prefixed.
|
||||
* @param value The function of the datum (the bound data item) and index (the position in the subgrouping) which computes the attribute value. If the function returns null, the attribute is removed.
|
||||
* @param value The function of the datum (the bound data item), index (the position in the subgrouping), and outer index (overall position in nested selections) which computes the attribute value. If the function returns null, the attribute is removed.
|
||||
*/
|
||||
attr(name: string, value: (datum: Datum, index: number) => Primitive): Selection<Datum>;
|
||||
attr(name: string, value: (datum: Datum, index: number, outerIndex: number) => Primitive): Selection<Datum>;
|
||||
|
||||
/**
|
||||
* Set multiple properties at once using an Object. D3 iterates over all enumerable properties and either sets or computes the attribute's value based on the corresponding entry in the Object.
|
||||
*
|
||||
* @param obj A key-value mapping corresponding to attributes and values. If the value is a simple string or number, it is taken as a constant. Otherwise, it is a function that derives the attribute value.
|
||||
*/
|
||||
attr(obj: { [key: string]: Primitive | ((datum: Datum, index: number) => Primitive) }): Selection<Datum>;
|
||||
attr(obj: { [key: string]: Primitive | ((datum: Datum, index: number, outerIndex: number) => Primitive) }): Selection<Datum>;
|
||||
|
||||
/**
|
||||
* Returns true if the first node in this selection has the given class list. If multiple classes are specified (i.e., "foo bar"), then returns true only if all classes match.
|
||||
@@ -496,14 +496,14 @@ declare module d3 {
|
||||
* @param name The class list. Spaces separate multiple class names.
|
||||
* @param value The function to run for each node. Should return true to add the class to the node, or false to remove it.
|
||||
*/
|
||||
classed(name: string, value: (datum: Datum, index: number) => boolean): Selection<Datum>;
|
||||
classed(name: string, value: (datum: Datum, index: number, outerIndex: number) => boolean): Selection<Datum>;
|
||||
|
||||
/**
|
||||
* Set or derive classes for multiple class lists at once.
|
||||
*
|
||||
* @param obj An Object mapping class lists to values that are either plain booleans or functions that return booleans.
|
||||
*/
|
||||
classed(obj: { [key: string]: boolean | ((datum: Datum, index: number) => boolean) }): Selection<Datum>;
|
||||
classed(obj: { [key: string]: boolean | ((datum: Datum, index: number, outerIndex: number) => boolean) }): Selection<Datum>;
|
||||
|
||||
/**
|
||||
* Retrieve the computed style value for the first node in the selection.
|
||||
@@ -525,7 +525,7 @@ declare module d3 {
|
||||
* @param value the function to derive the value
|
||||
* @param priority if specified, either null or the string "important" (no exclamation mark)
|
||||
*/
|
||||
style(name: string, value: (datum: Datum, index: number) => Primitive, priority?: string): Selection<Datum>;
|
||||
style(name: string, value: (datum: Datum, index: number, outerIndex: number) => Primitive, priority?: string): Selection<Datum>;
|
||||
|
||||
/**
|
||||
* Set a large number of CSS properties from an object.
|
||||
@@ -533,7 +533,7 @@ declare module d3 {
|
||||
* @param obj an Object whose keys correspond to CSS property names and values are either constants or functions that derive property values
|
||||
* @param priority if specified, either null or the string "important" (no exclamation mark)
|
||||
*/
|
||||
style(obj: { [key: string]: Primitive | ((datum: Datum, index: number) => Primitive) }, priority?: string): Selection<Datum>;
|
||||
style(obj: { [key: string]: Primitive | ((datum: Datum, index: number, outerIndex: number) => Primitive) }, priority?: string): Selection<Datum>;
|
||||
|
||||
/**
|
||||
* Retrieve an arbitrary node property such as the 'checked' property of checkboxes, or the 'value' of text boxes.
|
||||
@@ -556,14 +556,14 @@ declare module d3 {
|
||||
* @param name the property name
|
||||
* @param value the function used to derive the property's value
|
||||
*/
|
||||
property(name: string, value: (datum: Datum, index: number) => any): Selection<Datum>;
|
||||
property(name: string, value: (datum: Datum, index: number, outerIndex: number) => any): Selection<Datum>;
|
||||
|
||||
/**
|
||||
* Set multiple node properties. Caveats apply: take care not to mutate special properties like __proto__.
|
||||
*
|
||||
* @param obj an Object whose keys correspond to node properties and values are either constants or functions that will compute a value.
|
||||
*/
|
||||
property(obj: { [key: string]: any | ((datum: Datum, index: number) => any) }): Selection<Datum>;
|
||||
property(obj: { [key: string]: any | ((datum: Datum, index: number, innerInder: number) => any) }): Selection<Datum>;
|
||||
|
||||
/**
|
||||
* Retrieve the textContent of the first node in the selection.
|
||||
@@ -580,7 +580,7 @@ declare module d3 {
|
||||
* Compute the textContent of each node in the selection.
|
||||
* @param value the function which will compute the text
|
||||
*/
|
||||
text(value: (datum: Datum, index: number) => Primitive): Selection<Datum>;
|
||||
text(value: (datum: Datum, index: number, outerIndex: number) => Primitive): Selection<Datum>;
|
||||
|
||||
/**
|
||||
* Retrieve the HTML content of the first node in the selection. Uses 'innerHTML' internally and will not work with SVG or other elements without a polyfill.
|
||||
@@ -597,7 +597,7 @@ declare module d3 {
|
||||
* Compute the HTML content for each node in the selection. Uses 'innerHTML' internally and thus will not work with SVG or other elements without a polyfill.
|
||||
* @param value the function to compute HTML content
|
||||
*/
|
||||
html(value: (datum: Datum, index: number) => string): Selection<Datum>;
|
||||
html(value: (datum: Datum, index: number, outerIndex: number) => string): Selection<Datum>;
|
||||
|
||||
/**
|
||||
* Appends a new child to each node in the selection. This child will inherit the parent's data (if available). Returns a fresh selection consisting of the newly-appended children.
|
||||
@@ -611,7 +611,7 @@ declare module d3 {
|
||||
*
|
||||
* @param name the function to compute a new element
|
||||
*/
|
||||
append(name: (datum: Datum, index: number) => EventTarget): Selection<Datum>;
|
||||
append(name: (datum: Datum, index: number, outerIndex: number) => EventTarget): Selection<Datum>;
|
||||
|
||||
/**
|
||||
* Inserts a new child to each node in the selection. This child will inherit its parent's data (if available). Returns a fresh selection consisting of the newly-inserted children.
|
||||
@@ -625,21 +625,21 @@ declare module d3 {
|
||||
* @param name the element name to append. May be prefixed (see d3.ns.prefix).
|
||||
* @param before a function to determine the node to use as the next sibling
|
||||
*/
|
||||
insert(name: string, before: (datum: Datum, index: number) => EventTarget): Selection<Datum>;
|
||||
insert(name: string, before: (datum: Datum, index: number, outerIndex: number) => EventTarget): Selection<Datum>;
|
||||
|
||||
/**
|
||||
* Inserts a new child to the end of each node in the selection by computing a new node. This child will inherit its parent's data (if available). Returns a fresh selection consisting of the newly-inserted children.
|
||||
* @param name the function to compute a new child
|
||||
* @param before the selector to determine position (e.g., ":first-child")
|
||||
*/
|
||||
insert(name: (datum: Datum, index: number) => EventTarget, before: string): Selection<Datum>;
|
||||
insert(name: (datum: Datum, index: number, outerIndex: number) => EventTarget, before: string): Selection<Datum>;
|
||||
|
||||
/**
|
||||
* Inserts a new child to the end of each node in the selection by computing a new node. This child will inherit its parent's data (if available). Returns a fresh selection consisting of the newly-inserted children.
|
||||
* @param name the function to compute a new child
|
||||
* @param before a function to determine the node to use as the next sibling
|
||||
*/
|
||||
insert(name: (datum: Datum, index: number) => EventTarget, before: (datum: Datum, index: number) => EventTarget): Selection<Datum>;
|
||||
insert(name: (datum: Datum, index: number, outerIndex: number) => EventTarget, before: (datum: Datum, index: number, outerIndex: number) => EventTarget): Selection<Datum>;
|
||||
|
||||
/**
|
||||
* Removes the elements from the DOM. They are in a detached state and may be re-added (though there is currently no dedicated API for doing so).
|
||||
@@ -656,14 +656,14 @@ declare module d3 {
|
||||
* @param data the array of data to bind to this selection
|
||||
* @param key the optional function to determine the unique key for each piece of data. When unspecified, uses the index of the element.
|
||||
*/
|
||||
data<NewDatum>(data: NewDatum[], key?: (datum: NewDatum, index: number) => string): selection.Update<NewDatum>;
|
||||
data<NewDatum>(data: NewDatum[], key?: (datum: NewDatum, index: number, outerIndex: number) => string): selection.Update<NewDatum>;
|
||||
|
||||
/**
|
||||
* Derives data to bind to this selection.
|
||||
* @param data the function to derive data. Must return an array.
|
||||
* @param key the optional function to determine the unique key for each data item. When unspecified, uses the index of the element.
|
||||
*/
|
||||
data<NewDatum>(data: (datum: Datum, index: number) => NewDatum[], key?: (datum: NewDatum, index: number) => string): selection.Update<NewDatum>;
|
||||
data<NewDatum>(data: (datum: Datum, index: number, outerIndex: number) => NewDatum[], key?: (datum: NewDatum, index: number, outerIndex: number) => string): selection.Update<NewDatum>;
|
||||
|
||||
/**
|
||||
* Filters the selection, returning only those nodes that match the given CSS selector.
|
||||
@@ -675,7 +675,7 @@ declare module d3 {
|
||||
* Filters the selection, returning only those nodes for which the given function returned true.
|
||||
* @param selector the filter function
|
||||
*/
|
||||
filter(selector: (datum: Datum, index: number) => boolean): Selection<Datum>;
|
||||
filter(selector: (datum: Datum, index: number, outerIndex: number) => boolean): Selection<Datum>;
|
||||
|
||||
/**
|
||||
* Return the data item bound to the first element in the selection.
|
||||
@@ -686,7 +686,7 @@ declare module d3 {
|
||||
* Derive the data item for each node in the selection. Useful for situations such as the HTML5 'dataset' attribute.
|
||||
* @param value the function to compute data for each node
|
||||
*/
|
||||
datum<NewDatum>(value: (datum: Datum, index: number) => NewDatum): Selection<NewDatum>;
|
||||
datum<NewDatum>(value: (datum: Datum, index: number, outerIndex: number) => NewDatum): Selection<NewDatum>;
|
||||
|
||||
/**
|
||||
* Set the data item for each node in the selection.
|
||||
@@ -709,7 +709,7 @@ declare module d3 {
|
||||
* Returns the listener (if any) for the given event.
|
||||
* @param type the type of event to load the listener for. May have a namespace (e.g., ".foo") at the end.
|
||||
*/
|
||||
on(type: string): (datum: Datum, index: number) => any;
|
||||
on(type: string): (datum: Datum, index: number, outerIndex: number) => any;
|
||||
|
||||
/**
|
||||
* Adds a listener for the specified event. If one was already registered, it is removed before the new listener is added. The return value of the listener function is ignored.
|
||||
@@ -717,7 +717,7 @@ declare module d3 {
|
||||
* @param listener an event listener function, or null to unregister
|
||||
* @param capture sets the DOM useCapture flag
|
||||
*/
|
||||
on(type: string, listener: (datum: Datum, index: number) => any, capture?: boolean): Selection<Datum>;
|
||||
on(type: string, listener: (datum: Datum, index: number, outerIndex: number) => any, capture?: boolean): Selection<Datum>;
|
||||
|
||||
/**
|
||||
* Begins a new transition. Interrupts any active transitions of the same name.
|
||||
@@ -741,7 +741,7 @@ declare module d3 {
|
||||
* Creates a subselection by using a function to find descendent elements. Bound data is inherited.
|
||||
* @param selector the function to find matching descendants
|
||||
*/
|
||||
select(selector: (datum: Datum, index: number) => EventTarget): Selection<Datum>;
|
||||
select(selector: (datum: Datum, index: number, outerIndex: number) => EventTarget): Selection<Datum>;
|
||||
|
||||
/**
|
||||
* Creates a subselection by finding all descendents that match the given selector. Bound data is not inherited.
|
||||
@@ -760,7 +760,7 @@ declare module d3 {
|
||||
* Creates a subselection by using a function to find descendent elements. Bound data is not inherited.
|
||||
* @param selector the function to find matching descendents
|
||||
*/
|
||||
selectAll(selector: (datum: Datum, index: number) => Array<EventTarget> | NodeList): Selection<any>;
|
||||
selectAll(selector: (datum: Datum, index: number, outerIndex: number) => Array<EventTarget> | NodeList): Selection<any>;
|
||||
|
||||
/**
|
||||
* Creates a subselection by using a function to find descendent elements. Bound data is not inherited.
|
||||
@@ -768,13 +768,13 @@ declare module d3 {
|
||||
* Use this overload when data-binding a subselection (that is, sel.selectAll('.foo').data(d => ...)). The type will carry over.
|
||||
* @param selector the function to find matching descendents
|
||||
*/
|
||||
selectAll<T>(selector: (datum: Datum, index: number) => Array<EventTarget> | NodeList): Selection<T>;
|
||||
selectAll<T>(selector: (datum: Datum, index: number, outerIndex: number) => Array<EventTarget> | NodeList): Selection<T>;
|
||||
|
||||
/**
|
||||
* Invoke the given function for each element in the selection. The return value of the function is ignored.
|
||||
* @param func the function to invoke
|
||||
*/
|
||||
each(func: (datum: Datum, index: number) => any): Selection<Datum>;
|
||||
each(func: (datum: Datum, index: number, outerIndex: number) => any): Selection<Datum>;
|
||||
|
||||
/**
|
||||
* Call a function on the selection. sel.call(foo) is equivalent to foo(sel).
|
||||
@@ -805,32 +805,35 @@ declare module d3 {
|
||||
}
|
||||
|
||||
interface Transition<Datum> {
|
||||
|
||||
transition(): Transition<Datum>;
|
||||
|
||||
delay(): number;
|
||||
delay(delay: number): Transition<Datum>;
|
||||
delay(delay: (datum: Datum, index: number) => number): Transition<Datum>;
|
||||
delay(delay: (datum: Datum, index: number, outerIndex: number) => number): Transition<Datum>;
|
||||
|
||||
duration(): number;
|
||||
duration(duration: number): Transition<Datum>;
|
||||
duration(duration: (datum: Datum, index: number) => number): Transition<Datum>;
|
||||
duration(duration: (datum: Datum, index: number, outerIndex: number) => number): Transition<Datum>;
|
||||
|
||||
ease(): (t: number) => number;
|
||||
ease(value: string, ...args: any[]): Transition<Datum>;
|
||||
ease(value: (t: number) => number): Transition<Datum>;
|
||||
|
||||
attr(name: string, value: Primitive): Transition<Datum>;
|
||||
attr(name: string, value: (datum: Datum, index: number) => Primitive): Transition<Datum>;
|
||||
attr(obj: { [key: string]: Primitive | ((datum: Datum, index: number) => Primitive) }): Transition<Datum>;
|
||||
attr(name: string, value: (datum: Datum, index: number, outerIndex: number) => Primitive): Transition<Datum>;
|
||||
attr(obj: { [key: string]: Primitive | ((datum: Datum, index: number, outerIndex: number) => Primitive) }): Transition<Datum>;
|
||||
|
||||
attrTween(name: string, tween: (datum: Datum, index: number, attr: string) => Primitive): Transition<Datum>;
|
||||
attrTween(name: string, tween: (datum: Datum, index: number, attr: string) => (t: number) => Primitive): Transition<Datum>;
|
||||
|
||||
style(name: string, value: Primitive, priority?: string): Transition<Datum>;
|
||||
style(name: string, value: (datum: Datum, index: number) => Primitive, priority?: string): Transition<Datum>;
|
||||
style(obj: { [key: string]: Primitive | ((datum: Datum, index: number) => Primitive) }, priority?: string): Transition<Datum>;
|
||||
style(name: string, value: (datum: Datum, index: number, outerIndex: number) => Primitive, priority?: string): Transition<Datum>;
|
||||
style(obj: { [key: string]: Primitive | ((datum: Datum, index: number, outerIndex: number) => Primitive) }, priority?: string): Transition<Datum>;
|
||||
|
||||
styleTween(name: string, tween: (datum: Datum, index: number, attr: string) => Primitive, priority?: string): Transition<Datum>;
|
||||
styleTween(name: string, tween: (datum: Datum, index: number, attr: string) => (t: number) => Primitive, priority?: string): Transition<Datum>;
|
||||
|
||||
text(value: Primitive): Transition<Datum>;
|
||||
text(value: (datum: Datum, index: number) => Primitive): Transition<Datum>;
|
||||
text(value: (datum: Datum, index: number, outerIndex: number) => Primitive): Transition<Datum>;
|
||||
|
||||
tween(name: string, factory: () => (t: number) => any): Transition<Datum>;
|
||||
|
||||
@@ -2193,8 +2196,7 @@ declare module d3 {
|
||||
interpolate(interpolate: "cardinal-open"): Line<T>;
|
||||
interpolate(interpolate: "cardinal-closed"): Line<T>;
|
||||
interpolate(interpolate: "monotone"): Line<T>;
|
||||
interpolate(interpolate: string): Line<T>;
|
||||
interpolate(interpolate: (points: Array<[number, number]>) => string): Line<T>;
|
||||
interpolate(interpolate: string | ((points: Array<[number, number]>) => string)): Line<T>;
|
||||
|
||||
tension(): number;
|
||||
tension(tension: number): Line<T>;
|
||||
@@ -2232,8 +2234,7 @@ declare module d3 {
|
||||
interpolate(interpolate: "cardinal-open"): Radial<T>;
|
||||
interpolate(interpolate: "cardinal-closed"): Radial<T>;
|
||||
interpolate(interpolate: "monotone"): Radial<T>;
|
||||
interpolate(interpolate: string): Radial<T>;
|
||||
interpolate(interpolate: (points: Array<[number, number]>) => string): Radial<T>;
|
||||
interpolate(interpolate: string | ((points: Array<[number, number]>) => string)): Radial<T>;
|
||||
|
||||
tension(): number;
|
||||
tension(tension: number): Radial<T>;
|
||||
@@ -2283,7 +2284,7 @@ declare module d3 {
|
||||
interpolate(interpolate: "cardinal"): Area<T>;
|
||||
interpolate(interpolate: "cardinal-open"): Area<T>;
|
||||
interpolate(interpolate: "monotone"): Area<T>;
|
||||
interpolate(interpolate: string): Area<T>;
|
||||
interpolate(interpolate: string | ((points: Array<[number, number]>) => string)): Area<T>;
|
||||
|
||||
tension(): number;
|
||||
tension(tension: number): Area<T>;
|
||||
@@ -2333,8 +2334,7 @@ declare module d3 {
|
||||
interpolate(interpolate: "cardinal"): Radial<T>;
|
||||
interpolate(interpolate: "cardinal-open"): Radial<T>;
|
||||
interpolate(interpolate: "monotone"): Radial<T>;
|
||||
interpolate(interpolate: string): Radial<T>;
|
||||
interpolate(interpolate: (points: Array<[number, number]>) => string): Radial<T>;
|
||||
interpolate(interpolate: string | ((points: Array<[number, number]>) => string)): Radial<T>;
|
||||
|
||||
tension(): number;
|
||||
tension(tension: number): Radial<T>;
|
||||
@@ -2358,7 +2358,7 @@ declare module d3 {
|
||||
}
|
||||
|
||||
interface Arc<T> {
|
||||
(d: T, i: number): string;
|
||||
(d: T, i?: number): string;
|
||||
|
||||
innerRadius(): (d: T, i: number) => number;
|
||||
innerRadius(radius: number): Arc<T>;
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/// <reference path="data-driven.d.ts" />
|
||||
|
||||
import data_driven = require('data-driven');
|
||||
|
||||
data_driven([
|
||||
{key:"value"},
|
||||
{key:"foobar"}
|
||||
],() => {});
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// Type definitions for data-driven.js
|
||||
// Project: https://github.com/fluentsoftware/data-driven
|
||||
// Definitions by: Adam Babcock <https://github.com/mrhen>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "data-driven" {
|
||||
function data_driven<T>(data:T[], callback:()=>any):any;
|
||||
export = data_driven
|
||||
}
|
||||
Vendored
+6
-2
@@ -4,6 +4,10 @@
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module 'detect-indent' {
|
||||
function DetectIndent (dir: string, alt?: string): string;
|
||||
export = DetectIndent;
|
||||
interface DetectIndent {
|
||||
(dir: string, alt?: string): string;
|
||||
}
|
||||
var _: DetectIndent;
|
||||
export = _;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+6448
File diff suppressed because it is too large
Load Diff
Vendored
+53
-4
@@ -1,4 +1,4 @@
|
||||
// Type definitions for DevExtreme 15.1.4
|
||||
// Type definitions for DevExtreme 15.1.5
|
||||
// Project: http://js.devexpress.com/
|
||||
// Definitions by: DevExpress Inc. <http://devexpress.com/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
@@ -520,6 +520,8 @@ declare module DevExpress {
|
||||
}
|
||||
/** An object used to work with primitive data types not supported by JavaScript when accessing an OData web service. */
|
||||
export class EdmLiteral {
|
||||
/** Creates an EdmLiteral instance and assigns the specified value to it. */
|
||||
constructor(value: string);
|
||||
/** Returns a string representation of the value associated with this EdmLiteral object. */
|
||||
valueOf(): string;
|
||||
}
|
||||
@@ -1438,6 +1440,7 @@ declare module DevExpress.ui {
|
||||
applyButtonText?: string;
|
||||
/** A Boolean value specifying whether or not to display the lookup in full-screen mode. */
|
||||
fullScreen?: boolean;
|
||||
focusStateEnabled?: boolean;
|
||||
/** A Boolean value specifying whether or not to group widget items. */
|
||||
grouped?: boolean;
|
||||
groupRender?: any;
|
||||
@@ -1817,9 +1820,11 @@ declare module DevExpress.ui {
|
||||
/** A handler for the click event. */
|
||||
onClick?: any;
|
||||
clickAction?: any;
|
||||
/** The name of an icon to be displayed on the button. */
|
||||
/** Specifies the icon to be displayed on the button. */
|
||||
icon?: string;
|
||||
iconSrc?: string;
|
||||
/** A template to be used for rendering the dxButton widget. */
|
||||
template?: any;
|
||||
/** The text displayed on the button. */
|
||||
text?: string;
|
||||
/** Specifies the button type. */
|
||||
@@ -1867,7 +1872,7 @@ declare module DevExpress.ui {
|
||||
minSearchLength?: number;
|
||||
/** Specifies the maximum count of items displayed by the widget. */
|
||||
maxItemCount?: number;
|
||||
/** Specifies the currently selected item. */
|
||||
/** Gets the currently selected item. */
|
||||
selectedItem?: Object;
|
||||
}
|
||||
/** A textbox widget that supports autocompletion. */
|
||||
@@ -2730,6 +2735,8 @@ declare module DevExpress.ui {
|
||||
onItemExpanded?: Function;
|
||||
/** A handler for the itemCollapsed event. */
|
||||
onItemCollapsed?: Function;
|
||||
hoverStateEnabled?: boolean;
|
||||
focusStateEnabled?: boolean;
|
||||
}
|
||||
/** A widget displaying specified data items as a tree. */
|
||||
export class dxTreeView extends CollectionWidget {
|
||||
@@ -3339,6 +3346,8 @@ Specifies the message displayed in a group row when the corresponding group cont
|
||||
}) => void;
|
||||
/** A handler for the exported event. */
|
||||
onExported?: (e: Object) => void;
|
||||
/** A handler for the keyDown event. */
|
||||
onKeyDown?: (e: Object) => void;
|
||||
/** A handler for the rowExpanding event. */
|
||||
onRowExpanding?: (e: Object) => void;
|
||||
/** A handler for the rowExpanded event. */
|
||||
@@ -3589,8 +3598,10 @@ Searches grid records by a search string.
|
||||
focus(element?: JQuery): void;
|
||||
}
|
||||
export interface dxPivotGridOptions extends WidgetOptions {
|
||||
onContentReady?: Function;
|
||||
/** Specifies a data source for the pivot grid. */
|
||||
dataSource?: any;
|
||||
/** Specifies whether or not the widget uses native scrolling. */
|
||||
useNativeScrolling?: any;
|
||||
/** Allows an end-user to change sorting options. */
|
||||
allowSorting?: boolean;
|
||||
@@ -3676,6 +3687,8 @@ Searches grid records by a search string.
|
||||
onCellClick?: (e: any) => void;
|
||||
/** A handler for the cellPrepared event. */
|
||||
onCellPrepared?: (e: any) => void;
|
||||
/** A handler for the contextMenuPreparing event. */
|
||||
onContextMenuPreparing?: (e: Object) => void;
|
||||
}
|
||||
/** A data summarization widget for multi-dimensional data analysis and data mining. */
|
||||
export class dxPivotGrid extends Widget {
|
||||
@@ -5179,11 +5192,13 @@ declare module DevExpress.viz.charts {
|
||||
onTooltipShown?: (e: {
|
||||
component: BaseChart;
|
||||
element: Element;
|
||||
target: BasePoint;
|
||||
}) => void;
|
||||
/** A handler for the tooltipHidden event. */
|
||||
onTooltipHidden?: (e: {
|
||||
component: BaseChart;
|
||||
element: Element;
|
||||
target: BasePoint;
|
||||
}) => void;
|
||||
tooltipHidden?: (point: TPoint) => void;
|
||||
tooltipShown?: (point: TPoint) => void;
|
||||
@@ -5606,6 +5621,18 @@ declare module DevExpress.viz.gauges {
|
||||
};
|
||||
/** Specifies options for gauge tooltips. */
|
||||
tooltip?: viz.core.Tooltip;
|
||||
/** A handler for the tooltipShown event. */
|
||||
onTooltipShown?: (e: {
|
||||
component: dxBaseGauge;
|
||||
element: Element;
|
||||
target: {};
|
||||
}) => void;
|
||||
/** A handler for the tooltipHidden event. */
|
||||
onTooltipHidden?: (e: {
|
||||
component: dxBaseGauge;
|
||||
element: Element;
|
||||
target: {};
|
||||
}) => void;
|
||||
}
|
||||
export interface BaseGaugeOptions extends viz.core.BaseWidgetOptions, SharedGaugeOptions {
|
||||
/** Specifies the color of the parent page element. */
|
||||
@@ -6252,7 +6279,19 @@ declare module DevExpress.viz.map {
|
||||
center: Array<number>;
|
||||
component: dxVectorMap;
|
||||
element: Element;
|
||||
}) => void;
|
||||
}) => void;
|
||||
/** A handler for the tooltipShown event. */
|
||||
onTooltipShown?: (e: {
|
||||
component: dxVectorMap;
|
||||
element: Element;
|
||||
target: {};
|
||||
}) => void;
|
||||
/** A handler for the tooltipHidden event. */
|
||||
onTooltipHidden?: (e: {
|
||||
component: dxVectorMap;
|
||||
element: Element;
|
||||
target: {};
|
||||
}) => void;
|
||||
/** Specifies a number that is used to zoom a map initially. */
|
||||
zoomFactor?: number;
|
||||
/** Specifies a map's maximum zoom factor. */
|
||||
@@ -6355,6 +6394,16 @@ declare module DevExpress.viz.sparklines {
|
||||
size?: viz.core.Size;
|
||||
/** Specifies tooltip options. */
|
||||
tooltip?: SparklineTooltip;
|
||||
/** A handler for the tooltipShown event. */
|
||||
onTooltipShown?: (e: {
|
||||
component: BaseSparkline;
|
||||
element: Element;
|
||||
}) => void;
|
||||
/** A handler for the tooltipHidden event. */
|
||||
onTooltipHidden?: (e: {
|
||||
component: BaseSparkline;
|
||||
element: Element;
|
||||
}) => void;
|
||||
}
|
||||
/** Overridden by descriptions for particular widgets. */
|
||||
export class BaseSparkline extends viz.core.BaseWidget {
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
///<reference path="./diff-match-patch.d.ts" />
|
||||
|
||||
import DiffMatchPatch = require("diff-match-patch");
|
||||
|
||||
var oldValue = "hello world, how are you?";
|
||||
var newValue = "hello again world. how have you been?";
|
||||
|
||||
var diffEngine = new DiffMatchPatch.diff_match_patch();
|
||||
var diffs = diffEngine.diff_main(oldValue, newValue);
|
||||
diffEngine.diff_cleanupSemantic(diffs);
|
||||
|
||||
var changes = "";
|
||||
var pattern = "";
|
||||
|
||||
diffs.forEach(function(diff) {
|
||||
var operation = diff[0]; // Operation (insert, delete, equal)
|
||||
var text = diff[1]; // Text of change
|
||||
|
||||
switch (operation) {
|
||||
case DiffMatchPatch.DIFF_INSERT:
|
||||
pattern += "I";
|
||||
break;
|
||||
case DiffMatchPatch.DIFF_DELETE:
|
||||
pattern += "D";
|
||||
break;
|
||||
case DiffMatchPatch.DIFF_EQUAL:
|
||||
pattern += "E";
|
||||
break;
|
||||
}
|
||||
|
||||
changes += text;
|
||||
});
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
// Type definitions for diff-match-patch v1.0.0
|
||||
// Project: https://www.npmjs.com/package/diff-match-patch
|
||||
// Definitions by: Asana <https://asana.com>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "diff-match-patch" {
|
||||
type Diff = [number, string];
|
||||
|
||||
export class diff_match_patch {
|
||||
static new (): diff_match_patch;
|
||||
|
||||
Diff_Timeout: number;
|
||||
Diff_EditCost: number;
|
||||
Match_Threshold: number;
|
||||
Match_Distance: number;
|
||||
Patch_DeleteThreshold: number;
|
||||
Patch_Margin: number;
|
||||
Match_MaxBits: number;
|
||||
|
||||
diff_main(text1: string, text2: string, opt_checklines?: boolean, opt_deadline?: number): Diff[];
|
||||
diff_commonPrefix(text1: string, text2: string): number;
|
||||
diff_commonSuffix(text1: string, text2: string): number;
|
||||
diff_cleanupSemantic(diffs: Diff[]): void;
|
||||
diff_cleanupSemanticLossless(diffs: Diff[]): void;
|
||||
diff_cleanupEfficiency(diffs: Diff[]): void;
|
||||
diff_cleanupMerge(diffs: Diff[]): void;
|
||||
diff_xIndex(diffs: Diff[], loc: number): number;
|
||||
diff_prettyHtml(diffs: Diff[]): string;
|
||||
diff_text1(diffs: Diff[]): string;
|
||||
diff_text2(diffs: Diff[]): string;
|
||||
diff_levenshtein(diffs: Diff[]): number;
|
||||
diff_toDelta(diffs: Diff[]): string;
|
||||
diff_fromDelta(text1: string, delta: string): Diff[];
|
||||
}
|
||||
|
||||
export var DIFF_DELETE: number;
|
||||
export var DIFF_INSERT: number;
|
||||
export var DIFF_EQUAL: number;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
/// <reference path="dot-case.d.ts" />
|
||||
|
||||
import dotCase = require('dot-case');
|
||||
|
||||
console.log(dotCase('string')); // => "string"
|
||||
console.log(dotCase('camelCase')); // => "camel.case"
|
||||
console.log(dotCase('sentence case')); // => "sentence.case"
|
||||
|
||||
console.log(dotCase('MY STRING', 'tr')); // => "my.strıng"
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// Type definitions for dot-case
|
||||
// Project: https://github.com/blakeembrey/dot-case
|
||||
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "dot-case" {
|
||||
function dotCase(string: string, locale?: string): string;
|
||||
export = dotCase;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
import dragula = require("dragula");
|
||||
|
||||
// containers
|
||||
var d1 = dragula([document.querySelector('#left'), document.querySelector('#right')]);
|
||||
|
||||
// all options
|
||||
var d2 = dragula({
|
||||
isContainer: function (el) {
|
||||
return false;
|
||||
},
|
||||
moves: function (el, container, handle) {
|
||||
return true;
|
||||
},
|
||||
accepts: function (el, target, source, sibling) {
|
||||
return true;
|
||||
},
|
||||
invalid: function (el, target) {
|
||||
return el.tagName === 'A' || el.tagName === 'BUTTON';
|
||||
},
|
||||
direction: 'vertical',
|
||||
copy: false,
|
||||
revertOnSpill: false,
|
||||
removeOnSpill: false,
|
||||
delay: false,
|
||||
mirrorContainer: document.body
|
||||
});
|
||||
|
||||
// empty call
|
||||
var d3 = dragula();
|
||||
|
||||
|
||||
// drake API
|
||||
var drake = dragula({
|
||||
copy: true
|
||||
});
|
||||
|
||||
drake.containers.push(document.querySelector('#container'));
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user