Merge branch 'master' of github.com:borisyankov/DefinitelyTyped

Conflicts:
	d3/d3-tests.ts
	d3/d3.d.ts
This commit is contained in:
Alex Ford
2015-04-08 10:08:54 -04:00
31 changed files with 7000 additions and 2861 deletions
+26 -6
View File
@@ -12,6 +12,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](amplifyjs/amplifyjs.d.ts) [AmplifyJs](http://amplifyjs.com) by [Jonas Eriksson](https://github.com/joeriks)
* [:link:](amqp-rpc/amqp-rpc.d.ts) [amqp-rpc](https://github.com/demchenkoe/node-amqp-rpc) by [Wonshik Kim](https://github.com/wokim)
* [:link:](angular-file-upload/angular-file-upload.d.ts) [Angular File Upload](https://github.com/danialfarid/angular-file-upload) by [John Reilly](https://github.com/johnnyreilly)
* [:link:](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)
* [:link:](angularjs/angular-cookies.d.ts) [Angular JS (ngCookies module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar)
@@ -41,6 +42,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](any-db/any-db.d.ts) [any-db](https://github.com/grncdr/node-any-db) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](any-db-transaction/any-db-transaction.d.ts) [any-db-transaction](https://github.com/grncdr/node-any-db-transaction) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](cordova/cordova.d.ts) [Apache Cordova](http://cordova.apache.org) by [Microsoft Open Technologies Inc.](http://msopentech.com)
* [:link:](cordova-plugin-email-composer/cordova-plugin-email-composer.d.ts) [Apache Cordova Email Composer plugin](https://github.com/katzer/cordova-plugin-email-composer) by [Dave Taylor](http://davetayls.me)
* [:link:](polymer/polymer.app-router.d.ts) [app-router](https://github.com/erikringsmuth/app-router) by [Louis Grignon](https://github.com/lgrignon)
* [:link:](appframework/appframework.d.ts) [AppFramework](http://app-framework-software.intel.com) by [kyo_ago](https://github.com/kyo-ago)
* [:link:](arbiter/Arbiter.d.ts) [Arbiter.js](http://arbiterjs.com) by [Arash Shakery](https://github.com/arash16)
@@ -57,6 +59,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](atpl/atpl.d.ts) [atpl](https://github.com/soywiz/atpl.js) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](auth0/auth0.d.ts) [Auth0.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
* [:link:](auth0.widget/auth0.widget.d.ts) [Auth0Widget.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
* [:link:](auth0.lock/auth0.lock.d.ts) [Auth0Widget.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
* [:link:](autobahn/autobahn.d.ts) [AutobahnJS](http://autobahn.ws/js) by [Elad Zelingher](https://github.com/darkl)
* [:link:](aws-sdk/aws-sdk.d.ts) [aws-sdk](https://github.com/aws/aws-sdk-js) by [midknight41](https://github.com/midknight41)
* [:link:](axios/axios.d.ts) [axios](https://github.com/mzabriskie/axios) by [Marcel Buesing](https://github.com/marcelbuesing)
@@ -275,8 +278,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](gridfs-stream/gridfs-stream.d.ts) [gridfs-stream](https://github.com/aheckmann/gridfs-stream) by [Lior Mualem](https://github.com/liorm)
* [:link:](gruntjs/gruntjs.d.ts) [Grunt 0.4.x](http://gruntjs.com) by [Jeff May](https://github.com/jeffmay), [Basarat Ali Syed](https://github.com/basarat)
* [:link:](gsap/Core.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gsap/Ease.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gsap/TweenLite.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gsap/Ease.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gulp/gulp.d.ts) [Gulp v3.8.x](http://gulpjs.com) by [Drew Noakes](https://drewnoakes.com)
* [:link:](gulp-autoprefixer/gulp-autoprefixer.d.ts) [gulp-autoprefixer](https://github.com/sindresorhus/gulp-autoprefixer) by [Asana](https://asana.com)
* [:link:](gulp-concat/gulp-concat.d.ts) [gulp-concat](http://github.com/wearefractal/gulp-concat) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
@@ -302,6 +305,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:](hashmap/hashmap.d.ts) [HashMap](https://github.com/flesler/hashmap) by [Rafał Wrzeszcz](http://wrzasq.pl)
* [: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:](heatmap.js/heatmap.d.ts) [heatmap.js](https://github.com/pa7/heatmap.js) by [Yang Guan](https://github.com/lookuptable)
* [:link:](hellojs/hellojs.d.ts) [hello.js](http://adodson.com/hello.js) by [Pavel Zika](https://github.com/PavelPZ)
@@ -322,6 +326,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](icheck/icheck.d.ts) [iCheck](http://damirfoy.com/iCheck) by [Dániel Tar](https://github.com/qcz)
* [:link:](imagemagick/imagemagick.d.ts) [imagemagick](http://github.com/rsms/node-imagemagick) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](imap/imap.d.ts) [imap](https://www.npmjs.com/package/imap) by [Peter Snider](https://github.com/psnider)
* [:link:](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)
* [:link:](inflection/inflection.d.ts) [inflection](https://github.com/dreamerslab/node.inflection) by [Shogo Iwano](https://github.com/shiwano)
* [:link:](ini/ini.d.ts) [ini](https://github.com/isaacs/ini) by [Marcin Porębski](https://github.com/marcinporebski)
@@ -360,7 +365,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](jquery.contextMenu/jquery.contextMenu.d.ts) [jQuery contextMenu](http://medialize.github.com/jQuery-contextMenu) by [Natan Vivo](https://github.com/nvivo)
* [:link:](jquery.cookie/jquery.cookie.d.ts) [jQuery Cookie Plugin](https://github.com/carhartl/jquery-cookie) by [Roy Goode](https://github.com/RoyGoode)
* [:link:](jquery.cycle2/jquery.cycle2.d.ts) [jQuery Cycle2 version (build 20140216)](http://jquery.malsup.com/cycle2) by [Donny Nadolny](https://github.com/dnadolny)
* [:link:](jquery.dataTables/jquery.dataTables.d.ts) [JQuery DataTables](http://www.datatables.net) by [Armin Sander](https://github.com/pragmatrix)
* [:link:](jquery.dataTables/jquery.dataTables.d.ts) [JQuery DataTables](http://www.datatables.net) by [Kiarash Ghiaseddin](https://github.com/Silver-Connection/DefinitelyTyped), [Omid Rad](https://github.com/omidkrad), [Armin Sander](https://github.com/pragmatrix)
* [:link:](jquery.fileupload/jquery.fileupload.d.ts) [jQuery File Upload Plugin](https://github.com/blueimp/jQuery-File-Upload) by [Rob Alarcon](https://github.com/rob-alarcon)
* [: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)
@@ -379,6 +384,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](jquery.ui.datetimepicker/jquery.ui.datetimepicker.d.ts) [jQuery UI DateTimePicker](http://trentrichardson.com/examples/timepicker) by [dougajmcdonald](https://github.com/dougajmcdonald)
* [:link:](jquery.ui.layout/jquery.ui.layout.d.ts) [jQuery UI Layout Plug-in](http://layout.jquery-dev.net) by [Steve Fenton](https://github.com/Steve-Fenton)
* [:link:](jquery.timepicker/jquery.timepicker.d.ts) [jQuery UI Timepicker](http://fgelinas.com/code/timepicker) by [Anwar Javed](https://github.com/anwarjaved)
* [:link:](jquery-fullscreen/jquery-fullscreen.d.ts) [jquery-fullscreen](https://github.com/kayahr/jquery-fullscreen-plugin) by [Bruno Grieder](https://github.com/bgrieder)
* [:link:](jquery-handsontable/jquery-handsontable.d.ts) [jquery-handsontable](http://handsontable.com) by [Ted John](https://github.com/intelorca)
* [:link:](jquery.menuaim/jquery.menuaim.d.ts) [jQuery-menu-aim](https://github.com/kamens/jQuery-menu-aim) by [Robert Fonseca-Ensor](http://www.robfe.com)
* [:link:](jquery.pjax/jquery.pjax.d.ts) [jquery-pjax](https://github.com/defunkt/jquery-pjax) by [Junle Li](https://github.com/lijunle)
@@ -590,9 +596,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](xml2js/xml2js.d.ts) [node-xml2js](https://github.com/Leonidas-from-XIV/node-xml2js) by [Michel Salib](https://github.com/michelsalib), [Jason McNeil](https://github.com/jasonrm)
* [:link:](node/node.d.ts) [Node.js](http://nodejs.org) by [Microsoft TypeScript](http://typescriptlang.org), [DefinitelyTyped](https://github.com/borisyankov/DefinitelyTyped)
* [:link:](restify/restify.d.ts) [node.js REST framework](https://github.com/mcavage/node-restify) by [Bret Little](https://github.com/blittle)
* [:link:](acl/acl-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:](acl/acl-redisBackend.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo)
* [:link:](mdns/mdns.d.ts) [node_mdns](https://github.com/agnat/node_mdns) by [Stefan Steinhart](https://github.com/reppners)
* [:link:](node_redis/node_redis.d.ts) [node_redis](https://github.com/mranney/node_redis) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](each/each.d.ts) [NodeEach](http://www.adaltas.com/projects/node-each) by [Michael Zabka](https://github.com/misak113)
@@ -609,9 +615,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](nprogress/NProgress.d.ts) [NProgress](https://github.com/rstacruz/nprogress) by [Judah Gabriel Himango](http://debuggerdotbreak.wordpress.com)
* [:link:](numeraljs/numeraljs.d.ts) [Numeral.js](https://github.com/adamwdraper/Numeral-js) by [Vincent Bortone](https://github.com/vbortone)
* [:link:](object-hash/object-hash.d.ts) [object-hash](https://github.com/puleos/object-hash) by [Michael Zabka](https://github.com/misak113)
* [:link:](object-path/object-path.d.ts) [objectPath](https://github.com/mariocasciaro/object-path) by [Paulo Cesar](https://github.com/pocesar)
* [:link:](object-path/object-path.d.ts) [objectPath v0.9.x](https://github.com/mariocasciaro/object-path) by [Paulo Cesar](https://github.com/pocesar)
* [:link:](oboe/oboe.d.ts) [oboe](https://github.com/jimhigson/oboe.js) by [Jared Klopper](https://github.com/optical)
* [:link:](oclazyload/oclazyload.d.ts) [oc.LazyLoad](https://github.com/ocombe/ocLazyLoad) by [Roland Zwaga](https://github.com/rolandzwaga)
* [:link:](on-finished/on-finished.d.ts) [on-finished](https://github.com/jshttp/on-finished) by [Honza Dvorsky](http://github.com/czechboy0)
* [:link:](onsenui/onsenui.d.ts) [Onsen UI](http://onsen.io) by [Fran Dios](https://github.com/frankdiox)
* [:link:](open/open.d.ts) [open](https://github.com/jjrdn/node-open) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](openlayers/openlayers.d.ts) [OpenLayers.js](https://github.com/openlayers/openlayers) by [Ilya Bolkhovsky](https://github.com/bolhovsky)
* [:link:](opn/opn.d.ts) [opn](https://github.com/sindresorhus/opn) by [Shinnosuke Watanabe](https://github.com/shinnn)
@@ -636,6 +644,7 @@ 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:](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 [Adi Dahiya](https://github.com/adidahiya)
* [:link:](pixi/pixi.d.ts) [PIXI](https://github.com/GoodBoyDigital/pixi.js) by [xperiments](http://github.com/xperiments)
@@ -646,8 +655,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](podcast/podcast.d.ts) [podcast](http://github.com/maxnowack/node-podcast) by [Niklas Mollenhauer](https://github.com/nikeee)
* [:link:](poly2tri/poly2tri.d.ts) [poly2tri](http://github.com/r3mi/poly2tri.js) by [Elemar Junior](https://github.com/elemarjr)
* [:link:](polymer/polymer.d.ts) [polymer](https://github.com/polymer) by [Louis Grignon](https://github.com/lgrignon)
* [:link:](polymer/polymer.paper-toast.d.ts) [polymer's paper-toast](https://github.com/Polymer/paper-toast) by [Louis Grignon](https://github.com/lgrignon)
* [:link:](polymer/polymer.paper-dialog.d.ts) [polymer's paper-dialog](https://github.com/Polymer/paper-dialog) by [Louis Grignon](https://github.com/lgrignon)
* [:link:](polymer/polymer.core-drawer-panel.d.ts) [polymer's paper-toast](https://github.com/Polymer/core-drawer-panel) by [Louis Grignon](https://github.com/lgrignon)
* [:link:](polymer/polymer.core-overlay.d.ts) [polymer's paper-toast](https://github.com/Polymer/core-selector) by [Louis Grignon](https://github.com/lgrignon)
* [:link:](polymer/polymer.paper-toast.d.ts) [polymer's paper-toast](https://github.com/Polymer/paper-toast) by [Louis Grignon](https://github.com/lgrignon)
* [:link:](polymer/polymer.core-selector.d.ts) [polymer's paper-toast](https://github.com/Polymer/core-selector) by [Louis Grignon](https://github.com/lgrignon)
* [:link:](popcorn/popcorn.d.ts) [Popcorn](https://github.com/mozilla/popcorn-js) by [grapswiz](https://github.com/grapswiz)
* [:link:](pouchDB/pouch.d.ts) [Pouch](http://pouchdb.com) by [Bill Sears](https://github.com/MrBigDog2U)
* [:link:](power-assert/power-assert.d.ts) [power-assert](https://github.com/twada/power-assert) by [vvakame](https://github.com/vvakame)
@@ -722,6 +734,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](semver/semver.d.ts) [semver](https://github.com/isaacs/node-semver) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](sendgrid/sendgrid.d.ts) [sendgrid](https://github.com/sendgrid/sendgrid-nodejs) by [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](sequelize/sequelize.d.ts) [Sequelize 2.0.0 dev13](http://sequelizejs.com) by [samuelneff](https://github.com/samuelneff), [Peter Harris](https://github.com/codeanimal)
* [:link:](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)
@@ -740,6 +753,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](slickgrid/SlickGrid.d.ts) [SlickGrid](https://github.com/mleibman/SlickGrid) by [Josh Baldwin](https://github.com/jbaldwin)
* [:link:](slickgrid/slick.autotooltips.d.ts) [SlickGrid AutoToolTips Plugin](https://github.com/mleibman/SlickGrid) by [Ryo Iwamoto](https://github.com/ryiwamoto)
* [: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)
@@ -758,6 +772,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](sprintf/sprintf.d.ts) [sprintff](https://github.com/maritz/node-sprintff) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](sharepoint/SharePoint.d.ts) [sptypescript](http://sptypescript.codeplex.com) by [Stanislav Vyshchepan](http://gandjustas.blogspot.ru), [Andrey Markeev](http://markeev.com)
* [:link:](sqlite3/sqlite3.d.ts) [sqlite3](https://github.com/mapbox/node-sqlite3) by [Nick Malaguti](https://github.com/nmalaguti)
* [:link:](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)
* [:link:](stampit/stampit.d.ts) [stampit](https://github.com/ericelliott/stampit) by [Vasyl Boroviak](https://github.com/koresar)
* [:link:](stats/stats.d.ts) [Stats.js r12](http://github.com/mrdoob/stats.js) by [Gregory Dalton](https://github.com/gregolai)
@@ -779,6 +794,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](swig/swig.d.ts) [swig](http://github.com/paularmstrong/swig) by [Peter Harris](https://github.com/CodeAnimal), [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](swiper/swiper.d.ts) [Swiper](https://github.com/nolimits4web/Swiper) by [Sebastián Galiano](https://github.com/sgaliano)
* [: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:](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)
@@ -808,7 +824,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](timezonecomplete/timezonecomplete.d.ts) [timezonecomplete](https://github.com/SpiritIT/timezonecomplete) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](tv4/tv4.d.ts) [Tiny Validator tv4](https://github.com/geraintluff/tv4) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](tinycolor/tinycolor.d.ts) [tinycolor](https://github.com/bgrins/TinyColor) by [Mordechai Zuber](https://github.com/M-Zuber)
* [:link:](titanium/titanium.d.ts) [Titanium Movile 3.1.3.GA](http://www.appcelerator.com) by [Airam Rguez](https://github.com/airamrguez)
* [:link:](titanium/titanium.d.ts) [Titanium Mobile](http://www.appcelerator.com) by [Craig Younkins](https://github.com/cyounkins)
* [:link:](tmp/tmp.d.ts) [tmp](https://www.npmjs.com/package/tmp) by [Jared Klopper](https://github.com/optical)
* [: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)
@@ -840,6 +856,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](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)
* [:link:](vinyl/vinyl.d.ts) [vinyl](https://github.com/wearefractal/vinyl) by [vvakame](https://github.com/vvakame), [jedmao](https://github.com/jedmao)
@@ -853,12 +870,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
* [:link:](webcomponents.js/webcomponents.js.d.ts) [webcomponents.js](https://github.com/webcomponents/webcomponentsjs) by [Adi Dahiya](https://github.com/adidahiya)
* [:link:](webcrypto/WebCrypto.d.ts) [WebCrypto](http://www.w3.org/TR/WebCryptoAPI) by [Lucas Dixon](https://github.com/iislucas)
* [:link:](webix/webix.d.ts) [Webix UI](http://webix.com) by [Maksim Kozhukh](http://github.com/mkozhukh)
* [:link:](webrtc/MediaStream.d.ts) [WebRTC](http://dev.w3.org/2011/webrtc) by [Ken Smith](https://github.com/smithkl42)
* [:link:](websocket/websocket.d.ts) [websocket](https://github.com/Worlize/WebSocket-Node) by [Paul Loyd](https://github.com/loyd)
* [:link:](when/when.d.ts) [When](https://github.com/cujojs/when) by [Derek Cicerone](https://github.com/derekcicerone), [Wim Looman](https://github.com/Nemo157)
* [:link:](which/which.d.ts) [which](https://github.com/isaacs/node-which) by [vvakame](https://github.com/vvakame)
* [:link:](jquery.window/jquery.window.d.ts) [Window plugin for jQuery](http://fstoke.me/jquery/window) by [Ryan Graham](https://github.com/ryan-codingintrigue)
* [:link:](windows-service/windows-service.d.ts) [windows-service](https://bitbucket.org/stephenwvickers/node-windows-service) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](winjs/winjs.d.ts) [WinJS](http://try.buildwinjs.com) by [TypeScript samples](https://www.typescriptlang.org), [Adam Hewitt](https://github.com/adamhewitt627), [Craig Treasure](https://github.com/craigktreasure), [Jeff Fisher](https://github.com/xirzec)
* [:link:](winrt/winrt.d.ts) [WinRT](http://msdn.microsoft.com/en-us/library/windows/apps/br211377.aspx) by [TypeScript samples](https://www.typescriptlang.org)
@@ -872,6 +891,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](xpath/xpath.d.ts) [xpath](https://github.com/goto100/xpath) by [Andrew Bradley](https://github.com/cspotcode)
* [:link:](xregexp/xregexp.d.ts) [XRegExp](http://xregexp.com) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](xsockets/XSockets.d.ts) [XSockets.NET](http://xsockets.net) by [Jeffery Grajkowski](https://github.com/pushplay)
* [:link:](yamljs/yamljs.d.ts) [yamljs](https://github.com/jeremyfa/yaml.js) by [Tim Jonischkat](http://www.tim-jonischkat.de)
* [:link:](yargs/yargs.d.ts) [yargs](https://github.com/chevex/yargs) by [Martin Poelstra](https://github.com/poelstra)
* [:link:](yeoman-generator/yeoman-generator.d.ts) [yeoman-generator](https://github.com/yeoman/generator) by [Kentaro Okuno](http://github.com/armorik83)
* [:link:](yosay/yosay.d.ts) [yosay](https://github.com/yeoman/yosay) by [Kentaro Okuno](http://github.com/armorik83)
+53
View File
@@ -0,0 +1,53 @@
/// <reference path="angular-growl-v2.d.ts" />
var app = angular.module("ag", ["pascalprecht.translate", "$httpProvider"]);
app.config((growlProvider:angular.growl.IGrowlProvider, $httpProvider:angular.IHttpProvider) => {
var ttl:angular.growl.IGrowlTTLConfig = {
success: 5000,
error: 4000
};
growlProvider.globalTimeToLive(ttl);
growlProvider.globalTimeToLive(5000);
growlProvider.globalDisableCloseButton(true);
growlProvider.globalDisableIcons(true);
growlProvider.globalReversedOrder(false);
growlProvider.globalDisableCountDown(true);
growlProvider.messageVariableKey("someKey");
growlProvider.globalInlineMessages(false);
growlProvider.globalPosition("top-center");
growlProvider.messagesKey("someKey");
growlProvider.messageTextKey("someKey");
growlProvider.messageTitleKey("someKey");
growlProvider.messageSeverityKey("someKey");
growlProvider.onlyUniqueMessages(false);
$httpProvider.interceptors.push(growlProvider.serverMessagesInterceptor);
});
app.controller("Ctrl", ($scope:angular.IScope, growl:angular.growl.IGrowlService) => {
var config:angular.growl.IGrowlMessageConfig = {
ttl: 5000,
disableCountDown: true,
disableCloseButton: true
};
var message = "Some message";
growl.warning(message);
growl.warning(message, config);
growl.error(message);
growl.error(message, config);
growl.info(message);
growl.info(message, config);
growl.success(message);
growl.success(message, config);
growl.general(message);
growl.general(message, config);
growl.general(message, config, "error");
growl.onlyUnique();
growl.reverseOrder();
growl.inlineMessages();
growl.position();
});
+211
View File
@@ -0,0 +1,211 @@
// Type definitions for Angular Growl 2 v.0.7.3
// Project: http://janstevens.github.io/angular-growl-2
// Definitions by: Tadeusz Hucal <https://github.com/mkp05>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts" />
declare module angular.growl {
/**
* Global Time-To-Leave configuration.
*/
interface IGrowlTTLConfig {
success?: number;
error?: number;
warning?: number;
info?: number;
}
/**
* Custom configuration used in single message call.
*/
interface IGrowlMessageConfig {
title?: string;
ttl?: number;
disableCountDown?: boolean;
disableIcons?: boolean;
disableCloseButton?: boolean;
referenceId?: number;
onclose?: Function;
onopen?: Function;
}
/**
* Growl message with configuration.
*/
interface IGrowlMessage extends IGrowlMessageConfig {
text: string;
}
/**
* Growl service provider.
*/
interface IGrowlProvider extends angular.IServiceProvider {
/**
* Pre-defined server error interceptor.
*/
serverMessagesInterceptor: (string|Function)[];
/**
* Set default TTL settings.
* @param ttl configuration of TTL for different type of message
*/
globalTimeToLive(ttl: IGrowlTTLConfig): void;
/**
* Set default TTL settings.
* @param ttl ttl in milliseconds
*/
globalTimeToLive(ttl: number): void;
/**
* Set default setting for disabling close button.
* @param disableCloseButton
*/
globalDisableCloseButton(disableCloseButton: boolean): void;
/**
* Set default setting for disabling icons.
* @param disableIcons
*/
globalDisableIcons(disableIcons: boolean): void;
/**
* Set reversing order of displaying new messages.
* @param reverseOrder
*/
globalReversedOrder(reverseOrder: boolean): void
/**
* Set default setting for displaying message disappear countdown.
* @param disableCountDown
*/
globalDisableCountDown(disableCountDown: boolean): void;
/**
* Set default allowance for inline messages.
* @param inline
*/
globalInlineMessages(inline: boolean): void;
/**
* Set default message position.
* @param position
*/
globalPosition(position: string): void;
/**
* Enable/disable displaying only unique messages.
* @param onlyUniqueMessages
*/
onlyUniqueMessages(onlyUniqueMessages: boolean): void;
/**
* Set key where messages are stored (for http interceptor).
* @param messageVariableKey
*/
messagesKey(messageKey: string): void;
/**
* Set key where message text is stored (for http interceptor).
* @param messageVariableKey
*/
messageTextKey(messageTextKey: string): void;
/**
* Set key where title of message is stored (for http interceptor).
* @param messageVariableKey
*/
messageTitleKey(messageTitleKey: string): void;
/**
* Set key where severity of message is stored (for http interceptor).
* @param messageVariableKey
*/
messageSeverityKey(messageSeverityKey: string): void;
/**
* Set key where variables for message are stored (for http interceptor).
* @param messageVariableKey
*/
messageVariableKey(messageVariableKey: string): void;
}
/**
* Growl service.
*/
interface IGrowlService {
/**
* Show warning message.
* @param message text to display (or code for angular-translate)
*/
warning(message: string): IGrowlMessage;
/**
* Show warning message.
* @param message text to display (or code for angular-translate)
* @param config additional message configuration
*/
warning(message: string, config: IGrowlMessageConfig): IGrowlMessage;
/**
* Show error message.
* @param message text to display (or code for angular-translate)
*/
error(message: string): IGrowlMessage;
/**
* Show error message.
* @param message text to display (or code for angular-translate)
* @param config additional message configuration
*/
error(message: string, config: IGrowlMessageConfig): IGrowlMessage;
/**
* Show information message.
* @param message text to display (or code for angular-translate)
*/
info(message: string): IGrowlMessage;
/**
* Show information message.
* @param message text to display (or code for angular-translate)
* @param config additional message configuration
*/
info(message: string, config: IGrowlMessageConfig): IGrowlMessage;
/**
* Show success message.
* @param message text to display (or code for angular-translate)
* @param config additional message configuration
*/
success(message: string): IGrowlMessage;
/**
* Show success message.
* @param message text to display (or code for angular-translate)
*/
success(message: string, config: IGrowlMessageConfig): IGrowlMessage;
/**
* Show message (generic).
* @param message text to display (or code for angular-translate)
*/
general(message: string): IGrowlMessage;
/**
* Show message (generic).
* @param message text to display (or code for angular-translate)
* @param config additional message configuration
*/
general(message: string, config: IGrowlMessageConfig): IGrowlMessage;
/**
* Show message (generic).
* @param message text to display (or code for angular-translate)
* @param config additional message configuration
* @param severity message severity (error, warning, success, info).
*/
general(message: string, config: IGrowlMessageConfig, severity: string): IGrowlMessage;
/**
* Get current setting for displaying only unique messages.
*/
onlyUnique(): boolean;
/**
* Get current setting for reversing messages order.
*/
reverseOrder(): boolean;
/**
* Get current allowance for inline messages.
*/
inlineMessages(): boolean;
/**
* Get current messages position.
*/
position(): string;
}
}
+6
View File
@@ -21,6 +21,12 @@ plugin.register.attributes = {
version: "1.0.0"
};
// optional options parameter
server.register({}, function (err) {});
// optional options.routes.vhost parameter
server.register({}, { select: 'api', routes: { prefix: '/prefix' } }, function (err) {});
//server.pack.register(plugin, (err: Object) => {
// if (err) { throw err; }
//});
+10 -8
View File
@@ -147,11 +147,11 @@ declare module "hapi" {
};
/** options passed to the mimos module (https://github.com/hapijs/mimos) when generating the mime database used by the server and accessed via server.mime.*/
mime: any;
mime?: any;
/** if true, does not load the inert (file and directory support), h2o2 (proxy support), and vision (views support) plugins automatically. The plugins can be loaded manually after construction. Defaults to false (plugins loaded). */
minimal: boolean;
minimal?: boolean;
/** plugin-specific configuration which can later be accessed via server.settings.plugins. plugins is an object where each key is a plugin name and the value is the configuration. Note the difference between server.settings.plugins which is used to store static configuration values and server.plugins which is meant for storing run-time state. Defaults to {}.*/
plugins: IDictionary<any>;
plugins?: IDictionary<any>;
}
@@ -726,7 +726,7 @@ declare module "hapi" {
a relative or absolute file path string (relative paths are resolved based on the route files configuration).
a function with the signature function(request) which returns the relative or absolute file path.
an object with the following options */
file: string | IRequestHandler<void> |IFileHandlerConfig;
file?: string | IRequestHandler<void> |IFileHandlerConfig;
/** directory - generates a directory endpoint for serving static content from a directory. Routes using the directory handler must include a path parameter at the end of the path string (e.g. /path/to/somewhere/{param} where the parameter name does not matter). The path parameter can use any of the parameter options (e.g. {param} for one level files only, {param?} for one level files or the directory root, {param*} for any level, or {param*3} for a specific level). If additional path parameters are present, they are ignored for the purpose of selecting the file system resource. The directory handler is an object with the following options:
path - (required) the directory root path (relative paths are resolved based on the route files configuration). Value can be:
a single path string used as the prefix for any resources requested by appending the request path parameter to the provided string.
@@ -738,7 +738,7 @@ declare module "hapi" {
redirectToSlash - optional boolean, determines if requests for a directory without a trailing slash are redirected to the same path with the missing slash. Useful for ensuring relative links inside the response are resolved correctly. Disabled when the server config router.stripTrailingSlash is true.Defaults to false.
lookupCompressed - optional boolean, instructs the file processor to look for the same filename with the '.gz' suffix for a pre-compressed version of the file to serve if the request supports content encoding. Defaults to false.
defaultExtension - optional string, appended to file requests if the requested file is not found. Defaults to no extension.*/
directory: {
directory?: {
path: string |Array<string> | IRequestHandler<string> | IRequestHandler<Array<string>>;
index?: boolean;
listing?: boolean;
@@ -748,7 +748,7 @@ declare module "hapi" {
defaultExtension?: string;
};
proxy?: IProxyHandlerConfig;
view: string | {
view?: string | {
template: string;
context: {
payload: any;
@@ -757,7 +757,7 @@ declare module "hapi" {
pre: any;
}
};
config: {
config?: {
handler: any;
bind: any;
app: any;
@@ -2051,11 +2051,13 @@ declare module "hapi" {
register(plugins: any|any[], options: {
select: string|string[];
routes: {
prefix: string; vhost: string|string[]
prefix: string; vhost?: string|string[]
};
}
, callback: (err: any) => void):void;
register(plugins: any|any[], callback: (err: any) => void):void;
/**server.render(template, context, [options], callback)
Utilizes the server views manager to render a template where:
template - the template filename and path, relative to the views manager templates path (path or relativeTo).
+52
View File
@@ -0,0 +1,52 @@
/// <reference path="he.d.ts" />
import he = require('he');
function main() {
var result: string;
result = he.encode('foo \xa9 bar \u2260 baz qux');
// 'foo &#xA9; bar &#x2260; baz qux'
he.encode('foo \0 bar');
// 'foo \0 bar'
// Passing an `options` object to `encode`, to explicitly disallow named references:
he.encode('foo \xa9 bar \u2260 baz qux', {
'useNamedReferences': false
});
he.encode('foo \xa9 bar \u2260 baz qux', {
'encodeEverything': true
});
he.encode('foo \xa9 bar \u2260 baz qux', {
'encodeEverything': true,
'useNamedReferences': true
});
he.encode('\x01', {
'strict': false
});
// '&#x1;'
he.encode('foo © and & ampersand', {
'allowUnsafeSymbols': true
});
// Override the global default setting:
he.encode.options.useNamedReferences = true;
he.decode('foo &copy; bar &ne; baz &#x1D306; qux');
he.decode('foo&ampbar', {
'isAttributeValue': false
});
he.decode('foo&ampbar', {
'strict': false
});
he.decode.options.isAttributeValue = true;
he.escape('<img src=\'x\' onerror="prompt(1)">');
}
Vendored
+114
View File
@@ -0,0 +1,114 @@
// Type definitions for he v0.5.0
// Project: https://github.com/mathiasbynens/he
// Definitions by: Simon Edwards <https://github.com/sedwards2009>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// he - "HTML Entities" - A high quality pair of HTML encode and decode functions.
declare module "he" {
var version: string;
interface EncodeOptions {
/**
* The default value for the useNamedReferences option is false. This
* means that encode() will not use any named character references
* (e.g. &copy;) in the output — hexadecimal escapes (e.g. &#xA9;) will
* be used instead. Set it to true to enable the use of named references.
*/
useNamedReferences?: boolean;
/**
* The default value for the encodeEverything option is false. This means
* that encode() will not use any character references for printable ASCII
* symbols that dont need escaping. Set it to true to encode every symbol
* in the input string. When set to true, this option takes precedence over
* allowUnsafeSymbols (i.e. setting the latter to true in such a case has
* no effect).
*/
encodeEverything?: boolean;
/**
* The default value for the strict option is false. This means that
* encode() will encode any HTML text content you feed it, even if it
* contains any symbols that cause parse errors. To throw an error when such
* invalid HTML is encountered, set the strict option to true. This option
* makes it possible to use he as part of HTML parsers and HTML validators.
*/
strict?: boolean;
/**
* The default value for the allowUnsafeSymbols option is false. This means
* that characters that are unsafe for use in HTML content (&, <, >, ", ',
* and `) will be encoded. When set to true, only non-ASCII characters will
* be encoded. If the encodeEverything option is set to true, this option
* will be ignored.
*/
allowUnsafeSymbols?: boolean;
}
interface Encode {
/**
* Encode a string of text
*
* This function takes a string of text and encodes (by default) any symbols
* that arent printable ASCII symbols and &, <, >, ", ', and `, replacing
* them with character references.
*
* As long as the input string contains allowed code points only, the return
* value of this function is always valid HTML. Any (invalid) code points
* that cannot be represented using a character reference in the input are
* not encoded.
*/
(text: string, options?: EncodeOptions): string;
options: EncodeOptions;
}
var encode: Encode;
interface DecodeOptions {
/**
* The default value for the isAttributeValue option is false. This means
* that decode() will decode the string as if it were used in a text
* context in an HTML document. HTML has different rules for parsing
* character references in attribute values — set this option to true to
* treat the input string as if it were used as an attribute value.
*/
isAttributeValue?: boolean;
/**
* The default value for the strict option is false. This means that
* decode() will decode any HTML text content you feed it, even if it
* contains any entities that cause parse errors. To throw an error when
* such invalid HTML is encountered, set the strict option to true. This
* option makes it possible to use he as part of HTML parsers and HTML
* validators.
*/
strict?: boolean;
}
interface Decode {
/**
* Decode a string of HTML text
*
* This function takes a string of HTML and decodes any named and numerical
* character references in it using the algorithm described in section
* 12.2.4.69 of the HTML spec.
*/
(html: string, options?: DecodeOptions): string;
options: DecodeOptions;
}
var decode: Decode;
/**
* Escape XML entities
*
* This function takes a string of text and escapes it for use in text
* contexts in XML or HTML documents. Only the following characters are
* escaped: &, <, >, ", ', and `.
*/
function escape(text: string): string;
var unescape: Decode;
}
+479
View File
@@ -0,0 +1,479 @@
// Type definitions for JQuery DataTables 1.9.4
// Project: http://www.datatables.net
// Definitions by: Armin Sander <https://github.com/pragmatrix/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// missing:
// - Static methods that are defined in JQueryStatic.fn are not typed.
// - Plugin and extension definitions are not typed.
interface JQuery
{
dataTable(param? :DataTables.Options) : DataTables.DataTable;
}
declare module DataTables
{
export interface DataTable
{
/// Perform a jQuery selector action on the table's TR elements (from the tbody) and return the resulting jQuery object.
$(selector:string, opts?:RowParams): JQuery;
$(selector:Node[], opts?:RowParams): JQuery;
$(selector:JQuery, opts?:RowParams): JQuery;
/// Almost identical to $ in operation, but in this case returns the data for the matched rows.
_(selector:string, opts?:RowParams): any[];
_(selector:Node[], opts?:RowParams): any[];
_(selector:JQuery, opts?:RowParams): any[];
/// Add a single new row or multiple rows of data to the table.
fnAddData(data:any, redraw?:boolean) : number[];
/// This function will make DataTables recalculate the column sizes.
fnAdjustColumnSizing(redraw? : boolean) : void;
/// Quickly and simply clear a table
fnClearTable(redraw? : boolean) : void;
/// The exact opposite of 'opening' a row, this function will close any rows which are currently 'open'.
fnClose(node: Node) : number;
/// Remove a row for the table
fnDeleteRow(index: number, callback?: () => void, redraw?: boolean) : any[];
fnDeleteRow(tr: Node, callback?: () => void, redraw?: boolean) : any[];
/// Restore the table to it's original state in the DOM by removing all of DataTables enhancements,
/// alterations to the DOM structure of the table and event listeners.
fnDestroy(remove?: boolean) : void;
/// Redraw the table
fnDraw(complete? : boolean) : void;
/// Filter the input based on data
fnFilter(input: string, column? : number, regex?: boolean, smart? : boolean, showGlobal?: boolean, caseInsensitive? : boolean) : void;
/// Get the data for the whole table, an individual row or an individual cell based on the provided parameters.
fnGetData(row?: Node, col? : number) : any;
fnGetData(row?: number, col? : number) : any;
/// Get an array of the TR nodes that are used in the table's body.
fnGetNodes(row? : number) : any; // Node[] | Node
/// Get the array indexes of a particular cell from it's DOM element and column index including hidden columns
fnGetPosition(node: Node) : any; // number | number[]
/// Check to see if a row is 'open' or not.
fnIsOpen(tr: Node) : boolean;
/// This function will place a new row directly after a row which is currently on display on the page,
/// with the HTML contents that is passed into the function.
fnOpen(node: Node, html: string, clazz: string) : Node;
fnOpen(node: Node, html: Node, clazz: string) : Node;
fnOpen(node: Node, html: JQuery, clazz: string) : Node;
/// Change the pagination - provides the internal logic for pagination in a simple API function.
fnPageChange(action: string, redraw?: boolean) : void;
fnPageChange(page: number, redraw?: boolean) : void;
/// Show a particular column
fnSetColumnVis(column: number, show: boolean, redraw?: boolean) : void;
/// Get the settings for a particular table for external manipulation
fnSettings() : Settings;
/// Sort the table by a particular column
fnSort(col: number) : void;
fnSort(col: any[][]) : void;
/// Attach a sort listener to an element for a given column
fnSortListener(node: Node, column: number, callback? : () => void): void;
/// Update a table cell or row - this method will accept either a single value to update the cell with,
/// an array of values with one element for each column or an object in the same format as the original data source.
fnUpdate(data: any, row: Node, column?:number, redraw?: boolean, action? : boolean) : number;
fnUpdate(data: any, dataIndex: number, column?:number, redraw?: boolean, action? : boolean) : number;
/// Provide a common method for plug-ins to check the version of DataTables being used,
/// in order to ensure compatibility.
fnVersionCheck(version: string) : boolean;
}
export interface Static
{
/// Provide a common method for plug-ins to check the version of DataTables being used,
/// in order to ensure compatibility.
fnVersionCheck(version: string) : boolean;
/// Check if a TABLE node is a DataTable table already or not.
fnIsDataTable(table: Node) : boolean;
/// Get all DataTable tables that have been initialised.
fnTables(visible? : boolean) : Node[];
}
export interface RowParams
{
/// Select TR elements that meet the current filter criterion ("applied") or all TR elements (i.e. no filter).
filter?: string;
/// Order of the TR elements in the processed array.
/// Can be either 'current', whereby the current sorting of the table is used, or
/// 'original' whereby the original order the data was read into the table is used.
order?: string;
/// Limit the selection to the currently displayed page
/// ("current") or not ("all"). If 'current' is given, then order is assumed to be
/// 'current' and filter is 'applied', regardless of what they might be given as.
page?: string;
}
export interface Options
{
aaData?: any[];
aaSorting?: any[];
aaSortingFixed?: any[];
ajax?: any;
aLengthMenu?: any[];
aoColumns?: ColumnOptions[];
aoColumnDefs?: ColumnDef[];
aoSearchCols?: any[];
asStripClasses?: string[];
bAutoWidth?: boolean;
bDeferRender?: boolean;
bDestroy?: boolean;
bFilter?: boolean;
bInfo?: boolean;
bJQueryUI?: boolean;
bLengthChange?: boolean;
bPaginate?: boolean;
bProcessing?: boolean;
bRetrieve?: boolean;
bScrollAutoCss?: boolean;
bScrollCollapse?: boolean;
bScrollInfinite?: boolean;
bServerSide?: boolean;
bSort?: boolean;
bSortCellsTop?: boolean;
bSortClasses?: boolean;
bStateSave?: boolean;
fnCookieCallback?: CookieCallback;
fnCreatedRow?: RowCreatedCallback;
fnDrawCallback?: DrawCallback;
fnFooterCallback?: FooterCallback;
fnFormatNumber?: FormatNumber;
fnHeaderCallback?: HeaderCallback;
fnInfoCallback?: InfoCallback;
fnInitComplete?: InitComplete;
fnPreDrawCallback?: PreDrawCallback;
fnRowCallback?: RowCallback;
fnStateLoadCallback?: StateLoadCallback;
fnStateLoadParams?: StateLoadParams;
fnStateLoaded?: StateLoaded;
fnStateSaveCallback?: StateSaveCallback;
fnStateSaveParams?: StateSaveParams;
iCookieDuration?: number;
iDeferLoading?: any;
iDisplayLength?: number;
iDisplayStart?: number;
iScrollLoadGap?: number;
iTabIndex?: number;
oLanguage?: LanguageOptions;
oSearch?: any;
sAjaxDataProp?: string;
sAjaxSource?: string;
sCookiePrefix?: string;
sDom?: string;
sPaginationType?: string;
sScrollX?: string;
sScrollXInner?: string;
sScrollY?: string;
sServerMethod? : string;
}
export interface LanguageOptions
{
oAria? : AriaOptions;
oPaginate? : PaginateOptions;
sEmptyTable?: string;
sInfo?: string;
sInfoEmpty?: string;
sInfoFiltered?: string;
sInfoPostFix?: string;
sInfoThousands?: string;
sLengthMenu?: string;
sLoadingRecords?: string;
sProcessing?: string;
sSearch?: string;
sUrl?: string;
sZeroRecords?: string;
}
export interface AriaOptions
{
sSortAscending?: string;
sSortDescending?: string;
}
export interface PaginateOptions
{
sFirst?: string;
sLast?: string;
sNext?: string;
sPrevious?: string;
}
export interface ColumnOptions
{
aDataSort?: number[];
asSorting?: string[];
bSearchable? : boolean;
bSortable? : boolean;
bVisible? : boolean;
_bAutoType? : boolean;
fnCreatedCell?: CreatedCell;
iDataSort?: number;
mData?: any;
mRender?: any;
sCellType?: string;
sClass?: string;
sContentPadding?: string;
sDefaultContent?: string;
sName?: string;
sSortDataType?: string;
sSortingClass?: string;
sTitle?: string;
sType?: string;
sWidth?: string;
}
export interface ColumnDef extends ColumnOptions
{
aTargets: any[];
}
export interface Settings
{
oFeatures : Features;
oScroll: ScrollingSettings;
oLanguage : { fnInfoCallback : InfoCallback; };
oBrowser : { bScrollOversize : boolean; };
aanFeatures: Node[][];
aoData: Row[];
aiDisplay: number[];
aiDisplayMaster: number[];
aoColumns: Column[];
aoHeader: any[];
aoFooter: any[];
asDataSearch: string[];
oPreviousSearch: any;
aoPreSearchCols: any[];
aaSorting: any[][];
aaSortingFixed: any[][];
asStripeClasses: string[];
asDestroyStripes: string[];
sDestroyWidth: number;
aoRowCallback: RowCallback[];
aoHeaderCallback: HeaderCallback[];
aoFooterCallback: FooterCallback[];
aoDrawCallback: DrawCallback[];
aoRowCreatedCallback: RowCreatedCallback[];
aoPreDrawCallback: PreDrawCallback[];
aoInitComplete: InitComplete[];
aoStateSaveParams: StateSaveParams[];
aoStateLoadParams: StateLoadParams[];
aoStateLoaded: StateLoaded[];
sTableId: string;
nTable: Node;
nTHead: Node;
nTFoot: Node;
nTBody: Node;
nTableWrapper: Node;
bDeferLoading: boolean;
bInitialized: boolean;
aoOpenRows: any[];
sDom: string;
sPaginationType: string;
iCookieDuration: number;
sCookiePrefix: string;
fnCookieCallback: CookieCallback;
aoStateSave: StateSaveCallback[];
aoStateLoad: StateLoadCallback[];
oLoadedState: any;
sAjaxSource: string;
sAjaxDataProp: string;
bAjaxDataGet: boolean;
jqXHR: any;
fnServerData: any;
aoServerParams: any[];
sServerMethod: string;
fnFormatNumber: FormatNumber;
aLengthMenu: any[];
iDraw: number;
bDrawing: boolean;
iDrawError: number;
_iDisplayLength: number;
_iDisplayStart: number;
_iDisplayEnd: number;
_iRecordsTotal: number;
_iRecordsDisplay: number;
bJUI: boolean;
oClasses: any;
bFiltered: boolean;
bSorted: boolean;
bSortCellsTop: boolean;
oInit: any;
aoDestroyCallback: any[];
fnRecordsTotal: () => number;
fnRecordsDisplay: () => number;
fnDisplayEnd: () => number;
oInstance : any;
sInstance: string;
iTabIndex: number;
nScrollHead: Node;
nScrollFoot: Node;
}
export interface Features
{
bAutoWidth: boolean;
bDeferRender: boolean;
bFilter: boolean;
bInfo: boolean;
bLengthChange: boolean;
bPaginate: boolean;
bProcessing: boolean;
bServerSide: boolean;
bSort: boolean;
bSortClasses: boolean;
bStateSave: boolean;
}
export interface ScrollingSettings
{
bAutoCss : boolean;
bCollapse: boolean;
bInfinite: boolean;
iBarWidth: number;
iLoadGap: number;
sX: string;
sY: string;
}
export interface Row
{
nTr: Node;
_aData: any;
_aSortData: any[];
_anHidden: Node[];
_sRowStripe: string;
}
export interface Column
{
aDataSort: any;
asSorting: string[];
bSearchable : boolean;
bSortable : boolean;
bVisible : boolean;
_bAutoType : boolean;
fnCreatedCell: CreatedCell;
fnGetData: (data: any, specific: string) => any;
fnSetData: (data: any, value: any) => void;
mData: any;
mRender: any;
nTh: Node;
nIf: Node;
sClass: string;
sContentPadding: string;
sDefaultContent: string;
sName: string;
sSortDataType: string;
sSortingClass: string;
sSortingClassJUI: string;
sTitle: string;
sType: string;
sWidth: string;
sWidthOrig: string;
}
export interface CookieCallback
{
(name: string, data: any, expires: string, path: string, cookie: string) : void;
}
export interface RowCreatedCallback
{
(row: Node, data: any[], dataIndex: number) : void;
}
export interface DrawCallback
{
(settings: Settings) : void;
}
export interface FooterCallback
{
(foot: Element, data: any[], start:number, end:number, display: number[]) : void;
}
export interface FormatNumber
{
(toFormat: number) : string;
}
export interface HeaderCallback
{
(head: Element, data: any[], start:number, end:number, display: number[]) : void;
}
export interface InfoCallback
{
(settings: Settings, start: number, end: number, max:number, total: number, pre: string) : string;
}
export interface InitComplete
{
(settings: Settings, json: any) : void;
}
export interface PreDrawCallback
{
(settings: Settings) : boolean;
}
export interface RowCallback
{
(row : Settings, data: any[], displayIndex: number, displayIndexFull: number) : void;
}
export interface StateLoadCallback
{
(settings: Settings) : any;
}
export interface StateLoadParams
{
(settings: Settings, data: any) : void;
}
export interface StateLoaded
{
(settings: Settings, data: any) : void;
}
export interface StateSaveCallback
{
(settings: any, data:any) : void;
}
export interface StateSaveParams
{
(settings: any, data:any) : void;
}
export interface CreatedCell
{
(nTd: Node, cellData: any, rowData: any, row: number, col: number) : void;
}
}
File diff suppressed because it is too large Load Diff
+1828 -479
View File
File diff suppressed because it is too large Load Diff
+139
View File
@@ -0,0 +1,139 @@
/// <reference path="../jquery/jquery.d.ts"/>
/// <reference path="jquery.window.d.ts"/>
function example_1() {
$.window({
title: "Cyclops Studio",
url: "http://apps.fstoke.me/"
});
}
function example_2() {
$.window({
showModal: true,
modalOpacity: 0.5,
icon: "http://www.fstoke.me/favicon.ico",
title: "Professional JavaScript for Web Developers",
content: $("#window_block2").html(), // load window_block2 html content
footerContent: "<img style=\"vertical-align:middle;\" src=\"img/ star.png\"> This is a nice plugin :^)"
});
};
function example_3() {
// prepare customerized static attributes, see static attributes
// Note: you should call this method before starting to create window instances, or windows might display wrong.
$.window.prepare({
dock: 'bottom', // change the dock direction: 'left', 'right', 'top', 'bottom'
animationSpeed: 200, // set animation speed
minWinLong: 180 // set minimized window long dimension width in pixel
});
// limit window within body
$.window({
icon: 'http://www.fstoke.me/favicon.ico',
title: "This window only can be dragged within body boundary",
content: "<div style=\"padding: 10px; font - weight:bold; \">I only can be dragged within body element." +
"<br><br>Really? Really? You can try it... :)</div>",
checkBoundary: true,
x: 80,
y: 80
});
// limit window within a element
$("#my_boundary_panel").window({
icon: 'http://mail.google.com/favicon.ico',
title: "This window only can be dragged within its parent element",
content: "<div style=\"border: 15px solid green; padding: 10px; font - weight:bold; \">I only can be dragged within my boss...@@</div>",
checkBoundary: true,
width: 200,
height: 160,
maxWidth: 400,
maxHeight: 300,
x: 80,
y: 80
});
// assign the dock area
$.window.prepare({
dock: 'bottom', // change the dock direction: 'left', 'right', 'top', 'bottom'
dockArea: $('#myDockArea'), // set the dock area
animationSpeed: 200, // set animation speed
minWinLong: 180 // set minimized window long dimension width in pixel
});
}
function example_4() {
$.window({
title: "Un-draggable & Un-resizable Window",
content: "<div style=\"padding: 10px; font - weight:bold; \">I can't be dragged...<br>" +
"I can't be resized too...<br><br>Of course, maximize and minimize are also disabled... <br><br>" +
"So... What can I do? I only can be closed. @_@</div>",
draggable: false,
resizable: false,
maximizable: false,
minimizable: false,
showModal: true
});
}
function example_5() {
var log = console.log;
$.window({
title: "complext window",
content: $("#window_block5").html(), // load window_block5 html content
x: 150, // the x-axis value on screen, if -1 means put on screen center
y: 100, // the y-axis value on screen, if -1 means put on screen center
width: 600, // window width
height: 300, // window height
minWidth: 200, // the minimum width, if -1 means no checking
minHeight: 100, // the minimum height, if -1 means no checking
maxWidth: 700, // the minimum width, if -1 means no checking
maxHeight: 400, // the minimum height, if -1 means no checking
scrollable: false, // a boolean flag to show scroll bar or not
onOpen: (wnd: JQueryWindow.Window) => { // a callback function while container is added into body
alert('open');
},
onShow: (wnd: JQueryWindow.Window) => { // a callback function while whole window display routine is finished
alert('show');
},
onClose: (wnd: JQueryWindow.Window) => { // a callback function while user click close button
alert('close');
},
onSelect: (wnd: JQueryWindow.Window) => { // a callback function while user select the window
log('select');
},
onUnselect: (wnd: JQueryWindow.Window) => { // a callback function while window unselected
log('unelect');
},
onDrag: (wnd: JQueryWindow.Window) => { // a callback function while window is going to drag
log('drag');
},
afterDrag: (wnd: JQueryWindow.Window) => { // a callback function after window dragged
log('after dragged');
},
onResize: (wnd: JQueryWindow.Window) => { // a callback function while window is going to resize
log('resize');
},
afterResize: (wnd: JQueryWindow.Window) => { // a callback function after window resized
log('after resized');
},
onMinimize: (wnd: JQueryWindow.Window) => { // a callback function while window is going to minimize
log('minimize');
},
afterMinimize: (wnd: JQueryWindow.Window) => { // a callback function after window minimized
log('after minimized');
},
onMaximize: (wnd: JQueryWindow.Window) => { // a callback function while window is going to maximize
log('maximize');
},
afterMaximize: (wnd: JQueryWindow.Window) => { // a callback function after window maximized
log('after maximized');
},
onCascade: (wnd: JQueryWindow.Window) => { // a callback function while window is going to cascade
log('cascade');
},
afterCascade: (wnd: JQueryWindow.Window) => { // a callback function after window cascaded
log('after cascaded');
}
});
}
+460
View File
@@ -0,0 +1,460 @@
// Type definitions for Window plugin for jQuery 5.0.4
// Project: http://fstoke.me/jquery/window/
// Definitions by: Ryan Graham <https://github.com/ryan-codingintrigue/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>
declare module JQueryWindow {
// Instance methods
interface Window {
/**
get window id
**/
getWindowId(): string;
/**
get window container's parent panel, it's a jQuery object
**/
getCaller(): JQuery;
/**
get window container panel, it's a jQuery object
**/
getContainer(): JQuery;
/**
get window header panel, it's a jQuery object
**/
getHeader(): JQuery;
/**
get window frame panel, it's a jQuery object
**/
getFrame(): JQuery;
/**
get window footer panel, it's a jQuery object
**/
getFooter(): JQuery;
/**
set current window as screen center
**/
alignCenter(): void;
/**
set current window as horizontal center
**/
alignHorizontalCenter(): void;
/**
set current window as vertical center
**/
alignVerticalCenter(): void;
/**
select current window, it will increase the original z-index value with 2
**/
select(): void;
/**
unselect current window, it will set the z-index as original options.z
**/
unselect(): void;
/**
move current window to target position or shift it by passed distance
**/
move(x: number, y: number, bShift: boolean): void;
/**
resize current window to target width/height
**/
resize(width: number, height: number): void;
/**
maximize current window
**/
maximize(): void;
/**
minimize current window
**/
minimize(): void;
/**
restore current window, it could be maximized or cascade status
**/
restore(): void;
/**
close current window
**/
close(quiet: boolean): void;
/**
hide current window
**/
hide(): void;
/**
show current window
**/
show(): void;
/**
change window title
**/
setTitle(title: string): void;
/**
change iframe url
**/
setUrl(url: string): void;
/**
change frame content
**/
setContent(content: string|JQuery|HTMLElement): void;
/**
change footer content
**/
setFooterContent(content: string|JQuery|HTMLElement): void;
/**
get window title text
**/
getTitle(): string;
/**
get url string
**/
getUrl(): string;
/**
get frame html content
**/
getContent(): string;
/**
get footer html content
**/
getFooterContent(): string;
/**
get window maximized status
**/
isMaximized(): boolean;
/**
get window minmized status
**/
isMinimized(): boolean;
/**
get window selected status
**/
isSelected(): boolean;
/**
set window icon
**/
setIcon(iconUrl: string): void;
/**
show window icon
**/
showIcon(): void;
/**
hide window icon
**/
hideIcon(): void;
}
// Static methods
interface Static {
(options: WindowOptions): JQueryWindow.Window;
/**
initialize with customerized static setting attributes
**/
prepare(options?: StaticOptions): void;
/**
close all created windows
**/
closeAll(quiet?: boolean): void;
/**
hide all created windows
**/
hideAll(): void;
/**
show all created windows
**/
showAll(): void;
/**
return all created windows instance
**/
getAll(): Array<JQueryWindow.Window>;
/**
get the window instance by passed window id
**/
getWindow(windowId: string): JQueryWindow.Window;
/**
get the selected window instance
**/
getSelectedWindow(): JQueryWindow.Window;
}
// Static options
interface StaticOptions {
/**
the direction of minimized window dock at. the available values are [left, right, top, bottom]
**/
dock?: string;
/**
the area which the windows will dock at
**/
dockArea?: JQuery|HTMLElement;
/**
the speed of animations: maximize, minimize, restore, shift, in milliseconds
**/
animationSpeed?: number;
/**
the narrow dimension of minimized window
**/
minWinNarrow?: number;
/**
the long dimension of minimized window
**/
minWinLong?: number;
/**
to handle browser scrollbar when window status changed(maximize, minimize, cascade)
**/
handleScrollbar?: boolean;
/**
to decide show log in firebug, IE8, chrome console
**/
showLog?: boolean;
}
// Instance options
interface WindowOptions {
/**
an icon image url string. if this attribute is given, it will force to replace the original favicon of remote page on window. or you can set it as null to hide icon.
**/
icon?: string;
/**
the title text of window
**/
title: string;
/**
the target url of iframe ready to load.
**/
url?: string;
/**
this attribute only works when url is null. when passing a jquery object or a element, it will clone the original one to append.
**/
content?: string|JQuery|HTMLElement;
/**
same as content attribute, but it's put on footer panel.
**/
footerContent?: string|JQuery|HTMLElement;
/**
container extra class
**/
containerClass?: string;
/**
header extra class
**/
headerClass?: string;
/**
frame extra class
**/
frameClass?: string;
/**
footer extra class
**/
footerClass?: string;
/**
selected header extra class
**/
selectedHeaderClass?: string;
/**
the x-axis value on screen(or caller element), if -1 means put on screen(or caller element) center
**/
x?: number;
/**
the y-axis value on screen(or caller element), if -1 means put on screen(or caller element) center
**/
y?: number;
/**
the css z-index value
**/
z?: number;
/**
window width
**/
width?: number;
/**
window height
**/
height?: number;
/**
the minimum width, if -1 means no checking
**/
minWidth?: number;
/**
the minimum height, if -1 means no checking
**/
minHeight?: number;
/**
the maximum width, if -1 means no checking
**/
maxWidth?: number;
/**
the maximum height, if -1 means no checking
**/
maxHeight?: number;
/**
to control show modal on background
**/
showModal?: boolean;
/**
the opacity of modal dialog
**/
modalOpacity?: number;
/**
to control show footer panel
**/
showFooter?: boolean;
/**
to control display window as round corner
**/
showRoundCorner?: boolean;
/**
to control window closable
**/
closable?: boolean;
/**
to control window minimizable
**/
minimizable?: boolean;
/**
to control window maximizable
**/
maximizable?: boolean;
/**
to control window with remote url could be bookmarked
**/
bookmarkable?: boolean;
/**
to control window draggable
**/
draggable?: boolean;
/**
to control window resizable
**/
resizable?: boolean;
/**
to show scroll bar or not
**/
scrollable?: boolean;
/**
to check window dialog overflow html body or caller element
**/
checkBoundary?: boolean;
/**
to limit window only can be dragged within browser window. this attribute only works when checkBoundary is true and caller is null.
**/
withinBrowserWindow?: boolean;
/**
to describe the customized button display and callback function
**/
custBtns?: Array<JQueryWindow.Button>;
/**
a callback function while container is added into body
**/
onOpen?: (wnd: JQueryWindow.Window) => void;
/**
a callback function while whole window display routine is finished
**/
onShow?: (wnd: JQueryWindow.Window) => void;
/**
a callback function while user click close button
**/
onClose?: (wnd: JQueryWindow.Window) => void;
/**
a callback function while user select the window
**/
onSelect?: (wnd: JQueryWindow.Window) => void;
/**
a callback function while window unselected
**/
onUnselect?: (wnd: JQueryWindow.Window) => void;
/**
a callback function while window is going to drag
**/
onDrag?: (wnd: JQueryWindow.Window) => void;
/**
a callback function after window dragged
**/
afterDrag?: (wnd: JQueryWindow.Window) => void;
/**
a callback function while window is going to resize
**/
onResize?: (wnd: JQueryWindow.Window) => void;
/**
a callback function after window resized
**/
afterResize?: (wnd: JQueryWindow.Window) => void;
/**
a callback function while window is going to minimize
**/
onMinimize?: (wnd: JQueryWindow.Window) => void;
/**
a callback function after window minimized
**/
afterMinimize?: (wnd: JQueryWindow.Window) => void;
/**
a callback function while window is going to maximize
**/
onMaximize?: (wnd: JQueryWindow.Window) => void;
/**
a callback function after window maximized
**/
afterMaximize?: (wnd: JQueryWindow.Window) => void;
/**
a callback function while window is going to cascade
**/
onCascade?: (wnd: JQueryWindow.Window) => void;
/**
a callback function after window cascaded
**/
afterCascade?: (wnd: JQueryWindow.Window) => void;
/**
a callback function while iframe ready to connect remoting url. this attribute only works while url attribute is given
**/
onIframeStart?: (wnd: JQueryWindow.Window) => void;
/**
a callback function while iframe load finished. this attribute only works while url attribute is given
**/
onIframeEnd?: (wnd: JQueryWindow.Window) => void;
/**
if null means no check, or pass a string to show warning message while iframe is going to redirect current top page
**/
iframeRedirectCheckMsg?: string;
/**
random the new created window position, it only works when options x,y value both are -1
**/
createRandomOffset?: { x: number; y: number };
}
// Button definition
interface Button {
/**
**/
id: string;
/**
**/
title?: string;
/**
**/
clazz?: string;
/**
**/
style?: string;
/**
**/
image: string;
/**
**/
callback: (btn: JQueryWindow.Button, wnd: JQueryWindow.Window) => void;
}
}
// Register with JQuery instance
interface JQuery {
window(options: JQueryWindow.WindowOptions): JQueryWindow.Window;
}
// Register with JQuery static
interface JQueryStatic {
window: JQueryWindow.Static;
}
+18 -20
View File
@@ -1,6 +1,6 @@
# Meteor Type Definitions
These are the definitions for version 1.0.3.1 of Meteor.
These are the definitions for version 1.1.0.1 of Meteor.
Although these definitions can be downloaded separately for use, the recommended way to use these definitions in a Meteor application is by installing the
[typescript-libs](https://atmospherejs.com/meteortypescript/typescript-libs) Meteor smart package from atmosphere. The smart package contains TypeScript
@@ -16,25 +16,21 @@ to generate the official [Meteor docs] (http://docs.meteor.com/).
## Usage
1. If you are using the smart package, add a symbolic link to the definitions from within some directory within your project (e.g. ".typescript" or "lib"). The
definitions can be found somewhere deep within `<project_root_dir>/.meteor/...`. The following will probably work:
1. Add a symbolic link to the definitions from within some directory within your project (e.g. ".typescript" or "lib"). The definitions can be found somewhere
deep within `<project_root_dir>/.meteor/...`. The following will probably work:
$ ln -s ../.meteor/local/build/programs/server/assets/packages/meteortypescript_typescript-libs/definitions package_defs
If the definitions can't be found within the .meteor directory, you will have to manually pull down the definitions from github and add them to your project:
<https://github.com/meteor-typescript/meteor-typescript-libs>
If you are just using the *meteor.d.ts* file from this source, you can just add the file to any directory in your project (e.g. ".typescript" or "lib").
2. Install the [Typescript compiler for Meteor](https://github.com/meteor-typescript/meteor-typescript-compiler) or an [IDE which can transpile TypeScript to JavaScript](#transpiling-typescript).
3. From the typescript files, add references. Reference the definition files with a single line:
/// <reference path=".typescript/package_defs/all-definitions.d.ts" /> (substitute path in your project)
Or you can reference definition files individually:
/// <reference path=".typescript/package_defs/meteor.d.ts" /> (substitue path in your project)
/// <reference path=".typescript/package_defs/underscore.d.ts" />
/// <reference path=".typescript/package_defs/jquery.d.ts" />
@@ -46,26 +42,28 @@ definitions can be found somewhere deep within `<project_root_dir>/.meteor/...`.
### References
Try to stay away from referencing *file.ts*, rather generate a *file.d.ts* using `tsc --reference file.ts`, and reference it in your file. Compilation will
be much faster and code cleaner - it's always better to split definition from implemention.
Meteor code can run on the client and the server, for this reason you should try to stay away from referencing *file.ts* directly: you may get unexpected results.
Rather generate a *file.d.ts* using `tsc --reference file.ts`, and reference it in your file.
Compilation will be much faster and code cleaner - it's always better to split definition from implementation anyways.
### Templates
When specifying template *helpers*, *events*, and functions for *created*, *rendered*, and *destroyed*, you will need to use a "bracket notation" instead of the "dot notation":
With the exception of the **body** and **head** templates, Meteor's Template dot notation cannot be used (ie. *Template.mytemplate*). Thanks to Typescript static typing checks, you will need to used the *bracket notation* to access the Template.
Template['myTemplateName']['helpers']({
Template['myTemplateName'].helpers({
foo: function () {
return Session.get("foo");
}
});
Template['myTemplateName']['rendered'] = function ( ) { ... }
Template['myTemplateName'].rendered = function ( ) { ... }
This is because TypeScript enforces typing and it will throw an error saying "myTemplateName" does not exist when using the dot notation.
### Form fields
### Accessing a Form field
Trying to read a form field value? use `(<HTMLInputElement>evt.target).value`.
Form fields typically need to be casted to <HTMLInputElement>. For instance to read a form field value, use `(<HTMLInputElement>evt.target).value`.
### Global variables
@@ -77,7 +75,7 @@ Preface any global variable declarations with a TypeScript "declare var" stateme
### Collections
The majority of extra work required to use TypeScript with Meteor is creating and maintaining the collection interfaces. However, doing so also provides the
The majority of extra work required to use TypeScript with Meteor is creating and maintaining the collection interfaces. However, doing so also provides the
additional benefit of succinctly documenting collection schema definitions (that are actually enforced).
To define collections, you will need to create an interface representing the collection and then declare a Collection type variable with that interface type (as a generic):
@@ -113,7 +111,7 @@ for all of you custom definitions. e.g. contents of ".typescript/custom_defs/cu
/// <reference path='paraview_helpers.d.ts'/>
/// <reference path='handsontable.d.ts'/>
/// <reference path='utility_helpers.ts'/>
## Transpiling TypeScript
@@ -132,4 +130,4 @@ Then, within WebStorm, go to Preferences -> File Watchers -> "+" symbol and add
Last option, is to compile code from the command line. With node and the typescript compiler installed:
$ tsc *.ts
$ tsc *.ts
+80 -52
View File
@@ -8,21 +8,15 @@
/*********************************** Begin setup for tests ******************************/
// A developer must declare a var Template like this in a separate file to use this TypeScript type definition file
//interface ITemplate {
// adminDashboard: Meteor.Template;
// chat: Meteor.Template;
//}
//declare var Template: ITemplate;
var Rooms = new Mongo.Collection('rooms');
var Messages = new Mongo.Collection('messages');
var Monkeys = new Mongo.Collection('monkeys');
var x = new Mongo.Collection('x');
var y = new Mongo.Collection('y');
var check = function(str1, str2) {};
interface MonkeyDAO {
_id: string;
name: string;
}
var Monkeys = new Mongo.Collection<MonkeyDAO>('monkeys');
//var x = new Mongo.Collection<xDAO>('x');
//var y = new Mongo.Collection<yDAO>('y');
/********************************** End setup for tests *********************************/
@@ -98,8 +92,8 @@ Tracker.autorun(function () {
});
console.log("Current room has " +
Counts.find(Session.get("roomId")).count +
" messages.");
Counts.find(Session.get("roomId")).count +
" messages.");
/**
* From Publish and Subscribe, Meteor.subscribe section
@@ -124,7 +118,7 @@ Meteor.methods({
var you_want_to_throw_an_error = true;
if (you_want_to_throw_an_error)
throw new Meteor.Error("404", "Can't find my pants");
throw new Meteor.Error("404", "Can't find my pants");
return "some return value";
},
@@ -146,15 +140,15 @@ var result = Meteor.call('foo', 1, 2);
// DA: I added the "var" keyword in there
interface ChatroomsDAO {
_id?: string;
_id?: string;
}
interface MessagesDAO {
_id?: string;
_id?: string;
}
var Chatrooms = new Mongo.Collection<ChatroomsDAO>("chatrooms");
Messages = new Mongo.Collection<MessagesDAO>("messages");
var myMessages = Messages.find({userId: Session.get('myUserId')}).fetch();
var myMessages = <MessagesDAO> Messages.find({userId: Session.get('myUserId')}).fetch();
Messages.insert({text: "Hello, world!"});
@@ -171,10 +165,10 @@ Posts.insert({title: "Hello world", body: "First post"});
* since there is already a Collection constructor with a different signature
*
var Scratchpad = new Mongo.Collection;
for (var i = 0; i < 10; i++)
Scratchpad.insert({number: i * 2});
assert(Scratchpad.find({number: {$lt: 9}}).count() === 5);
**/
for (var i = 0; i < 10; i++)
Scratchpad.insert({number: i * 2});
assert(Scratchpad.find({number: {$lt: 9}}).count() === 5);
**/
var Animal = function (doc) {
// _.extend(this, doc);
@@ -185,11 +179,16 @@ Animal.prototype = {
makeNoise: function () {
console.log(this.sound);
}
};
interface AnimalDAO {
_id: string;
makeNoise: () => void;
}
// Define a Collection that uses Animal as its document
var Animals = new Mongo.Collection("Animals", {
var Animals = new Mongo.Collection<AnimalDAO>("Animals", {
transform: function (doc) { return new Animal(doc); }
});
@@ -225,8 +224,8 @@ Template['adminDashboard'].events({
Meteor.methods({
declareWinners: function () {
Players.update({score: {$gt: 10}},
{$addToSet: {badges: "Winner"}},
{multi: true});
{$addToSet: {badges: "Winner"}},
{multi: true});
}
});
@@ -348,7 +347,7 @@ Session.equals("key", value);
*/
Meteor.publish("userData", function () {
return Meteor.users.find({_id: this.userId},
{fields: {'other': 1, 'things': 1}});
{fields: {'other': 1, 'things': 1}});
});
Meteor.users.deny({update: function () { return true; }});
@@ -412,8 +411,8 @@ Accounts.emailTemplates.enrollAccount.subject = function (user) {
};
Accounts.emailTemplates.enrollAccount.text = function (user, url) {
return "You have been selected to participate in building a better future!"
+ " To activate your account, simply click the link below:\n\n"
+ url;
+ " To activate your account, simply click the link below:\n\n"
+ url;
};
/**
@@ -424,6 +423,36 @@ Template['adminDashboard'].helpers({
return Session.get("foo");
}
});
Template['newTemplate'].helpers({
helperName: function () {
}
});
Template['newTemplate'].created = function () {
};
Template['newTemplate'].rendered = function () {
};
Template['newTemplate'].destroyed = function () {
};
Template['newTemplate'].events({
'click .something': function (event) {
}
});
Template.registerHelper('testHelper', function() {
return 'tester';
});
var instance = Template.instance();
var data = Template.currentData();
var data = Template.parentData(1);
var body = Template.body;
/**
* From Match section
@@ -481,10 +510,9 @@ Tracker.autorun(function (c) {
* From Deps, Deps.Computation
*/
if (Tracker.active) {
Tracker.onInvalidate(function () {
x.destroy();
y.finalize();
});
Tracker.onInvalidate(function () {
console.log('invalidated');
});
}
/**
@@ -494,15 +522,15 @@ var weather = "sunny";
var weatherDep = new Tracker.Dependency;
var getWeather = function () {
weatherDep.depend();
return weather;
weatherDep.depend();
return weather;
};
var setWeather = function (w) {
weather = w;
// (could add logic here to only call changed()
// if the new value is different from the old)
weatherDep.changed();
weather = w;
// (could add logic here to only call changed()
// if the new value is different from the old)
weatherDep.changed();
};
/**
@@ -512,7 +540,7 @@ Meteor.methods({checkTwitter: function (userId) {
check(userId, String);
this.unblock();
var result = HTTP.call("GET", "http://api.twitter.com/xyz",
{params: {user: userId}});
{params: {user: userId}});
if (result.statusCode === 200)
return true
return false;
@@ -520,12 +548,12 @@ Meteor.methods({checkTwitter: function (userId) {
HTTP.call("POST", "http://api.twitter.com/xyz",
{data: {some: "json", stuff: 1}},
function (error, result) {
if (result.statusCode === 200) {
Session.set("twizzled", true);
}
});
{data: {some: "json", stuff: 1}},
function (error, result) {
if (result.statusCode === 200) {
Session.set("twizzled", true);
}
});
/**
* From Email, Email.send section
@@ -542,9 +570,9 @@ Meteor.methods({
// In your client code: asynchronously send an email
Meteor.call('sendEmail',
'alice@example.com',
'Hello from Meteor!',
'This is a test of Email.send.');
'alice@example.com',
'Hello from Meteor!',
'This is a test of Email.send.');
var testTemplate = new Blaze.Template();
var testView = new Blaze.View();
@@ -562,8 +590,8 @@ Blaze.toHTMLWithData(testTemplate, function() {});
Blaze.toHTMLWithData(testView, {test: 1});
Blaze.toHTMLWithData(testView, function() {});
var reactiveVar1 = new ReactiveVar('test value');
var reactiveVar2 = new ReactiveVar('test value', function(oldVal) { return true; });
var reactiveVar1 = new ReactiveVar<string>('test value');
var reactiveVar2 = new ReactiveVar<string>('test value', function(oldVal) { return true; });
var varValue: string = reactiveVar1.get();
reactiveVar1.set('new value');
+638 -538
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -14,6 +14,7 @@ function test_Notify_constructor() {
body : "fuga",
icon : "./logo.png",
tag : "user",
timeout : 1000,
notifyShow : (e:Event)=> console.log("notifyShow", e),
notifyClose : ()=> console.log("notifyClose"),
notifyClick : ()=> console.log("notifyClick"),
+5
View File
@@ -72,6 +72,11 @@ declare module notifyjs {
* unique identifier to stop duplicate notifications
*/
tag? : string;
/**
* number of seconds to close the notification automatically
*/
timeout? : number;
/**
* callback when notification is shown
+94 -68
View File
@@ -1,68 +1,94 @@
/// <reference path="object-path.d.ts" />
var
object = {
one: 1,
two: {
three: 3,
four: ['4']
}
},
array: any[] = [],
Null:any = null;
objectPath.del<string[]>(array) === ['12'];
objectPath.del<typeof object>(object) === object;
objectPath.del(object) === object;
objectPath.del() === void 0;
objectPath.del(object, ['1','2','3']);
objectPath.del(object, [1,2,3]);
objectPath.del(object, 1);
objectPath.del(object, 'one').one === 1;
objectPath.coalesce(object, ['1','2']) === void 0;
objectPath.coalesce(object, ['1',['2','1']]) === void 0;
objectPath.coalesce(object, ['1',['2','1']], 1) === 1;
objectPath.coalesce(object, [1,1], 1) === 1;
objectPath.coalesce(object, <Array<number[]>>[1,[1,1]], 1) === 1;
objectPath.ensureExists(object, '1.2', 2);
objectPath.ensureExists(object, 1, 2);
objectPath.ensureExists(object, [1,2], 2);
objectPath.ensureExists(object, ['1','2'], 2);
objectPath.ensureExists<typeof object, number>(object, ['1','2'], 2) === 3;
objectPath.ensureExists<typeof object, any[][]>(object, ['1','2'], 2) === [[]];
objectPath.push(object, 1, 1,2,3,4);
objectPath.push(object, 1, 1,'2', 3, false);
objectPath.push(object, 'one.four', 1,'2', 3, false);
objectPath.push(object, ['one','two'], [1,'2', 3, false]);
objectPath.get(array) === array;
objectPath.get(Null) === Null;
objectPath.get() === void 0;
objectPath.get(object, 'one') === 1;
objectPath.get(object, ['two','three']) === 3;
objectPath.get(object, ['three'], 3) === 3;
objectPath.get(object, 'three', 3) === 3;
objectPath.get(object, 0, 3) === 3;
objectPath.get(object, 0, '3') === '3';
objectPath.get<typeof object, string[]>(object, 0, ['1','2']) === ['1','2'];
objectPath.get<typeof object, number>(object, 0) === 10;
objectPath.set(object, '1.2', true);
objectPath.set(object, ['1','2'], true);
objectPath.set(object, [1, 2], true);
objectPath.set(object, '1.2', true, true);
objectPath.set(object, '1.2', true, false);
objectPath.set<typeof object, string[]>(object, '1.2', true, false) === ['string'];
objectPath.set<typeof object, typeof object>(object, '1.2', true, false) === object;
objectPath.insert(object, '1.2', 1);
objectPath.insert(object, ['1','2'], 1);
objectPath.insert(object, 1, 1);
objectPath.insert(object, [1,2], 1);
objectPath.insert(object, '1.2', 1, 2);
objectPath.insert(object, ['1.2'], 1, 6);
/// <reference path="object-path.d.ts" />
import ObjectPath = require('object-path');
var
object = {
one: 1,
two: {
three: 3,
four: ['4']
}
},
array: any[] = [],
Null:any = null;
var obj = ObjectPath(object);
obj.del(array);
obj.coalesce([1,2]);
obj.ensureExists('1.2', 1);
obj.push(1, 'value');
obj.get(array);
obj.set(array, 'value');
obj.insert(1, 10);
objectPath.del<string[]>(array) === ['12'];
objectPath.del<typeof object>(object) === object;
objectPath.del(object) === object;
obj.del() === object;
objectPath.has(object, ['1','2','3']) === true;
objectPath.has(object, ['1.2.3']) === false;
objectPath.has(object, [1,2,3]) === true;
objectPath.has(object, 1) === false;
objectPath.has() === false;
objectPath.del() === void 0;
objectPath.del(object, ['1','2','3']);
objectPath.del(object, [1,2,3]);
objectPath.del(object, 1);
objectPath.del(object, 'one').one === 1;
obj.del('one').one === 1;
objectPath.coalesce(object, ['1','2']) === void 0;
objectPath.coalesce(object, ['1',['2','1']]) === void 0;
objectPath.coalesce(object, ['1',['2','1']], 1) === 1;
objectPath.coalesce(object, [1,1], 1) === 1;
objectPath.coalesce(object, <Array<number[]>>[1,[1,1]], 1) === 1;
obj.coalesce(<Array<number[]>>[1,[1,1]], 1) === 1;
objectPath.ensureExists(object, '1.2', 2);
objectPath.ensureExists(object, 1, 2);
objectPath.ensureExists(object, [1,2], 2);
objectPath.ensureExists(object, ['1','2'], 2);
objectPath.ensureExists<typeof object, number>(object, ['1','2'], 2) === 3;
objectPath.ensureExists<typeof object, any[][]>(object, ['1','2'], 2) === [[]];
obj.ensureExists<any[][]>(['1','2'], 2) === [[]];
objectPath.push(object, 1, 1,2,3,4);
objectPath.push(object, 1, 1,'2', 3, false);
objectPath.push(object, 'one.four', 1,'2', 3, false);
objectPath.push(object, ['one','two'], [1,'2', 3, false]);
obj.push(['one','two'], [1,'2', 3, false]);
objectPath.get(array) === array;
objectPath.get(Null) === Null;
objectPath.get() === void 0;
objectPath.get(object, 'one') === 1;
objectPath.get(object, ['two','three']) === 3;
objectPath.get(object, ['three'], 3) === 3;
objectPath.get(object, 'three', 3) === 3;
objectPath.get(object, 0, 3) === 3;
objectPath.get(object, 0, '3') === '3';
objectPath.get<typeof object, string[]>(object, 0, ['1','2']) === ['1','2'];
objectPath.get<typeof object, number>(object, 0) === 10;
obj.get<number>(0) === 10;
objectPath.set(object, '1.2', true);
objectPath.set(object, ['1','2'], true);
objectPath.set(object, [1, 2], true);
objectPath.set(object, '1.2', true, true);
objectPath.set(object, '1.2', true, false);
objectPath.set<typeof object, string[]>(object, '1.2', true, false) === ['string'];
objectPath.set<typeof object, typeof object>(object, '1.2', true, false) === object;
obj.set<typeof object>('1.2', true, false) === object;
objectPath.insert(object, '1.2', 1);
objectPath.insert(object, ['1','2'], 1);
objectPath.insert(object, 1, 1);
objectPath.insert(object, [1,2], 1);
objectPath.insert(object, '1.2', 1, 2);
objectPath.insert(object, ['1.2'], 1, 6);
obj.insert(['1.2'], 1, 6);
+469 -237
View File
@@ -1,238 +1,470 @@
// Type definitions for objectPath v0.6.0
// Project: https://github.com/mariocasciaro/object-path
// Definitions by: Paulo Cesar <https://github.com/pocesar/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare var objectPath: objectPath.IObjectPathStatic;
declare module objectPath {
interface IStringArray {
[index: number]: string;
}
interface INumberArray {
[index: number]: number;
}
interface IObjectPathStatic {
/*======== Del =========*/
/**
* Deletes a member from object or array
* @param {object} object
* @param {string[]|string} path
* @return object
*/
del<T extends {}>(object: T, path: IStringArray): T;
/**
* @see objectPath.del
*/
del<T extends {}>(object: T, path: INumberArray): T;
/**
* @see objectPath.del
*/
del<T extends {}>(object: T, path: number): T;
/**
* @see objectPath.del
*/
del<T extends {}>(object: T, path: string): T;
/**
* @see objectPath.del
*/
del<T extends {}>(object: T): T;
/**
* @see objectPath.del
*/
del():void;
/*======== Get =========*/
/**
* Get a path from an object
* @param {object} object
* @param {string|string[]|number|number[]} path
* @param {*} [defaultValue=undefined]
*/
get<T extends {}, TResult>(object: T, path: string, defaultValue?: TResult): TResult;
/**
* @see objectPath.get
*/
get<T extends {}, TResult>(object: T, path: IStringArray, defaultValue?: TResult): TResult;
/**
* @see objectPath.get
*/
get<T extends {}, TResult>(object: T, path: number, defaultValue?: TResult): TResult;
/**
* @see objectPath.get
*/
get<T extends {}, TResult>(object: T, path: INumberArray, defaultValue?: TResult): TResult;
/**
* @see objectPath.get
*/
get<T extends {}>(object: T): T;
/**
* @see objectPath.get
*/
get():void;
/*======== Set =========*/
/**
* Set a path to a value
* @param {object} object
* @param {string|string[]|number|number[]} path
* @param {*} value
* @param {boolean} [doNotReplace=false]
* @return Any existing value on the path if any
*/
set<T extends {}, TExisting>(object: T, path: string, value: any, doNotReplace?:boolean): TExisting;
/**
* @see objectPath.set
*/
set<T extends {}, TExisting>(object: T, path: number, value: any, doNotReplace?:boolean): TExisting;
/**
* @see objectPath.set
*/
set<T extends {}, TExisting>(object: T, path: IStringArray, value: any, doNotReplace?:boolean): TExisting;
/**
* @see objectPath.set
*/
set<T extends {}, TExisting>(object: T, path: INumberArray, value: any, doNotReplace?:boolean): TExisting;
/**
* @see objectPath.set
*/
set<T extends {}>(object: T): T;
/**
* @see objectPath.set
*/
set():void;
/*======== Push =========*/
/**
* Create (if path isn't an array) and push the value to it. Can push unlimited number of values
* @param {object} object
*/
push<T extends {}>(object: T, path: INumberArray, ...args:any[]):void;
/**
* @see objectPath.push
*/
push<T extends {}>(object: T, path: IStringArray, ...args:any[]):void;
/**
* @see objectPath.push
*/
push<T extends {}>(object: T, path: number, ...args:any[]):void;
/**
* @see objectPath.push
*/
push<T extends {}>(object: T, path: string, ...args:any[]):void;
/**
* @see objectPath.push
*/
push():void;
/*======== Coalesce =========*/
/**
* Get the first non undefined property
* @param {object} object
* @param {string[]|string[][]|number[]|number[][]} paths
* @param {*} defaultValue
* @return {*}
*/
coalesce<T extends {}, TResult>(object: T, paths: IStringArray, defaultValue?: any):TResult;
/**
* @see objectPath.coalesce
*/
coalesce<T extends {}, TResult>(object: T, paths: INumberArray, defaultValue?: any):TResult;
/**
* @see objectPath.coalesce
*/
coalesce<T extends {}, TResult>(object: T, paths: IStringArray[], defaultValue?: any):TResult;
/**
* @see objectPath.coalesce
*/
coalesce<T extends {}, TResult>(object: T, paths: INumberArray[], defaultValue?: any):TResult;
/*======== Empty =========*/
/**
* Empty a path. Arrays are set to length 0, objects have all elements deleted, strings
* are set to empty, numbers to 0, everything else is set to null
* @param {object} object
* @param {string|string[]|number[]} path
*/
empty<T extends {}, TResult>(object: T, path: string):TResult;
/**
* @see objectPath.empty
*/
empty<T extends {}, TResult>(object: T, path: INumberArray):TResult;
/**
* @see objectPath.empty
*/
empty<T extends {}, TResult>(object: T, path: IStringArray):TResult;
/**
* @see objectPath.empty
*/
empty<T extends {}, TResult>(object: T, path: number):TResult;
/**
* @see objectPath.empty
*/
empty<T extends {}>(object: T):T;
/**
* @see objectPath.empty
*/
empty():void;
/*======== EnsureExists =========*/
/**
* Set a value if it doesn't exist, do nothing if it does
* @param {object} object
* @param {string|string[]|number|number[]} path
*/
ensureExists<T extends {}, TResult>(object: T, path: string, value: any):TResult;
/**
* @see objectPath.ensureExists
*/
ensureExists<T extends {}, TResult>(object: T, path: number, value: any):TResult;
/**
* @see objectPath.ensureExists
*/
ensureExists<T extends {}, TResult>(object: T, path: INumberArray, value: any):TResult;
/**
* @see objectPath.ensureExists
*/
ensureExists<T extends {}, TResult>(object: T, path: IStringArray, value: any):TResult;
/**
* @see objectPath.ensureExists
*/
ensureExists<T extends {}>(object: T): T;
/**
* @see objectPath.ensureExists
*/
ensureExists():void;
/*======== Insert =========*/
/**
* Insert an item in an array path
* @param {object} object
* @param {string|string[]|number|number[]} path
* @param {*} value
* @param {number} [at=0]
*/
insert<T extends {}>(object: T, path: string, value: any, at?: number):void;
/**
* @see objectPath.insert
*/
insert<T extends {}>(object: T, path: INumberArray, value: any, at?: number):void;
/**
* @see objectPath.insert
*/
insert<T extends {}>(object: T, path: IStringArray, value: any, at?: number):void;
/**
* @see objectPath.insert
*/
insert<T extends {}>(object: T, path: number, value: any, at?: number):void;
}
}
declare module 'objectPath' {
export = objectPath;
// Type definitions for objectPath v0.9.x
// Project: https://github.com/mariocasciaro/object-path
// Definitions by: Paulo Cesar <https://github.com/pocesar/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare var objectPath: objectPath.IObjectPathStatic;
declare module objectPath {
interface IStringArray {
[index: number]: string;
}
interface INumberArray {
[index: number]: number;
}
interface IObjectPathStatic {
/**
* Binds an object
*/
<T extends {}>(object: T): IObjectPathBound<T>;
/*======== Del =========*/
/**
* Deletes a member from object or array
* @param {object} object
* @param {string[]|string} path
* @return object
*/
del<T extends {}>(object: T, path: IStringArray): T;
/**
* @see objectPath.del
*/
del<T extends {}>(object: T, path: INumberArray): T;
/**
* @see objectPath.del
*/
del<T extends {}>(object: T, path: number): T;
/**
* @see objectPath.del
*/
del<T extends {}>(object: T, path: string): T;
/**
* @see objectPath.del
*/
del<T extends {}>(object: T): T;
/**
* @see objectPath.del
*/
del():void;
/*======== Has =========*/
/**
* Tests path existence
* @param {object} object
* @param {string[]|string} path
* @return object
*/
has<T extends {}>(object: T, path: IStringArray): boolean;
/**
* @see objectPath.has
*/
has<T extends {}>(object: T, path: INumberArray): boolean;
/**
* @see objectPath.has
*/
has<T extends {}>(object: T, path: string): boolean;
/**
* @see objectPath.has
*/
has<T extends {}>(object: T, path: number): boolean;
/**
* @see objectPath.has
*/
has<T extends {}>(object: T): boolean;
/**
* @see objectPath.has
*/
has(): boolean;
/*======== Get =========*/
/**
* Get a path from an object
* @param {object} object
* @param {string|string[]|number|number[]} path
* @param {*} [defaultValue=undefined]
*/
get<T extends {}, TResult>(object: T, path: string, defaultValue?: TResult): TResult;
/**
* @see objectPath.get
*/
get<T extends {}, TResult>(object: T, path: IStringArray, defaultValue?: TResult): TResult;
/**
* @see objectPath.get
*/
get<T extends {}, TResult>(object: T, path: number, defaultValue?: TResult): TResult;
/**
* @see objectPath.get
*/
get<T extends {}, TResult>(object: T, path: INumberArray, defaultValue?: TResult): TResult;
/**
* @see objectPath.get
*/
get<T extends {}>(object: T): T;
/**
* @see objectPath.get
*/
get():void;
/*======== Set =========*/
/**
* Set a path to a value
* @param {object} object
* @param {string|string[]|number|number[]} path
* @param {*} value
* @param {boolean} [doNotReplace=false]
* @return Any existing value on the path if any
*/
set<T extends {}, TExisting>(object: T, path: string, value: any, doNotReplace?:boolean): TExisting;
/**
* @see objectPath.set
*/
set<T extends {}, TExisting>(object: T, path: number, value: any, doNotReplace?:boolean): TExisting;
/**
* @see objectPath.set
*/
set<T extends {}, TExisting>(object: T, path: IStringArray, value: any, doNotReplace?:boolean): TExisting;
/**
* @see objectPath.set
*/
set<T extends {}, TExisting>(object: T, path: INumberArray, value: any, doNotReplace?:boolean): TExisting;
/**
* @see objectPath.set
*/
set<T extends {}>(object: T): T;
/**
* @see objectPath.set
*/
set():void;
/*======== Push =========*/
/**
* Create (if path isn't an array) and push the value to it. Can push unlimited number of values
* @param {object} object
*/
push<T extends {}>(object: T, path: INumberArray, ...args:any[]):void;
/**
* @see objectPath.push
*/
push<T extends {}>(object: T, path: IStringArray, ...args:any[]):void;
/**
* @see objectPath.push
*/
push<T extends {}>(object: T, path: number, ...args:any[]):void;
/**
* @see objectPath.push
*/
push<T extends {}>(object: T, path: string, ...args:any[]):void;
/**
* @see objectPath.push
*/
push():void;
/*======== Coalesce =========*/
/**
* Get the first non undefined property
* @param {object} object
* @param {string[]|string[][]|number[]|number[][]} paths
* @param {*} defaultValue
* @return {*}
*/
coalesce<T extends {}, TResult>(object: T, paths: IStringArray, defaultValue?: any):TResult;
/**
* @see objectPath.coalesce
*/
coalesce<T extends {}, TResult>(object: T, paths: INumberArray, defaultValue?: any):TResult;
/**
* @see objectPath.coalesce
*/
coalesce<T extends {}, TResult>(object: T, paths: IStringArray[], defaultValue?: any):TResult;
/**
* @see objectPath.coalesce
*/
coalesce<T extends {}, TResult>(object: T, paths: INumberArray[], defaultValue?: any):TResult;
/*======== Empty =========*/
/**
* Empty a path. Arrays are set to length 0, objects have all elements deleted, strings
* are set to empty, numbers to 0, everything else is set to null
* @param {object} object
* @param {string|string[]|number[]} path
*/
empty<T extends {}, TResult>(object: T, path: string):TResult;
/**
* @see objectPath.empty
*/
empty<T extends {}, TResult>(object: T, path: INumberArray):TResult;
/**
* @see objectPath.empty
*/
empty<T extends {}, TResult>(object: T, path: IStringArray):TResult;
/**
* @see objectPath.empty
*/
empty<T extends {}, TResult>(object: T, path: number):TResult;
/**
* @see objectPath.empty
*/
empty<T extends {}>(object: T):T;
/**
* @see objectPath.empty
*/
empty():void;
/*======== EnsureExists =========*/
/**
* Set a value if it doesn't exist, do nothing if it does
* @param {object} object
* @param {string|string[]|number|number[]} path
*/
ensureExists<T extends {}, TResult>(object: T, path: string, value: any):TResult;
/**
* @see objectPath.ensureExists
*/
ensureExists<T extends {}, TResult>(object: T, path: number, value: any):TResult;
/**
* @see objectPath.ensureExists
*/
ensureExists<T extends {}, TResult>(object: T, path: INumberArray, value: any):TResult;
/**
* @see objectPath.ensureExists
*/
ensureExists<T extends {}, TResult>(object: T, path: IStringArray, value: any):TResult;
/**
* @see objectPath.ensureExists
*/
ensureExists<T extends {}>(object: T): T;
/**
* @see objectPath.ensureExists
*/
ensureExists():void;
/*======== Insert =========*/
/**
* Insert an item in an array path
* @param {object} object
* @param {string|string[]|number|number[]} path
* @param {*} value
* @param {number} [at=0]
*/
insert<T extends {}>(object: T, path: string, value: any, at?: number):void;
/**
* @see objectPath.insert
*/
insert<T extends {}>(object: T, path: INumberArray, value: any, at?: number):void;
/**
* @see objectPath.insert
*/
insert<T extends {}>(object: T, path: IStringArray, value: any, at?: number):void;
/**
* @see objectPath.insert
*/
insert<T extends {}>(object: T, path: number, value: any, at?: number):void;
}
interface IObjectPathBound<T extends {}> {
/*======== Del =========*/
/**
* @see objectPath.ensureExists
*/
del(path: IStringArray): T;
/**
* @see objectPath.del
*/
del(path: INumberArray): T;
/**
* @see objectPath.del
*/
del(path: number): T;
/**
* @see objectPath.del
*/
del(path: string): T;
/**
* @see objectPath.del
*/
del(): T;
/*======== Has =========*/
/**
* @see objectPath.ensureExists
*/
has(path: IStringArray): boolean;
/**
* @see objectPath.has
*/
has(path: INumberArray): boolean;
/**
* @see objectPath.has
*/
has(path: string): boolean;
/**
* @see objectPath.has
*/
has(path: number): boolean;
/**
* @see objectPath.has
*/
has(): boolean;
/*======== Get =========*/
/**
* @see objectPath.ensureExists
*/
get<TResult>(path: string, defaultValue?: TResult): TResult;
/**
* @see objectPath.get
*/
get<TResult>(path: IStringArray, defaultValue?: TResult): TResult;
/**
* @see objectPath.get
*/
get<TResult>(path: number, defaultValue?: TResult): TResult;
/**
* @see objectPath.get
*/
get<TResult>(path: INumberArray, defaultValue?: TResult): TResult;
/**
* @see objectPath.get
*/
get(): T;
/*======== Set =========*/
/**
* @see objectPath.ensureExists
*/
set<TExisting>(path: string, value: any, doNotReplace?:boolean): TExisting;
/**
* @see objectPath.set
*/
set<TExisting>(path: number, value: any, doNotReplace?:boolean): TExisting;
/**
* @see objectPath.set
*/
set<TExisting>(path: IStringArray, value: any, doNotReplace?:boolean): TExisting;
/**
* @see objectPath.set
*/
set<TExisting>(path: INumberArray, value: any, doNotReplace?:boolean): TExisting;
/**
* @see objectPath.set
*/
set(): T;
/*======== Push =========*/
/**
* @see objectPath.ensureExists
*/
push(path: INumberArray, ...args:any[]):void;
/**
* @see objectPath.push
*/
push(path: IStringArray, ...args:any[]):void;
/**
* @see objectPath.push
*/
push(path: number, ...args:any[]):void;
/**
* @see objectPath.push
*/
push(path: string, ...args:any[]):void;
/**
* @see objectPath.push
*/
push():void;
/*======== Coalesce =========*/
/**
* @see objectPath.ensureExists
*/
coalesce<TResult>(paths: IStringArray, defaultValue?: any):TResult;
/**
* @see objectPath.coalesce
*/
coalesce<TResult>(paths: INumberArray, defaultValue?: any):TResult;
/**
* @see objectPath.coalesce
*/
coalesce<TResult>(paths: IStringArray[], defaultValue?: any):TResult;
/**
* @see objectPath.coalesce
*/
coalesce<TResult>(paths: INumberArray[], defaultValue?: any):TResult;
/*======== Empty =========*/
/**
* @see objectPath.ensureExists
*/
empty<TResult>(path: string):TResult;
/**
* @see objectPath.empty
*/
empty<TResult>(path: INumberArray):TResult;
/**
* @see objectPath.empty
*/
empty<TResult>(path: IStringArray):TResult;
/**
* @see objectPath.empty
*/
empty<TResult>(path: number):TResult;
/**
* @see objectPath.empty
*/
empty():T;
/*======== EnsureExists =========*/
/**
* @see objectPath.ensureExists
*/
ensureExists<TResult>(path: string, value: any):TResult;
/**
* @see objectPath.ensureExists
*/
ensureExists<TResult>(path: number, value: any):TResult;
/**
* @see objectPath.ensureExists
*/
ensureExists<TResult>(path: INumberArray, value: any):TResult;
/**
* @see objectPath.ensureExists
*/
ensureExists<TResult>(path: IStringArray, value: any):TResult;
/**
* @see objectPath.ensureExists
*/
ensureExists(): T;
/*======== Insert =========*/
/**
* @see objectPath.insert
*/
insert(path: string, value: any, at?: number):void;
/**
* @see objectPath.insert
*/
insert(path: INumberArray, value: any, at?: number):void;
/**
* @see objectPath.insert
*/
insert(path: IStringArray, value: any, at?: number):void;
/**
* @see objectPath.insert
*/
insert(path: number, value: any, at?: number):void;
}
}
// browser version
declare module 'objectPath' {
export = objectPath;
}
// node version
declare module 'object-path' {
export = objectPath;
}
+16
View File
@@ -0,0 +1,16 @@
/// <reference path="../node/node.d.ts" />
/// <reference path="./on-finished.d.ts" />
import events = require('events');
import onFinished = require('on-finished');
function test_finished() {
var e = new events.EventEmitter();
var ret: NodeJS.EventEmitter = onFinished(e, () => {
//callback
});
var finished: boolean = onFinished.isFinished(e);
}
+18
View File
@@ -0,0 +1,18 @@
// Type definitions for on-finished v2.2.0
// Project: https://github.com/jshttp/on-finished
// Definitions by: Honza Dvorsky <http://github.com/czechboy0>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module 'on-finished' {
function onFinished(msg:NodeJS.EventEmitter, listener:Function): NodeJS.EventEmitter;
module onFinished {
export function isFinished(msg:NodeJS.EventEmitter):boolean;
}
export = onFinished;
}
+20
View File
@@ -0,0 +1,20 @@
/// <reference path="on-headers.d.ts"/>
import http = require('http')
import onHeaders = require('on-headers')
http.createServer(onRequest)
.listen(3000);
function onRequest(req: http.ServerRequest, res: http.ServerResponse) {
onHeaders(res, addPoweredBy);
res.setHeader('Content-Type', 'text/plain')
res.end('hello!');
}
function addPoweredBy(): void {
// set if not set by end of request
if (!this.getHeader('X-Powered-By')) {
this.setHeader('X-Powered-By', 'Node.js');
}
}
+33
View File
@@ -0,0 +1,33 @@
// Type definitions for serve-favicon 2.1.6
// Project: https://github.com/jshttp/on-headers
// Definitions by: John Jeffery <https://github.com/jjeffery/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module "on-headers" {
import http = require("http");
/**
* This will add the listener to fire when headers are emitted for res.
* The listener is passed the response object as its context (this).
* Headers are considered emitted only once, right before they
* are sent to the client.
*
* When this is called multiple times on the same res, the listeners
* are fired in the reverse order they were added.
*
* @param res HTTP server response object
* @param listener Function to call prior to headers being emitted,
* the response object is passed as this context.
*/
function onHeaders(res: http.ServerResponse, listener: Function):void;
// Note that this definition might be able to be improved in a future
// version of typescript. At the moment it is not possible to declare
// the type of the 'this' context for a function, but it might be included
// in a future typescript version.
// https://github.com/Microsoft/TypeScript/issues/229
export = onHeaders;
}
+216
View File
@@ -0,0 +1,216 @@
/// <reference path="onsenui.d.ts" />
function onsStatic(): void {
ons.ready(function(): void {
alert('Ready!');
});
ons.bootstrap();
ons.enableAutoStatusBarFill();
ons.disableAutoStatusBarFill();
ons.findParentComponentUntil('ons-page');
ons.findComponent('.class1');
ons.setDefaultDeviceBackButtonListener(null);
ons.disableDeviceBackButtonHandler();
ons.enableDeviceBackButtonHandler();
ons.isReady();
var content: HTMLElement = document.getElementById('#my-content');
content.innerHTML = '<ons-button>Test Button</ons-button>';
ons.compile(content);
ons.isWebView();
ons.createAlertDialog('myPage.html');
ons.createDialog('myPage.html');
ons.createPopover('myPage.html');
var options: alertOptions = {
message: 'text message'
};
ons.notification.alert(options);
ons.notification.confirm(options);
ons.notification.prompt(options);
var potrait: boolean = ons.orientation.isPortrait();
var isLandscape: boolean = ons.orientation.isLandscape();
ons.orientation.on('eventName', null);
ons.orientation.once('eventName', null);
ons.orientation.off('eventName', null);
var web: boolean = ons.platform.isWebView();
var ios: boolean = ons.platform.isIOS();
var iPhone: boolean = ons.platform.isIPhone();
var iPad: boolean = ons.platform.isIPad();
var blackBerry: boolean = ons.platform.isBlackBerry();
var opera: boolean = ons.platform.isOpera();
var firefox: boolean = ons.platform.isFirefox();
var safari: boolean = ons.platform.isSafari();
var chrome: boolean = ons.platform.isChrome();
var ie: boolean = ons.platform.isIE();
var ios7above: boolean = ons.platform.isIOS7above();
}
function onsPage(page: PageView): void {
var DBBHandler: any = page.getDeviceBackButtonHandler();
}
function onsCarousel(carousel: CarouselView): void {
carousel.next();
carousel.prev();
carousel.first();
carousel.last();
carousel.setSwipeable(true);
var swipeable: boolean = carousel.isSwipeable();
carousel.setActiveCarouselItemIndex(0);
carousel.getActiveCarouselItemIndex();
var autoScrollEnabled: boolean = carousel.isAutoScrollEnabled();
carousel.setAutoScrollEnabled(true);
carousel.getAutoScrollRatio();
carousel.setOverscrollable(true);
var overscrollable: boolean = carousel.isOverscrollable();
carousel.refresh();
var disabled: boolean = carousel.isDisabled();
carousel.setDisabled(false);
carousel.on('eventName', null);
carousel.once('eventName', null);
carousel.off('eventName', null);
}
function onsPullHook(pullHook: PullHookView): void {
pullHook.setDisabled(false);
var disabled: boolean = pullHook.isDisabled();
pullHook.setHeight(15);
pullHook.setThresholdHeight(4);
pullHook.on('eventName', null);
pullHook.once('eventName', null);
pullHook.off('eventName', null);
}
function onsSplitView(splitViewVar: SplitView): void {
splitViewVar.setMainPage('myPage.html');
splitViewVar.setSecondaryPage('myPage2.html');
splitViewVar.update();
splitViewVar.on('eventName', null);
splitViewVar.once('eventName', null);
splitViewVar.off('eventName', null);
}
function onsAlertDialog(alertDialog: AlertDialogView): void {
var options: dialogOptions = {
animation: 'default'
};
alertDialog.show(options);
alertDialog.hide(options);
var shown: boolean = alertDialog.isShown();
alertDialog.destroy();
alertDialog.setCancelable(true);
var cancelable: boolean = alertDialog.isCancelable();
alertDialog.setDisabled(false);
var disabled: boolean = alertDialog.isDisabled();
alertDialog.on('eventName', null);
alertDialog.once('eventName', null);
alertDialog.off('eventName', null);
}
function onsDialog(dialog: DialogView): void {
var options: dialogOptions = {
animation: 'default'
};
dialog.show(options);
dialog.hide(options);
var shown: boolean = dialog.isShown();
dialog.destroy();
var DBBHandler: any = dialog.getDeviceBackButtonHandler();
dialog.setCancelable(true);
var cancelable: boolean = dialog.isCancelable();
dialog.setDisabled(false);
var disabled: boolean = dialog.isDisabled();
dialog.on('eventName', null);
dialog.once('eventName', null);
dialog.off('eventName', null);
}
function onsButton(button: ButtonView): void {
button.startSpin();
button.stopSpin();
var spinning: boolean = button.isSpinning();
button.setSpinAnimation('slide-left');
button.setDisabled(false);
var disabled: boolean = button.isDisabled();
}
function onsSwitch(switchVar: SwitchView): void {
var checked: boolean = switchVar.isChecked();
switchVar.setChecked(true);
var checkbox: HTMLElement = switchVar.getCheckboxElement();
switchVar.on('eventName', null);
switchVar.once('eventName', null);
switchVar.off('eventName', null);
}
function onsModal(modal: ModalView): void {
modal.toggle();
modal.show();
modal.hide();
var DBBHandler: boolean = modal.getDeviceBackButtonHandler();
}
function onsNavigator(navigator: NavigatorView): void {
var options: navigatorOptions = {
animation: 'slide'
};
navigator.pushPage('myPage.html');
navigator.insertPage(2, 'myPage2.html');
navigator.popPage();
navigator.resetToPage('myPage.html');
var currentPage: any = navigator.getCurrentPage();
var pages: objectArray = navigator.getPages();
var DBBHandler: any = navigator.getDeviceBackButtonHandler();
navigator.on('eventName', null);
navigator.once('eventName', null);
navigator.off('eventName', null);
}
function onsSlidingMenu(slidingMenu: SlidingMenuView): void {
var options: slidingMenuOptions = {
closeMenu: true
};
slidingMenu.setMainPage('myPage.html', options);
slidingMenu.setMenuPage('myMenu.html', options);
slidingMenu.openMenu(options);
slidingMenu.closeMenu(options);
slidingMenu.toggleMenu(options);
var opened: boolean = slidingMenu.isMenuOpened();
var DBBHandler: any = slidingMenu.getDeviceBackButtonHandler();
slidingMenu.setSwipeable(true);
slidingMenu.on('eventName', null);
slidingMenu.once('eventName', null);
slidingMenu.off('eventName', null);
}
function onsTabbar(tabBar: TabbarView): void {
var options: tabbarOptions = {
keepPage: true
};
tabBar.setActiveTab(2, options);
var activeTab: number = tabBar.getActiveTab();
tabBar.loadPage('myPage.html');
tabBar.on('eventName', null);
tabBar.once('eventName', null);
tabBar.off('eventName', null);
}
function onsPopover(popover: PopoverView): void {
var options: popoverOptions = {
animation: 'fade'
}
popover.show('#element5', options);
popover.hide(options);
var shown: boolean = popover.isShown();
popover.destroy();
popover.setCancelable(true);
var cancelable: boolean = popover.isCancelable();
popover.setDisabled(true);
var disabled: boolean = popover.isDisabled();
popover.on('eventName', null);
popover.once('eventName', null);
popover.off('eventName', null);
}
+1017
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -13,6 +13,7 @@ declare module 'passport-local' {
interface IStrategyOptions {
usernameField?: string;
passwordField?: string;
passReqToCallback?: boolean;
}
interface IVerifyOptions {
@@ -20,6 +21,7 @@ declare module 'passport-local' {
}
interface VerifyFunction {
(req: express.Request, username: string, password: string, done: (error: any, user?: any, options?: IVerifyOptions) => void): void;
(username: string, password: string, done: (error: any, user?: any, options?: IVerifyOptions) => void): void;
}
+5 -5
View File
@@ -1211,11 +1211,11 @@ declare module THREE {
getObjectByProperty( name: string, value: string, recursive?: boolean ): Object3D;
getWorldPosition(optionalTarget: Vector3): Vector3;
getWorldQuaternion(optionalTarget: Quaternion): Quaternion;
getWorldRotation(optionalTarget: Euler): Euler;
getWorldScale(optionalTarget: Vector3): Vector3;
getWorldDirection(optionalTarget: Vector3): Vector3;
getWorldPosition(optionalTarget?: Vector3): Vector3;
getWorldQuaternion(optionalTarget?: Quaternion): Quaternion;
getWorldRotation(optionalTarget?: Euler): Euler;
getWorldScale(optionalTarget?: Vector3): Vector3;
getWorldDirection(optionalTarget?: Vector3): Vector3;
/**
* Translates object along arbitrary axis by distance.
@@ -0,0 +1,39 @@
/// <reference path="webcomponents.js.d.ts" />
/*
* Custom Elements
*/
var fooProto = Object.create(HTMLElement.prototype, {
createdCallback() {
// `this` should be the created element
this.getElementsByTagName("a");
}
});
document.registerElement("x-foo", {
prototype: fooProto
});
window.CustomElements.hasNative;
window.CustomElements.flags;
window.CustomElements.ready;
window.CustomElements.useNative;
/*
* HTMLImports
*/
window.HTMLImports.isIE;
window.HTMLImports.rootDocument.querySelectorAll("div");
window.HTMLImports.useNative;
window.HTMLImports.whenReady(() => {
return window.HTMLImports.ready === true;
});
document.querySelectorAll(`link[type=${window.HTMLImports.IMPORT_LINK_TYPE}`);
/*
* Web Components
*/
window.WebComponents.flags;
+48
View File
@@ -0,0 +1,48 @@
// Type definitions for webcomponents.js 0.6.0
// Project: https://github.com/webcomponents/webcomponentsjs
// Definitions by: Adi Dahiya <https://github.com/adidahiya>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module webcomponents {
export interface CustomElementInit {
prototype: HTMLElement;
extends?: string;
}
export interface CustomElementsPolyfill {
hasNative: boolean;
flags: any;
ready: boolean;
useNative: boolean;
}
export interface HTMLImportsPolyfill {
IMPORT_LINK_TYPE: string;
isIE: boolean;
flags: any;
ready: boolean;
rootDocument: Document;
useNative: boolean;
whenReady(callback: () => void): void;
}
export interface Polyfill {
flags: any;
}
}
declare module "webcomponents.js" {
export = webcomponents;
}
interface Document {
registerElement(name: string, prototype: webcomponents.CustomElementInit): void;
}
interface Window {
CustomElements: webcomponents.CustomElementsPolyfill;
HTMLImports: webcomponents.HTMLImportsPolyfill;
WebComponents: webcomponents.Polyfill;
}
+11 -1
View File
@@ -11,6 +11,16 @@ function test_fetchUrlWithOptions() {
handlePromise(window.fetch("http://www.andlabs.net/html5/uCOR.php", requestOptions));
}
function test_fetchUrlWithHeadersObject() {
var requestOptions: RequestInit = {
method: "POST",
headers: {
'Content-Type': 'application/json'
}
};
handlePromise(window.fetch("http://www.andlabs.net/html5/uCOR.php", requestOptions));
}
function test_fetchUrl() {
handlePromise(window.fetch("http://www.andlabs.net/html5/uCOR.php"));
}
@@ -21,4 +31,4 @@ function handlePromise(promise: Promise<Response>) {
}).then((text) => {
console.log(text);
});
}
}
+2 -2
View File
@@ -19,7 +19,7 @@ declare class Request {
interface RequestInit {
method?: string;
headers?: HeaderInit;
headers?: HeaderInit|{ [index: string]: string };
body?: BodyInit;
mode?: RequestMode;
credentials?: RequestCredentials;
@@ -81,4 +81,4 @@ declare type RequestInfo = Request|string;
interface Window {
fetch(url: string, init?: RequestInit): Promise<Response>;
}
}