Merge pull request #1 from borisyankov/master

sync main master with czechboy0 master
This commit is contained in:
Honza Dvorsky
2015-04-02 15:02:38 +02:00
71 changed files with 12334 additions and 603 deletions
+45 -14
View File
@@ -19,7 +19,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](angularjs/angular-resource.d.ts) [Angular JS (ngResource module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar), [Michael Jess](http://github.com/miffels)
* [:link:](angularjs/angular-route.d.ts) [Angular JS (ngRoute module)](http://angularjs.org) by [Jonathan Park](https://github.com/park9140)
* [:link:](angularjs/angular-sanitize.d.ts) [Angular JS (ngSanitize module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar)
* [:link:](angular-ui/angular-ui-router.d.ts) [Angular JS (ui.router module)](https://github.com/angular-ui/ui-router) by [Michel Salib](https://github.com/michelsalib)
* [:link:](angular-ui-router/angular-ui-router.d.ts) [Angular JS (ui.router module)](https://github.com/angular-ui/ui-router) by [Michel Salib](https://github.com/michelsalib)
* [:link:](angular-material/angular-material.d.ts) [Angular Material (ng.material module)](https://github.com/angular/material) by [Matt Traynham](https://github.com/mtraynham)
* [:link:](angular-protractor/angular-protractor.d.ts) [Angular Protractor](https://github.com/angular/protractor) by [Bill Armstrong](https://github.com/BillArmstrong)
* [:link:](angular-scenario/angular-scenario.d.ts) [Angular Scenario Testing (ngScenario module)](http://angularjs.org) by [RomanoLindano](https://github.com/RomanoLindano)
@@ -32,7 +32,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](angular-notify/angular-notify.d.ts) [angular-notify](https://github.com/cgross/angular-notify) by [Suwato](https://github.com/Suwato/DefinitelyTyped)
* [:link:](angular-scroll/angular-scroll.d.ts) [angular-scroll](https://github.com/oblador/angular-scroll) by [Sam Herrmann](https://github.com/samherrmann)
* [:link:](angular-spinner/angular-spinner.d.ts) [angular-spinner.js](https://github.com/urish/angular-spinner) by [Marcin Biegała](https://github.com/Biegal)
* [:link:](angular-ui/angular-ui-sortable.d.ts) [angular.ui.sortable module](https://github.com/angular-ui/ui-sortable) by [Thodoris Greasidis](https://github.com/thgreasi)
* [:link:](angular-ui-sortable/angular-ui-sortable.d.ts) [angular.ui.sortable module](https://github.com/angular-ui/ui-sortable) by [Thodoris Greasidis](https://github.com/thgreasi)
* [:link:](angular-agility/angular-agility.d.ts) [AngularAgility](https://github.com/AngularAgility/AngularAgility) by [Roland Zwaga](https://github.com/rolandzwaga)
* [:link:](angularfire/angularfire.d.ts) [AngularFire](http://angularfire.com) by [Dénes Harmath](http://github.com/thSoft)
* [:link:](angularLocalStorage/angularLocalStorage.d.ts) [AngularLocalStorage](https://github.com/agrublev/angularLocalStorage) by [Horiuchi_H](https://github.com/horiuchi)
@@ -57,11 +57,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](atpl/atpl.d.ts) [atpl](https://github.com/soywiz/atpl.js) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](auth0/auth0.d.ts) [Auth0.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
* [:link:](auth0.widget/auth0.widget.d.ts) [Auth0Widget.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
* [:link:](autobahn/autobahn.d.ts) [AutobahnJS](http://autobahn.ws/js) by [Elad Zelingher](https://github.com/darkl)
* [:link:](aws-sdk/aws-sdk.d.ts) [aws-sdk](https://github.com/aws/aws-sdk-js) by [midknight41](https://github.com/midknight41)
* [:link:](axios/axios.d.ts) [axios](https://github.com/mzabriskie/axios) by [Marcel Buesing](https://github.com/marcelbuesing)
* [:link:](node-azure/azure.d.ts) [Azure SDK for Node](https://github.com/WindowsAzure/azure-sdk-for-node) by [Andrew Gaspar](https://github.com/AndrewGaspar), [Anti Veeranna](https://github.com/antiveeranna), [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](backbone/backbone.d.ts) [Backbone](http://backbonejs.org) by [Boris Yankov](https://github.com/borisyankov), [Natan Vivo](https://github.com/nvivo)
* [:link:](backbone-relational/backbone-relational.d.ts) [Backbone-relational](http://backbonerelational.org) by [Eirik Hoem](https://github.com/eirikhm)
* [:link:](backbone.layoutmanager/backbone.layoutmanager.d.ts) [Backbone.LayoutManager](http://layoutmanager.org) by [He Jiang](https://github.com/hejiang2000)
* [:link:](backbone.paginator/backbone.paginator.d.ts) [backbone.paginator](https://github.com/backbone-paginator/backbone.paginator) by [Nyamazing](https://github.com/Nyamazing)
* [:link:](backbone.radio/backbone.radio.d.ts) [Backbone.Radio](https://github.com/marionettejs/backbone.radio) by [Peter Palotas](https://github.com/alphaleonis)
* [:link:](backgrid/backgrid.d.ts) [Backgrid](http://backgridjs.com) by [Jeremy Lujan](https://github.com/jlujan)
* [:link:](bcrypt/bcrypt.d.ts) [bcrypt](https://www.npmjs.org/package/bcrypt) by [Peter Harris](https://github.com/codeanimal)
@@ -81,8 +84,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](bootstrap-notify/bootstrap-notify.d.ts) [bootstrap-notify](https://github.com/Nijikokun/bootstrap-notify) by [Blake Niemyjski](https://github.com/niemyjski)
* [:link:](bootstrap.datepicker/bootstrap.datepicker.d.ts) [bootstrap.datepicker](https://github.com/eternicode/bootstrap-datepicker) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](bootstrap.paginator/bootstrap.paginator.d.ts) [bootstrap.paginator](https://github.com/lyonlai/bootstrap-paginator) by [derikwhittaker](https://github.com/derikwhittaker)
* [:link:](bootstrap.timepicker/bootstrap.timepicker.d.ts) [bootstrap.timepicker](https://github.com/jdewit/bootstrap-timepicker) by [derikwhittaker](https://github.com/derikwhittaker)
* [:link:](box2d/box2dweb.d.ts) [bootstrap.timepicker](http://code.google.com/p/box2dweb) by [jbaldwin](https://github.com/jbaldwin)
* [:link:](bootstrap.timepicker/bootstrap.timepicker.d.ts) [bootstrap.timepicker](https://github.com/jdewit/bootstrap-timepicker) by [derikwhittaker](https://github.com/derikwhittaker)
* [:link:](breeze/breeze.d.ts) [Breeze 1.5.x](http://www.breezejs.com) by [Boris Yankov](https://github.com/borisyankov), [IdeaBlade](https://github.com/IdeaBlade/Breeze)
* [:link:](browser-harness/browser-harness.d.ts) [Browser Harness](https://github.com/scriby/browser-harness) by [Chris Scribner](https://github.com/scriby)
* [:link:](browser-sync/browser-sync.d.ts) [browser-sync](http://www.browsersync.io) by [Asana](https://asana.com)
@@ -135,6 +138,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](createjs/createjs.d.ts) [CreateJS](http://www.createjs.com) by [Pedro Ferreira](https://bitbucket.org/drk4), [Chris Smith](https://github.com/evilangelist), [Satoru Kimura](https://github.com/gyohk)
* [:link:](crossfilter/crossfilter.d.ts) [CrossFilter](https://github.com/square/crossfilter) by [Schmulik Raskin](https://github.com/schmuli)
* [:link:](crossroads/crossroads.d.ts) [Crossroads.js](http://millermedeiros.github.io/crossroads.js) by [Diullei Gomes](https://github.com/diullei)
* [:link:](crypto-js/crypto-js.d.ts) [crypto-js](https://github.com/evanvosberg/crypto-js) by [Michael Zabka](https://github.com/misak113)
* [:link:](cryptojs/cryptojs.d.ts) [CryptoJS](https://code.google.com/p/crypto-js) by [Gia Bảo @ Sân Đình](https://github.com/giabao)
* [:link:](googlemaps.infobubble/google.maps.infobubble.d.ts) [CSS3 InfoBubble with tabs for Google Maps API V3](http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobubble/src) by [Johan Nilsson](https://github.com/Dashue)
* [:link:](csurf/csurf.d.ts) [csurf](https://www.npmjs.org/package/csurf) by [Hiroki Horiuchi](https://github.com/horiuchi)
@@ -143,6 +147,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](d3/d3.d.ts) [d3JS](http://d3js.org) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](d3.cloud.layout/d3.cloud.layout.d.ts) [d3JS cloud layout plugin by Jason Davies](https://github.com/jasondavies/d3-cloud) by [hans windhoff](https://github.com/hansrwindhoff)
* [:link:](dagre/dagre.d.ts) [dagre](https://github.com/cpettitt/dagre) by [Qinfeng Chen](https://github.com/qinfchen)
* [:link:](dagre-d3/dagre-d3.d.ts) [dagre-d3.core.js](https://github.com/cpettitt/dagre-d3) by [Mark Wong Siang Kai](https://github.com/markwongsk)
* [:link:](dat-gui/dat-gui.d.ts) [dat.GUI](https://github.com/dataarts/dat.gui) by [Satoru Kimura](https://github.com/gyohk)
* [:link:](date.format.js/date.format.d.ts) [Date Format](http://blog.stevenlevithan.com/archives/date-time-format) by [Rob Stutton](https://github.com/balrob)
* [:link:](datejs/datejs.d.ts) [DateJS](http://www.datejs.com) by [David Khristepher Santos](http://github.com/rupertavery)
@@ -208,6 +213,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](fancybox/fancybox.d.ts) [fancyBox](https://github.com/fancyapps/fancyBox) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](fast-stats/fast-stats.d.ts) [fast-stats](https://github.com/bluesmoon/node-faststats) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](fastclick/fastclick.d.ts) [FastClick](https://github.com/ftlabs/fastclick) by [Shinnosuke Watanabe](https://github.com/shinnn)
* [:link:](whatwg-fetch/whatwg-fetch.d.ts) [fetch API](https://github.com/github/fetch) by [Ryan Graham](https://github.com/ryan-codingintrigue)
* [:link:](fibers/fibers.d.ts) [fibers](https://github.com/laverdet/node-fibers) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](filewriter/filewriter.d.ts) [File API: Writer](http://www.w3.org/TR/file-writer-api) by [Kon](http://phyzkit.net)
* [:link:](filesystem/filesystem.d.ts) [File System API](http://www.w3.org/TR/file-system-api) by [Kon](http://phyzkit.net)
@@ -231,7 +237,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](fpsmeter/FPSMeter.d.ts) [FPSmeter](http://darsa.in/fpsmeter) by [Aaron Lampros](http://github.com/alampros)
* [:link:](from/from.d.ts) [from](https://github.com/dominictarr/from) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](fs-extra/fs-extra.d.ts) [fs-extra](https://github.com/jprichardson/node-fs-extra) by [midknight41](https://github.com/midknight41)
* [:link:](fs-finder/fs-finder.d.ts) [fs-finder](https://github.com/sakren/node-fs-finder) by [Michael Zabka](https://github.com/misak113)
* [:link:](fs-mock/fs-mock.d.ts) [fs-mock](https://github.com/sakren/node-fs-mock) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](ftdomdelegate/ftdomdelegate.d.ts) [ftdomdelegate](https://github.com/ftlabs/ftdomdelegate) by [Christian Holm Nielsen](https://github.com/dotnetnerd)
* [:link:](ftp/ftp.d.ts) [ftp](https://github.com/mscdex/node-ftp) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](ftpd/ftpd.d.ts) [ftpd](https://github.com/sstur/nodeftpd) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](fullCalendar/fullCalendar.d.ts) [FullCalendar](http://arshaw.com/fullcalendar) by [Neil Stalker](https://github.com/nestalk)
* [:link:](fuse/fuse.d.ts) [Fuse.js](https://github.com/krisk/Fuse) by [Greg Smith](https://github.com/smrq)
* [:link:](jquery-galleria/jquery-galleria.d.ts) [galleria.js](https://github.com/aino/galleria) by [Robert Imig](https://github.com/rimig)
@@ -250,8 +260,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](google.analytics/ga.d.ts) [Google Analytics (Classic and Universal)](https://developers.google.com/analytics/devguides/collection/gajs) by [Ronnie Haakon Hegelund](http://ronniehegelund.blogspot.dk), [Pat Kujawa](http://patkujawa.com)
* [:link:](gapi/gapi.d.ts) [Google API Client](https://code.google.com/p/google-api-javascript-client) by [Frank M](https://github.com/sgtfrankieboy)
* [:link:](google.feeds/google.feed.api.d.ts) [Google Feed Apis](https://developers.google.com/feed) by [RodneyJT](https://github.com/RodneyJT)
* [:link:](googlemaps/google.maps.d.ts) [Google Geolocation](https://developers.google.com/maps) by [Folia A/S](http://www.folia.dk)
* [:link:](google.geolocation/google.geolocation.d.ts) [Google Geolocation](https://code.google.com/p/geo-location-javascript) by [Vincent Bortone](https://github.com/vbortone)
* [:link:](googlemaps/google.maps.d.ts) [Google Geolocation](https://developers.google.com/maps) by [Folia A/S](http://www.folia.dk)
* [:link:](gapi.pagespeedonline/gapi.pagespeedonline.d.ts) [Google Page Speed Online Api](https://developers.google.com/speed/pagespeed) by [Frank M](https://github.com/sgtfrankieboy)
* [:link:](google.picker/google.picker.d.ts) [Google Picker API](https://developers.google.com/picker) by [grapswiz](https://github.com/grapswiz)
* [:link:](recaptcha/recaptcha.d.ts) [Google Recaptcha](https://www.google.com/recaptcha) by [Brent Jenkins](https://github.com/brentj73)
@@ -264,9 +274,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](greensock/greensock.d.ts) [GreenSock Animation Platform](http://www.greensock.com/get-started-js) by [Robert S](https://github.com/codebelt)
* [:link:](gridfs-stream/gridfs-stream.d.ts) [gridfs-stream](https://github.com/aheckmann/gridfs-stream) by [Lior Mualem](https://github.com/liorm)
* [:link:](gruntjs/gruntjs.d.ts) [Grunt 0.4.x](http://gruntjs.com) by [Jeff May](https://github.com/jeffmay), [Basarat Ali Syed](https://github.com/basarat)
* [:link:](gsap/TweenLite.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gsap/Ease.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gsap/Core.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gsap/Ease.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gsap/TweenLite.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
* [:link:](gulp/gulp.d.ts) [Gulp v3.8.x](http://gulpjs.com) by [Drew Noakes](https://drewnoakes.com)
* [:link:](gulp-autoprefixer/gulp-autoprefixer.d.ts) [gulp-autoprefixer](https://github.com/sindresorhus/gulp-autoprefixer) by [Asana](https://asana.com)
* [:link:](gulp-concat/gulp-concat.d.ts) [gulp-concat](http://github.com/wearefractal/gulp-concat) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
@@ -290,6 +300,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](hammerjs/hammerjs.d.ts) [Hammer.js](http://hammerjs.github.io) by [Philip Bulley](https://github.com/milkisevil), [Han Lin Yap](https://github.com/codler)
* [:link:](handlebars/handlebars.d.ts) [Handlebars](http://handlebarsjs.com) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](hapi/hapi.d.ts) [hapi](http://github.com/spumko/hapi) by [Jason Swearingen](http://github.com/jasonswearingen)
* [:link:](hasher/hasher.d.ts) [Hasher.js](https://github.com/millermedeiros/hasher) by [flyfishMT](https://github.com/flyfishMT)
* [:link:](hashmap/hashmap.d.ts) [HashMap](https://github.com/flesler/hashmap) by [Rafał Wrzeszcz](http://wrzasq.pl)
* [:link:](Headroom/headroom.d.ts) [headroom.js](http://wicky.nillia.ms/headroom.js) by [Jakub Olek](https://github.com/hakubo)
* [:link:](heatmap.js/heatmap.d.ts) [heatmap.js](https://github.com/pa7/heatmap.js) by [Yang Guan](https://github.com/lookuptable)
@@ -302,6 +313,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](touch-events/touch-events.d.ts) [HTML Touch Events](http://www.w3.org/TR/touch-events) by [Kevin Barabash](https://github.com/kevinb7)
* [:link:](html2canvas/html2canvas.d.ts) [html2canvas.js](https://github.com/niklasvh/html2canvas) by [Richard Hepburn](https://github.com/rwhepburn)
* [:link:](htmlparser2/htmlparser2.d.ts) [htmlparser2 v3.7.x](https://github.com/fb55/htmlparser2) by [James Roland Cabresos](https://github.com/staticfunction)
* [:link:](http-status/http-status.d.ts) [http-status](https://github.com/wdavidw/node-http-status) by [Michael Zabka](https://github.com/misak113)
* [:link:](http-string-parser/http-string-parser.d.ts) [http-string-parser](https://github.com/apiaryio/http-string-parser) by [MIZUNE Pine](https://github.com/pine613)
* [:link:](humane/humane.d.ts) [Humane](http://wavded.github.com/humane-js) by [jmvrbanac](https://github.com/jmvrbanac)
* [:link:](i18n-node/i18n-node.d.ts) [i18n-node](https://github.com/mashpie/i18n-node) by [Maxime LUCE](https://github.com/SomaticIT)
@@ -337,6 +349,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](jest/jest.d.ts) [Jest](http://facebook.github.io/jest) by [Asana](https://asana.com)
* [:link:](jjv/jjv.d.ts) [JJV](https://github.com/acornejo/jjv) by [Wim Looman](https://github.com/Nemo157)
* [:link:](jjve/jjve.d.ts) [JJVE](https://github.com/silas/jjve) by [Wim Looman](https://github.com/Nemo157)
* [:link:](johnny-five/johnny-five.d.ts) [johnny-five](https://github.com/rwaldron/johnny-five) by [Toshiya Nakakura](https://github.com/nakakura)
* [:link:](joi/joi.d.ts) [joi](https://github.com/spumko/joi) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](jointjs/jointjs.d.ts) [Joint JS](http://www.jointjs.com) by [Aidan Reel](http://github.com/areel), [David Durman](http://github.com/DavidDurman), [Ewout Van Gossum](https://github.com/DenEwout)
* [:link:](jqrangeslider/jqrangeslider.d.ts) [jQRangeSlider](http://ghusse.github.com/jQRangeSlider) by [Dániel Tar](https://github.com/qcz)
@@ -439,6 +452,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](keymaster/keymaster.d.ts) [keymaster](https://github.com/madrobby/keymaster) by [Martin W. Kirst](https://github.com/nitram509)
* [:link:](keypress/keypress.d.ts) [Keypress](https://github.com/dmauro/Keypress) by [Roger Chen](https://github.com/rcchen)
* [:link:](kineticjs/kineticjs.d.ts) [KineticJS](http://kineticjs.com) by [Basarat Ali Syed](http://www.github.com/basarat), [Ralph de Ruijter](http://www.superdopey.nl/techblog)
* [:link:](knex/knex.d.ts) [Knex.js](https://github.com/tgriesser/knex) by [Qubo](https://github.com/tkQubo)
* [:link:](knockback/knockback.d.ts) [Knockback.js](http://kmalakoff.github.io/knockback) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](knockout/knockout.d.ts) [Knockout](http://knockoutjs.com) by [Boris Yankov](https://github.com/borisyankov), [Igor Oleinikov](https://github.com/Igorbek), [Clément Bourgeois](https://github.com/moonpyk)
* [:link:](knockout.deferred.updates/knockout.deferred.updates.d.ts) [Knockout Deferred Updates](https://github.com/mbest/knockout-deferred-updates) by [Sebastián Galiano](https://github.com/sgaliano)
@@ -478,7 +492,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](log4javascript/log4javascript.d.ts) [log4javascript](http://log4javascript.org) by [Markus Wagner](https://github.com/Ritzlgrmft)
* [:link:](log4js/log4js.d.ts) [log4js](https://github.com/nomiddlename/log4js-node) by [Kentaro Okuno](http://github.com/armorik83)
* [:link:](logg/logg.d.ts) [logg](https://github.com/dpup/node-logg) by [Bret Little](https://github.com/blittle)
* [:link:](loggly/loggly.d.ts) [loggly](https://github.com/nodejitsu/node-loggly) by [Ray Martone](https://github.com/rmartone)
* [:link:](logrotate-stream/logrotate-stream.d.ts) [logrotate-stream](https://github.com/dstokes/logrotate-stream) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](lolex/lolex.d.ts) [lolex](https://github.com/sinonjs/lolex) by [Wim Looman](https://github.com/Nemo157)
* [:link:](long/long.d.ts) [Long.js](https://github.com/dcodeIO/Long.js) by [Toshihide Hara](https://github.com/kerug)
* [:link:](lru-cache/lru-cache.d.ts) [lru-cache](https://github.com/isaacs/node-lru-cache) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](lscache/lscache.d.ts) [lscache](https://github.com/pamelafox/lscache) by [Chris Martinez](https://github.com/Chris-Martinezz)
@@ -487,6 +503,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](main-bower-files/main-bower-files.d.ts) [main-bower-files](https://github.com/ck86/main-bower-files) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
* [:link:](mapbox/mapbox.d.ts) [Mapbox](https://www.mapbox.com/mapbox.js) by [Maxime Fabre](https://github.com/anahkiasen)
* [:link:](mapsjs/mapsjs.d.ts) [Mapsjs](https://github.com/mapsjs) by [Matthew James Davis](https://github.com/davismj)
* [:link:](mariasql/mariasql.d.ts) [mariasql](https://github.com/mscdex/node-mariasql) by [MichaelBennett](https://github.com/bennett000)
* [:link:](marionette/marionette.d.ts) [Marionette](https://github.com/marionettejs) by [Zeeshan Hamid](https://github.com/zhamid), [Natan Vivo](https://github.com/nvivo), [Sven Tschui](https://github.com/sventschui)
* [:link:](marked/marked.d.ts) [Marked](https://github.com/chjj/marked) by [William Orr](https://github.com/worr)
* [:link:](maskedinput/maskedinput.d.ts) [Masked Input plugin for jQuery](http://digitalbush.com/projects/masked-input-plugin) by [Lokesh Peta](https://github.com/lokeshpeta)
@@ -520,6 +537,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](mkpath/mkpath.d.ts) [mkpath](https://www.npmjs.com/package/mkpath) by [Jared Klopper](https://github.com/optical)
* [:link:](mocha/mocha.d.ts) [mocha](http://mochajs.org) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid), [otiai10](https://github.com/otiai10), [jt000](https://github.com/jt000)
* [:link:](mocha-phantomjs/mocha-phantomjs.d.ts) [mocha-phantomjs](http://metaskills.net/mocha-phantomjs) by [Erik Schierboom](https://github.com/ErikSchierboom)
* [:link:](mock-fs/mock-fs.d.ts) [mock-fs](https://github.com/tschaub/mock-fs) by [Wim Looman](https://github.com/Nemo157)
* [:link:](mockery/mockery.d.ts) [mockery](https://github.com/mfncooper/mockery) by [jt000](https://github.com/jt000)
* [:link:](modernizr/modernizr.d.ts) [Modernizr](http://modernizr.com) by [Boris Yankov](https://github.com/borisyankov), [Theodore Brown](https://github.com/theodorejb)
* [:link:](moment-timezone/moment-timezone.d.ts) [moment-timezone.js](http://momentjs.com/timezone) by [Michel Salib](https://github.com/michelsalib)
@@ -536,6 +554,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](localForage/localForage.d.ts) [Mozilla's localForage](https://github.com/mozilla/localforage) by [david pichsenmeister](https://github.com/3x14159265)
* [:link:](msgpack/msgpack.d.ts) [msgpack.js - MessagePack JavaScript Implementation](https://github.com/uupaa/msgpack.js) by [Shinya Mochizuki](https://github.com/enrapt-mochizuki)
* [:link:](msnodesql/msnodesql.d.ts) [msnodesql](https://github.com/WindowsAzure/node-sqlserver) by [Boris Yankov](https://github.com/borisyankov), [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](mssql/mssql.d.ts) [mssql](https://www.npmjs.com/package/mssql) by [COLSA Corporation](http://www.colsa.com)
* [:link:](mu2/mu2.d.ts) [mu2](http://github.com/raycmorgan/mu) by [Jeff Goddard](https://github.com/jedigo)
* [:link:](multer/multer.d.ts) [multer](https://github.com/expressjs/multer) by [jt000](https://github.com/jt000)
* [:link:](mustache/mustache.d.ts) [Mustache](https://github.com/janl/mustache.js) by [Mark Ashley Bell](https://github.com/markashleybell)
@@ -581,12 +600,15 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](nodeunit/nodeunit.d.ts) [nodeunit](https://github.com/caolan/nodeunit) by [Jeff Goddard](https://github.com/jedigo)
* [:link:](nomnom/nomnom.d.ts) [nomnom](https://github.com/harthur/nomnom) by [Paul Vick](https://github.com/panopticoncentral)
* [:link:](nopt/nopt.d.ts) [nopt](https://github.com/npm/nopt) by [jbondc](https://github.com/jbondc)
* [:link:](notify/notify.d.ts) [Notify.js](https://github.com/jpillora/notifyjs) by [Xiaohan Zhang](https://github.com/hellochar)
* [:link:](notifyjs/notifyjs.d.ts) [notify.js](https://github.com/alexgibson/notify.js) by [soundTricker](https://github.com/soundTricker)
* [:link:](notify/notify.d.ts) [Notify.js](https://github.com/jpillora/notifyjs) by [Xiaohan Zhang](https://github.com/hellochar)
* [:link:](nouislider/nouislider.d.ts) [nouislider](https://github.com/leongersen/noUiSlider) by [Corey Jepperson](https://github.com/acoreyj)
* [:link:](wnumb/wnumb.d.ts) [nouislider](https://github.com/leongersen/wnumb) by [Corey Jepperson](https://github.com/acoreyj)
* [:link:](noVNC/noVNC.d.ts) [noVNC](https://github.com/kanaka/noVNC) by [Ken Smith](https://github.com/smithkl42)
* [:link:](npm/npm.d.ts) [npm](https://github.com/npm/npm) by [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](nprogress/nprogress.d.ts) [NProgress](https://github.com/rstacruz/nprogress) by [Judah Gabriel Himango](http://debuggerdotbreak.wordpress.com)
* [:link:](nprogress/NProgress.d.ts) [NProgress](https://github.com/rstacruz/nprogress) by [Judah Gabriel Himango](http://debuggerdotbreak.wordpress.com)
* [:link:](numeraljs/numeraljs.d.ts) [Numeral.js](https://github.com/adamwdraper/Numeral-js) by [Vincent Bortone](https://github.com/vbortone)
* [:link:](object-hash/object-hash.d.ts) [object-hash](https://github.com/puleos/object-hash) by [Michael Zabka](https://github.com/misak113)
* [:link:](object-path/object-path.d.ts) [objectPath](https://github.com/mariocasciaro/object-path) by [Paulo Cesar](https://github.com/pocesar)
* [:link:](oboe/oboe.d.ts) [oboe](https://github.com/jimhigson/oboe.js) by [Jared Klopper](https://github.com/optical)
* [:link:](oclazyload/oclazyload.d.ts) [oc.LazyLoad](https://github.com/ocombe/ocLazyLoad) by [Roland Zwaga](https://github.com/rolandzwaga)
@@ -601,7 +623,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](passport/passport.d.ts) [Passport](http://passportjs.org) by [Horiuchi_H](https://github.com/horiuchi)
* [:link:](passport-strategy/passport-strategy.d.ts) [Passport Strategy module](https://github.com/jaredhanson/passport-strategy) by [Lior Mualem](https://github.com/liorm)
* [:link:](passport-facebook/passport-facebook.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
* [:link:](passport-facebook-token/passport-facebook-token.d.ts) [passport-facebook-token](https://github.com/drudge/passport-facebook-token) by [Ray Martone](https://github.com/rmartone)
* [:link:](passport-local/passport-local.d.ts) [passport-local](https://github.com/jaredhanson/passport-local) by [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](path-to-regexp/path-to-regexp.d.ts) [path-to-regexp](https://github.com/pillarjs/path-to-regexp) by [xica](https://github.com/xica)
* [:link:](pathwatcher/pathwatcher.d.ts) [pathwatcher](https://github.com/atom/node-pathwatcher) by [vvakame](https://github.com/vvakame)
* [:link:](pdf/pdf.d.ts) [PDF.js](https://github.com/mozilla/pdf.js) by [Josh Baldwin](https://github.com/jbaldwin)
* [:link:](peerjs/peerjs.d.ts) [PeerJS](http://peerjs.com) by [Toshiya Nakakura](https://github.com/nakakura)
@@ -622,8 +646,8 @@ 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.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.paper-toast.d.ts) [polymer's paper-toast](https://github.com/Polymer/paper-toast) by [Louis Grignon](https://github.com/lgrignon)
* [:link:](polymer/polymer.core-drawer-panel.d.ts) [polymer's paper-toast](https://github.com/Polymer/core-drawer-panel) by [Louis Grignon](https://github.com/lgrignon)
* [:link:](popcorn/popcorn.d.ts) [Popcorn](https://github.com/mozilla/popcorn-js) by [grapswiz](https://github.com/grapswiz)
* [:link:](pouchDB/pouch.d.ts) [Pouch](http://pouchdb.com) by [Bill Sears](https://github.com/MrBigDog2U)
* [:link:](power-assert/power-assert.d.ts) [power-assert](https://github.com/twada/power-assert) by [vvakame](https://github.com/vvakame)
@@ -644,15 +668,15 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](qajax/qajax.d.ts) [Qajax](https://github.com/gre/qajax) by [Boltmade](https://github.com/Boltmade)
* [:link:](qunit/qunit.d.ts) [QUnit](http://qunitjs.com) by [Diullei Gomes](https://github.com/diullei)
* [:link:](rabbit.js/rabbit.js.d.ts) [rabbit.js](https://github.com/squaremo/rabbit.js) by [Wonshik Kim](https://github.com/wokim)
* [:link:](ractive/ractive.d.ts) [Ractive 0.7.0 edge f22ab8ad0a640591b1c263f57e21d1565cb26bf5](http://ractivejs.org) by [Han Lin Yap](http://yap.nu)
* [:link:](ractive/ractive.d.ts) [Ractive](http://ractivejs.org) by [Han Lin Yap](http://yap.nu)
* [:link:](raphael/raphael.d.ts) [Raphael](http://raphaeljs.com) by [CheCoxshall](https://github.com/CheCoxshall)
* [:link:](rappid/rappid.d.ts) [Rappid](http://jointjs.com/about-rappid) by [Ewout Van Gossum](https://github.com/DenEwout)
* [:link:](ravenjs/ravenjs.d.ts) [Raven.js](https://github.com/getsentry/raven-js) by [Santi Albo](https://github.com/santialbo)
* [:link:](react/react.d.ts) [React (external module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com)
* [:link:](react/react-global.d.ts) [React (internal module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com)
* [:link:](react-router/react-router.d.ts) [React Router](https://github.com/rackt/react-router) by [Yuichi Murata](https://github.com/mrk21)
* [:link:](react/react.d.ts) [React v0.13.0 RC2 (external module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com)
* [:link:](react/react-global.d.ts) [React v0.13.0 RC2 (internal module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com)
* [:link:](react/react-addons.d.ts) [ReactWithAddons v0.13.0 RC2 (external module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com)
* [:link:](react/react-addons-global.d.ts) [ReactWithAddons v0.13.0 RC2 (internal module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com)
* [:link:](react/react-addons.d.ts) [ReactWithAddons (external module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com)
* [:link:](react/react-addons-global.d.ts) [ReactWithAddons (internal module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com)
* [:link:](readdir-stream/readdir-stream.d.ts) [readdir-stream](https://github.com/logicalparadox/readdir-stream) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](redis/redis.d.ts) [redis](https://github.com/mranney/node_redis) by [Carlos Ballesteros Velasco](https://github.com/soywiz), [Peter Harris](https://github.com/CodeAnimal)
* [:link:](ref/ref.d.ts) [ref](https://github.com/TooTallNate/ref) by [Paul Loyd](https://github.com/loyd)
@@ -661,6 +685,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](ref-union/ref-union.d.ts) [ref-union](https://github.com/TooTallNate/ref-union) by [Paul Loyd](https://github.com/loyd)
* [:link:](request/request.d.ts) [request](https://github.com/mikeal/request) by [Carlos Ballesteros Velasco](https://github.com/soywiz), [bonnici](https://github.com/bonnici), [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](requirejs/require.d.ts) [RequireJS](http://requirejs.org) by [Josh Baldwin](https://github.com/jbaldwin)
* [:link:](response-time/response-time.d.ts) [response-time](https://github.com/expressjs/response-time) by [Uros Smolnik](https://github.com/urossmolnik)
* [:link:](rest/rest.d.ts) [rest.js](https://github.com/cujojs/rest) by [Wim Looman](https://github.com/Nemo157)
* [:link:](restangular/restangular.d.ts) [Restangular](https://github.com/mgonto/restangular) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](rethinkdb/rethinkdb.d.ts) [Rethinkdb](http://rethinkdb.com) by [Sean Hess](https://seanhess.github.io)
@@ -685,6 +710,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](rx/rx.testing.d.ts) [RxJS-Testing](https://github.com/Reactive-Extensions/RxJS) by [Igor Oleinikov](https://github.com/Igorbek)
* [:link:](rx/rx.time.d.ts) [RxJS-Time](http://rx.codeplex.com) by [Carl de Billy](http://carl.debilly.net), [Igor Oleinikov](https://github.com/Igorbek)
* [:link:](rx/rx.virtualtime.d.ts) [RxJS-VirtualTime](http://rx.codeplex.com) by [gsino](http://www.codeplex.com/site/users/view/gsino), [Igor Oleinikov](https://github.com/Igorbek)
* [:link:](s3-uploader/s3-uploader.d.ts) [s3-uploader](https://www.npmjs.com/package/s3-uploader) by [COLSA Corporation](http://www.colsa.com)
* [:link:](sammyjs/sammyjs.d.ts) [Sammy.js](http://sammyjs.org) by [Boris Yankov](https://github.com/borisyankov), [Oisin Grehan](https://github.com/oising)
* [:link:](sanitize-filename/sanitize-filename.d.ts) [sanitize-filename](https://github.com/parshap/node-sanitize-filename) by [Wim Looman](https://github.com/Nemo157)
* [:link:](sanitize-html/sanitize-html.d.ts) [sanitize-html](https://github.com/punkave/sanitize-html) by [Rogier Schouten](https://github.com/rogierschouten)
@@ -696,6 +722,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](semver/semver.d.ts) [semver](https://github.com/isaacs/node-semver) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](sendgrid/sendgrid.d.ts) [sendgrid](https://github.com/sendgrid/sendgrid-nodejs) by [Maxime LUCE](https://github.com/SomaticIT)
* [:link:](sequelize/sequelize.d.ts) [Sequelize 2.0.0 dev13](http://sequelizejs.com) by [samuelneff](https://github.com/samuelneff), [Peter Harris](https://github.com/codeanimal)
* [:link:](serve-favicon/serve-favicon.d.ts) [serve-favicon](https://github.com/expressjs/serve-favicon) by [Uros Smolnik](https://github.com/urossmolnik)
* [:link:](serve-static/serve-static.d.ts) [serve-static](https://github.com/expressjs/serve-static) by [Uros Smolnik](https://github.com/urossmolnik)
* [:link:](sharedworker/SharedWorker.d.ts) [SharedWorker](http://www.w3.org/TR/workers) by [Toshiya Nakakura](https://github.com/nakakura)
* [:link:](shelljs/shelljs.d.ts) [ShellJS](http://shelljs.org) by [Niklas Mollenhauer](https://github.com/nikeee)
* [:link:](should-promised/should-promised.d.ts) [should-promised](https://github.com/shouldjs/promised) by [Yaroslav Admin](https://github.com/devoto13)
@@ -730,6 +758,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](sprintf/sprintf.d.ts) [sprintff](https://github.com/maritz/node-sprintff) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](sharepoint/SharePoint.d.ts) [sptypescript](http://sptypescript.codeplex.com) by [Stanislav Vyshchepan](http://gandjustas.blogspot.ru), [Andrey Markeev](http://markeev.com)
* [:link:](sqlite3/sqlite3.d.ts) [sqlite3](https://github.com/mapbox/node-sqlite3) by [Nick Malaguti](https://github.com/nmalaguti)
* [:link:](stack-mapper/stack-mapper.d.ts) [stack-mapper](https://github.com/thlorenz/stack-mapper) by [Rogier Schouten](https://github.com/rogierschouten)
* [:link:](stampit/stampit.d.ts) [stampit](https://github.com/ericelliott/stampit) by [Vasyl Boroviak](https://github.com/koresar)
* [:link:](stats/stats.d.ts) [Stats.js r12](http://github.com/mrdoob/stats.js) by [Gregory Dalton](https://github.com/gregolai)
* [:link:](status-bar/status-bar.d.ts) [status-bar](https://github.com/atom/status-bar) by [vvakame](https://github.com/vvakame)
@@ -794,6 +823,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](type-detect/type-detect.d.ts) [type-detect](https://github.com/chaijs/type-detect) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](typeahead/typeahead.d.ts) [typeahead.js](http://twitter.github.io/typeahead.js) by [Ivaylo Gochkov](https://github.com/igochkov), [Gidon Junge](https://github.com/gjunge)
* [:link:](typescript/typescript.d.ts) [TypeScript API](http://www.typescriptlang.org) by [Microsoft TypeScript](http://typescriptlang.org)
* [:link:](typescript-deferred/typescript-deferred.d.ts) [typescript-deferred](https://github.com/DirtyHairy/typescript-deferred) by [Christian Speckner](https://github.com/DirtyHairy)
* [:link:](typescript-services/typescriptServices.d.ts) [TypeScript-Services](https://www.npmjs.org/package/typescript-services) by [Basarat Ali Syed](http://github.com/basarat)
* [:link:](unity-webapi/unity-webapi.d.ts) [Ubuntu Unity Web API](https://launchpad.net/libunity-webapps) by [John Vrbanac](jhttps://github.com/jmvrbanac)
* [:link:](underscore/underscore.d.ts) [Underscore](http://underscorejs.org) by [Boris Yankov](https://github.com/borisyankov), [Josh Baldwin](https://github.com/jbaldwin)
@@ -824,6 +854,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](webspeechapi/webspeechapi.d.ts) [Web Speech API](https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html) by [SaschaNaz](https://github.com/saschanaz)
* [:link:](webcola/webcola.d.ts) [webcola](https://github.com/tgdwyer/WebCola) by [Qinfeng Chen](https://github.com/qinfchen)
* [:link:](webcrypto/WebCrypto.d.ts) [WebCrypto](http://www.w3.org/TR/WebCryptoAPI) by [Lucas Dixon](https://github.com/iislucas)
* [:link:](webix/webix.d.ts) [Webix UI](http://webix.com) by [Maksim Kozhukh](http://github.com/mkozhukh)
* [:link:](webrtc/MediaStream.d.ts) [WebRTC](http://dev.w3.org/2011/webrtc) by [Ken Smith](https://github.com/smithkl42)
* [:link:](websocket/websocket.d.ts) [websocket](https://github.com/Worlize/WebSocket-Node) by [Paul Loyd](https://github.com/loyd)
* [:link:](when/when.d.ts) [When](https://github.com/cujojs/when) by [Derek Cicerone](https://github.com/derekcicerone), [Wim Looman](https://github.com/Nemo157)
+4 -4
View File
@@ -190,15 +190,15 @@ declare module angular.ui.bootstrap {
/**
* a promise that is resolved when a modal is closed and rejected when a modal is dismissed
*/
result: ng.IPromise<any>;
result: angular.IPromise<any>;
/**
* a promise that is resolved when a modal gets opened after downloading content's template and resolving all variables
*/
opened: ng.IPromise<any>;
opened: angular.IPromise<any>;
}
interface IModalScope extends ng.IScope {
interface IModalScope extends angular.IScope {
/**
* Those methods make it easy to close a modal window without a need to create a dedicated controller
*/
@@ -623,7 +623,7 @@ declare module angular.ui.bootstrap {
*
* @return A promise that is resolved when the transition finishes.
*/
(element: ng.IAugmentedJQuery, trigger: any, options?: ITransitionServiceOptions): ng.IPromise<ng.IAugmentedJQuery>;
(element: angular.IAugmentedJQuery, trigger: any, options?: ITransitionServiceOptions): angular.IPromise<angular.IAugmentedJQuery>;
}
interface ITransitionServiceOptions {
+21 -6
View File
@@ -36,9 +36,10 @@ declare module angular.animate {
* @param from a collection of CSS styles that will be applied to the element at the start of the animation
* @param to a collection of CSS styles that the element will animate towards
* @param className an optional CSS class that will be added to the element for the duration of the animation (the default class is 'ng-inline-animate')
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
* @returns the animation callback promise
*/
animate(element: JQuery, from: any, to: any, className?: string): ng.IPromise<void>;
animate(element: JQuery, from: any, to: any, className?: string, options?: IAnimationOptions): ng.IPromise<void>;
/**
* Appends the element to the parentElement element that resides in the document and then runs the enter animation.
@@ -46,17 +47,19 @@ declare module angular.animate {
* @param element the element that will be the focus of the enter animation
* @param parentElement the parent element of the element that will be the focus of the enter animation
* @param afterElement the sibling element (which is the previous element) of the element that will be the focus of the enter animation
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
* @returns the animation callback promise
*/
enter(element: JQuery, parentElement: JQuery, afterElement?: JQuery): ng.IPromise<void>;
enter(element: JQuery, parentElement: JQuery, afterElement?: JQuery, options?: IAnimationOptions): ng.IPromise<void>;
/**
* Runs the leave animation operation and, upon completion, removes the element from the DOM.
*
* @param element the element that will be the focus of the leave animation
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
* @returns the animation callback promise
*/
leave(element: JQuery): ng.IPromise<void>;
leave(element: JQuery, options?: IAnimationOptions): ng.IPromise<void>;
/**
* Fires the move DOM operation. Just before the animation starts, the animate service will either append
@@ -76,9 +79,10 @@ declare module angular.animate {
*
* @param element the element that will be animated
* @param className the CSS class that will be added to the element and then animated
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
* @returns the animation callback promise
*/
addClass(element: JQuery, className: string): ng.IPromise<void>;
addClass(element: JQuery, className: string, options?: IAnimationOptions): ng.IPromise<void>;
/**
* Triggers a custom animation event based off the className variable and then removes the CSS class
@@ -86,9 +90,10 @@ declare module angular.animate {
*
* @param element the element that will be animated
* @param className the CSS class that will be animated and then removed from the element
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
* @returns the animation callback promise
*/
removeClass(element: JQuery, className: string): ng.IPromise<void>;
removeClass(element: JQuery, className: string, options?: IAnimationOptions): ng.IPromise<void>;
/**
* Adds and/or removes the given CSS classes to and from the element. Once complete, the done() callback
@@ -97,9 +102,10 @@ declare module angular.animate {
* @param element the element which will have its CSS classes changed removed from it
* @param add the CSS classes which will be added to the element
* @param remove the CSS class which will be removed from the element CSS classes have been set on the element
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
* @returns the animation callback promise
*/
setClass(element: JQuery, add: string, remove: string): ng.IPromise<void>;
setClass(element: JQuery, add: string, remove: string, options?: IAnimationOptions): ng.IPromise<void>;
/**
* Cancels the provided animation.
@@ -128,4 +134,13 @@ declare module angular.animate {
*/
classNameFilter(expression?: RegExp): RegExp;
}
///////////////////////////////////////////////////////////////////////////
// Angular Animation Options
// see https://docs.angularjs.org/api/ngAnimate/#applying-directive-specific-styles-to-an-animation
///////////////////////////////////////////////////////////////////////////
interface IAnimationOptions {
to?: Object;
from?: Object;
}
}
+21 -13
View File
@@ -452,9 +452,9 @@ declare module angular {
$invalid: boolean;
$submitted: boolean;
$error: any;
$addControl(control: ng.INgModelController): void;
$removeControl(control: ng.INgModelController): void;
$setValidity(validationErrorKey: string, isValid: boolean, control: ng.INgModelController): void;
$addControl(control: INgModelController): void;
$removeControl(control: INgModelController): void;
$setValidity(validationErrorKey: string, isValid: boolean, control: INgModelController): void;
$setDirty(): void;
$setPristine(): void;
$commitViewValue(): void;
@@ -509,7 +509,7 @@ declare module angular {
}
interface IAsyncModelValidators {
[index: string]: (...args: any[]) => ng.IPromise<boolean>;
[index: string]: (...args: any[]) => IPromise<boolean>;
}
interface IModelParser {
@@ -931,11 +931,19 @@ declare module angular {
/**
* Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
*
* Returns a single promise that will be resolved with an array/hash of values, each value corresponding to the promise at the same index/key in the promises array/hash. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
* Returns a single promise that will be resolved with an array of values, each value corresponding to the promise at the same index in the promises array. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
*
* @param promises An array or hash of promises.
* @param promises An array of promises.
*/
all(promises: IPromise<any>[]|{ [id: string]: IPromise<any>; }): IPromise<any[]>;
all(promises: IPromise<any>[]): IPromise<any[]>;
/**
* Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
*
* Returns a single promise that will be resolved with a hash of values, each value corresponding to the promise at the same key in the promises hash. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
*
* @param promises A hash of promises.
*/
all(promises: { [id: string]: IPromise<any>; }): IPromise<{ [id: string]: any; }>;
/**
* Creates a Deferred object which represents a task which will finish in the future.
*/
@@ -1573,12 +1581,12 @@ declare module angular {
* $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.
*/
decorator(name: string, inlineAnnotatedFunction: any[]): void;
factory(name: string, serviceFactoryFunction: Function): ng.IServiceProvider;
factory(name: string, inlineAnnotatedFunction: any[]): ng.IServiceProvider;
provider(name: string, provider: ng.IServiceProvider): ng.IServiceProvider;
provider(name: string, serviceProviderConstructor: Function): ng.IServiceProvider;
service(name: string, constructor: Function): ng.IServiceProvider;
value(name: string, value: any): ng.IServiceProvider;
factory(name: string, serviceFactoryFunction: Function): IServiceProvider;
factory(name: string, inlineAnnotatedFunction: any[]): IServiceProvider;
provider(name: string, provider: IServiceProvider): IServiceProvider;
provider(name: string, serviceProviderConstructor: Function): IServiceProvider;
service(name: string, constructor: Function): IServiceProvider;
value(name: string, value: any): IServiceProvider;
}
}
+47
View File
@@ -0,0 +1,47 @@
/// <reference path="autobahn.d.ts"/>
class MyClass {
add2Count: number = 0;
session: autobahn.Session;
constructor(session: autobahn.Session) {
this.session = session;
}
add2(args: Array<number>): number {
this.add2Count++;
return args[0] + args[1];
}
onEvent(args: Array<any>): void {
console.log("Event:", args[0]);
}
}
function test_client() {
var options: autobahn.IConnectionOptions =
{ url: 'ws://127.0.0.1:8080/ws', realm: 'realm1' };
var connection = new autobahn.Connection(options);
connection.onopen = session => {
var myInstance = new MyClass(session);
// 1) subscribe to a topic
session.subscribe('com.myapp.hello', myInstance.onEvent);
// 2) publish an event
session.publish('com.myapp.hello', ['Hello, world!']);
// 3) register a procedure for remoting
session.register('com.myapp.add2', myInstance.add2);
// 4) call a remote procedure
session.call<number>('com.myapp.add2', [2, 3]).then(
res => {
console.log("Result:", res);
});
};
connection.open();
}
+195
View File
@@ -0,0 +1,195 @@
// Type definitions for AutobahnJS v0.9.6
// Project: http://autobahn.ws/js/
// Definitions by: Elad Zelingher <https://github.com/darkl/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../when/when.d.ts" />
declare module autobahn {
export class Session {
id: number;
realm: string;
isOpen: boolean;
features: any;
caller_disclose_me: boolean;
publisher_disclose_me: boolean;
subscriptions: ISubscription[][];
registrations: IRegistration[];
constructor(transport: ITransport, defer: DeferFactory, challenge: OnChallengeHandler);
join(realm: string, authmethods: string[], authid: string): void;
leave(reason: string, message: string): void;
call<TResult>(procedure: string, args?: any[], kwargs?: any, options?: ICallOptions): When.Promise<TResult>;
publish(topic: string, args?: any[], kwargs?: any, options?: IPublishOptions): When.Promise<IPublication>;
subscribe(topic: string, handler: SubscribeHandler, options?: ISubscribeOptions): When.Promise<ISubscription>;
register(procedure: string, endpoint: RegisterEndpoint, options?: IRegisterOptions): When.Promise<IRegistration>;
unsubscribe(subscription: ISubscription): When.Promise<any>;
unregister(registration: IRegistration): When.Promise<any>;
prefix(prefix: string, uri: string): void;
resolve(curie: string): string;
onjoin: (roleFeatures: any) => void;
onleave: (reason: string, details: any) => void;
}
interface IInvocation {
caller?: number;
progress?: boolean;
procedure: string;
}
interface IEvent {
publication: number;
publisher?: number;
topic: string;
}
interface IResult {
args: any[];
kwargs: any;
}
interface IError {
error: string;
args: any[];
kwargs: any;
}
type SubscribeHandler = (args?: any[], kwargs?: any, details?: IEvent) => void;
interface ISubscription {
topic: string;
handler: SubscribeHandler;
options: ISubscribeOptions;
session: Session;
id: number;
active: boolean;
unsubscribe(): When.Promise<any>;
}
type RegisterEndpoint = (args?: any[], kwargs?: any, details?: IInvocation) => void;
interface IRegistration {
procedure: string;
endpoint: RegisterEndpoint;
options: IRegisterOptions;
session: Session;
id: number;
active: boolean;
unregister(): When.Promise<any>;
}
interface IPublication {
id: number;
}
interface ICallOptions {
timeout?: number;
receive_progress?: boolean;
disclose_me?: boolean;
}
interface IPublishOptions {
exclude?: number[];
eligible?: number[];
disclose_me? : Boolean;
}
interface ISubscribeOptions {
match? : string;
}
interface IRegisterOptions {
disclose_caller?: boolean;
}
export class Connection {
constructor(options?: IConnectionOptions);
open(): void;
close(reason: string, message: string): void;
onopen: (session: Session, details: any) => void;
onclose: (reason: string, details: any) => boolean;
}
interface ITransportDefinition {
url?: string;
protocols?: string[];
type: string;
}
type DeferFactory = () => any;
type OnChallengeHandler = (session: Session, method: string, extra: any) => When.Promise<string>;
interface IConnectionOptions {
use_es6_promises?: boolean;
// use explicit deferred factory, e.g. jQuery.Deferred or Q.defer
use_deferred?: DeferFactory;
transports?: ITransportDefinition[];
retry_if_unreachable?: boolean;
max_retries?: number;
initial_retry_delay?: number;
max_retry_delay?: number;
retry_delay_growth?: number;
retry_delay_jitter?: number;
url?: string;
protocols?: string[];
onchallenge?: (session: Session, method: string, extra: any) => OnChallengeHandler;
realm?: string;
authmethods?: string[];
authid?: string;
}
interface ICloseEventDetails {
wasClean: boolean;
reason: string;
code: number;
}
interface ITransport {
onopen: () => void;
onmessage: (message: any[]) => void;
onclose: (details: ICloseEventDetails) => void;
send(message: any[]): void;
close(errorCode: number, reason?: string): void;
}
interface ITransportFactory {
//constructor(options: any);
type: string;
create(): ITransport;
}
interface ITransports {
register(name: string, factory: any): void;
isRegistered(name: string): boolean;
get(name: string): any;
list(): any[];
}
interface ILog {
debug(...args: any[]): void;
}
interface IUtil {
assert(condition: boolean, message: string): void;
}
var util: IUtil;
var log: ILog;
var transports: ITransports;
}
+9 -14
View File
@@ -1,23 +1,18 @@
/// <reference path="axios.d.ts" />
interface InputBody {
random: number;
}
enum HttpMethod { GET, PUT, POST, DELETE, CONNECT, HEAD, OPTIONS, TRACE, PATCH }
enum ResponseType { arraybuffer, blob, document, json, text }
interface Repository {
id: number;
name: string;
}
function convenientGet () {
axios.get<Repository, InputBody>("https://api.github.com/repos/mzabriskie/axios")
.then(r => console.log(r.config.data.random));
}
axios.get<Repository>("https://api.github.com/repos/mzabriskie/axios")
.then(r => console.log(r.config.method));
function get() {
axios<Repository, any>({
url: "https://api.github.com/repos/mzabriskie/axios",
method: Axios.HTTPMethod.GET,
headers: {},
}).then(r => console.log("ID:" + r.data.id + " Name: " + r.data.name));
}
axios<Repository>({
url: "https://api.github.com/repos/mzabriskie/axios",
method: HttpMethod[HttpMethod.GET],
headers: {},
}).then(r => console.log("ID:" + r.data.id + " Name: " + r.data.name));
+14 -15
View File
@@ -6,8 +6,6 @@
/// <reference path="../es6-promise/es6-promise.d.ts"/>
declare module Axios {
export enum HTTPMethod { GET, PUT, POST, DELETE, CONNECT, HEAD, OPTIONS, TRACE, PATCH }
export enum ResponseType { arraybuffer, blob, document, json, text }
/**
* <T> - request body data type
@@ -46,7 +44,7 @@ declare module Axios {
* indicates the type of data that the server will respond with
* options are 'arraybuffer', 'blob', 'document', 'json', 'text'
*/
responseType?: Axios.ResponseType;
responseType?: string;
/**
* name of the cookie to use as a value for xsrf token
@@ -65,14 +63,15 @@ declare module Axios {
*/
interface AxiosXHRConfig<T> extends AxiosXHRConfigBase<T> {
/**
* server URL that will be used for the request
* server URL that will be used for the request, options are:
* GET, PUT, POST, DELETE, CONNECT, HEAD, OPTIONS, TRACE, PATCH
*/
url: string;
/**
* request method to be used when making the request
*/
method?: Axios.HTTPMethod;
method?: string;
/**
* data to be sent as the request body
@@ -86,7 +85,7 @@ declare module Axios {
* <T> - expected response type,
* <U> - request body data type
*/
interface AxiosXHR<T, U> {
interface AxiosXHR<T> {
/**
* Response that was provided by the server
*/
@@ -110,7 +109,7 @@ declare module Axios {
/**
* config that was provided to `axios` for the request
*/
config: AxiosXHRConfig<U>;
config: AxiosXHRConfig<T>;
}
/**
@@ -119,40 +118,40 @@ declare module Axios {
*/
interface AxiosStatic {
<T, U>(config: AxiosXHRConfig<U>): Promise<AxiosXHR<T, U>>;
<T>(config: AxiosXHRConfig<T>): Promise<AxiosXHR<T>>;
new <T, U>(config: AxiosXHRConfig<U>): Promise<AxiosXHR<T, U>>;
new <T>(config: AxiosXHRConfig<T>): Promise<AxiosXHR<T>>;
/**
* convenience alias, method = GET
*/
get<T, U>(url: string, config?: AxiosXHRConfigBase<U>): Promise<AxiosXHR<T, U>>;
get<T>(url: string, config?: AxiosXHRConfigBase<T>): Promise<AxiosXHR<T>>;
/**
* convenience alias, method = DELETE
*/
delete<T, U>(url: string, config?: AxiosXHRConfigBase<U>): Promise<AxiosXHR<T, U>>;
delete<T>(url: string, config?: AxiosXHRConfigBase<T>): Promise<AxiosXHR<T>>;
/**
* convenience alias, method = HEAD
*/
head<T, U>(url: string, config?: AxiosXHRConfigBase<U>): Promise<AxiosXHR<T, U>>;
head<T>(url: string, config?: AxiosXHRConfigBase<T>): Promise<AxiosXHR<T>>;
/**
* convenience alias, method = POST
*/
post<T, U>(url: string, data?: any, config?: AxiosXHRConfigBase<U>): Promise<AxiosXHR<T, U>>;
post<T>(url: string, data?: any, config?: AxiosXHRConfigBase<T>): Promise<AxiosXHR<T>>;
/**
* convenience alias, method = PUT
*/
put<T, U>(url: string, data?: any, config?: AxiosXHRConfigBase<U>): Promise<AxiosXHR<T, U>>;
put<T>(url: string, data?: any, config?: AxiosXHRConfigBase<T>): Promise<AxiosXHR<T>>;
/**
* convenience alias, method = PATCH
*/
patch<T, U>(url: string, data?: any, config?: AxiosXHRConfigBase<U>): Promise<AxiosXHR<T, U>>;
patch<T>(url: string, data?: any, config?: AxiosXHRConfigBase<T>): Promise<AxiosXHR<T>>;
}
}
@@ -0,0 +1,305 @@
/// <reference path="../jquery/jquery.d.ts" />
/// <reference path="../backbone/backbone.d.ts" />
/// <reference path="backbone.paginator.d.ts" />
module BackbonePaginatorTests {
class TestModel extends Backbone.Model{};
var makeFetchOptions = <TCol extends Backbone.PageableCollection<TestModel>>() => {
return {
reset: true,
url: 'example.com',
beforeSend: (jqxhr: JQueryXHR) => {},
success: (model: TestModel, response: any, options: any) => {},
error: (collection: TCol, jqxhr: JQueryXHR, options: any) => {},
parse: '',
};
};
module InitializingWithNoOption {
class TestCollection extends Backbone.PageableCollection<TestModel> {
constructor(){
super();
}
}
var testCollection = new TestCollection();
}
module InitializingWithOptions {
class TestCollection extends Backbone.PageableCollection<TestModel> {
constructor(models?: TestModel[],
options?: Backbone.PageableInitialOptions){
super();
}
}
var testCollection1 = new TestCollection();
var testCollection2 = new TestCollection([
new TestModel(),
new TestModel()
]);
var testCollection3 = new TestCollection([], {});
var testCollection4 = new TestCollection([],{
comparator: ()=>1,
full: true,
state: {},
queryParam: {},
});
var testCollection5 = new TestCollection([],{
state: {
firstPage: 0,
lastPage: 0,
currentPage: 0,
pageSize: 1,
totalPages: 1,
totalRecords: 1,
sortKey: 'id',
order: 1,
},
queryParam: {
currentPage: 'current_page',
pageSize: 'page_size',
totalPages: 'total_pages',
totalRecords: 'total_records',
sortKey: 'sort_key',
order: 'order',
directions: '',
},
});
var testCollection6 = new TestCollection([
<TestModel>{},
<TestModel>{},
]);
}
module Fetching {
class TestCollection extends Backbone.PageableCollection<TestModel> {
constructor(models?: TestModel[],
options?: Backbone.PageableInitialOptions){
super();
}
}
var testCollection = new TestCollection();
var result:JQueryXHR = testCollection.fetch();
testCollection.fetch({});
testCollection.fetch(makeFetchOptions<TestCollection>());
}
module Paging {
class TestCollection extends Backbone.PageableCollection<TestModel> {
constructor(models?: TestModel[],
options?: Backbone.PageableInitialOptions){
super();
}
}
var options = makeFetchOptions<TestCollection>();
var testCollection = new TestCollection();
var result:JQueryXHR|TestCollection = testCollection.getFirstPage();
testCollection.getFirstPage(options);
// 'silent's type is boolean. (structural subtyping)
testCollection.getFirstPage({silent: 'aa'});
// 'url's type is string. (structural subtyping)
testCollection.getFirstPage({url: true});
result = testCollection.getLastPage();
testCollection.getLastPage(options);
// 'silent's type is boolean. (structural subtyping)
testCollection.getLastPage({silent: 'aa'});
// 'url's type is string. (structural subtyping)
testCollection.getLastPage({url: true});
result = testCollection.getNextPage();
testCollection.getNextPage(options);
// 'silent's type is boolean. (structural subtyping)
testCollection.getNextPage({silent: 'aa'});
// 'url's type is string. (structural subtyping)
testCollection.getNextPage({url: true});
result = testCollection.getPage(1);
testCollection.getPage("1", options);
// 'silent's type is boolean. (structural subtyping)
testCollection.getPage(1, {silent: 'aa'});
// 'url's type is string. (structural subtyping)
testCollection.getPage(1, {url: true});
result = testCollection.getPageByOffset(1);
testCollection.getPageByOffset(1, options);
// 'silent's type is boolean. (structural subtyping)
testCollection.getPageByOffset(1, {silent: 'aa'});
// 'url's type is string. (structural subtyping)
testCollection.getPageByOffset(1, {url: true});
result = testCollection.getPreviousPage();
testCollection.getPreviousPage(options);
// 'silent's type is boolean. (structural subtyping)
testCollection.getPreviousPage({silent: 'aa'});
// 'url's type is string. (structural subtyping)
testCollection.getPreviousPage({url: true});
var hasPage:boolean = testCollection.hasNextPage();
hasPage = testCollection.hasPreviousPage();
}
module Parse {
class TestCollection extends Backbone.PageableCollection<TestModel> {
constructor(models?: TestModel[],
options?: Backbone.PageableInitialOptions){
super();
}
}
var testCollection = new TestCollection();
var result:any[] = testCollection.parse({}, {});
var resultLinks:any = testCollection.parseLinks({}, {});
resultLinks = testCollection.parseLinks({}, { xhr: $.ajax({}) } );
result = testCollection.parseRecords({}, {});
var resultState: Backbone.PageableState = testCollection.parseState(
{},
{
currentPage: 'current_page',
pageSize: 'page_size',
totalPages: 'total_pages',
totalRecords: 'total_records',
sortKey: 'sort_key',
order: 'order',
directions: '',
},
{
firstPage: 0,
lastPage: 0,
currentPage: 0,
pageSize: 1,
totalPages: 1,
totalRecords: 1,
sortKey: 'id',
order: 1,
},
{});
}
module Setting {
class TestCollection extends Backbone.PageableCollection<TestModel> {
constructor(models?: TestModel[],
options?: Backbone.PageableInitialOptions){
super();
}
}
var testCollection = new TestCollection();
var options = makeFetchOptions<TestCollection>();
var result1:JQueryXHR|TestCollection
= testCollection.setPageSize(1, options);
var result2:TestCollection
= testCollection.setSorting('id', 1, options);
result1 = testCollection.switchMode(
'server',
{fetch: true, resetState: true}
);
}
module Syncing {
class TestCollection extends Backbone.PageableCollection<TestModel> {
constructor(models?: TestModel[],
options?: Backbone.PageableInitialOptions){
super();
}
}
var testCollection = new TestCollection();
var result:JQueryXHR = testCollection.sync('server', new TestModel(), {});
result = testCollection.sync('server', testCollection, {});
}
module Confllict {
var result:typeof Backbone.PageableCollection
= Backbone.PageableCollection.noConflict();
}
}
+116
View File
@@ -0,0 +1,116 @@
// Type definitions for backbone.paginator 2.0.2
// Project: https://github.com/backbone-paginator/backbone.paginator
// Definitions by: Nyamazing <https://github.com/Nyamazing/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../backbone/backbone.d.ts" />
declare module Backbone {
interface PageableState {
firstPage?: number;
lastPage?: number;
currentPage?: number;
pageSize?: number;
totalPages?: number;
totalRecords?: number;
sortKey?: string;
order?: number;
}
interface PageableQueryParams {
currentPage?: string;
pageSize?: string;
totalPages?: string;
totalRecords?: string;
sortKey?: string;
order?: string;
directions?: any;
}
interface PageableInitialOptions {
comparator?: (...options: any[]) => number;
full?: boolean;
state?: PageableState;
queryParam?: PageableQueryParams;
}
interface PageableParseLinksOptions {
xhr?: JQueryXHR;
}
interface PageableSetSortingOptions<TModel extends Model> {
side?: string;
full?: boolean;
sortValue?: (model: TModel, sortKey: string) => any | string;
}
interface PageableSwitchModeOptions {
fetch?: boolean;
resetState?: boolean;
}
type PageableGetPageOptions = CollectionFetchOptions|Silenceable;
class PageableCollection<TModel extends Model> extends Collection<Model>{
fullCollection: Collection<TModel>;
mode: string;
queryParams: PageableQueryParams;
state: PageableState;
constructor(models?: TModel[], options?: PageableInitialOptions);
fetch(options?: CollectionFetchOptions): JQueryXHR;
getFirstPage(options?: PageableGetPageOptions):
JQueryXHR|PageableCollection<TModel>;
getLastPage(options?: PageableGetPageOptions):
JQueryXHR|PageableCollection<TModel>;
getNextPage(options?: PageableGetPageOptions):
JQueryXHR|PageableCollection<TModel>;
getPage(index: number|string, options?: PageableGetPageOptions):
JQueryXHR|PageableCollection<TModel>;
getPageByOffset(offset: number, options?: PageableGetPageOptions):
JQueryXHR|PageableCollection<TModel>;
getPreviousPage(options?: PageableGetPageOptions):
JQueryXHR|PageableCollection<TModel>;
hasNextPage(): boolean;
hasPreviousPage(): boolean;
parse(resp: any, options?: any): any[];
parseLinks(resp: any, options?: PageableParseLinksOptions): any;
parseRecords(resp: any, options?: any): any[];
parseState(resp: any, queryParams: PageableQueryParams,
state: PageableState, options?: any): PageableState;
setPageSize(pageSize: number,
options?: CollectionFetchOptions):
JQueryXHR|PageableCollection<TModel>;
setSorting(sortKey: string, order?: number,
options?: PageableSetSortingOptions<TModel>):
PageableCollection<TModel>;
switchMode(mode?: string, options?: PageableSwitchModeOptions):
JQueryXHR|PageableCollection<TModel>;
sync(method: string,
model: TModel|Collection<TModel>,
options?: any): JQueryXHR;
static noConflict(): typeof PageableCollection;
}
}
+87
View File
@@ -919,4 +919,91 @@ declare module CodeMirror {
*/
current(): string;
}
/**
* A Mode is, in the simplest case, a lexer (tokenizer) for your language — a function that takes a character stream as input,
* advances it past a token, and returns a style for that token. More advanced modes can also handle indentation for the language.
*/
interface Mode<T> {
/**
* This function should read one token from the stream it is given as an argument, optionally update its state,
* and return a style string, or null for tokens that do not have to be styled. Multiple styles can be returned, separated by spaces.
*/
token(stream: StringStream, state: T): string;
/**
* A function that produces a state object to be used at the start of a document.
*/
startState?: () => T;
/**
* For languages that have significant blank lines, you can define a blankLine(state) method on your mode that will get called
* whenever a blank line is passed over, so that it can update the parser state.
*/
blankLine?: (state: T) => void;
/**
* Given a state returns a safe copy of that state.
*/
copyState?: (state: T) => T;
/**
* The indentation method should inspect the given state object, and optionally the textAfter string, which contains the text on
* the line that is being indented, and return an integer, the amount of spaces to indent.
*/
indent?: (state: T, textAfter: string) => number;
/** The four below strings are used for working with the commenting addon. */
/**
* String that starts a line comment.
*/
lineComment?: string;
/**
* String that starts a block comment.
*/
blockCommentStart?: string;
/**
* String that ends a block comment.
*/
blockCommentEnd?: string;
/**
* String to put at the start of continued lines in a block comment.
*/
blockCommentLead?: string;
/**
* Trigger a reindent whenever one of the characters in the string is typed.
*/
electricChars?: string
/**
* Trigger a reindent whenever the regex matches the part of the line before the cursor.
*/
electricinput?: RegExp
}
/**
* A function that, given a CodeMirror configuration object and an optional mode configuration object, returns a mode object.
*/
interface ModeFactory<T> {
(config: CodeMirror.EditorConfiguration, modeOptions?: any): Mode<T>
}
/**
* id will be the id for the defined mode. Typically, you should use this second argument to defineMode as your module scope function
* (modes should not leak anything into the global scope!), i.e. write your whole mode inside this function.
*/
function defineMode(id: string, modefactory: ModeFactory<any>): void;
/**
* The first argument is a configuration object as passed to the mode constructor function, and the second argument
* is a mode specification as in the EditorConfiguration mode option.
*/
function getMode<T>(config: CodeMirror.EditorConfiguration, mode: any): Mode<T>;
/**
* Utility function from the overlay.js addon that allows modes to be combined. The mode given as the base argument takes care of
* most of the normal mode functionality, but a second (typically simple) mode is used, which can override the style of text.
* Both modes get to parse all of the text, but when both assign a non-null style to a piece of code, the overlay wins, unless
* the combine argument was true and not overridden, or state.overlay.combineTokens was true, in which case the styles are combined.
*/
function overlayMode<T, S>(base: Mode<T>, overlay: Mode<S>, combine?: boolean): Mode<any>
}
+23
View File
@@ -0,0 +1,23 @@
/// <reference path="crypto-js.d.ts" />
import CryptoJS = require('crypto-js');
var str: string;
str = CryptoJS.MD5('some message');
str = CryptoJS.MD5('some message', 'some key');
str = CryptoJS.SHA1('some message');
str = CryptoJS.SHA1('some message', 'some key', { any: true });
str = CryptoJS.format.OpenSSL('some message');
str = CryptoJS.format.OpenSSL('some message', 'some key');
str = CryptoJS.enc.Utf8('some message');
str = CryptoJS.enc.Utf8('some message', 'some key');
str = CryptoJS.mode.OFB('some message');
str = CryptoJS.mode.OFB('some message', 'some key');
str = CryptoJS.pad.Ansix923('some message');
str = CryptoJS.pad.Ansix923('some message', 'some key');
+67
View File
@@ -0,0 +1,67 @@
// Type definitions for crypto-js v3.1.3
// Project: https://github.com/evanvosberg/crypto-js
// Definitions by: Michael Zabka <https://github.com/misak113/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module CryptoJS {
type Hash = (message: string, key?: string, ...options: any[]) => string;
export interface Hashes {
MD5: Hash;
SHA1: Hash;
SHA256: Hash;
SHA224: Hash;
SHA512: Hash;
SHA384: Hash;
SHA3: Hash;
RIPEMD160: Hash;
HmacMD5: Hash;
HmacSHA1: Hash;
HmacSHA256: Hash;
HmacSHA224: Hash;
HmacSHA512: Hash;
HmacSHA384: Hash;
HmacSHA3: Hash;
HmacRIPEMD160: Hash;
PBKDF2: Hash;
AES: Hash;
TripleDES: Hash;
RC4: Hash;
Rabbit: Hash;
RabbitLegacy: Hash;
EvpKDF: Hash;
format: {
OpenSSL: Hash;
Hex: Hash;
};
enc: {
Latin1: Hash;
Utf8: Hash;
Hex: Hash;
Utf16: Hash;
Base64: Hash;
};
mode: {
CFB: Hash;
CTR: Hash;
CTRGladman: Hash;
OFB: Hash;
ECB: Hash;
};
pad: {
Pkcs7: Hash;
Ansix923: Hash;
Iso10126: Hash;
Iso97971: Hash;
ZeroPadding: Hash;
NoPadding: Hash;
};
}
export var hashes: Hashes;
}
declare module 'crypto-js' {
import hashes = CryptoJS.hashes;
export = hashes;
}
Vendored
+19 -19
View File
@@ -1290,24 +1290,24 @@ declare module D3 {
}
export interface GraphNode {
id: number;
index: number;
name: string;
px: number;
py: number;
size: number;
weight: number;
x: number;
y: number;
subindex: number;
startAngle: number;
endAngle: number;
value: number;
fixed: boolean;
children: GraphNode[];
_children: GraphNode[];
parent: GraphNode;
depth: number;
id?: number;
index?: number;
name?: string;
px?: number;
py?: number;
size?: number;
weight?: number;
x?: number;
y?: number;
subindex?: number;
startAngle?: number;
endAngle?: number;
value?: number;
fixed?: boolean;
children?: GraphNode[];
_children?: GraphNode[];
parent?: GraphNode;
depth?: number;
}
export interface GraphLink {
@@ -1842,7 +1842,7 @@ declare module D3 {
(): number;
(value: number): Axis;
}
tickFormat(formatter: (value: any) => string): Axis;
tickFormat(formatter: (value: any, index?: number) => string): Axis;
nice(count?: number): Axis;
}
+6
View File
@@ -9,6 +9,12 @@ declare module drop {
interface DropStatic {
new(options: IDropOptions): Drop;
createContext(options: IDropContextOptions): DropStatic;
}
interface IDropContextOptions {
classPrefix?: string;
defaults?: IDropOptions;
}
interface IDropOptions {
+1 -1
View File
@@ -55,7 +55,7 @@ declare class EventEmitter2 {
* Removes the listener that will be fired when any event is emitted.
* @param listener
*/
offAny(listener: Function): EventEmitter2;
offAny(listener?: Function): EventEmitter2;
/**
* Adds a one time listener for the event.
+87
View File
@@ -0,0 +1,87 @@
/// <reference path="fs-finder.d.ts" />
import finder = require('fs-finder');
// static
var a: FsFinder.Finder = finder.in('./*');
var b: FsFinder.Finder = finder.from('./*');
var c: FsFinder.Finder = finder.find('./*');
finder.find('./*', (paths: string[]) => {});
var d: FsFinder.Finder = finder.findFiles('./*');
finder.findFiles('./*', (paths: string[]) => {});
var e: FsFinder.Finder = finder.findDirectories('./*');
finder.findDirectories('./*', (paths: string[]) => {});
var f: FsFinder.Finder = finder.findFile('./*');
finder.findFile('./*', (paths: string[]) => {});
var g: FsFinder.Finder = finder.findDirectory('./*');
finder.findDirectory('./*', (paths: string[]) => {});
// instance
var instance = finder.in('./any*');
var j: string[] = instance.find('./*');
instance.find('./*', (paths: string[]) => {});
var k: string[] = instance.findFiles('./*');
instance.findFiles('./*', (paths: string[]) => {});
var l: string[] = instance.findDirectories('./*');
instance.findDirectories('./*', (paths: string[]) => {});
var m: string[] = instance.findFile('./*');
instance.findFile('./*', (paths: string[]) => {});
var n: string[] = instance.findDirectory('./*');
instance.findDirectory('./*', (paths: string[]) => {});
var paths: string[];
paths = instance.find();
paths = instance.findFiles();
paths = instance.findDirectories();
paths = instance.findFile();
paths = instance.findDirectory();
// Base
instance = instance.recursively();
instance = instance.recursively(false);
instance = instance.exclude('b');
instance = instance.exclude(['b']);
instance = instance.exclude('a', true);
instance = instance.showSystemFiles();
instance = instance.showSystemFiles(false);
instance = instance.lookUp();
instance = instance.lookUp(false);
instance = instance.findFirst();
instance = instance.findFirst(true);
instance = instance.filter((path: string) => {
return false;
});
paths = instance.getPathsSync('all', './*', './dir');
instance.getPathsAsync((paths: string[]) => {}, 'all', './*', './dir');
paths = instance.getPathsSync('directories', './*', './dir');
instance.getPathsAsync((paths: string[]) => {}, 'directories', './*', './dir');
paths = instance.getPathsSync('files', './*', './dir');
instance.getPathsAsync((paths: string[]) => {}, 'files', './*', './dir');
var is: boolean;
is = instance.checkExcludes('a');
is = instance.checkSystemFiles('b');
is = instance.checkFilters('c', {});
var numeric: number;
numeric = instance.checkFile('d', {}, './*.ts', 'all');
numeric = instance.checkFile('d', {}, './*.ts', 'directories');
numeric = instance.checkFile('d', {}, './*.ts', 'files');
paths = instance.getPathsFromParentsSync('a', 'all');
instance.getPathsFromParentsAsync((paths: string[]) => {}, '*.ts', 'all');
+55
View File
@@ -0,0 +1,55 @@
// Type definitions for fs-finder v1.8.0
// Project: https://github.com/sakren/node-fs-finder
// Definitions by: Michael Zabka <https://github.com/misak113/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module FsFinder {
type AsyncFunction = (paths: string|string[]) => void;
type Type = string; // 'all'|'directories'|'files'
type Mask = string;
type Directory = string;
export class Finder extends Base {
static TIME_FORMAT: string;
static in(path: string): Finder;
static from(path: string): Finder;
static find(path: string, fn?: AsyncFunction, type?: Type): Finder;
static findFiles(path?: string, fn?: AsyncFunction): Finder;
static findDirectories(path?: string, fn?: AsyncFunction): Finder;
static findFile(path?: string, fn?: AsyncFunction): Finder;
static findDirectory(path?: string, fn?: AsyncFunction): Finder;
find(mask?: Mask, fn?: AsyncFunction, type?: Type): string[];
findFiles(mask?: Mask, fn?: AsyncFunction): string[];
findDirectories(mask?: Mask, fn?: AsyncFunction): string[];
findFile(mask?: Mask, fn?: AsyncFunction): string[];
findDirectory(mask?: Mask, fn?: AsyncFunction): string[];
size(operation?: any, value?: any): Finder;
date(operation?: any, value?: any): Finder;
}
export class Base {
recursively(recursive?: boolean): Finder;
exclude(excludes: string|string[], exactly?: boolean): Finder;
showSystemFiles(systemFiles?: boolean): Finder;
lookUp(up?: boolean): Finder;
findFirst(findFirst?: boolean): Finder;
filter(fn: Function): Finder;
getPathsSync(type?: Type, mask?: Mask, dir?: Directory): string[];
getPathsAsync(fn: AsyncFunction, type?: Type, mask?: Mask, dir?: Directory): void;
checkExcludes(path: string): boolean;
checkSystemFiles(path: string): boolean;
checkFilters(path: string, stats: any): boolean;
checkFile(path: string, stats: any, mask: Mask, type: Type): number;
getPathsFromParentsSync(mask?: Mask, type?: Type): string[];
getPathsFromParentsAsync(fn: AsyncFunction, mask?: Mask, type?: Type): void;
}
}
declare module "fs-finder" {
import Finder = FsFinder.Finder;
export = Finder;
}
+23
View File
@@ -0,0 +1,23 @@
/// <reference path="fs-mock.d.ts" />
import FS = require("fs-mock");
var fs: FS = new FS({
'Users': {
'David': {
'password.txt': 'my super password'
}
}
}, {
windows: true
});
var fsopts: FS.Opts = {
windows: true,
drives: ["A", "B"],
root: "/"
};
fs.rename("/a/b.txt", "/a/c/txt", (err?: Error): void => {
// nothing
});
+144
View File
@@ -0,0 +1,144 @@
// Type definitions for fs-mock 1.1.3
// Project: https://github.com/sakren/node-fs-mock
// Definitions by: Rogier Schouten <https://github.com/rogierschouten>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module "fs-mock" {
import stream = require("stream");
import events = require("events");
import fs = require("fs");
module FS {
export interface Opts {
windows?: boolean;
drives?: string[];
root?: string;
}
}
class FS {
constructor(content: any, opts?: FS.Opts)
rename(oldPath: string, newPath: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
renameSync(oldPath: string, newPath: string): void;
truncate(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
truncate(path: string, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
truncateSync(path: string, len?: number): void;
ftruncate(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
ftruncate(fd: number, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
ftruncateSync(fd: number, len?: number): void;
chown(path: string, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
chownSync(path: string, uid: number, gid: number): void;
fchown(fd: number, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
fchownSync(fd: number, uid: number, gid: number): void;
lchown(path: string, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
lchownSync(path: string, uid: number, gid: number): void;
chmod(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
chmod(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
chmodSync(path: string, mode: number): void;
chmodSync(path: string, mode: string): void;
fchmod(fd: number, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
fchmod(fd: number, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
fchmodSync(fd: number, mode: number): void;
fchmodSync(fd: number, mode: string): void;
lchmod(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
lchmod(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
lchmodSync(path: string, mode: number): void;
lchmodSync(path: string, mode: string): void;
stat(path: string, callback?: (err: NodeJS.ErrnoException, stats: fs.Stats) => any): void;
lstat(path: string, callback?: (err: NodeJS.ErrnoException, stats: fs.Stats) => any): void;
fstat(fd: number, callback?: (err: NodeJS.ErrnoException, stats: fs.Stats) => any): void;
statSync(path: string): fs.Stats;
lstatSync(path: string): fs.Stats;
fstatSync(fd: number): fs.Stats;
link(srcpath: string, dstpath: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
linkSync(srcpath: string, dstpath: string): void;
symlink(srcpath: string, dstpath: string, type?: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
symlinkSync(srcpath: string, dstpath: string, type?: string): void;
readlink(path: string, callback?: (err: NodeJS.ErrnoException, linkString: string) => any): void;
readlinkSync(path: string): string;
realpath(path: string, callback?: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void;
realpath(path: string, cache: {[path: string]: string}, callback: (err: NodeJS.ErrnoException, resolvedPath: string) =>any): void;
realpathSync(path: string, cache?: {[path: string]: string}): string;
unlink(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
unlinkSync(path: string): void;
rmdir(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
rmdirSync(path: string): void;
mkdir(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
mkdir(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
mkdir(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
mkdirSync(path: string, mode?: number): void;
mkdirSync(path: string, mode?: string): void;
readdir(path: string, callback?: (err: NodeJS.ErrnoException, files: string[]) => void): void;
readdirSync(path: string): string[];
close(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
closeSync(fd: number): void;
open(path: string, flags: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void;
open(path: string, flags: string, mode: number, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void;
open(path: string, flags: string, mode: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void;
openSync(path: string, flags: string, mode?: number): number;
openSync(path: string, flags: string, mode?: string): number;
utimes(path: string, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
utimes(path: string, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void;
utimesSync(path: string, atime: number, mtime: number): void;
utimesSync(path: string, atime: Date, mtime: Date): void;
futimes(fd: number, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
futimes(fd: number, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void;
futimesSync(fd: number, atime: number, mtime: number): void;
futimesSync(fd: number, atime: Date, mtime: Date): void;
fsync(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
fsyncSync(fd: number): void;
write(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void;
writeSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number;
read(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, bytesRead: number, buffer: Buffer) => void): void;
readSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number;
readFile(filename: string, encoding: string, callback: (err: NodeJS.ErrnoException, data: string) => void): void;
readFile(filename: string, options: { encoding: string; flag?: string; }, callback: (err: NodeJS.ErrnoException, data: string) => void): void;
readFile(filename: string, options: { flag?: string; }, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
readFile(filename: string, callback: (err: NodeJS.ErrnoException, data: Buffer) => void ): void;
readFileSync(filename: string, encoding: string): string;
readFileSync(filename: string, options: { encoding: string; flag?: string; }): string;
readFileSync(filename: string, options?: { flag?: string; }): Buffer;
writeFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void;
writeFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
writeFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void;
writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void;
appendFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
appendFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
appendFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void;
appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void;
appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void;
watchFile(filename: string, listener: (curr: fs.Stats, prev: fs.Stats) => void): void;
watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: (curr: fs.Stats, prev: fs.Stats) => void): void;
unwatchFile(filename: string, listener?: (curr: fs.Stats, prev: fs.Stats) => void): void;
watch(filename: string, listener?: (event: string, filename: string) => any): fs.FSWatcher;
watch(filename: string, options: { persistent?: boolean; }, listener?: (event: string, filename: string) => any): fs.FSWatcher;
exists(path: string, callback?: (exists: boolean) => void): void;
existsSync(path: string): boolean;
createReadStream(path: string, options?: {
flags?: string;
encoding?: string;
fd?: string;
mode?: number;
bufferSize?: number;
}): fs.ReadStream;
createReadStream(path: string, options?: {
flags?: string;
encoding?: string;
fd?: string;
mode?: string;
bufferSize?: number;
}): fs.ReadStream;
createWriteStream(path: string, options?: {
flags?: string;
encoding?: string;
string?: string;
}): fs.WriteStream;
}
export = FS;
}
+28
View File
@@ -0,0 +1,28 @@
/// <reference path="ftp.d.ts" />
/// <reference path="../node/node.d.ts" />
import Client = require("ftp");
import fs = require("fs");
var c = new Client();
c.on('ready', (): void => {
c.get('foo.txt', function(err: Error, stream: NodeJS.ReadableStream): void {
if (err) throw err;
stream.once('close', function(): void {
c.end();
});
stream.pipe(fs.createWriteStream('foo.local-copy.txt'));
});
});
// connect to localhost:21 as anonymous
c.connect();
c.connect({
host: "127.0.0.1",
port: 21,
username: "Boo",
password: "secret"
});
+294
View File
@@ -0,0 +1,294 @@
// Type definitions for ftp 0.3.8
// Project: https://github.com/mscdex/node-ftp
// Definitions by: Rogier Schouten <https://github.com/rogierschouten>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module "ftp" {
import events = require("events");
import tls = require("tls");
module Client {
/**
* Options for Client#connect()
*/
export interface Options {
/**
* The hostname or IP address of the FTP server. Default: 'localhost'
*/
host?: string;
/**
* The port of the FTP server. Default: 21
*/
port?: number;
/**
* Set to true for both control and data connection encryption, 'control' for control connection encryption only, or 'implicit' for
* implicitly encrypted control connection (this mode is deprecated in modern times, but usually uses port 990) Default: false
*/
secure?: string|boolean;
/**
* Additional options to be passed to tls.connect(). Default: (none)
*/
secureOptions?: tls.ConnectionOptions;
/**
* Username for authentication. Default: 'anonymous'
*/
user?: string;
/**
* Password for authentication. Default: 'anonymous@'
*/
password?: string;
/**
* How long (in milliseconds) to wait for the control connection to be established. Default: 10000
*/
connTimeout?: number;
/**
* How long (in milliseconds) to wait for a PASV data connection to be established. Default: 10000
*/
pasvTimeout?: number;
/**
* How often (in milliseconds) to send a 'dummy' (NOOP) command to keep the connection alive. Default: 10000
*/
keepalive?: number;
}
/**
* Element returned by Client#list()
*/
export interface ListingElement {
/**
* A single character denoting the entry type: 'd' for directory, '-' for file (or 'l' for symlink on **\*NIX only**).
*/
"type": string;
/**
* The name of the entry
*/
name: string;
/**
* The size of the entry in bytes
*/
size: string;
/**
* The last modified date of the entry
*/
date: Date;
/**
* The various permissions for this entry **(*NIX only)**
*/
rights?: {
/**
* An empty string or any combination of 'r', 'w', 'x'.
*/
user: string;
/**
* An empty string or any combination of 'r', 'w', 'x'.
*/
group: string;
/**
* An empty string or any combination of 'r', 'w', 'x'.
*/
other: string;
};
/**
* The user name or ID that this entry belongs to **(*NIX only)**.
*/
owner?: string;
/**
* The group name or ID that this entry belongs to **(*NIX only)**.
*/
group?: string;
/**
* For symlink entries, this is the symlink's target **(*NIX only)**.
*/
target?: string;
/**
* True if the sticky bit is set for this entry **(*NIX only)**.
*/
sticky?: boolean;
}
}
/**
* FTP client.
*
* Events:
* @event greeting(< string >msg) - Emitted after connection. msg is the text the server sent upon connection.
* @event ready() - Emitted when connection and authentication were sucessful.
* @event close(< boolean >hadErr) - Emitted when the connection has fully closed.
* @event end() - Emitted when the connection has ended.
* @event error(< Error >err) - Emitted when an error occurs. In case of protocol-level errors, err contains
* a 'code' property that references the related 3-digit FTP response code.
*/
class Client extends events.EventEmitter {
/**
* Creates and returns a new FTP client instance.
*/
constructor();
/**
* Connects to an FTP server.
*/
connect(config?: Client.Options): void;
/**
* Closes the connection to the server after any/all enqueued commands have been executed.
*/
end(): void;
/**
* Closes the connection to the server immediately.
*/
destroy(): void;
/**
* Retrieves the directory listing of path.
* @param path defaults to the current working directory.
* @param useCompression defaults to false.
*/
list(path: string, useCompression: boolean, callback: (error: Error, listing: Client.ListingElement[]) => void): void;
list(path: string, callback: (error: Error, listing: Client.ListingElement[]) => void): void;
list(useCompression: boolean, callback: (error: Error, listing: Client.ListingElement[]) => void): void;
list(callback: (error: Error, listing: Client.ListingElement[]) => void): void;
/**
* Retrieves a file at path from the server. useCompression defaults to false
*/
get(path: string, callback: (error: Error, stream: NodeJS.ReadableStream) => void): void;
get(path: string, useCompression: boolean, callback: (error: Error, stream: NodeJS.ReadableStream) => void): void;
/**
* Sends data to the server to be stored as destPath.
* @param input can be a ReadableStream, a Buffer, or a path to a local file.
* @param destPath
* @param useCompression defaults to false.
*/
put(input: NodeJS.ReadableStream|Buffer|string, destPath: string, useCompression: boolean, callback: (error: Error) => void): void;
put(input: NodeJS.ReadableStream|Buffer|string, destPath: string, callback: (error: Error) => void): void;
/**
* Same as put(), except if destPath already exists, it will be appended to instead of overwritten.
* @param input can be a ReadableStream, a Buffer, or a path to a local file.
* @param destPath
* @param useCompression defaults to false.
*/
append(input: NodeJS.ReadableStream|Buffer|string, destPath: string, useCompression: boolean, callback: (error: Error) => void): void;
append(input: NodeJS.ReadableStream|Buffer|string, destPath: string, callback: (error: Error) => void): void;
/**
* Renames oldPath to newPath on the server
*/
rename(oldPath: string, newPath: string, callback: (error: Error) => void): void;
/**
* Logout the user from the server.
*/
logout(callback: (error: Error) => void): void;
/**
* Delete a file on the server
*/
delete(path: string, callback: (error: Error) => void): void;
/**
* Changes the current working directory to path. callback has 2 parameters: < Error >err, < string >currentDir.
* Note: currentDir is only given if the server replies with the path in the response text.
*/
cwd(path: string, callback: (error: Error, currentDir?: string) => void): void;
/**
* Aborts the current data transfer (e.g. from get(), put(), or list())
*/
abort(callback: (error: Error) => void): void;
/**
* Sends command (e.g. 'CHMOD 755 foo', 'QUOTA') using SITE. callback has 3 parameters:
* < Error >err, < _string >responseText, < integer >responseCode.
*/
site(command: string, callback: (error: Error, responseText: string, responseCode: number) => void): void;
/**
* Retrieves human-readable information about the server's status.
*/
status(callback: (error: Error, status: string) => void): void;
/**
* Sets the transfer data type to ASCII.
*/
ascii(callback: (error: Error) => void): void;
/**
* Sets the transfer data type to binary (default at time of connection).
*/
binary(callback: (error: Error) => void): void;
/**
* Optional "standard" commands (RFC 959)
* Creates a new directory, path, on the server. recursive is for enabling a 'mkdir -p' algorithm and defaults to false
*/
mkdir(path: string, recursive: boolean, callback: (error: Error) => void): void;
mkdir(path: string, callback: (error: Error) => void): void;
/**
* Optional "standard" commands (RFC 959)
* Removes a directory, path, on the server. If recursive, this call will delete the contents of the directory if it is not empty
*/
rmdir(path: string, recursive: boolean, callback: (error: Error) => void): void;
rmdir(path: string, callback: (error: Error) => void): void;
/**
* Optional "standard" commands (RFC 959)
* Changes the working directory to the parent of the current directory
*/
cdup(callback: (error: Error) => void): void;
/**
* Optional "standard" commands (RFC 959)
* Retrieves the current working directory
*/
pwd(callback: (error: Error, path: string) => void): void;
/**
* Optional "standard" commands (RFC 959)
* Retrieves the server's operating system.
*/
system(callback: (error: Error, OS: string) => void): void;
/**
* Optional "standard" commands (RFC 959)
* Similar to list(), except the directory is temporarily changed to path to retrieve the directory listing.
* This is useful for servers that do not handle characters like spaces and quotes in directory names well for the LIST command.
* This function is "optional" because it relies on pwd() being available.
*/
listSafe(path: string, useCompression: boolean, callback: (error: Error, listing: Client.ListingElement[]) => void): void;
listSafe(path: string, callback: (error: Error, listing: Client.ListingElement[]) => void): void;
listSafe(useCompression: boolean, callback: (error: Error, listing: Client.ListingElement[]) => void): void;
listSafe(callback: (error: Error, listing: Client.ListingElement[]) => void): void;
/**
* Extended commands (RFC 3659)
* Retrieves the size of path
*/
size(path: string, callback: (error: Error, size: number) => void): void;
/**
* Extended commands (RFC 3659)
* Retrieves the last modified date and time for path
*/
lastMod(path: string, callback: (error: Error, lastMod: Date) => void): void;
/**
* Extended commands (RFC 3659)
* Sets the file byte offset for the next file transfer action (get/put) to byteOffset
*/
restart(byteOffset: number, callback: (error: Error) => void): void;
}
export = Client;
}
+32
View File
@@ -0,0 +1,32 @@
/// <reference path="ftpd.d.ts" />
import ftpd = require("ftpd");
var options: ftpd.FtpServerOptions = {
pasvPortRangeStart: 4000,
pasvPortRangeEnd: 5000,
getInitialCwd: function(connection: ftpd.FtpConnection, callback: (error: Error, path: string) => void): void {
callback(null, "boo");
},
getRoot: function(connection: ftpd.FtpConnection): string {
return '/';
}
};
var host: string = '10.0.0.42';
var server = new ftpd.FtpServer(host, options);
server.on('client:connected', function(conn: ftpd.FtpConnection): void {
conn.on('command:user', function(user: string, success: () => void, failure: () => void): void {
success();
});
conn.on('command:pass', function(
pass: string,
success: (username: string, fs?: ftpd.FtpFileSystem) => void,
failure: () => void) {
success("Rogier");
});
});
server.listen(21);
+202
View File
@@ -0,0 +1,202 @@
// Type definitions for ftpd 0.2.11
// Project: https://github.com/sstur/nodeftpd
// Definitions by: Rogier Schouten <https://github.com/rogierschouten>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module "ftpd" {
import events = require("events");
import fs = require("fs");
import net = require("net");
import tls = require("tls");
/**
* Options for FtpServer constructor
*/
export interface FtpServerOptions {
/**
* Gets the initial working directory for the user. Called after user is authenticated
* Typical cases where you would want/need the callback involve retrieving configurations from external datasources and suchlike.
*/
getInitialCwd: (connection: FtpConnection, callback?: (error: Error, path: string) => void) => void|string;
/**
* Gets the root directory for the user relative to the CWD. Called after getInitialCwd. The user is not able to escape this directory.
* Typical cases where you would want/need the callback involve retrieving configurations from external datasources and suchlike.
*/
getRoot: (connection: FtpConnection, callback?: (error: Error, path: string) => void) => void|string;
/**
* If set to true, then files which the client uploads are buffered in memory and then written to disk using writeFile.
* If false, files are written using writeStream.
*/
useWriteFile?: boolean;
/**
* If set to true, then files which the client uploads are slurped using 'readFile'.
* If false, files are read using readStream.
*/
useReadFile?: boolean;
/**
* Determines the maximum file size (in bytes) for which uploads are buffered in memory before being written to disk.
* Has an effect only if useWriteFile is set to true.
* If uploadMaxSlurpSize is not set, then there is no limit on buffer size.
*/
uploadMaxSlurpSize?: number;
/**
* The maximum number of concurrent calls to fs.stat which will be made when processing a LIST request. Default 5.
*/
maxStatsAtOnce?: number;
/**
* A function which can be used as the argument of an array's sort method. Used to sort filenames for directory listings.
* See [https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/sort] for more info.
*/
filenameSortFunc?: (a: string, b: string) => number;
/**
* A function which is applied to each filename before sorting.
* If set to false, filenames are unaltered.
*/
filenameSortMap?: ((a: string) => string) | boolean;
/**
* If this is set, then filenames are not sorted in responses to the LIST and NLST commands.
*/
dontSortFilenames?: boolean;
/**
* If set to true, then LIST and NLST treat the characters ? and * as literals instead of as wildcards.
*/
noWildcards?: boolean;
/**
* If this is set, the server will allow explicit TLS authentication. Value should be a dictionary which is suitable as the options argument of tls.createServer.
*/
tlsOptions?: tls.TlsOptions;
/**
* If this is set to true, and tlsOptions is also set, then the server will not allow logins over non-secure connections.
* Default false
*/
tlsOnly?: boolean;
/**
* I obviously set this to true when tlsOnly is on -someone needs to update this.
*/
allowUnauthorizedTls?: boolean;
/**
* Integer, specifies the lower-bound port (min port) for creating PASV connections
*/
pasvPortRangeStart?: number;
/**
* Integer, specifies the upper-bound port (max port) for creating PASV connections
*/
pasvPortRangeEnd?: number;
}
/**
* Represents one Ftp connection. Incomplete type definition.
*
* @event command:user (username: string, success: () => void, failure: () => void)
* @event command:pass (password: string, success: (username: string, fs?: FtpFileSystem) => void, failure: () => void)
* The server raises a command:pass event which is given pass, success and failure arguments.
* On successful login, success should be called with a username argument. It may also optionally
* be given a second argument, which should be an object providing an implementation of the API for Node's fs module.
*/
export class FtpConnection extends events.EventEmitter {
server: FtpServer;
socket: net.Socket;
pasv: net.Server;
dataSocket: net.Socket; // the actual data socket
mode: string;
username: string;
cwd: string;
root: string;
hasQuit: boolean;
// State for handling TLS upgrades.
secure: boolean;
pbszReceived: boolean;
}
/**
* Optional mock fs implementation to set in the command:pass event of FtpConnection
*/
export interface FtpFileSystem {
unlink: (path: string, callback?: (err?: NodeJS.ErrnoException) => void) => void;
readdir: (path: string, callback?: (err: NodeJS.ErrnoException, files: string[]) => void) => void;
mkdir: ((path: string, callback?: (err?: NodeJS.ErrnoException) => void) => void)
| ((path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void) => void)
| ((path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void) => void);
open: ((path: string, flags: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any) => void)
| ((path: string, flags: string, mode: number, callback?: (err: NodeJS.ErrnoException, fd: number) => any) => void)
| ((path: string, flags: string, mode: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any) => void);
close: (fd: number, callback?: (err?: NodeJS.ErrnoException) => void) => void;
rmdir: (path: string, callback?: (err?: NodeJS.ErrnoException) => void) => void;
rename: (oldPath: string, newPath: string, callback?: (err?: NodeJS.ErrnoException) => void) => void;
/**
* specific object properties: { mode, isDirectory(), size, mtime }
*/
stat: (path: string, callback?: (err: NodeJS.ErrnoException, stats: fs.Stats) => any) => void;
/**
* if useReadFile option is not set or is false
*/
createReadStream?: (path: string, options?: {
flags?: string;
encoding?: string;
fd?: string;
mode?: string;
bufferSize?: number;
}) => fs.ReadStream;
/**
* if useWriteFile option is not set or is false
*/
createWriteStream?: (path: string, options?: {
flags?: string;
encoding?: string;
string?: string;
}) => fs.WriteStream;
/**
* if useReadFile option is set to 'true'
*/
readFile?:
((filename: string, encoding: string, callback: (err: NodeJS.ErrnoException, data: string) => void) => void)
| ((filename: string, options: { encoding: string; flag?: string; }, callback: (err: NodeJS.ErrnoException, data: string) => void) => void)
| ((filename: string, options: { flag?: string; }, callback: (err: NodeJS.ErrnoException, data: Buffer) => void) => void)
| ((filename: string, callback: (err: NodeJS.ErrnoException, data: Buffer) => void ) => void);
/**
* if useWriteFile option is set to 'true'
*/
writeFile?:
((filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void) => void)
| ((filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void) => void)
| ((filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void) => void);
}
/**
* FTP server
*
* Events:
* @event close net.Server close event
* @event error net.Server error event
* @event client:connected (connection: FtpConnection)
*/
export class FtpServer extends events.EventEmitter {
/**
* @param host host is a string representation of the IP address clients use to connect to the FTP server.
* It's imperative that this actually reflects the remote IP the clients use to access the server,
* as this IP will be used in the establishment of PASV data connections. If this IP is not the one clients use to connect,
* you will see some strange behavior from the client side (hangs).
* @param options See test.js for a simple example.
*/
constructor(host: string, options: FtpServerOptions);
/**
* Start listening, see net.Server.listen()
*/
public listen(port: number, host?: string, backlog?: number, listeningListener?: () => void): void;
/**
* Stop listening
*/
public close(callback?: () => void): void;
}
}
+91
View File
@@ -0,0 +1,91 @@
/// <reference path="http-status.d.ts" />
import httpStatus = require('http-status');
var str: string;
var nmr: number;
str = httpStatus[100];
str = httpStatus[101];
str = httpStatus[200];
str = httpStatus[201];
str = httpStatus[202];
str = httpStatus[203];
str = httpStatus[204];
str = httpStatus[205];
str = httpStatus[206];
str = httpStatus[300];
str = httpStatus[301];
str = httpStatus[302];
str = httpStatus[303];
str = httpStatus[304];
str = httpStatus[305];
str = httpStatus[307];
str = httpStatus[400];
str = httpStatus[401];
str = httpStatus[402];
str = httpStatus[403];
str = httpStatus[404];
str = httpStatus[405];
str = httpStatus[406];
str = httpStatus[407];
str = httpStatus[408];
str = httpStatus[409];
str = httpStatus[410];
str = httpStatus[411];
str = httpStatus[412];
str = httpStatus[413];
str = httpStatus[414];
str = httpStatus[415];
str = httpStatus[416];
str = httpStatus[417];
str = httpStatus[429];
str = httpStatus[500];
str = httpStatus[501];
str = httpStatus[502];
str = httpStatus[503];
str = httpStatus[504];
str = httpStatus[505];
nmr = httpStatus.CONTINUE;
nmr = httpStatus.SWITCHING_PROTOCOLS;
nmr = httpStatus.OK;
nmr = httpStatus.CREATED;
nmr = httpStatus.ACCEPTED;
nmr = httpStatus.NON_AUTHORITATIVE_INFORMATION;
nmr = httpStatus.NO_CONTENT;
nmr = httpStatus.RESET_CONTENT;
nmr = httpStatus.PARTIAL_CONTENT;
nmr = httpStatus.MULTIPLE_CHOICES;
nmr = httpStatus.MOVED_PERMANENTLY;
nmr = httpStatus.FOUND;
nmr = httpStatus.SEE_OTHER;
nmr = httpStatus.NOT_MODIFIED;
nmr = httpStatus.USE_PROXY;
nmr = httpStatus.TEMPORARY_REDIRECT;
nmr = httpStatus.BAD_REQUEST;
nmr = httpStatus.UNAUTHORIZED;
nmr = httpStatus.PAYMENT_REQUIRED;
nmr = httpStatus.FORBIDDEN;
nmr = httpStatus.NOT_FOUND;
nmr = httpStatus.METHOD_NOT_ALLOWED;
nmr = httpStatus.NOT_ACCEPTABLE;
nmr = httpStatus.PROXY_AUTHENTICATION_REQUIRED;
nmr = httpStatus.REQUEST_TIMEOUT;
nmr = httpStatus.CONFLICT;
nmr = httpStatus.GONE;
nmr = httpStatus.LENGTH_REQUIRED;
nmr = httpStatus.PRECONDITION_FAILED;
nmr = httpStatus.REQUEST_ENTITY_TOO_LARGE;
nmr = httpStatus.REQUEST_URI_TOO_LONG;
nmr = httpStatus.UNSUPPORTED_MEDIA_TYPE;
nmr = httpStatus.REQUESTED_RANGE_NOT_SATISFIABLE;
nmr = httpStatus.EXPECTATION_FAILED;
nmr = httpStatus.TOO_MANY_REQUESTS;
nmr = httpStatus.INTERNAL_SERVER_ERROR;
nmr = httpStatus.NOT_IMPLEMENTED;
nmr = httpStatus.BAD_GATEWAY;
nmr = httpStatus.SERVICE_UNAVAILABLE;
nmr = httpStatus.GATEWAY_TIMEOUT;
nmr = httpStatus.HTTP_VERSION_NOT_SUPPORTED;
+95
View File
@@ -0,0 +1,95 @@
// Type definitions for http-status v0.1.8
// Project: https://github.com/wdavidw/node-http-status
// Definitions by: Michael Zabka <https://github.com/misak113/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface HttpStatus {
100: string;
101: string;
200: string;
201: string;
202: string;
203: string;
204: string;
205: string;
206: string;
300: string;
301: string;
302: string;
303: string;
304: string;
305: string;
307: string;
400: string;
401: string;
402: string;
403: string;
404: string;
405: string;
406: string;
407: string;
408: string;
409: string;
410: string;
411: string;
412: string;
413: string;
414: string;
415: string;
416: string;
417: string;
429: string;
500: string;
501: string;
502: string;
503: string;
504: string;
505: string;
CONTINUE: number;
SWITCHING_PROTOCOLS: number;
OK: number;
CREATED: number;
ACCEPTED: number;
NON_AUTHORITATIVE_INFORMATION: number;
NO_CONTENT: number;
RESET_CONTENT: number;
PARTIAL_CONTENT: number;
MULTIPLE_CHOICES: number;
MOVED_PERMANENTLY: number;
FOUND: number;
SEE_OTHER: number;
NOT_MODIFIED: number;
USE_PROXY: number;
TEMPORARY_REDIRECT: number;
BAD_REQUEST: number;
UNAUTHORIZED: number;
PAYMENT_REQUIRED: number;
FORBIDDEN: number;
NOT_FOUND: number;
METHOD_NOT_ALLOWED: number;
NOT_ACCEPTABLE: number;
PROXY_AUTHENTICATION_REQUIRED: number;
REQUEST_TIMEOUT: number;
CONFLICT: number;
GONE: number;
LENGTH_REQUIRED: number;
PRECONDITION_FAILED: number;
REQUEST_ENTITY_TOO_LARGE: number;
REQUEST_URI_TOO_LONG: number;
UNSUPPORTED_MEDIA_TYPE: number;
REQUESTED_RANGE_NOT_SATISFIABLE: number;
EXPECTATION_FAILED: number;
TOO_MANY_REQUESTS: number;
INTERNAL_SERVER_ERROR: number;
NOT_IMPLEMENTED: number;
BAD_GATEWAY: number;
SERVICE_UNAVAILABLE: number;
GATEWAY_TIMEOUT: number;
HTTP_VERSION_NOT_SUPPORTED: number
}
declare var httpStatus: HttpStatus;
declare module 'http-status' {
export = httpStatus;
}
+17
View File
@@ -712,6 +712,23 @@ describe("Asynchronous specs", function () {
expect(value).toBeGreaterThan(0);
done();
});
describe("long asynchronous specs", function() {
beforeEach(function(done) {
done();
}, 1000);
it("takes a long time", function(done) {
setTimeout(function() {
done();
}, 9000);
}, 10000);
afterEach(function(done) {
done();
}, 1000);
});
});
describe("Fail", function () {
+14 -14
View File
@@ -10,25 +10,25 @@ declare function describe(description: string, specDefinitions: () => void): voi
declare function fdescribe(description: string, specDefinitions: () => void): void;
declare function xdescribe(description: string, specDefinitions: () => void): void;
declare function it(expectation: string, assertion?: () => void): void;
declare function it(expectation: string, assertion?: (done: () => void) => void): void;
declare function fit(expectation: string, assertion?: () => void): void;
declare function fit(expectation: string, assertion?: (done: () => void) => void): void;
declare function xit(expectation: string, assertion?: () => void): void;
declare function xit(expectation: string, assertion?: (done: () => void) => void): void;
declare function it(expectation: string, assertion?: () => void, timeout?: number): void;
declare function it(expectation: string, assertion?: (done: () => void) => void, timeout?: number): void;
declare function fit(expectation: string, assertion?: () => void, timeout?: number): void;
declare function fit(expectation: string, assertion?: (done: () => void) => void, timeout?: number): void;
declare function xit(expectation: string, assertion?: () => void, timeout?: number): void;
declare function xit(expectation: string, assertion?: (done: () => void) => void, timeout?: number): void;
/** If you call the function pending anywhere in the spec body, no matter the expectations, the spec will be marked pending. */
declare function pending(): void;
declare function beforeEach(action: () => void): void;
declare function beforeEach(action: (done: () => void) => void): void;
declare function afterEach(action: () => void): void;
declare function afterEach(action: (done: () => void) => void): void;
declare function beforeEach(action: () => void, timeout?: number): void;
declare function beforeEach(action: (done: () => void) => void, timeout?: number): void;
declare function afterEach(action: () => void, timeout?: number): void;
declare function afterEach(action: (done: () => void) => void, timeout?: number): void;
declare function beforeAll(action: () => void): void;
declare function beforeAll(action: (done: () => void) => void): void;
declare function afterAll(action: () => void): void;
declare function afterAll(action: (done: () => void) => void): void;
declare function beforeAll(action: () => void, timeout?: number): void;
declare function beforeAll(action: (done: () => void) => void, timeout?: number): void;
declare function afterAll(action: () => void, timeout?: number): void;
declare function afterAll(action: (done: () => void) => void, timeout?: number): void;
declare function expect(spy: Function): jasmine.Matchers;
declare function expect(actual: any): jasmine.Matchers;
@@ -0,0 +1,19 @@
/// <reference path="./jquery.contextMenu.d.ts" />
//http://medialize.github.io/jQuery-contextMenu/docs.html
//Disable a contextMenu trigger
$(".some-selector").contextMenu(false);
//Manually show a contextMenu
$(".some-selector").contextMenu();
$(".some-selector").contextMenu({x: 123, y: 123});
//Manually hide a contextMenu
$(".some-selector").contextMenu("hide");
//Unregister contextMenu
$.contextMenu('destroy', ".some-selector");
//Unregister all contextMenus
$.contextMenu('destroy');
+11 -5
View File
@@ -1,4 +1,4 @@
// Type definitions for jQuery contextMenu 1.6.6
// Type definitions for jQuery contextMenu 1.7.0
// Project: http://medialize.github.com/jQuery-contextMenu/
// Definitions by: Natan Vivo <https://github.com/nvivo/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -11,9 +11,9 @@ interface JQueryContextMenuOptions {
trigger?: string;
autoHide?: boolean;
delay?: number;
determinePosition?: (menu) => void;
position?: (opt, x, y) => void;
positionSubmenu?: (menu) => void;
determinePosition?: (menu: JQuery) => void;
position?: (opt: JQuery, x: number, y: number) => void;
positionSubmenu?: (menu: JQuery) => void;
zIndex?: number;
animation?: {
duration?: number;
@@ -26,9 +26,15 @@ interface JQueryContextMenuOptions {
};
callback?: (key: any, options: any) => any;
items: any;
reposition?: boolean;
className?: string;
}
interface JQueryStatic {
contextMenu(options?: JQueryContextMenuOptions): JQuery;
contextMenu(type: string): JQuery;
contextMenu(type: string, selector?: any): JQuery;
}
interface JQuery {
contextMenu(options?: any): JQuery;
}
@@ -1 +1 @@
--noImplicitAny
+4
View File
@@ -20,6 +20,10 @@ interface JQuery {
declare module Fancytree {
interface Fancytree {
$div: JQuery;
rootNode: FancytreeNode;
/** Activate node with a given key and fire focus and
* activate events. A prevously activated node will be
* deactivated. If activeVisible option is set, all parents
+9 -1
View File
@@ -276,7 +276,15 @@ interface JQueryGenericPromise<T> {
* @param doneFilter A function that is called when the Deferred is resolved.
* @param failFilter An optional function that is called when the Deferred is rejected.
*/
then<U>(doneFilter: (value: T, ...values: any[]) => U|JQueryPromise<U>, failFilter?: (...reasons: any[]) => U|JQueryPromise<U>, progressFilter?: (...progression: any[]) => any): JQueryPromise<U>;
then<U>(doneFilter: (value?: T, ...values: any[]) => U|JQueryPromise<U>, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise<U>;
/**
* Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.
*
* @param doneFilter A function that is called when the Deferred is resolved.
* @param failFilter An optional function that is called when the Deferred is rejected.
*/
then(doneFilter: (value?: T, ...values: any[]) => void, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise<void>;
}
/**
+569
View File
@@ -0,0 +1,569 @@
/// <reference path='knex.d.ts' />
/// <reference path='../lodash/lodash.d.ts' />
import Knex = require('knex');
import _ = require('lodash');
'use strict';
// Initializing the Library
var knex = Knex({
client: 'sqlite3',
connection: {
filename: "./mydb.sqlite"
}
});
var knex = Knex({
client: 'mysql',
connection: {
socketPath : '/path/to/socket.sock',
user : 'your_database_user',
password : 'your_database_password',
database : 'myapp_test'
}
});
// Pooling
var knex = Knex({
client: 'mysql',
connection: {
host : '127.0.0.1',
user : 'your_database_user',
password : 'your_database_password',
database : 'myapp_test'
},
pool: {
min: 0,
max: 7
}
});
// Migrations
var knex = Knex({
client: 'mysql',
connection: {
host : '127.0.0.1',
user : 'your_database_user',
password : 'your_database_password',
database : 'myapp_test'
},
migrations: {
tableName: 'migrations'
}
});
// Knex Query Builder
knex.select('title', 'author', 'year').from('books');
knex.select().table('books');
knex.avg('sum_column1').from(function() {
this.sum('column1 as sum_column1').from('t1').groupBy('column1').as('t1')
}).as('ignored_alias');
knex.column('title', 'author', 'year').select().from('books');
knex.column(['title', 'author', 'year']).select().from('books');
knex.select('*').from('users');
knex('users').where({
first_name: 'Test',
last_name: 'User'
}).select('id');
knex('users').where('id', 1);
knex('users').where(() => {
this.where('id', 1).orWhere('id', '>', 10)
}).orWhere({name: 'Tester'});
knex('users').where('votes', '>', 100);
var subquery = knex('users').where('votes', '>', 100).andWhere('status', 'active').orWhere('name', 'John').select('id');
knex('accounts').where('id', 'in', subquery);
knex.select('name').from('users')
.whereIn('id', [1, 2, 3])
.orWhereIn('id', [4, 5, 6]);
var subquery = knex.select('id').from('accounts');
knex.select('name').from('users')
.whereIn('account_id', subquery);
knex('users')
.where('name', '=', 'John')
.orWhere(function() {
this.where('votes', '>', 100).andWhere('title', '<>', 'Admin');
});
knex('users').whereNotIn('id', [1, 2, 3]);
knex('users').where('name', 'like', '%Test%').orWhereNotIn('id', [1, 2, 3]);
knex('users').whereNull('updated_at');
knex('users').whereNotNull('created_at');
knex('users').whereExists(function() {
this.select('*').from('accounts').whereRaw('users.account_id = accounts.id');
});
knex('users').whereExists(knex.select('*').from('accounts').whereRaw('users.account_id = accounts.id'));
knex('users').whereNotExists(function() {
this.select('*').from('accounts').whereRaw('users.account_id = accounts.id');
});
knex('users').whereBetween('votes', [1, 100]);
knex('users').whereNotBetween('votes', [1, 100]);
knex('users').whereRaw('id = ?', [1]);
// Join methods
knex('users')
.join('contacts', 'users.id', '=', 'contacts.user_id')
.select('users.id', 'contacts.phone');
knex('users')
.join('contacts', 'users.id', 'contacts.user_id')
.select('users.id', 'contacts.phone');
knex.select('*').from('users').join('accounts', function() {
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id')
});
knex.select('*').from('users').join('accounts', 'accounts.type', knex.raw('?', ['admin']));
knex.from('users').innerJoin('accounts', 'users.id', 'accounts.user_id');
knex.table('users').innerJoin('accounts', 'users.id', '=', 'accounts.user_id');
knex('users').innerJoin('accounts', function() {
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id')
});
knex.select('*').from('users').leftJoin('accounts', 'users.id', 'accounts.user_id');
knex.select('*').from('users').leftJoin('accounts', function() {
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id')
});
knex.select('*').from('users').leftOuterJoin('accounts', 'users.id', 'accounts.user_id');
knex.select('*').from('users').leftOuterJoin('accounts', function() {
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id')
});
knex.select('*').from('users').rightJoin('accounts', 'users.id', 'accounts.user_id');
knex.select('*').from('users').rightJoin('accounts', function() {
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id')
});
knex.select('*').from('users').rightOuterJoin('accounts', 'users.id', 'accounts.user_id');
knex.select('*').from('users').rightOuterJoin('accounts', function() {
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id')
});
knex.select('*').from('users').outerJoin('accounts', 'users.id', 'accounts.user_id');
knex.select('*').from('users').outerJoin('accounts', function() {
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id')
});
knex.select('*').from('users').fullOuterJoin('accounts', 'users.id', 'accounts.user_id');
knex.select('*').from('users').fullOuterJoin('accounts', function() {
this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id')
});
knex.select('*').from('users').crossJoin('accounts', 'users.id', 'accounts.user_id');
knex.select('*').from('accounts').joinRaw('natural full join table1').where('id', 1);
knex.select('*').from('accounts').join(knex.raw('natural full join table1')).where('id', 1);
knex('customers')
.distinct('first_name', 'last_name')
.select();
knex('users').groupBy('count');
knex.select('year', knex.raw('SUM(profit)')).from('sales').groupByRaw('year WITH ROLLUP');
knex('users').orderBy('name', 'desc');
knex.select('*').from('table').orderByRaw('col NULLS LAST DESC');
knex('books').insert({title: 'Slaughterhouse Five'});
knex('coords').insert([{x: 20}, {y: 30}, {x: 10, y: 20}]);
knex.insert([{title: 'Great Gatsby'}, {title: 'Fahrenheit 451'}], 'id').into('books');
knex('books')
.returning('id')
.insert({title: 'Slaughterhouse Five'});
knex('books')
.returning('id')
.insert([{title: 'Great Gatsby'}, {title: 'Fahrenheit 451'}]);
knex('books')
.where('published_date', '<', 2000)
.update({
status: 'archived'
});
knex('books').update('title', 'Slaughterhouse Five');
knex('accounts')
.where('activated', false)
.del();
var someExternalMethod: Function;
knex.transaction(function(trx) {
knex('books').transacting(trx).insert({name: 'Old Books'})
.then(function(resp) {
var id = resp[0];
return someExternalMethod(id, trx);
})
.then(trx.commit)
.catch(trx.rollback);
}).then(function() {
console.log('Transaction complete.');
}).catch(function(err) {
console.error(err);
});
knex.transaction(function(trx) {
knex('tableName')
.transacting(trx)
.forUpdate()
.select('*');
knex('tableName')
.transacting(trx)
.forShare()
.select('*')
});
knex('users').count('active');
knex('users').min('age');
knex('users').min('age as a');
knex('users').max('age');
knex('users').max('age as a');
knex('users').sum('products');
knex('users').sum('products as p');
knex('users').avg('age');
knex('users').avg('age as a');
knex('accounts')
.where('userid', '=', 1)
.increment('balance', 10);
knex('accounts').where('userid', '=', 1).decrement('balance', 5);
knex('accounts').truncate();
knex.table('users').pluck('id').then(function(ids) {
console.log(ids);
});
knex.table('users').first('id', 'name').then(function(row) {
console.log(row);
});
// Using trx as a query builder:
knex.transaction(function(trx) {
var info: any;
var books: any[] = [
{title: 'Canterbury Tales'},
{title: 'Moby Dick'},
{title: 'Hamlet'}
];
return trx
.insert({name: 'Old Books'}, 'id')
.into('catalogues')
.then(function(ids) {
return Promise.map(books, function(book) {
book.catalogue_id = ids[0];
// Some validation could take place here.
return trx.insert(info).into('books');
});
});
})
.then(function(inserts) {
console.log(inserts.length + ' new books saved.');
})
.catch(function(error) {
// If we get here, that means that neither the 'Old Books' catalogues insert,
// nor any of the books inserts will have taken place.
console.error(error);
});
// Using trx as a transaction object:
knex.transaction(function(trx) {
var info: any;
var books: any[] = [
{title: 'Canterbury Tales'},
{title: 'Moby Dick'},
{title: 'Hamlet'}
];
knex.insert({name: 'Old Books'}, 'id')
.into('catalogues')
.transacting(trx)
.then(function(ids) {
return Promise.map(books, function(book) {
book.catalogue_id = ids[0];
// Some validation could take place here.
return knex.insert(info).into('books').transacting(trx);
});
})
.then(trx.commit)
.catch(trx.rollback);
})
.then(function(inserts) {
console.log(inserts.length + ' new books saved.');
})
.catch(function(error) {
// If we get here, that means that neither the 'Old Books' catalogues insert,
// nor any of the books inserts will have taken place.
console.error(error);
});
knex.schema.createTable('users', function (table) {
table.increments();
table.string('name');
table.timestamps();
});
knex.schema.renameTable('users', 'old_users');
knex.schema.dropTable('users');
knex.schema.hasTable('users').then(function(exists) {
if (!exists) {
return knex.schema.createTable('users', function(t) {
t.increments('id').primary();
t.string('first_name', 100);
t.string('last_name', 100);
t.text('bio');
});
}
});
var tableName: string;
var columnName: string;
knex.schema.hasColumn(tableName, columnName);
knex.schema.dropTableIfExists('users');
knex.schema.table('users', function (table) {
table.dropColumn('name');
table.string('first_name');
table.string('last_name');
});
knex.schema.raw("SET sql_mode='TRADITIONAL'")
.table('users', function (table) {
table.dropColumn('name');
table.string('first_name');
table.string('last_name');
});
knex('users')
.select(knex.raw('count(*) as user_count, status'))
.where(knex.raw(1))
.orWhere(knex.raw('status <> ?', [1]))
.groupBy('status');
knex.raw('select * from users where id = ?', [1]).then(function(resp) {
// ...
});
(() => {
var subcolumn = knex.raw('select avg(salary) from employee where dept_no = e.dept_no')
.wrap('(', ') avg_sal_dept');
knex.select('e.lastname', 'e.salary', subcolumn)
.from('employee as e')
.whereRaw('dept_no = e.dept_no');
})();
(() => {
var subcolumn = knex.avg('salary')
.from('employee')
.whereRaw('dept_no = e.dept_no')
.as('avg_sal_dept');
knex.select('e.lastname', 'e.salary', subcolumn)
.from('employee as e')
.whereRaw('dept_no = e.dept_no');
})();
var x: number;
knex.select('name').from('users')
.where('id', '>', 20)
.andWhere('id', '<', 200)
.limit(10)
.offset(x)
.then(function(rows: any) {
return _.pluck(rows, 'name');
})
.then(function(names: any) {
return knex.select('id').from('nicknames').whereIn('nickname', names);
})
.then(function(rows) {
console.log(rows);
})
.catch(function(error) {
console.error(error)
});
knex.select('*').from('users').where({name: 'Tim'})
.then(function(rows) {
return knex.insert({user_id: rows[0].id, name: 'Test'}, 'id').into('accounts');
}).then(function(id) {
console.log('Inserted Account ' + id);
}).catch(function(error) {
console.error(error);
});
knex.insert({id: 1, name: 'Test'}, 'id').into('accounts')
.catch(function(error) {
console.error(error);
}).then(function() {
return knex.select('*').from('accounts').where('id', 1);
}).then(function(rows) {
console.log(rows[0]);
}).catch(function(error) {
console.error(error);
});
var query: any;
query.then(function(x: any) {
// doSideEffectsHere(x);
return x;
});
knex.select('name').from('users').limit(10).map(function(row: any) {
return row.name;
}).then(function(names) {
console.log(names);
}).catch(function(e) {
console.error(e);
});
knex.select('name').from('users').limit(10).reduce(function(memo: any, row: any) {
memo.names.push(row.name);
memo.count++;
return memo;
}, {count: 0, names: []}).then(function(obj) {
console.log(obj);
}).catch(function(e) {
console.error(e);
});
knex.select('name').from('users')
.limit(10)
.bind(console)
.then(console.log)
.catch(console.error);
var values: any[];
// Without return:
knex.insert(values).into('users')
.then(function() {
return {inserted: true};
});
knex.insert(values).into('users').return({inserted: true});
knex.select('name').from('users')
.where('id', '>', 20)
.andWhere('id', '<', 200)
.limit(10)
.offset(x)
.exec(function(err: any, rows: any[]) {
if (err) return console.error(err);
knex.select('id').from('nicknames').whereIn('nickname', _.pluck(rows, 'name'))
.exec(function(err: any, rows: any[]) {
if (err) return console.error(err);
console.log(rows);
});
});
// Retrieve the stream:
var stream = knex.select('*').from('users').stream();
var writableStream: any;
stream.pipe(writableStream);
// With options:
var stream = knex.select('*').from('users').stream({highWaterMark: 5});
stream.pipe(writableStream);
// Use as a promise:
(() => {
var stream = knex.select('*').from('users').where(knex.raw('id = ?', [1])).stream(function(stream: any) {
stream.pipe(writableStream);
}).then(function() {
// ...
}).catch(function(e: Error) {
console.error(e);
});
})();
var stream = knex.select('*').from('users').pipe(writableStream);
var app: any;
knex.select('*')
.from('users')
.on('query', function(data: any) {
app.log(data);
})
.then(function() {
// ...
});
knex.select('*').from('users').where(knex.raw('id = ?', [1])).toString();
knex.select('*').from('users').where(knex.raw('id = ?', [1])).toSQL();
//
// Migrations
//
var config = { };
knex.migrate.make(name, config);
knex.migrate.make(name);
knex.migrate.latest(config);
knex.migrate.latest();
knex.migrate.rollback(config);
knex.migrate.rollback();
knex.migrate.currentversion(config);
knex.migrate.currentversion();
knex.seed.make(name, config);
knex.seed.make(name);
knex.seed.run(config);
knex.seed.run();
+457
View File
@@ -0,0 +1,457 @@
// Type definitions for Knex.js
// Project: https://github.com/tgriesser/knex
// Definitions by: Qubo <https://github.com/tkQubo>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../bluebird/bluebird.d.ts" />
/// <reference path="../node/node.d.ts" />
declare module "knex" {
import Promise = require("bluebird");
import events = require("events");
type Callback = Function;
type Client = Function;
type Value = string|number|boolean|Date;
type ColumnName = string|Raw|QueryBuilder;
module KnexStatic {
interface ConfigStatic { }
}
interface KnexStatic {
(config: Config): Knex;
}
interface Knex extends QueryInterface { }
interface Knex {
(tableName?: string): QueryBuilder;
VERSION: string;
__knex__: string;
raw: RawBuilder;
transaction: <R>(transactionScope: ((trx: Transaction) => void)) => Promise<any>;
destroy(callback: Function): void;
destroy(): Promise<void>;
client: any;
migrate: any;
seed: any;
fn: any;
}
//
// QueryInterface
//
interface QueryInterface {
select: Select;
as: As;
columns: Select;
column: Select;
from: Table;
into: Table;
table: Table;
distinct: Distinct;
// Joins
join: Join;
joinRaw: JoinRaw;
innerJoin: Join;
leftJoin: Join;
leftOuterJoin: Join;
rightJoin: Join;
rightOuterJoin: Join;
outerJoin: Join;
fullOuterJoin: Join;
crossJoin: Join;
// Wheres
where: Where;
andWhere: Where;
orWhere: Where;
whereRaw: WhereRaw;
whereWrapped: WhereWrapped;
havingWrapped: WhereWrapped;
orWhereRaw: WhereRaw;
whereExists: WhereExists;
orWhereExists: WhereExists;
whereNotExists: WhereExists;
orWhereNotExists: WhereExists;
whereIn: WhereIn;
orWhereIn: WhereIn;
whereNotIn: WhereIn;
orWhereNotIn: WhereIn;
whereNull: WhereNull;
orWhereNull: WhereNull;
whereNotNull: WhereNull;
orWhereNotNull: WhereNull;
whereBetween: WhereBetween;
whereNotBetween: WhereBetween;
orWhereBetween: WhereBetween;
orWhereNotBetween: WhereBetween;
// Group by
groupBy: GroupBy;
groupByRaw: RawQueryBuilder;
// Order by
orderBy: OrderBy;
orderByRaw: RawQueryBuilder;
// Union
union: Union;
unionAll(callback: Function): QueryBuilder;
// Having
having: Having;
havingRaw: RawQueryBuilder;
orHaving: Having;
orHavingRaw: RawQueryBuilder;
// Paging
offset(offset: number): QueryBuilder;
limit(limit: number): QueryBuilder;
// Aggregation
count(columnName?: string): QueryBuilder;
min(columnName: string): QueryBuilder;
max(columnName: string): QueryBuilder;
sum(columnName: string): QueryBuilder;
avg(columnName: string): QueryBuilder;
increment(columnName: string, amount?: number): QueryBuilder;
decrement(columnName: string, amount?: number): QueryBuilder;
// Others
first(...columns: string[]): QueryBuilder;
debug(enabled?: boolean): QueryBuilder;
pluck(column: string): QueryBuilder;
insert(data: any, returning?: string): QueryBuilder;
update(data: any, returning?: string): QueryBuilder;
update(columnName: string, value: Value, returning?: string): QueryBuilder;
returning(column: string): QueryBuilder;
del(returning?: string): QueryBuilder;
delete(returning?: string): QueryBuilder;
truncate(): QueryBuilder;
transacting(trx: Transaction): QueryBuilder;
connection(connection: any): QueryBuilder;
}
interface As {
(columnName: string): QueryBuilder;
}
interface Select extends ColumnNameQueryBuilder {
}
interface Table {
(tableName: string): QueryBuilder;
(callback: Function): QueryBuilder;
}
interface Distinct extends ColumnNameQueryBuilder {
}
interface Join {
(raw: Raw): QueryBuilder;
(tableName: string, callback: Function): QueryBuilder;
(tableName: string, column1: string, column2: string): QueryBuilder;
(tableName: string, column1: string, raw: Raw): QueryBuilder;
(tableName: string, column1: string, operator: string, column2: string): QueryBuilder;
}
interface JoinRaw {
(tableName: string, binding?: Value): QueryBuilder;
}
interface Where extends WhereRaw, WhereWrapped, WhereNull {
(object: Object): QueryBuilder;
(columnName: string, value: Value): QueryBuilder;
(columnName: string, operator: string, value: Value): QueryBuilder;
(columnName: string, operator: string, query: QueryBuilder): QueryBuilder;
}
interface WhereRaw extends RawQueryBuilder {
(condition: boolean): QueryBuilder;
}
interface WhereWrapped {
(callback: Function): QueryBuilder;
}
interface WhereNull {
(columnName: string): QueryBuilder;
}
interface WhereIn {
(columnName: string, values: Value[]): QueryBuilder;
(columnName: string, callback: Function): QueryBuilder;
(columnName: string, query: QueryBuilder): QueryBuilder;
}
interface WhereBetween {
(columnName: string, range: [Value, Value]): QueryBuilder;
}
interface WhereExists {
(callback: Function): QueryBuilder;
(query: QueryBuilder): QueryBuilder;
}
interface WhereNull {
(columnName: string): QueryBuilder;
}
interface WhereIn {
(columnName: string, values: Value[]): QueryBuilder;
}
interface GroupBy extends RawQueryBuilder, ColumnNameQueryBuilder {
}
interface OrderBy {
(columnName: string, direction?: string): QueryBuilder;
}
interface Union {
(callback: Function, wrap?: boolean): QueryBuilder;
(callbacks: Function[], wrap?: boolean): QueryBuilder;
(...callbacks: Function[]): QueryBuilder;
// (...callbacks: Function[], wrap?: boolean): QueryInterface;
}
interface Having extends RawQueryBuilder, WhereWrapped {
(tableName: string, column1: string, operator: string, column2: string): QueryBuilder;
}
// commons
interface ColumnNameQueryBuilder {
(...columnNames: ColumnName[]): QueryBuilder;
(columnNames: ColumnName[]): QueryBuilder;
}
interface RawQueryBuilder {
(sql: string, ...bindings: Value[]): QueryBuilder;
(sql: string, bindings: Value[]): QueryBuilder;
(raw: Raw): QueryBuilder;
}
// Raw
interface Raw extends events.EventEmitter, ChainableInterface {
wrap(before: string, after: string): Raw;
}
interface RawBuilder {
(value: Value): Raw;
(sql: string, ...bindings: Value[]): Raw;
(sql: string, bindings: Value[]): Raw;
}
//
// QueryBuilder
//
interface QueryBuilder extends QueryInterface, ChainableInterface {
or: QueryBuilder;
and: QueryBuilder;
//TODO: Promise?
columnInfo(column?: string): Promise<ColumnInfo>;
forUpdate(): QueryBuilder;
forShare(): QueryBuilder;
toSQL(): Sql;
on(event: string, callback: Function): QueryBuilder;
}
interface Sql {
method: string;
options: any;
bindings: Value[];
sql: string;
}
//
// Chainable interface
//
interface ChainableInterface extends Promise<any> {
toQuery(): string;
options(options: any): QueryBuilder;
stream(options?: any, callback?: (builder: QueryBuilder) => any): QueryBuilder;
stream(callback?: (builder: QueryBuilder) => any): QueryBuilder;
pipe(writable: any): QueryBuilder;
exec(callback: Function): QueryBuilder;
}
interface Transaction extends QueryBuilder {
commit: any;
rollback: any;
}
//
// Schema builder
//
interface Knex {
schema: SchemaBuilder;
}
interface SchemaBuilder {
createTable(tableName: string, callback: (tableBuilder: CreateTableBuilder) => any): void;
renameTable(oldTableName: string, newTableName: string): void;
dropTable(tableName: string): void;
hasTable(tableName: string): Promise<boolean>;
hasColumn(tableName: string, columnName: string): Promise<boolean>;
table(tableName: string, callback: (tableBuilder: AlterTableBuilder) => any): void;
dropTableIfExists(tableName: string): void;
raw(statement: string): SchemaBuilder;
}
interface TableBuilder {
increments(columnName?: string): ColumnBuilder;
dropColumn(columnName: string): TableBuilder;
dropColumns(...columnNames: string[]): TableBuilder;
renameColumn(from: string, to: string): ColumnBuilder;
integer(columnName: string): ColumnBuilder;
bigInteger(columnName: string): ColumnBuilder;
text(columnName: string, textType?: string): ColumnBuilder;
string(columnName: string, length?: number): ColumnBuilder;
float(columnName: string, precision?: number, scale?: number): ColumnBuilder;
decimal(columnName: string, precision?: number, scale?: number): ColumnBuilder;
boolean(columnName: string): ColumnBuilder;
date(columnName: string): ColumnBuilder;
dateTime(columnName: string): ColumnBuilder;
time(columnName: string): ColumnBuilder;
timestamp(columnName: string): ColumnBuilder;
timestamps(): ColumnBuilder;
binary(columnName: string): ColumnBuilder;
enum(columnName: string): ColumnBuilder;
enu(columnName: string): ColumnBuilder;
json(columnName: string): ColumnBuilder;
uuid(columnName: string): ColumnBuilder;
comment(val: string): TableBuilder;
specificType(columnName: string, type: string): ColumnBuilder;
}
interface CreateTableBuilder extends TableBuilder {
}
interface MySqlTableBuilder extends CreateTableBuilder {
engine(val: string): CreateTableBuilder;
charset(val: string): CreateTableBuilder;
collate(val: string): CreateTableBuilder;
}
interface AlterTableBuilder extends TableBuilder {
}
interface MySqlAlterTableBuilder extends AlterTableBuilder {
}
interface ColumnBuilder {
index(indexName?: string): ColumnBuilder;
primary(): ColumnBuilder;
unique(): ColumnBuilder;
references(columnName: string): ReferencingColumnBuilder;
onDelete(command: string): ColumnBuilder;
onUpdate(command: string): ColumnBuilder;
defaultTo(value: Value): ColumnBuilder;
unsigned(): ColumnBuilder;
notNullable(): ColumnBuilder;
nullable(): ColumnBuilder;
comment(value: string): ColumnBuilder;
}
interface PostgreSqlColumnBuilder extends ColumnBuilder {
index(indexName?: string, indexType?: string): ColumnBuilder;
}
interface ReferencingColumnBuilder {
inTable(tableName: string): ColumnBuilder;
}
interface AlterColumnBuilder extends ColumnBuilder {
}
interface MySqlAlterColumnBuilder extends AlterColumnBuilder {
first(): AlterColumnBuilder;
after(columnName: string): AlterColumnBuilder;
}
//
// Configurations
//
interface ColumnInfo {
defaultValue: Value;
type: string;
maxLength: number;
nullable: boolean;
}
interface Config {
client?: string;
dialect?: string;
connection: string|ConnectionConfig|
Sqlite3ConnectionConfig|SocketConnectionConfig;
pool?: PoolConfig;
migrations?: MigrationConfig;
}
interface ConnectionConfig {
host: string;
user: string;
password: string;
database: string;
debug?: boolean;
}
/** Used with SQLite3 adapter */
interface Sqlite3ConnectionConfig {
filename: string;
debug?: boolean;
}
interface SocketConnectionConfig {
socketPath: string;
user: string;
password: string;
database: string;
debug?: boolean;
}
interface PoolConfig {
name?: string;
create?: Function;
destroy?: Function;
min?: number;
max?: number;
refreshIdle?: boolean;
idleTimeoutMillis?: number;
reapIntervalMillis?: number;
returnToHead?: boolean;
priorityRange?: number;
validate?: Function;
log?: boolean;
}
interface MigrationConfig {
database?: string;
directory?: string;
extension?: string;
tableName?: string;
}
var _: KnexStatic;
export = _;
}
+8 -5
View File
@@ -121,6 +121,8 @@ interface KnockoutBindingContext {
$rawData: any | KnockoutObservable<any>;
$index?: KnockoutObservable<number>;
$parentContext?: KnockoutBindingContext;
$component: any;
$componentTemplateNodes: Node[];
extend(properties: any): any;
createChildContext(dataItemOrAccessor: any, dataItemAlias?: any, extendCallback?: Function): any;
@@ -133,8 +135,8 @@ interface KnockoutAllBindingsAccessor {
}
interface KnockoutBindingHandler {
init?: (element: any, valueAccessor: () => any, allBindingsAccessor: KnockoutAllBindingsAccessor, viewModel: any, bindingContext: KnockoutBindingContext) => void | { controlsDescendantBindings: boolean; };
update?: (element: any, valueAccessor: () => any, allBindingsAccessor: KnockoutAllBindingsAccessor, viewModel: any, bindingContext: KnockoutBindingContext) => void;
init?: (element: any, valueAccessor: () => any, allBindingsAccessor?: KnockoutAllBindingsAccessor, viewModel?: any, bindingContext?: KnockoutBindingContext) => void | { controlsDescendantBindings: boolean; };
update?: (element: any, valueAccessor: () => any, allBindingsAccessor?: KnockoutAllBindingsAccessor, viewModel?: any, bindingContext?: KnockoutBindingContext) => void;
options?: any;
preprocess?: (value: string, name: string, addBindingCallback?: (name: string, value: string) => void) => string;
}
@@ -572,7 +574,7 @@ interface KnockoutComputedContext {
declare module KnockoutComponentTypes {
interface Config {
viewModel: ViewModelFunction | ViewModelSharedInstance | ViewModelFactoryFunction | AMDModule;
viewModel?: ViewModelFunction | ViewModelSharedInstance | ViewModelFactoryFunction | AMDModule;
template: string | Node[]| DocumentFragment | TemplateElement | AMDModule;
}
@@ -603,7 +605,8 @@ declare module KnockoutComponentTypes {
}
interface ComponentInfo {
element: any;
element: Node;
templateNodes: Node[];
}
interface TemplateElement {
@@ -641,4 +644,4 @@ declare var ko: KnockoutStatic;
declare module "knockout" {
export = ko;
}
}
+436 -436
View File
File diff suppressed because it is too large Load Diff
+12
View File
@@ -0,0 +1,12 @@
/// <reference path='./loggly.d.ts' />
import loggly = require("loggly");
var options: loggly.LogglyOptions = {
token: "YOUR_TOKEN",
subdomain: "YOUR_DOMAIN",
tags: ["NodeJS"],
json: true
};
var client: loggly.Loggly = loggly.createClient(options)
client.log('hello world');
+1
View File
@@ -0,0 +1 @@
--noImplicitAny --module commonjs --target es5
+25
View File
@@ -0,0 +1,25 @@
// Type definitions for loggly 1.0.8
// Project: https://github.com/nodejitsu/node-loggly
// Definitions by: Ray Martone <https://github.com/rmartone>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "loggly" {
interface LogglyOptions {
token: string;
subdomain: string;
tags?: string[];
json?: boolean;
host?: string;
auth?: {
username: string;
password: string;
}
}
interface Loggly {
log(message: any, tags?: string[], callback?: (err: any, results: any) => void): void;
log(message: any, callback?: (err: any, results: any) => void): void;
}
function createClient(options: LogglyOptions): Loggly;
}
+198
View File
@@ -0,0 +1,198 @@
// These are the examples from the node-mariasql README transposed to TypeScript
// https://github.com/mscdex/node-mariasql
/// <reference path="../node/node-0.10.d.ts" />
// Example 1 - SHOW DATABASES
import util = require('util');
import Client = require('mariasql');
var c:mariasql.MariaClient = new Client(),
inspect = util.inspect;
c.connect({
host: '127.0.0.1',
user: 'foo',
password: 'bar'
});
c.on('connect', function () {
console.log('Client connected');
})
.on('error', function (err) {
console.log('Client error: ' + err);
})
.on('close', function (hadError) {
console.log('Client closed');
});
c.query('SHOW DATABASES')
.on('result', function (res) {
res.on('row', function (row) {
console.log('Result row: ' + inspect(row));
})
.on('error', function (err) {
console.log('Result error: ' + inspect(err));
})
.on('end', function (info) {
console.log('Result finished successfully');
});
})
.on('end', function () {
console.log('Done with all results');
});
c.end();
// Example 2 - Query Placeholders
var c = new Client();
c.connect({
host: '127.0.0.1',
user: 'foo',
password: 'bar',
db: 'mydb'
});
c.on('connect', function () {
console.log('Client connected');
})
.on('error', function (err) {
console.log('Client error: ' + err);
})
.on('close', function (hadError) {
console.log('Client closed');
});
c.query('SELECT * FROM users WHERE id = :id AND name = :name',
{id: 1337, name: 'Frylock'})
.on('result', function (res) {
res.on('row', function (row) {
console.log('Result row: ' + inspect(row));
})
.on('error', function (err) {
console.log('Result error: ' + inspect(err));
})
.on('end', function (info) {
console.log('Result finished successfully');
});
})
.on('end', function () {
console.log('Done with all results');
});
c.query('SELECT * FROM users WHERE id = ? AND name = ?',
[1337, 'Frylock'])
.on('result', function (res) {
res.on('row', function (row) {
console.log('Result row: ' + inspect(row));
})
.on('error', function (err) {
console.log('Result error: ' + inspect(err));
})
.on('end', function (info) {
console.log('Result finished successfully');
});
})
.on('end', function () {
console.log('Done with all results');
});
c.end();
// Example 3 prepared query
c = new Client();
c.connect({
host: '127.0.0.1',
user: 'foo',
password: 'bar',
db: 'mydb'
});
c.on('connect', function () {
console.log('Client connected');
})
.on('error', function (err) {
console.log('Client error: ' + err);
})
.on('close', function (hadError) {
console.log('Client closed');
});
var pq = c.prepare('SELECT * FROM users WHERE id = :id AND name = :name');
c.query(pq({id: 1337, name: 'Frylock'}))
.on('result', function (res) {
res.on('row', function (row) {
console.log('Result row: ' + inspect(row));
})
.on('error', function (err) {
console.log('Result error: ' + inspect(err));
})
.on('end', function (info) {
console.log('Result finished successfully');
});
})
.on('end', function () {
console.log('Done with all results');
});
c.end();
// Example 4 - Abort Query
c = new Client()
var qcnt:number = 0;
c.connect({
host: '127.0.0.1',
user: 'foo',
password: 'bar',
multiStatements: true
});
c.on('connect', function () {
console.log('Client connected');
})
.on('error', function (err) {
console.log('Client error: ' + err);
})
.on('close', function (hadError) {
console.log('Client closed');
});
c.query('SELECT "first query"; SELECT "second query"; SELECT "third query"', true)
.on('result', function (res) {
if (++qcnt === 2)
res.abort();
res.on('row', function (row) {
console.log('Query #' + (qcnt) + ' row: ' + inspect(row));
})
.on('error', function (err) {
console.log('Query #' + (qcnt) + ' error: ' + inspect(err));
})
.on('abort', function () {
console.log('Query #' + (qcnt) + ' was aborted');
})
.on('end', function (info) {
console.log('Query #' + (qcnt) + ' finished successfully');
});
})
.on('end', function () {
console.log('Done with all queries');
});
c.end();
/* output:
Client connected
Query #1 row: [ 'first query' ]
Query #1 finished successfully
Query #2 was aborted
Query #3 row: [ 'third query' ]
Query #3 finished successfully
Done with all queries
Client closed
*/
+102
View File
@@ -0,0 +1,102 @@
// Type definitions for mariasql v0.1.22
// Project: https://github.com/mscdex/node-mariasql
// Definitions by: MichaelBennett <https://github.com/bennett000/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module mariasql {
export interface MariaCallBackError {
(error:Error):void
}
export interface MariaCallBackResult {
(result:MariaResult):void
}
export interface MariaCallBackRow {
(result:Array<any>):void
}
export interface MariaCallBackBoolean {
(result:boolean):void
}
export interface MariaCallBackObject {
(result:Object):void
}
export interface MariaCallBackVoid {
():void
}
export interface Dictionary {
[index: string]: any;
}
export interface MariaPreparedQuery {
(values:Dictionary):string;
(values:Array<any>):string;
}
export interface ClientConfig {
host: string;
user: string;
password: string;
db?: string;
port?: number;
unixSocket?: string;
keepQueries?: boolean;
multiStatements?: boolean;
connTimeout?: number;
pingInterval?: number;
secureAuth?: boolean;
compress?: boolean;
ssl?:any;
local_infile?: boolean;
read_default_group?: string;
charset?: string;
}
export interface MariaResult {
on(signal:string, cb:MariaCallBackObject):MariaResult; // signal 'end'
on(signal:string, cb:MariaCallBackError):MariaResult; // signal 'error'
on(signal:string, cb:MariaCallBackRow):MariaResult; // signal 'row'
on(signal:string, cb:MariaCallBackVoid):MariaResult; // signal 'abort'
abort():void;
}
export interface MariaQuery {
on(signal:string, cb:MariaCallBackResult):MariaQuery; // signal 'result'
on(signal:string, cb:MariaCallBackVoid):MariaQuery; // signal 'end'
on(signal:string, cb:MariaCallBackVoid):MariaQuery; // signal 'abort'
on(signal:string, cb:MariaCallBackError):MariaQuery; // signal 'error'
abort():void;
}
export interface MariaClient {
connect(config:ClientConfig):void;
end():void;
destroy():void;
escape(query:string):string;
query(q:string, placeHolders?:Dictionary, useArray?:boolean):MariaQuery;
query(q:string, placeHolders?:Array<any>, useArray?:boolean):MariaQuery;
query(q:string, useArray?:boolean):MariaQuery;
prepare(query:string): MariaPreparedQuery;
isMariaDB():boolean;
on(signal:string, cb:MariaCallBackError): MariaClient; // signal 'error'
on(signal:string, cb:MariaCallBackObject): MariaClient; // signal 'close'
on(signal:string, cb:MariaCallBackVoid): MariaClient; // signal 'connect'
connected: boolean;
threadId: string;
}
export interface Client {
new ():MariaClient;
():MariaClient;
prototype: MariaClient;
}
}
declare module "mariasql" {
var Client:mariasql.Client;
export = Client;
}
+2 -2
View File
@@ -37,10 +37,10 @@ interface MochaSetupOptions {
reporter?: any;
// bail on the first test failure
bail?: Boolean;
bail?: boolean;
// ignore global leaks
ignoreLeaks?: Boolean;
ignoreLeaks?: boolean;
// grep string or regexp to filter tests with
grep?: any;
+1 -1
View File
@@ -128,7 +128,7 @@ declare module "mongoose" {
versionKey?: boolean;
}
export interface Model<T extends Document> {
export interface Model<T extends Document> extends NodeJS.EventEmitter {
new(doc: Object): T;
aggregate(...aggregations: Object[]): Aggregate<T[]>;
+70
View File
@@ -0,0 +1,70 @@
/// <reference path="../node/node.d.ts" />
/// <reference path="mssql.d.ts" />
import sql = require('mssql');
var config: sql.config = {
user: 'user',
password: 'password',
server: 'ip',
database: 'database',
connectionTimeout: 10000,
options: {
encrypt: true
}
}
var connection: sql.Connection = new sql.Connection(config, function (err: any) {
if (err != null) {
console.warn("Issue with connecting to SQL Server!");
}
else {
var requestQuery = new sql.Request(connection);
var getArticlesQuery = "SELECT * FROM TABLE";
requestQuery.query(getArticlesQuery, function (err, recordSet) {
if (err) {
console.error('Error happened calling Query: ' + err.name + " " + err.message);
}
// checking to see if the articles returned as at least one.
else if (recordSet.length > 0) {
}
});
var requestStoredProcedure = new sql.Request(connection);
var testId: number = 0;
var testString: string = 'test';
requestStoredProcedure.input('pId', testId);
requestStoredProcedure.input('pString', testString);
requestStoredProcedure.execute('StoredProcedureName', function (err, recordsets, returnValue) {
if (err != null) {
console.error('Error happened calling Query: ' + err.name + " " + err.message);
}
else {
console.info(returnValue);
}
});
var requestStoredProcedureWithOutput = new sql.Request(connection);
var testId: number = 0;
var testString: string = 'test';
requestStoredProcedure.input('pId', testId);
requestStoredProcedure.input('pString', testString);
requestStoredProcedure.output('output', sql.Int);
requestStoredProcedure.execute('StoredProcedureName', function (err, recordsets, returnValue) {
if (err != null) {
console.error('Error happened calling Query: ' + err.name + " " + err.message);
}
else {
console.info(requestStoredProcedureWithOutput.parameters.output.value);
}
});
}
});
+96
View File
@@ -0,0 +1,96 @@
// Type definitions for mssql
// Project: https://www.npmjs.com/package/mssql
// Definitions by: COLSA Corporation <http://www.colsa.com/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "mssql" {
export var DateTime: any;
export var NVarChar: any;
export var Int: any;
export var Bit: any;
export var VarBinary: any;
export var TVP: any;
export interface options {
encrypt: boolean;
}
export interface pool {
min: number;
max: number;
idleTimeoutMillis: number;
}
export interface config {
driver?: string;
user?: string;
password?: string;
server: string;
port?: number;
domain?: string;
database: string;
connectionTimeout?: number;
requestTimeout?: number;
stream?: boolean;
options?: options;
pool?: pool;
}
export class Connection {
public constructor(config: config, callback?: (err?: any) => void);
public connect(callback?: (err?: any) => void): void;
public close(): void;
}
class columns {
public add(name: string, type: any, options: any): void;
}
class rows {
public add(row: any): void;
}
export class Table {
public create: boolean;
public columns: columns;
public rows: rows;
public constructor(tableName: string);
}
export class Request {
public constructor(connection?: Connection);
public execute(procedure: string, callback?: (err?: any, recordsets?: any, returnValue?: any) => void): void;
public input(name: string, value: any): void;
public input(name: string, type: any, value: any): void;
public output(name: string, type: any, value?: any): void;
public pipe(stream: any): void;
public query(command: string, callback?: (err?: any, recordset?: any) => void): void;
public batch(batch: string, callback?: (err?: any, recordset?: any) => void): void;
public bulk(table: Table, callback?: (err?: any, rowCount?: any) => void): void;
public cancel(): void;
public parameters: any;
}
export class Transaction {
public constructor(connection?: Connection);
public begin(isolationLevel?: any, callback?: (err?: any) => void): void;
public begin(callback?: (err?: any) => void): void;
public commit(callback?: (err?: any) => void): void;
public rollback(callback?: (err?: any) => void): void;
}
export class PreparedStatement {
public constructor(connection?: Connection);
public input(name: string, type: any): void;
public output(name: string, type: any): void;
public prepare(statement: string, callback?: (err?: any) => void): void;
public execute(values: any, callback?: (err?: any) => void): void;
public unprepare(callback?: (err?: any) => void): void;
}
}
+30
View File
@@ -1036,6 +1036,36 @@ declare module "path" {
export var delimiter: string;
export function parse(p: string): ParsedPath;
export function format(pP: ParsedPath): string;
export module posix {
export function normalize(p: string): string;
export function join(...paths: any[]): string;
export function resolve(...pathSegments: any[]): string;
export function isAbsolute(p: string): boolean;
export function relative(from: string, to: string): string;
export function dirname(p: string): string;
export function basename(p: string, ext?: string): string;
export function extname(p: string): string;
export var sep: string;
export var delimiter: string;
export function parse(p: string): ParsedPath;
export function format(pP: ParsedPath): string;
}
export module win32 {
export function normalize(p: string): string;
export function join(...paths: any[]): string;
export function resolve(...pathSegments: any[]): string;
export function isAbsolute(p: string): boolean;
export function relative(from: string, to: string): string;
export function dirname(p: string): string;
export function basename(p: string, ext?: string): string;
export function extname(p: string): string;
export var sep: string;
export var delimiter: string;
export function parse(p: string): ParsedPath;
export function format(pP: ParsedPath): string;
}
}
declare module "string_decoder" {
+48
View File
@@ -0,0 +1,48 @@
/// <reference path="object-hash.d.ts" />
import hash = require('object-hash');
var hashed: string;
var obj = { any: true };
// hash object
hashed = hash(obj);
hashed = hash.sha1(obj);
hashed = hash.keys(obj);
hashed = hash.MD5(obj);
hashed = hash.keysMD5(obj);
var options = {
algorithm: 'md5',
encoding: 'utf8',
excludeValues: true
};
hashed = hash(obj, options);
// HashTable
var table: ObjectHash.HashTable;
table = hash.HashTable();
table = hash.HashTable(options);
table = table.add(obj);
table = table.add(obj, obj);
table = table.remove(obj);
table = table.remove(obj, obj);
var has: boolean = table.hasKey('whatEver');
var value: any = table.getValue('whatEver');
var count: number = table.getCount('whatEver');
var tableObject = table.table();
tableObject['whatEver'].value;
tableObject['whatEver'].count;
var tableArray = table.toArray();
tableArray.shift().value;
tableArray.pop().count;
tableArray[2].hash;
table = table.reset();
+52
View File
@@ -0,0 +1,52 @@
// Type definitions for object-hash v0.5.0
// Project: https://github.com/puleos/object-hash
// Definitions by: Michael Zabka <https://github.com/misak113/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module ObjectHash {
export interface IOptions {
algorithm?: string;
encoding?: string;
excludeValues?: boolean;
}
interface HashTableItem {
value: any;
count: number;
}
interface HashTableItemWithKey extends HashTableItem {
hash: string;
}
export interface HashTable {
add(...values: any[]): HashTable;
remove(...values: any[]): HashTable;
hasKey(key: string): boolean;
getValue(key: string): any;
getCount(key: string): number;
table(): { [key: string]: HashTableItem };
toArray(): HashTableItemWithKey[];
reset(): HashTable;
}
export interface HashTableStatic {
(options?: IOptions): HashTable;
}
export interface Hash {
(object: any, options?: IOptions): string;
sha1(object: any): string;
keys(object: any): string;
MD5(object: any): string;
keysMD5(object: any): string;
HashTable: HashTableStatic;
}
export var HashStatic: Hash;
}
declare module 'object-hash' {
import HashStatic = ObjectHash.HashStatic;
export = HashStatic;
}
+1 -1
View File
@@ -170,7 +170,7 @@ interface QUnitAssert {
* resolution callback for each async operation. The callback returned from assert.async()
* will throw an Error if is invoked more than once.
*/
async(): any;
async(): () => void;
/**
* A deep recursive comparison assertion, working on primitive types, arrays, objects,
+7 -1
View File
@@ -8,13 +8,19 @@ function test_transition() {
Ractive.transitions['myTransition'] = plugin;
}
var adaptor: Ractive.AdaptorPlugin;
Ractive.defaults = {
template: '',
debug: true
}
var options: Ractive.NewOptions = {
adapt: ['myAdaptor', adaptor],
template: '',
data: {
someThing: 'value',
}
};
var r: Ractive.Ractive = new Ractive(options);
+110 -42
View File
@@ -1,8 +1,10 @@
// Type definitions for Ractive 0.7.0 edge f22ab8ad0a640591b1c263f57e21d1565cb26bf5
// Type definitions for Ractive 0.7.1
// Project: http://ractivejs.org
// Definitions by: Han Lin Yap <http://yap.nu>
// Definitions: https://github.com/codler/Ractive-TypeScript-Definition
// Version: 0.7.0-1+2015-02-05
// Version: 0.7.1-1+2015-03-21
declare type _RactiveEvent = Event;
declare module Ractive {
export interface Node extends HTMLElement {
@@ -64,13 +66,22 @@ declare module Ractive {
export interface Event {
context: any;
// TODO: unclear in documantation
index: Object;
component?: Ractive;
index: { [key: string]: number };
keypath: string;
// Since 0.6.0
name: string;
node: HTMLElement;
original: Event;
original: _RactiveEvent;
}
// Since 0.7.1
export interface NodeInfo {
ractive: Ractive;
keypath: string;
index: { [key: string]: number };
}
// Return value in ractive.observe and ractive.on
export interface Observe {
cancel(): void;
@@ -113,13 +124,17 @@ declare module Ractive {
complate?: (t: number, value: number) => void; // TODO: void?
}
export interface ObserveOptions {
export interface ObserveOptions extends ObserveOnceOptions {
// Default true
init?: boolean;
}
// Since 0.7.1
export interface ObserveOnceOptions {
// Default Ractive
context?: any;
// Default false
defer?: boolean;
// Default true
init?: boolean;
}
// Used in Ractive.parse options
@@ -139,7 +154,7 @@ declare module Ractive {
/*
* @type List of mixed string or Adaptor
*/
adapt?: any[];
adapt?: (string | AdaptorPlugin)[];
adaptors?: AdaptorPlugins;
@@ -147,22 +162,20 @@ declare module Ractive {
* Default false
* @type boolean or any type that option `el` accepts (HTMLElement or String or jQuery-like collection)
*/
append?: any;
append?: boolean | any;
complete?: Function;
components?: ComponentPlugins;
computed?: Object;
// Since 0.5.5
// TODO: unclear in documantation
// TODO: unclear in documantation, should this be in ExtendOptions instead?
css?: string;
/**
* TODO: Question - When is data Array or String?
*
* @type Object, Array, String or Function
* @type Object or Function
*/
// TODO: undocumented type Function
data?: any;
data?: Object | Function;
decorators?: DecoratorPlugins;
/**
@@ -170,27 +183,53 @@ declare module Ractive {
*/
delimiters?: string[];
// TODO: unsure
easing?: string | Function;
/**
* @type HTMLElement or String or jQuery-like collection
*/
el?: any;
el?: string | HTMLElement | any;
// TODO: undocumented in Initialisation options page
events?: EventPlugins;
// TODO: In next release
// TODO: undocumented GH-429
// interpolate
// Since 0.5.5
// TODO: unclear in documantation
interpolators?: { [key: string]: any; };
// Since 0.6.0
onconstruct?: (options: NewOptions) => void; // TODO: void?
// Since 0.6.0
// TODO: undocumented arguments
onchange?: (options: NewOptions) => void; // TODO: void?
// Since 0.6.0
// TODO: undocumented arguments
oncomplete?: () => void; // TODO: void?
// Since 0.6.0
// TODO: undocumented arguments
onconfig?: () => void; // TODO: void?
// Since 0.6.0
// TODO: undocumented arguments
onconstruct?: (options: NewOptions) => void; // TODO: void?
// Since 0.6.0
// TODO: undocumented arguments
ondetach?: () => void; // TODO: void?
// Since 0.6.0
// TODO: undocumented arguments
oninit?: () => void; // TODO: void?
// Since 0.6.0
// TODO: undocumented arguments
oninsert?: () => void; // TODO: void?
// Since 0.6.0
// TODO: undocumented arguments
onrender?: () => void; // TODO: void?
// Since 0.6.0
// TODO: undocumented arguments
onunrender?: () => void; // TODO: void?
// Since 0.6.0
// TODO: undocumented arguments
onupdate?: () => void; // TODO: void?
// Since 0.6.0
// TODO: undocumented arguments
onteardown?: () => void; // TODO: void?
/**
* any is same type as template
@@ -198,9 +237,8 @@ declare module Ractive {
partials?: { [key: string]: any; };
/**
* Default false
* @type Boolean or RactiveSanitizeOptions
*/
sanitize?: any;
sanitize?: boolean | SanitizeOptions;
/**
* Default ['[[', ']]']
* @type [open, close]
@@ -238,6 +276,9 @@ declare module Ractive {
// Since 0.5.5
// Default true
stripComments?: boolean;
// Since 0.7.1
// Default true
transitionsEnabled?: boolean;
// Default true
twoway?: boolean;
@@ -252,17 +293,16 @@ declare module Ractive {
* @deprecated
*/
init?: (options: ExtendOptions) => void;
// TODO: undocumented arguments
onconstruct?: (options: ExtendOptions) => void; // TODO: void?
onrender?: () => void; // TODO: void?
// Default false, inherit from Ractive.defaults
isolated?: boolean;
}
// See ractive change log "All configuration options, except plugin registries, can be specified on Ractive.defaults and Component.defaults"
export interface DefaultsOptions extends ExtendOptions {
// TODO: not correctly documented
/**
* @deprecated since 0.7.1
*/
// Default false
debug?: boolean;
}
@@ -275,6 +315,9 @@ declare module Ractive {
extend(options: ExtendOptions): Static;
// Since 0.7.1
getNodeInfo(node: HTMLElement): NodeInfo;
parse(template: string, options?: ParseOptions): any;
// TODO: undocumented
@@ -283,6 +326,9 @@ declare module Ractive {
// TODO: undocumented
components: ComponentPlugins;
// Since 0.7.1
DEBUG: boolean;
defaults: DefaultsOptions;
// TODO: undocumented
@@ -327,13 +373,19 @@ declare module Ractive {
findComponent(name?: string): Ractive;
// Since 0.7.1
findContainer(name: string): Ractive; // TODO: Ractive?
// Since 0.7.1
findParent(name: string): Ractive; // TODO: Ractive?
fire(eventName: string, ...args: any[]): void; // TODO: void?
get(keypath: string): any;
get(): Object; // TODO: undocumented. or do it return function if ractive.data defined as function?
get(): Object; // TODO: Object?
// TODO: target - Node or String or jQuery (see Valid selectors)
// TODO: anchor - Node or String or jQuery
// target - Node or String or jQuery (see Valid selectors)
// anchor - Node or String or jQuery
insert(target: any, anchor?: any): void; // TODO: void?
merge(keypath: string, value: any[], options?: { compare: boolean | string | Function }): Promise;
@@ -342,13 +394,15 @@ declare module Ractive {
observe(keypath: string, callback: (newValue: any, oldValue: any, keypath: string) => void, options?: ObserveOptions): Observe;
observe(map: Object, options?: ObserveOptions): Observe;
// TODO: check handler type
off(eventName?: string, handler?: () => void): Ractive;
// Since 0.7.1
observeOnce(keypath: string, callback: (newValue: any, oldValue: any, keypath: string) => void, options?: ObserveOnceOptions): Observe;
// handler context Ractive
on(eventName: string, handler: (event?: Event, ...args: any[]) => void): Observe;
// TODO: undocumented
on(map: { [eventName: string]: (event?: Event, ...args: any[]) => void }): Observe;
off(eventName?: string, handler?: (event?: Ractive.Event | any, ...args: any[]) => any): Ractive;
on(eventName: string, handler: (event?: Ractive.Event | any, ...args: any[]) => any): Observe;
on(map: { [eventName: string]: (event?: Ractive.Event | any, ...args: any[]) => any }): Observe;
// Since 0.7.1
once(eventName: string, handler: (event?: Ractive.Event | any, ...args: any[]) => any): Observe;
// Since 0.5.5
pop(keypath: string): Promise;
@@ -356,13 +410,18 @@ declare module Ractive {
// Since 0.5.5
push(keypath: string, value: any): Promise;
// TODO: target - Node or String or jQuery (see Valid selectors)
// target - Node or String or jQuery (see Valid selectors)
render(target: any): void; // TODO: void?
// Default {}
reset(data?: Object): Promise;
// Since 0.7.1
resetPartial(name: string, partial: any): Promise;
// Since 0.5.5
// TODO: undocumented, mentioned in ractive change log
// https://github.com/ractivejs/docs.ractivejs.org/issues/188
resetTemplate(): void; // TODO: void?
set(keypath: string, value: any): Promise;
@@ -382,6 +441,9 @@ declare module Ractive {
toHTML(): string;
// Since 0.6.0
unrender(): void; // TODO: void?
// Since 0.5.5
unshift(keypath: string, value: any): Promise;
@@ -395,13 +457,19 @@ declare module Ractive {
updateModel(keypath?: string, cascade?: boolean): Promise;
// Properties
// Since 0.7.1
container: Ractive; // TODO: Ractive?
nodes: Object;
partials: Object;
transitions: Object;
// Since 0.7.1
parent: Ractive; // TODO: Ractive?
// Since 0.7.1
root: Ractive; // TODO: Ractive?
transitions: Object;
}
}
// used for require()
declare module "ractive" {
export = Ractive;
}
+2 -2
View File
@@ -33,7 +33,7 @@ declare module "redis" {
}
interface ClientOpts {
parser: string;
parser?: string;
return_buffers?: boolean;
detect_buffers?: boolean;
socket_nodelay?: boolean;
@@ -42,7 +42,7 @@ declare module "redis" {
retry_max_delay?: number;
connect_timeout?: number;
max_attempts?: number;
auth_pass?: boolean;
auth_pass?: string;
}
interface RedisClient extends NodeJS.EventEmitter {
+3
View File
@@ -82,6 +82,9 @@ myApp.controller('TestCtrl', (
Restangular.one('accounts', 123).getList('buildings');
Restangular.one('accounts', 123).getList<String>('buildings');
var accountData = Restangular.one('accounts', 123).plain();
var accountClone: restangular.IElement = Restangular.one('accounts', 123).clone();
baseAccounts.getList().then(function (accounts) {
var firstAccount = accounts[0];
$scope.buildings = firstAccount.getList("buildings");
+3
View File
@@ -112,7 +112,10 @@ declare module restangular {
trace(queryParams?: any, headers?: any): IPromise<any>;
options(queryParams?: any, headers?: any): IPromise<any>;
patch(queryParams?: any, headers?: any): IPromise<any>;
clone(): IElement;
plain(): any;
withHttpConfig(httpConfig: IRequestConfig): IElement;
save(queryParams?: any, headers?: any): IPromise<any>;
getRestangularUrl(): string;
}
+44
View File
@@ -0,0 +1,44 @@
/// <reference path="../node/node.d.ts" />
/// <reference path="s3-uploader.d.ts" />
//NOTE: Does require GM (https://github.com/aheckmann/gm) thus requires GraphicsMagick (http://www.graphicsmagick.org/) or ImageMagick (http://www.imagemagick.org/)
import Upload = require('s3-uploader');
var s3VersionOriginal: S3UploaderVersion = {
original: true
};
var s3VersionHeader: S3UploaderVersion = {
suffix: '-header',
quality: 100,
maxHeight: 300,
maxWidth: 600
}
var s3Config: S3UploaderOptions = {
awsAccessKeyId: 'awsKeyId',
awsSecretAccessKey: 'awsSecretAccessKey',
awsBucketPath: '',
awsBucketRegion: 'us-east-1' /*Whatever region s3 is located*/,
awsBucketAcl: 'public-read',
awsHttpTimeout: 60000,
versions: [s3VersionOriginal, s3VersionHeader]
}
var client = new Upload('bucketName', s3Config);
client.upload('/images/File.png', s3Config, function (err, images, meta) {
var returnVal: boolean = false;
if (err) {
console.log(err);
}
else {
if (images.length >= 2) {
var originalImageUrl = images[0].url;
var headerImageUrl = images[1].url;
console.log('Original: ' + originalImageUrl + ' headerImageUrl: ' + headerImageUrl);
}
}
});
+66
View File
@@ -0,0 +1,66 @@
// Type definitions for s3-uploader
// Project: https://www.npmjs.com/package/s3-uploader
// Definitions by: COLSA Corporation <http://www.colsa.com/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
//NOTE: Does require GM (https://github.com/aheckmann/gm) thus requires GraphicsMagick (http://www.graphicsmagick.org/) or ImageMagick (http://www.imagemagick.org/)
declare module "s3-uploader" {
export = Upload;
}
interface S3UploaderVersion {
original?: boolean;
suffix?: string;
quality?: number;
maxWidth?: number;
maxHeight?: number;
}
interface S3UploaderOptions {
awsAccessKeyId?: string;
awsSecretAccessKey?: string;
awsBucketRegion?: string;
awsBucketPath?: string;
awsBucketAcl?: string;
awsMaxRetries?: number;
awsHttpTimeout?: number;
resizeQuality?: number;
returnExif?: boolean;
tmpDir?: string;
workers?: number;
url?: string;
versions?: S3UploaderVersion;
}
declare class Meta {
public format: string;
public fileSize: string;
public imageSize: imageSize;
public orientation: string;
public colorSpace: string;
public compression: string;
public quallity: string;
}
declare class imageSize {
public height: number;
public width: number;
}
declare class image {
public etag: string;
public format: string;
public height: number;
public original: boolean;
public path: string;
public size: string;
public src: string;
public url: string;
public width: number;
}
declare class Upload {
public constructor(awsBucketName: string, opts: S3UploaderOptions);
public upload(src: string, opts?: S3UploaderOptions, cb?: (err: string, images: image[], meta: Meta) => void): void;
}
+1
View File
@@ -11,6 +11,7 @@ declare module chai {
calledOnce: Expect;
calledTwice: Expect;
calledThrice: Expect;
callCount(count: number): Expect;
calledBefore(spy: Function): Expect;
calledAfter(spy: Function): Expect;
calledWithNew: Expect;
+1
View File
@@ -177,6 +177,7 @@ declare module createjs {
static registerManifest(manifest: Object[], basePath: string): Object;
static registerPlugins(plugins: any[]): boolean;
static registerSound(src: string | Object, id?: string, data?: number | Object, basePath?: string): Object;
static registerSounds(sounds: Object[], basePath?: string): Object[];
static removeAllSounds(): void;
static removeManifest(manifest: any[], basePath: string): Object;
static removeSound(src: string | Object, basePath: string): boolean;
+8
View File
@@ -0,0 +1,8 @@
/// <reference path="stack-mapper.d.ts" />
import stackMapper = require("stack-mapper");
var map: any = {};
var sm: stackMapper.StackMapper = stackMapper(map);
var input: stackMapper.Callsite[] = [{ filename: "boo", line: 1, column: 10 }];
var cs: stackMapper.Callsite[] = sm.map(input);
+46
View File
@@ -0,0 +1,46 @@
// Type definitions for stack-mapper 0.2.2
// Project: https://github.com/thlorenz/stack-mapper
// Definitions by: Rogier Schouten <https://github.com/rogierschouten>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "stack-mapper" {
module stackMapper {
export class StackMapper {
/**
* Maps the trace statements of the given error stack and replaces locations
* referencing code in the generated file with the locations inside the original files.
*
* @name map
* @function
* @param {Array} array of callsite objects (see readme for details about Callsite object)
* @return {Array.<Object>} info about the error stack with adapted locations, each with the following properties
* - filename: original filename
* - line: origial line in that filename of the trace
* - column: origial column on that line of the trace
*/
public map(stack: Callsite[]): Callsite[];
}
export interface Callsite {
filename: string;
line: number;
column: number;
}
}
/**
* Returns a Stackmapper that will use the given source map to map error trace locations.
*
* @name stackMapper
* @function
* @param {Object} sourcemap source map for the generated file
* @return {StackMapper} stack mapper for the particular source map
*/
function stackMapper(sourcemap: any): stackMapper.StackMapper;
export = stackMapper;
}
+3 -3
View File
@@ -14,11 +14,11 @@ declare module tether {
classes?: {[className: string]: boolean};
classPrefix?: string;
constraints?: ITetherConstraint[];
element?: Element | string | any /* JQuery */;
element?: HTMLElement | string | any /* JQuery */;
enabled?: boolean;
offset?: string;
optimizations?: any;
target?: Element | string | any /* JQuery */;
target?: HTMLElement | string | any /* JQuery */;
targetAttachment?: string;
targetOffset?: string;
targetModifier?: string;
@@ -29,7 +29,7 @@ declare module tether {
outOfBoundsClass?: string;
pin?: boolean | string[];
pinnedClass?: string;
to?: string | Element | number[];
to?: string | HTMLElement | number[];
}
interface Tether {
+9 -1
View File
@@ -29,5 +29,13 @@ declare module THREE {
keys:number[];
update():void;
reset():void;
checkDistances():void;
zoomCamera():void;
panCamera():void;
rotateCamera():void;
handleResize():void;
handleEvent(event: any):void;
}
}
}
@@ -0,0 +1,61 @@
/// <reference path="./typescript-deferred.d.ts"/>
import tsd = require('typescript-deferred');
var t1: tsd.PromiseInterface<string> = tsd.when(10)
.then(() => tsd.when('foo'));
var t2: tsd. PromiseInterface<string> = tsd.when(10)
.then(() => 'foo');
var t3: tsd.PromiseInterface<string> = tsd.when(10)
.then(() => 'foo', () => tsd.when('bar'));
var t4: tsd.PromiseInterface<string> = tsd.when(10)
.then(() => 'foo', () => 'bar');
var t5: tsd.PromiseInterface<string> = tsd.when(10)
.then(() => tsd.when('foo'), () => 'bar');
var t6: tsd.PromiseInterface<string> = tsd.when(10)
.then(() => tsd.when('foo'), () => tsd.when('bar'));
var t7: tsd.PromiseInterface<string> = tsd.when(10)
.always(() => 'foo');
var t8: tsd.PromiseInterface<string> = tsd.when(10)
.always(() => tsd.when('foo'));
var t9: tsd.PromiseInterface<number> = tsd.when(10)
.otherwise(() => 11);
var t10: tsd.PromiseInterface<number> = tsd.when(10)
.otherwise(() => tsd.when(11));
var t11: tsd.PromiseInterface<string> = tsd.when('foo');
var t12: tsd.PromiseInterface<string> = tsd.when(tsd.when('foo'));
var t13: tsd.PromiseInterface<string> = tsd.create<string>()
.promise;
var t14: tsd.DeferredInterface<string> = tsd.create<string>();
var t15: tsd.ThenableInterface<string> = tsd.when('foo');
var t16: tsd.PromiseInterface<string> = tsd.when(<tsd.ThenableInterface<string> >tsd.when('foo'));
var t17: tsd.PromiseInterface<string> = tsd.when(10)
.then(() => <tsd.ThenableInterface<string> >tsd.when('foo'), () => <tsd.ThenableInterface<string> >tsd.when('bar'));
var t18: tsd.PromiseInterface<string> = tsd.create<string>()
.resolve('foo')
.promise;
var t19: tsd.PromiseInterface<string> = tsd.create<string>()
.resolve(tsd.when('foo'))
.promise;
var t20: tsd.PromiseInterface<string> = tsd.create<string>()
.reject(new Error('foo'))
.promise;
+47
View File
@@ -0,0 +1,47 @@
// Type definitions for typescript-deferred v0.1.5
// Project: https://github.com/DirtyHairy/typescript-deferred
// Definitions by: Christian Speckner <https://github.com/DirtyHairy>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "typescript-deferred" {
export interface ImmediateSuccessCB<T, TP> {
(value: T): TP;
}
export interface ImmediateErrorCB<TP> {
(err: any): TP;
}
export interface DeferredSuccessCB<T, TP> {
(value: T): ThenableInterface<TP>;
}
export interface DeferredErrorCB<TP> {
(error: any): ThenableInterface<TP>;
}
export interface ThenableInterface<T> {
then<TP>(successCB?: DeferredSuccessCB<T, TP>, errorCB?: DeferredErrorCB<TP>): ThenableInterface<TP>;
then<TP>(successCB?: DeferredSuccessCB<T, TP>, errorCB?: ImmediateErrorCB<TP>): ThenableInterface<TP>;
then<TP>(successCB?: ImmediateSuccessCB<T, TP>, errorCB?: DeferredErrorCB<TP>): ThenableInterface<TP>;
then<TP>(successCB?: ImmediateSuccessCB<T, TP>, errorCB?: ImmediateErrorCB<TP>): ThenableInterface<TP>;
}
export interface PromiseInterface<T> extends ThenableInterface<T> {
then<TP>(successCB?: DeferredSuccessCB<T, TP>, errorCB?: DeferredErrorCB<TP>): PromiseInterface<TP>;
then<TP>(successCB?: DeferredSuccessCB<T, TP>, errorCB?: ImmediateErrorCB<TP>): PromiseInterface<TP>;
then<TP>(successCB?: ImmediateSuccessCB<T, TP>, errorCB?: DeferredErrorCB<TP>): PromiseInterface<TP>;
then<TP>(successCB?: ImmediateSuccessCB<T, TP>, errorCB?: ImmediateErrorCB<TP>): PromiseInterface<TP>;
otherwise(errorCB?: DeferredErrorCB<T>): PromiseInterface<T>;
otherwise(errorCB?: ImmediateErrorCB<T>): PromiseInterface<T>;
always<TP>(errorCB?: DeferredErrorCB<TP>): PromiseInterface<TP>;
always<TP>(errorCB?: ImmediateErrorCB<TP>): PromiseInterface<TP>;
}
export interface DeferredInterface<T> {
resolve(value?: ThenableInterface<T>): DeferredInterface<T>;
resolve(value?: T): DeferredInterface<T>;
reject(error?: any): DeferredInterface<T>;
promise: PromiseInterface<T>;
}
export function create<T>(): DeferredInterface<T>;
export function when<T>(value?: ThenableInterface<T>): PromiseInterface<T>;
export function when<T>(value?: T): PromiseInterface<T>;
}
+1 -1
View File
@@ -278,7 +278,7 @@ interface UnderscoreStatic {
findIndex<T>(
list: _.List<T>,
iterator: _.ListIterator<T, boolean>,
context?: any): T;
context?: any): number;
/**
+66
View File
@@ -0,0 +1,66 @@
/// <reference path="webix.d.ts" />
//ajax operations
webix.ready(function(){
webix.ajax().get("te").then(function(){
webix.message( webix.env.isFF ? "FireFox" : "Other" );
});
});
//webix helpers
webix.html.addCss(document.body, "text");
webix.storage.local.get("mydata");
var proxy = webix.proxy("meteor", "books");
//webix ui helpers
webix.ui.zIndexBase = 101;
webix.ui.zIndex();
webix.ui.resize();
//webix ui constructor
//basic view
var ui = webix.ui({
view:"list", id:"l1"
});
ui.adjust();
$$("l1").adjust();
var l1 = <webix.ui.list>{};
var l2 = <webix.ui.view>{};
//specific view types
var ui2 = <webix.ui.list> webix.ui({
view:"list", id:"21"
});
ui2.add({ value:"100" });
//specific types by id
var list = <webix.ui.list> $$("l1");
list.add({ value:"100" });
list.config.height = 100;
//config typing
var table:webix.ui.datatableConfig = {};
table.columns = [];
table.autowidth = true;
webix.ui({ rows:[ table ] });
//events
list.attachEvent("onItemClick", function(id:string, e:Event){
var item = (<webix.ui.list>this).getItem(id);
var self = webix.$$(e);
return true;
});
//data collections
var data = new webix.DataCollection();
data.config["test"]= 123;
//mixins
var t = webix.DataDriver.json;
+7533
View File
File diff suppressed because it is too large Load Diff
+24
View File
@@ -0,0 +1,24 @@
/// <reference path="whatwg-fetch.d.ts" />
/// <reference path="../es6-promise/es6-promise.d.ts" />
function test_fetchUrlWithOptions() {
var headers = new Headers();
headers.append("Content-Type", "application/json");
var requestOptions: RequestInit = {
method: "POST",
headers: headers
};
handlePromise(window.fetch("http://www.andlabs.net/html5/uCOR.php", requestOptions));
}
function test_fetchUrl() {
handlePromise(window.fetch("http://www.andlabs.net/html5/uCOR.php"));
}
function handlePromise(promise: Promise<Response>) {
promise.then((response) => {
return response.text();
}).then((text) => {
console.log(text);
});
}
+84
View File
@@ -0,0 +1,84 @@
// Type definitions for fetch API
// Project: https://github.com/github/fetch
// Definitions by: Ryan Graham <https://github.com/ryan-codingintrigue>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../es6-promise/es6-promise.d.ts" />
declare class Request {
constructor(input: string|Request, init?:RequestInit);
method: string;
url: string;
headers: Headers;
context: RequestContext;
referrer: string;
mode: RequestMode;
credentials: RequestCredentials;
cache: RequestCache;
}
interface RequestInit {
method?: string;
headers?: HeaderInit;
body?: BodyInit;
mode?: RequestMode;
credentials?: RequestCredentials;
cache?: RequestCache;
}
declare enum RequestContext {
"audio", "beacon", "cspreport", "download", "embed", "eventsource", "favicon", "fetch",
"font", "form", "frame", "hyperlink", "iframe", "image", "imageset", "import",
"internal", "location", "manifest", "object", "ping", "plugin", "prefetch", "script",
"serviceworker", "sharedworker", "subresource", "style", "track", "video", "worker",
"xmlhttprequest", "xslt"
}
declare enum RequestMode { "same-origin", "no-cors", "cors" }
declare enum RequestCredentials { "omit", "same-origin", "include" }
declare enum RequestCache { "default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached" }
declare class Headers {
append(name: string, value: string): void;
delete(name: string):void;
get(name: string): string;
getAll(name: string): Array<string>;
has(name: string): boolean;
set(name: string, value: string): void;
}
declare class Body {
bodyUsed: boolean;
arrayBuffer(): Promise<ArrayBuffer>;
blob(): Promise<Blob>;
formData(): Promise<FormData>;
json(): Promise<JSON>;
text(): Promise<string>;
}
declare class Response extends Body {
constructor(body?: BodyInit, init?: ResponseInit);
error(): Response;
redirect(url: string, status: number): Response;
type: ResponseType;
url: string;
status: number;
ok: boolean;
statusText: string;
headers: Headers;
clone(): Response;
}
declare enum ResponseType { "basic", "cors", "default", "error", "opaque" }
declare class ResponseInit {
status: number;
statusText: string;
headers: HeaderInit;
}
declare type HeaderInit = Headers|Array<string>;
declare type BodyInit = Blob|FormData|string;
declare type RequestInfo = Request|string;
interface Window {
fetch(url: string, init?: RequestInit): Promise<Response>;
}
+1 -1
View File
@@ -146,7 +146,7 @@ declare module YT {
getPlaylistIndex(): number;
// Event Listener
addEventListener(event: string, listener: string): void;
addEventListener(event: string, handler: EventHandler): void;
}
export enum PlayerState {