mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-11 11:50:54 +08:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
+90
-27
@@ -9,14 +9,16 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](add2home/add2home.d.ts) [add2home](http://cubiq.org/add-to-home-screen) by [James Wilkins](http://www.codeplex.com/site/users/view/jamesnw)
|
||||
* [:link:](adm-zip/adm-zip.d.ts) [adm-zip](https://github.com/cthackers/adm-zip) by [John Vilk](https://github.com/jvilk)
|
||||
* [:link:](alertify/alertify.d.ts) [alertify](http://fabien-d.github.io/alertify.js) by [John Jeffery](http://github.com/jjeffery)
|
||||
* [:link:](alt/alt.d.ts) [Alt](https://github.com/goatslacker/alt) by [Michael Shearer](https://github.com/Shearerbeard)
|
||||
* [:link:](amcharts/AmCharts.d.ts) [amCharts](http://www.amcharts.com) by [aleksey-bykov](https://github.com/aleksey-bykov)
|
||||
* [:link:](amplifyjs/amplifyjs.d.ts) [AmplifyJs](http://amplifyjs.com) by [Jonas Eriksson](https://github.com/joeriks)
|
||||
* [:link:](amqp-rpc/amqp-rpc.d.ts) [amqp-rpc](https://github.com/demchenkoe/node-amqp-rpc) by [Wonshik Kim](https://github.com/wokim)
|
||||
* [:link:](angular2/router.d.ts) [Angular](http://angular.io) by [angular team](https://github.com/angular)
|
||||
* [:link:](angular2/angular2.d.ts) [Angular](http://angular.io) by [angular team](https://github.com/angular)
|
||||
* [:link:](angular-file-upload/angular-file-upload.d.ts) [Angular File Upload](https://github.com/danialfarid/ng-file-upload) by [John Reilly](https://github.com/johnnyreilly)
|
||||
* [:link:](angular-growl-v2/angular-growl-v2.d.ts) [Angular Growl 2 v.0.7.3](http://janstevens.github.io/angular-growl-2) by [Tadeusz Hucal](https://github.com/mkp05)
|
||||
* [:link:](angularjs/angular.d.ts) [Angular JS](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar)
|
||||
* [:link:](angularjs/angular-animate.d.ts) [Angular JS (ngAnimate module)](http://angularjs.org) by [Michel Salib](https://github.com/michelsalib), [Adi Dahiya](https://github.com/adidahiya), [Raphael Schweizer](https://github.com/rasch)
|
||||
* [:link:](angularjs/angular-animate.d.ts) [Angular JS (ngAnimate module)](http://angularjs.org) by [Michel Salib](https://github.com/michelsalib), [Adi Dahiya](https://github.com/adidahiya), [Raphael Schweizer](https://github.com/rasch), [Cody Schaaf](https://github.com/codyschaaf)
|
||||
* [:link:](angularjs/angular-cookies.d.ts) [Angular JS (ngCookies module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar), [Anthony Ciccarello](http://github.com/aciccarello)
|
||||
* [:link:](angularjs/angular-mocks.d.ts) [Angular JS (ngMock, ngMockE2E module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar)
|
||||
* [: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)
|
||||
@@ -41,9 +43,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [: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-storage/angular-storage.d.ts) [angular-storage](https://github.com/auth0/angular-storage) by [Matthew DeKrey](https://github.com/mdekrey)
|
||||
* [:link:](angular.throttle/angular.throttle.d.ts) [angular.throttle](https://github.com/BaggersIO/angular.throttle) by [Stefan Steinhart](https://github.com/reppners)
|
||||
* [: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:](rx-angular/rx.angular.d.ts) [angularjs extensions to rxjs](http://reactivex.io) by [Mick Delaney](https://github.com/mickdelaney)
|
||||
* [:link:](angularjs-toaster/angularjs-toaster.d.ts) [angularjs-toaster](https://github.com/jirikavi/AngularJS-Toaster) by [Ben Tesser](https://github.com/btesser)
|
||||
* [:link:](angularLocalStorage/angularLocalStorage.d.ts) [AngularLocalStorage](https://github.com/agrublev/angularLocalStorage) by [Horiuchi_H](https://github.com/horiuchi)
|
||||
* [:link:](animation-frame/animation-frame.d.ts) [animation-frame](https://github.com/kof/animation-frame) by [Qinfeng Chen](https://github.com/qinfchen)
|
||||
@@ -53,7 +57,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](any-db-transaction/any-db-transaction.d.ts) [any-db-transaction](https://github.com/grncdr/node-any-db-transaction) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](cordova/cordova.d.ts) [Apache Cordova](http://cordova.apache.org) by [Microsoft Open Technologies Inc.](http://msopentech.com)
|
||||
* [:link:](cordova-plugin-email-composer/cordova-plugin-email-composer.d.ts) [Apache Cordova Email Composer plugin](https://github.com/katzer/cordova-plugin-email-composer) by [Dave Taylor](http://davetayls.me)
|
||||
* [:link:](polymer/polymer.app-router.d.ts) [app-router](https://github.com/erikringsmuth/app-router) by [Louis Grignon](https://github.com/lgrignon)
|
||||
* [:link:](api-error-handler/api-error-handler.d.ts) [api-error-handler](https://github.com/expressjs/api-error-handler) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](appframework/appframework.d.ts) [AppFramework](http://app-framework-software.intel.com) by [kyo_ago](https://github.com/kyo-ago)
|
||||
* [:link:](applicationinsights/applicationinsights.d.ts) [Application Insights](https://github.com/Microsoft/ApplicationInsights-node.js) by [Scott Southwood](https://github.com/scsouthw)
|
||||
* [:link:](arbiter/Arbiter.d.ts) [Arbiter.js](http://arbiterjs.com) by [Arash Shakery](https://github.com/arash16)
|
||||
@@ -68,6 +72,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](atmosphere/atmosphere.d.ts) [Atmosphere](https://github.com/Atmosphere/atmosphere-javascript) by [Kai Toedter](https://github.com/toedter)
|
||||
* [:link:](atom/atom.d.ts) [Atom](https://atom.io) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](atom/api-docs.d.ts) [Atom API docs](https://github.com/atom/atom/blob/master/build/tasks/docs-task.coffee) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](atom-keymap/atom-keymap.d.ts) [atom-keymap](https://github.com/atom/atom-keymap) by [Vadim Macagon](https://github.com/enlight)
|
||||
* [: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.lock/auth0.lock.d.ts) [Auth0Widget.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
|
||||
@@ -78,11 +83,13 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [: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-associations/backbone-associations.d.ts) [Backbone-associations](https://github.com/dhruvaray/backbone-associations) by [Craig Brett](https://github.com/craigbrett17)
|
||||
* [: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:](bardjs/bardjs.d.ts) [bardjs](https://github.com/wardbell/bardjs) by [Andrew Archibald](https://github.com/TepigMC)
|
||||
* [:link:](bcrypt/bcrypt.d.ts) [bcrypt](https://www.npmjs.org/package/bcrypt) by [Peter Harris](https://github.com/codeanimal)
|
||||
* [:link:](bgiframe/typescript.bgiframe.d.ts) [bgiframe](https://github.com/sumegizoltan/BgiFrame) by [Zoltan Sumegi](https://github.com/sumegizoltan)
|
||||
* [:link:](big.js/big.js.d.ts) [big.js](https://github.com/MikeMcl/big.js) by [Steve Ognibene](https://github.com/nycdotnet)
|
||||
@@ -90,11 +97,12 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](big-integer/big-integer.d.ts) [BigInteger.js](https://github.com/peterolson/BigInteger.js) by [Ingo Bürk](https://github.com/Airblader), [Roel van Uden](https://github.com/Deathspike)
|
||||
* [:link:](bigscreen/bigscreen.d.ts) [BigScreen](http://brad.is/coding/BigScreen) by [Douglas Eichelberger](https://github.com/dduugg)
|
||||
* [:link:](bitwise-xor/bitwise-xor.d.ts) [bitwise-xor](https://github.com/czzarr/node-bitwise-xor) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](blob-stream/blob-stream.d.ts) [blob-stream](https://github.com/devongovett/blob-stream) by [Eric Hillah](https://github.com/erichillah)
|
||||
* [:link:](bluebird/bluebird.d.ts) [bluebird](https://github.com/petkaantonov/bluebird) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](blueimp-md5/blueimp-md5.d.ts) [blueimp-md5](https://github.com/blueimp/JavaScript-MD5) by [Ray Martone](https://github.com/rmartone)
|
||||
* [:link:](body-parser/body-parser.d.ts) [body-parser](http://expressjs.com) by [Santi Albo](https://github.com/santialbo), [VILIC VANE](https://vilic.info), [Jonathan Häberle](https://github.com/dreampulse)
|
||||
* [:link:](boom/boom.d.ts) [boom](http://github.com/hapijs/boom) by [Igor Rogatty](http://github.com/rogatty)
|
||||
* [:link:](bootbox/bootbox.d.ts) [Bootbox](https://github.com/makeusabrew/bootbox) by [Vincent Bortone](https://github.com/vbortone), [Kon Pik](https://github.com/konpikwastaken)
|
||||
* [:link:](bootbox/bootbox.d.ts) [Bootbox](https://github.com/makeusabrew/bootbox) by [Vincent Bortone](https://github.com/vbortone), [Kon Pik](https://github.com/konpikwastaken), [Anup Kattel](https://github.com/kanup)
|
||||
* [:link:](bootstrap/bootstrap.d.ts) [Bootstrap](http://twitter.github.com/bootstrap) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker.d.ts) [Bootstrap datetimepicker v3](http://eonasdan.github.io/bootstrap-datetimepicker) by [Jesica N. Fera](https://github.com/bayitajesi)
|
||||
* [:link:](bootstrap-touchspin/bootstrap-touchspin.d.ts) [Bootstrap TouchSpin](http://www.virtuosoft.eu/code/bootstrap-touchspin) by [Albin Sunnanbo](https://github.com/albinsunnanbo)
|
||||
@@ -102,8 +110,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](bootstrap-slider/bootstrap-slider.d.ts) [bootstrap-slider.js](https://github.com/seiyria/bootstrap-slider) by [Daniel Beckwith](https://github.com/dbeckwith)
|
||||
* [:link:](bootstrap.datepicker/bootstrap.datepicker.d.ts) [bootstrap.datepicker](https://github.com/eternicode/bootstrap-datepicker) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](bootstrap.paginator/bootstrap.paginator.d.ts) [bootstrap.paginator](https://github.com/lyonlai/bootstrap-paginator) by [derikwhittaker](https://github.com/derikwhittaker)
|
||||
* [:link:](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:](box2d/box2dweb.d.ts) [bootstrap.timepicker](http://code.google.com/p/box2dweb) by [jbaldwin](https://github.com/jbaldwin)
|
||||
* [: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)
|
||||
@@ -140,8 +148,10 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](chrome/chrome-cast.d.ts) [Chrome Cast application development](https://developers.google.com/cast) by [Thomas Stig Jacobsen](https://github.com/eXeDK)
|
||||
* [:link:](chrome/chrome.d.ts) [Chrome extension development](http://developer.chrome.com/extensions) by [Matthew Kimber](https://github.com/matthewkimber), [otiai10](https://github.com/otiai10)
|
||||
* [:link:](chrome/chrome-app.d.ts) [Chrome packaged application development](http://developer.chrome.com/apps) by [Adam Lay](https://github.com/AdamLay), [MIZUNE Pine](https://github.com/pine613), [MIZUSHIMA Junki](https://github.com/mzsm)
|
||||
* [:link:](chui/chui.d.ts) [chui](https://github.com/chocolatechipui/chocolatechip-ui) by [Robert Biggs](http://chocolatechip-ui.com)
|
||||
* [:link:](circular-json/circular-json.d.ts) [circular-json](https://github.com/WebReflection/circular-json) by [Jonathan Pevarnek](https://github.com/jpevarnek)
|
||||
* [:link:](ckeditor/ckeditor.d.ts) [CKEditor](http://ckeditor.com) by [Ondrej Sevcik](https://github.com/ondrejsevcik)
|
||||
* [:link:](classnames/classnames.d.ts) [classnames](https://github.com/JedWatson/classnames) by [Dave Keen](http://www.keendevelopment.ch)
|
||||
* [:link:](cli-color/cli-color.d.ts) [cli-color](https://github.com/medikoo/cli-color) by [Joel Spadin](https://github.com/ChaosinaCan)
|
||||
* [:link:](clone/clone.d.ts) [clone](https://github.com/pvorb/node-clone) by [Kieran Simpson](https://github.com/kierans/DefinitelyTyped)
|
||||
* [:link:](codemirror/codemirror.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [mihailik](https://github.com/mihailik)
|
||||
@@ -149,12 +159,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](colors/colors.d.ts) [Colors.js 0.6.0-1](https://github.com/Marak/colors.js) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](cometd/cometd.d.ts) [CometD](http://cometd.org) by [Derek Cicerone](https://github.com/derekcicerone)
|
||||
* [:link:](commander/commander.d.ts) [commanderjs](https://github.com/visionmedia/commander.js) by [Marcelo Dezem](http://github.com/mdezem), [vvakame](http://github.com/vvakame)
|
||||
* [:link:](compare-version/compare-version.d.ts) [compare-version](https://www.npmjs.com/package/compare-version) by [Jonathan Pevarnek](https://github.com/jpevarnek)
|
||||
* [:link:](compression/compression.d.ts) [compression](https://github.com/expressjs/compression) by [Santi Albo](https://github.com/santialbo)
|
||||
* [:link:](configstore/configstore.d.ts) [configstore](https://github.com/yeoman/configstore) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](connect-flash/connect-flash.d.ts) [connect-flash](https://github.com/jaredhanson/connect-flash) by [Andreas Gassmann](https://github.com/AndreasGassmann)
|
||||
* [:link:](connect-slashes/connect-slashes.d.ts) [connect-slashes](https://github.com/avinoamr/connect-slashes) by [Sam Herrmann](https://github.com/samherrmann)
|
||||
* [:link:](consolidate/consolidate.d.ts) [consolidate](https://github.com/visionmedia/consolidate.js) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
* [:link:](content-type/content-type.d.ts) [content-type](https://github.com/deoxxa/content-type) by [Pine Mizune](https://github.com/pine613)
|
||||
* [:link:](contextjs/contextjs.d.ts) [contextjs](https://github.com/jakiestfu/Context.js) by [Kern Handa](https://github.com/kernhanda)
|
||||
* [:link:](convert-source-map/convert-source-map.d.ts) [convert-source-map](https://github.com/thlorenz/convert-source-map) by [Andrew Gaspar](https://github.com/AndrewGaspar)
|
||||
* [:link:](cookie/cookie.d.ts) [cookie](https://github.com/jshttp/cookie) by [Pine Mizune](https://github.com/pine613)
|
||||
* [:link:](cookie-parser/cookie-parser.d.ts) [cookie-parser](https://github.com/expressjs/cookie-parser) by [Santi Albo](https://github.com/santialbo)
|
||||
@@ -168,9 +180,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [: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:](cson/cson.d.ts) [CSON](https://github.com/bevry/cson) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [: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)
|
||||
* [:link:](csv-stringify/csv-stringify.d.ts) [csv-stringify](https://github.com/wdavidw/node-csv-stringify) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](cuid/cuid.d.ts) [cuid](https://github.com/ericelliott/cuid) by [Dave Keen](http://www.keendevelopment.ch)
|
||||
* [:link:](custom-error-generator/custom-error-generator.d.ts) [custom-error-generator](https://github.com/jproulx/node-custom-error) by [Thierry Miceli](https://github.com/thmiceli)
|
||||
* [:link:](md5/md5.d.ts) [CybozuLabs.MD5](http://labs.cybozu.co.jp/blog/mitsunari/2007/07/md5js_1.html) by [MIZUNE Pine](https://github.com/pine613)
|
||||
* [:link:](d3/d3.d.ts) [d3JS](http://d3js.org) by [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov)
|
||||
@@ -214,8 +228,13 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](durandal/durandal.d.ts) [Durandal](http://durandaljs.com) by [Blue Spire](https://github.com/BlueSpire)
|
||||
* [:link:](dymo-label-framework/dymo-label-framework.d.ts) [DYMO Label Framework](http://www.labelwriter.com/software/dls/sdk/docs/DYMOLabelFrameworkJavaScriptHelp/index.html) by [Thijs Kuipers](https://github.com/thijskuipers)
|
||||
* [:link:](easeljs/easeljs.d.ts) [EaselJS](http://www.createjs.com/#!/EaselJS) by [Pedro Ferreira](https://bitbucket.org/drk4), [Chris Smith](https://github.com/evilangelist)
|
||||
* [:link:](easy-api-request/easy-api-request.d.ts) [easy-api-request](https://github.com/DeadAlready/easy-api-request) by [Karl Düüna](https://github.com/DeadAlready)
|
||||
* [:link:](easy-jsend/easy-jsend.d.ts) [easy-jsend](https://github.com/DeadAlready/easy-jsend) by [Karl Düüna](https://github.com/DeadAlready)
|
||||
* [:link:](easy-session/easy-session.d.ts) [easy-session](https://github.com/DeadAlready/node-easy-session) by [Karl Düüna](https://github.com/DeadAlready)
|
||||
* [:link:](easy-table/easy-table.d.ts) [easy-table](https://github.com/eldargab/easy-table) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](easy-xapi-supertest/easy-xapi-supertest.d.ts) [easy-x-headers](https://github.com/DeadAlready/easy-x-headers) by [Karl Düüna](https://github.com/DeadAlready)
|
||||
* [:link:](easy-x-headers/easy-x-headers.d.ts) [easy-x-headers](https://github.com/DeadAlready/easy-x-headers) by [Karl Düüna](https://github.com/DeadAlready)
|
||||
* [:link:](easy-xapi/easy-xapi.d.ts) [easy-xapi](https://github.com/DeadAlready/easy-xapi) by [Karl Düüna](https://github.com/DeadAlready)
|
||||
* [:link:](easystarjs/easystarjs.d.ts) [EasyStar.js](http://easystarjs.com) by [Magnus Gustafsson](https://github.com/borundin)
|
||||
* [:link:](egg.js/egg.js.d.ts) [Egg.js](https://github.com/mikeflynn/egg.js) by [Markus Peloso](https://github.com/ToastHawaii)
|
||||
* [:link:](ejs-locals/ejs-locals.d.ts) [ejs-locals](https://github.com/randometc/ejs-locals) by [jt000](https://github.com/jt000)
|
||||
@@ -228,11 +247,13 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](empower/empower.d.ts) [empower](https://github.com/twada/empower) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](emscripten/emscripten.d.ts) [Emscripten](http://kripken.github.io/emscripten-site/index.html) by [Kensuke Matsuzaki](https://github.com/zakki)
|
||||
* [:link:](epiceditor/epiceditor.d.ts) [EpicEditor](http://epiceditor.com) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](eq.js/eq.js.d.ts) [eq.js](https://github.com/Snugug/eq.js) by [Stephen Lautier](https://github.com/stephenlautier)
|
||||
* [:link:](errorhandler/errorhandler.d.ts) [errorhandler](https://github.com/expressjs/errorhandler) by [Santi Albo](https://github.com/santialbo)
|
||||
* [:link:](es6-promise/es6-promise.d.ts) [es6-promise](https://github.com/jakearchibald/ES6-Promise) by [François de Campredon](https://github.com/fdecampredon), [vvakame](https://github.com/vvakame)
|
||||
* [:link:](escape-latex/escape-latex.d.ts) [escape-latex](https://github.com/dangmai/escape-latex) by [Oliver Schneider](https://github.com/olsio)
|
||||
* [:link:](esprima/esprima.d.ts) [Esprima](http://esprima.org) by [teppeis](https://github.com/teppeis), [RReverser](https://github.com/RReverser)
|
||||
* [:link:](estree/estree.d.ts) [ESTree AST specification](https://github.com/estree/estree) by [RReverser](https://github.com/RReverser)
|
||||
* [:link:](event-kit/event-kit.d.ts) [event-kit](https://github.com/atom/event-kit) by [Vadim Macagon](https://github.com/enlight)
|
||||
* [:link:](event-loop-lag/event-loop-lag.d.ts) [event-loop-lag](https://github.com/pebble/event-loop-lag) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](eventemitter2/eventemitter2.d.ts) [EventEmitter2](https://github.com/asyncly/EventEmitter2) by [ryiwamoto](https://github.com/ryiwamoto)
|
||||
* [:link:](eventemitter3/eventemitter3.d.ts) [EventEmitter3](https://github.com/primus/eventemitter3) by [Yuichi Murata](https://github.com/mrk21)
|
||||
@@ -257,6 +278,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [: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:](fhir/fhir.d.ts) [FHIR DSTU2](http://www.hl7.org/fhir/2015May/index.html) by [Artifact Health](www.artifacthealth.com)
|
||||
* [: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)
|
||||
@@ -267,6 +289,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](state-machine/state-machine.d.ts) [Finite State Machine](https://github.com/jakesgordon/javascript-state-machine) by [Boris Yankov](https://github.com/borisyankov), [Maarten Docter](https://github.com/mdocter), [William Sears](https://github.com/MrBigDog2U)
|
||||
* [:link:](firebase/firebase.d.ts) [Firebase API](https://www.firebase.com/docs/javascript/firebase) by [Vincent Botone](https://github.com/vbortone), [Shin1 Kashimura](https://github.com/in-async)
|
||||
* [:link:](firebase/firebase-simplelogin.d.ts) [Firebase Simple Login](https://www.firebase.com/docs/security/simple-login-overview.html) by [Wilker Lucio](http://github.com/wilkerlucio)
|
||||
* [:link:](first-mate/first-mate.d.ts) [first-mate](https://github.com/atom/first-mate) by [Vadim Macagon](https://github.com/enlight)
|
||||
* [:link:](flexSlider/flexSlider.d.ts) [FlexSlider 2 jquery plugin](https://github.com/woothemes/FlexSlider) by [Diullei Gomes](https://github.com/diullei)
|
||||
* [:link:](flight/flight.d.ts) [Flight](http://flightjs.github.com/flight) by [Jonathan Hedrén](https://github.com/jonathanhedren)
|
||||
* [:link:](flipsnap/flipsnap.d.ts) [flipsnap.js](http://pxgrid.github.io/js-flipsnap) by [kubosho](https://github.com/kubosho), [gsino](https://github.com/gsino), [Mayuki Sawatari](https://github.com/mayuki)
|
||||
@@ -277,7 +300,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](forge-di/forge-di.d.ts) [forge-di](https://github.com/nkohari/forge) by [Adam Carr](https://github.com/adamcarr)
|
||||
* [:link:](form-data/form-data.d.ts) [form-data](https://github.com/felixge/node-form-data) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
* [:link:](formidable/formidable.d.ts) [Formidable](https://github.com/felixge/node-formidable) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](foundation/foundation.d.ts) [Foundation](http://foundation.zurb.com) by [Boris Yankov](https://github.com/borisyankov), [George Marshall](https://github.com/georgemarshall), [Boltmade](https://github.com/Boltmade)
|
||||
* [:link:](foundation/foundation.d.ts) [Foundation](http://foundation.zurb.com) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](fpsmeter/FPSMeter.d.ts) [FPSmeter](http://darsa.in/fpsmeter) by [Aaron Lampros](http://github.com/alampros)
|
||||
* [:link:](from/from.d.ts) [from](https://github.com/dominictarr/from) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](fs-extra/fs-extra.d.ts) [fs-extra](https://github.com/jprichardson/node-fs-extra) by [midknight41](https://github.com/midknight41)
|
||||
@@ -286,22 +309,23 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [: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:](fullCalendar/fullCalendar.d.ts) [FullCalendar](http://arshaw.com/fullcalendar) by [Neil Stalker](https://github.com/nestalk), [Marcelo Camargo](https://github.com/hasellcamargo)
|
||||
* [: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)
|
||||
* [:link:](gamepad/gamepad.d.ts) [Gamepad API](http://www.w3.org/TR/gamepad) by [Kon](http://phyzkit.net)
|
||||
* [:link:](gamequery/gamequery.d.ts) [gameQuery](http://gamequeryjs.com) by [David Laubreiter](https://github.com/Laubi)
|
||||
* [:link:](gently/gently.d.ts) [gently](https://www.npmjs.org/package/gently) by [bonnici](https://github.com/bonnici)
|
||||
* [:link:](geojson/geojson.d.ts) [GeoJSON Format Specification](http://geojson.org) by [Jacob Bruun](https://github.com/cobster)
|
||||
* [:link:](geometry-dom/geometry-dom.d.ts) [Geometry Format Specification](http://www.w3.org/TR/geometry-1) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
* [:link:](giraffe/giraffe.d.ts) [Giraffe](https://github.com/barc/backbone.giraffe) by [Matt McCray](https://github.com/darthapo)
|
||||
* [:link:](gl-matrix/gl-matrix.d.ts) [gl-matrix](https://github.com/toji/gl-matrix) by [Tat](https://github.com/tatchx)
|
||||
* [:link:](gldatepicker/gldatepicker.d.ts) [glDatePicker](http://glad.github.com/glDatePicker) by [Dániel Tar](https://github.com/qcz)
|
||||
* [:link:](glidejs/glidejs.d.ts) [Glide.js](http://glide.jedrzejchalubek.com) by [Milan Jaros](https://github.com/milanjaros)
|
||||
* [:link:](glob/glob.d.ts) [Glob](https://github.com/isaacs/node-glob) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](glob-stream/glob-stream.d.ts) [glob-stream](http://github.com/wearefractal/glob-stream) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](globalize/globalize.d.ts) [Globalize](https://github.com/jquery/globalize) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](globalize/globalize.d.ts) [Globalize](https://github.com/jquery/globalize) by [Aram Taieb](https://github.com/afromogli)
|
||||
* [:link:](gm/gm.d.ts) [gm](https://github.com/aheckmann/gm) by [Joel Spadin](https://github.com/ChaosinaCan)
|
||||
* [:link:](goJS/goJS.d.ts) [GoJS](http://gojs.net) by [Barbara Duckworth](https://github.com/barbara42)
|
||||
* [:link:](goJS/goJS.d.ts) [GoJS](http://gojs.net) by [Northwoods Software](https://github.com/NorthwoodsSoftware)
|
||||
* [: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)
|
||||
@@ -321,29 +345,40 @@ 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/Core.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
|
||||
* [:link:](gsap/Ease.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
|
||||
* [:link:](gsap/TweenLite.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
|
||||
* [:link:](gsap/Ease.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
|
||||
* [:link:](gsap/Core.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
|
||||
* [:link:](gulp/gulp.d.ts) [Gulp v3.8.x](http://gulpjs.com) by [Drew Noakes](https://drewnoakes.com)
|
||||
* [:link:](gulp-autoprefixer/gulp-autoprefixer.d.ts) [gulp-autoprefixer](https://github.com/sindresorhus/gulp-autoprefixer) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-concat/gulp-concat.d.ts) [gulp-concat](http://github.com/wearefractal/gulp-concat) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
|
||||
* [:link:](gulp-rev/gulp-rev.d.ts) [gulp-csso](https://github.com/sindresorhus/gulp-rev) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](gulp-csso/gulp-csso.d.ts) [gulp-csso](https://github.com/ben-eb/gulp-csso) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](gulp-debug/gulp-debug.d.ts) [gulp-debug](https://github.com/sindresorhus/gulp-debug) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](gulp-flatten/gulp-flatten.d.ts) [gulp-flatten](https://github.com/armed/gulp-flatten) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
|
||||
* [:link:](gulp-gh-pages/gulp-gh-pages.d.ts) [gulp-gh-pages](https://github.com/rowoot/gulp-gh-pages) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-if/gulp-if.d.ts) [gulp-if](https://github.com/robrich/gulp-if) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-inject/gulp-inject.d.ts) [gulp-inject](https://github.com/klei/gulp-inject) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
|
||||
* [:link:](gulp-istanbul/gulp-istanbul.d.ts) [gulp-istanbul](https://github.com/SBoudrias/gulp-istanbul) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-jasmine-browser/gulp-jasmine-browser.d.ts) [gulp-jasmine-browser](https://github.com/jasmine/gulp-jasmine-browser) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](gulp-less/gulp-less.d.ts) [gulp-less](https://github.com/plus3network/gulp-less) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
|
||||
* [:link:](gulp-minify-css/gulp-minify-css.d.ts) [gulp-minify-css](https://github.com/jonathanepollack/gulp-minify-css) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
|
||||
* [:link:](gulp-minify-html/gulp-minify-html.d.ts) [gulp-minify-html](https://github.com/murphydanger/gulp-minify-html) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](gulp-mocha/gulp-mocha.d.ts) [gulp-mocha](https://github.com/sindresorhus/gulp-mocha) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-protractor/gulp-protractor.d.ts) [gulp-protractor](https://github.com/mllrsohn/gulp-protractor) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](gulp-rename/gulp-rename.d.ts) [gulp-rename](https://github.com/hparra/gulp-rename) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-replace/gulp-replace.d.ts) [gulp-replace](https://github.com/lazd/gulp-replace) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-rev-replace/gulp-rev-replace.d.ts) [gulp-rev-replace](https://github.com/jamesknelson/gulp-rev-replace) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](gulp-sass/gulp-sass.d.ts) [gulp-sass](https://github.com/dlmanning/gulp-sass) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-size/gulp-size.d.ts) [gulp-size](https://github.com/sindresorhus/gulp-size) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](gulp-sourcemaps/gulp-sourcemaps.d.ts) [gulp-sourcemaps](https://github.com/floridoo/gulp-sourcemaps) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-tsd/gulp-tsd.d.ts) [gulp-tsd](https://github.com/moznion/gulp-tsd) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
|
||||
* [:link:](gulp-tslint/gulp-tslint.d.ts) [gulp-tslint](https://github.com/panuhorsmalahti/gulp-tslint) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-typedoc/gulp-typedoc.d.ts) [gulp-typedoc](https://github.com/rogierschouten/gulp-typedoc) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-typescript/gulp-typescript.d.ts) [gulp-typescript](https://github.com/ivogabe/gulp-typescript) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-uglify/gulp-uglify.d.ts) [gulp-uglify](https://github.com/terinjokes/gulp-uglify) by [Christopher Haws](https://github.com/ChristopherHaws)
|
||||
* [:link:](gulp-useref/gulp-useref.d.ts) [gulp-useref](https://github.com/jonkemp/gulp-useref) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](gulp-util/gulp-util.d.ts) [gulp-util v3.0.x](https://github.com/gulpjs/gulp-util) by [jedmao](https://github.com/jedmao)
|
||||
* [:link:](gulp-watch/gulp-watch.d.ts) [gulp-watch](https://github.com/floatdrop/gulp-watch) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [: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)
|
||||
@@ -364,6 +399,9 @@ 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:](htmltojsx/htmltojsx.d.ts) [htmltojsx](https://www.npmjs.com/package/htmltojsx) by [Basarat Ali Syed](https://github.com/basarat)
|
||||
* [:link:](statuses/statuses.d.ts) [http-errors](https://github.com/jshttp/statuses) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](http-errors/http-errors.d.ts) [http-errors](https://github.com/jshttp/http-errors) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](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)
|
||||
@@ -378,6 +416,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](imap/imap.d.ts) [imap](https://www.npmjs.com/package/imap) by [Peter Snider](https://github.com/psnider)
|
||||
* [:link:](imgur-rest-api/imgur-rest-api.d.ts) [Imgur REST API v3](https://api.imgur.com) by [Luke William Westby](http://github.com/lukewestby)
|
||||
* [:link:](impress/impress.d.ts) [Impress.js](https://github.com/bartaz/impress.js) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](incremental-dom/incremental-dom.d.ts) [Incremetal DOM](https://github.com/google/incremental-dom) by [Basarat Ali Syed](https://github.com/basarat)
|
||||
* [:link:](inflection/inflection.d.ts) [inflection](https://github.com/dreamerslab/node.inflection) by [Shogo Iwano](https://github.com/shiwano)
|
||||
* [:link:](ini/ini.d.ts) [ini](https://github.com/isaacs/ini) by [Marcin Porębski](https://github.com/marcinporebski)
|
||||
* [:link:](insight/insight.d.ts) [insight](https://github.com/yeoman/insight) by [vvakame](http://github.com/vvakame)
|
||||
@@ -400,6 +439,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](jasmine-fixture/jasmine-fixture.d.ts) [Jasmine-fixture](https://github.com/searls/jasmine-fixture) by [Craig Brett](https://github.com/craigbrett17)
|
||||
* [:link:](jasmine-jquery/jasmine-jquery.d.ts) [Jasmine-JQuery](https://github.com/velesin/jasmine-jquery) by [Gregor Stamac](https://github.com/gstamac)
|
||||
* [:link:](jasmine-matchers/jasmine-matchers.d.ts) [jasmine-matchers](https://github.com/uxebu/jasmine-matchers) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](jasmine-promise-matchers/jasmine-promise-matchers.d.ts) [jasmine-promise-matchers](https://github.com/bvaughn/jasmine-promise-matchers) by [Matthew Hill](https://github.com/matthewjh)
|
||||
* [:link:](java-applet/java-applet.d.ts) [Java Applet](https://www.java.com) by [Cyril Schumacher](https://github.com/cyrilschumacher)
|
||||
* [:link:](hooker/hooker.d.ts) [JavaScript Hooker](https://github.com/cowboy/javascript-hooker) by [Michael Zabka](https://github.com/misak113)
|
||||
* [:link:](oauth.js/oauth.js.d.ts) [JavaScript software for implementing an OAuth consumer](https://code.google.com/p/oauth) by [NOBUOKA Yu](https://github.com/nobuoka)
|
||||
@@ -447,7 +487,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](jquery.pjax/jquery.pjax.d.ts) [jquery-pjax](https://github.com/defunkt/jquery-pjax) by [Junle Li](https://github.com/lijunle)
|
||||
* [:link:](jquery.address/jquery.address.d.ts) [jQuery.Address](https://github.com/asual/jquery-address) by [Martin Duparc](https://github.com/martinduparc), [Tim Klingeleers](https://github.com/mardaneus86)
|
||||
* [:link:](jquery.are-you-sure/jquery.are-you-sure.d.ts) [jquery.are-you-sure.js](https://github.com/codedance/jquery.AreYouSure) by [Jon Egerton](https://github.com/jonegerton)
|
||||
* [:link:](jquery.autosize/jquery.autosize.d.ts) [jquery.autosize (un-versioned)](http://www.jacklmoore.com/autosize) by [Aaron T. King](https://github.com/kingdango)
|
||||
* [:link:](jquery.autosize/jquery.autosize.d.ts) [jquery.autosize](http://www.jacklmoore.com/autosize) by [Aaron T. King](https://github.com/kingdango)
|
||||
* [:link:](jquery.bbq/jquery.bbq.d.ts) [jquery.bbq](http://benalman.com/projects/jquery-bbq-plugin) by [Adam R. Smith](https://github.com/sunetos)
|
||||
* [:link:](jquery.clientSideLogging/jquery.clientSideLogging.d.ts) [jquery.clientSideLogging](https://github.com/remybach/jQuery.clientSideLogging) by [Diullei Gomes](https://github.com/diullei)
|
||||
* [:link:](jquery.color/jquery.color.d.ts) [jquery.color.js](https://github.com/jquery/jquery-color) by [Derek Cicerone](https://github.com/derekcicerone)
|
||||
@@ -518,6 +558,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](jwplayer/jwplayer.d.ts) [JW Player](http://developer.longtailvideo.com/trac) by [Martin Duparc](https://github.com/martinduparc)
|
||||
* [:link:](jwt-simple/jwt-simple.d.ts) [jwt-simple](https://github.com/hokaccha/node-jwt-simple) by [Ken Fukuyama](https://github.com/kenfdev)
|
||||
* [:link:](kafka-node/kafka-node.d.ts) [kafka-node](https://github.com/SOHU-Co/kafka-node) by [Daniel Imrie-Situnayake](https://github.com/dansitu)
|
||||
* [:link:](karma/karma.d.ts) [karma](https://github.com/karma-runner/karma) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](karma-jasmine/karma-jasmine.d.ts) [karma-jasmine plugin](https://github.com/karma-runner/karma-jasmine) by [Michel Salib](https://github.com/michelsalib)
|
||||
* [:link:](kendo-ui/kendo-ui.d.ts) [Kendo UI Professional](http://www.telerik.com/kendo-ui) by [Telerik](https://github.com/telerik)
|
||||
* [:link:](keyboardjs/keyboardjs.d.ts) [KeyboardJS](https://github.com/RobertWHurst/KeyboardJS) by [Vincent Bortone](https://github.com/vbortone)
|
||||
@@ -547,6 +588,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](knockout.kogrid/ko-grid.d.ts) [ko-grid](http://knockout-contrib.github.io/KoGrid) by [huer12](https://github.com/huer12)
|
||||
* [:link:](ko.plus/ko.plus.d.ts) [ko.plus](https://github.com/stevegreatrex/ko.plus) by [Howard Richards](https://github.com/conficient)
|
||||
* [:link:](kolite/kolite.d.ts) [KoLite](https://github.com/CodeSeven/kolite) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](kue/kue.d.ts) [kue 0.9.x](https://github.com/Automattic/kue) by [Nicholas Penree](http://github.com/drudge)
|
||||
* [:link:](kuromoji/kuromoji.d.ts) [kuromoji.js](https://github.com/takuyaa/kuromoji.js) by [MIZUSHIMA Junki](https://github.com/mzsm)
|
||||
* [:link:](ladda/ladda.d.ts) [Ladda](https://github.com/hakimel/Ladda) by [Danil Flores](https://github.com/dflor003), [Michael Lee](https://github.com/leemicw)
|
||||
* [:link:](later/later.d.ts) [LaterJS](http://bunkat.github.io/later) by [Jason D Dryhurst-Smith](http://jasonds.co.uk)
|
||||
@@ -573,19 +615,22 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](logrotate-stream/logrotate-stream.d.ts) [logrotate-stream](https://github.com/dstokes/logrotate-stream) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](lokijs/lokijs.d.ts) [lokijs](https://github.com/techfort/LokiJS) by [TeamworkGuy2](https://github.com/TeamworkGuy2)
|
||||
* [: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:](long/long.d.ts) [Long.js](https://github.com/dcodeIO/Long.js) by [Peter Kooijmans](https://github.com/peterkooijmans)
|
||||
* [:link:](lory.js/lory.js.d.ts) [lory](https://github.com/meandmax/lory) by [kubosho](https://github.com/kubosho)
|
||||
* [:link:](lovefield/lovefield.d.ts) [Lovefield](http://google.github.io/lovefield) by [freshp86](https://github.com/freshp86)
|
||||
* [:link:](lru-cache/lru-cache.d.ts) [lru-cache](https://github.com/isaacs/node-lru-cache) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](lscache/lscache.d.ts) [lscache](https://github.com/pamelafox/lscache) by [Chris Martinez](https://github.com/Chris-Martinezz)
|
||||
* [:link:](luaparse/luaparse.d.ts) [luaparse](https://github.com/oxyc/luaparse) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](lunr/lunr.d.ts) [lunr.js](https://github.com/olivernn/lunr.js) by [Sebastian Lenz](https://github.com/sebastian-lenz)
|
||||
* [:link:](lz-string/lz-string.d.ts) [lz-string](https://github.com/pieroxy/lz-string) by [Roman Nikitin](https://github.com/M0ns1gn0r)
|
||||
* [:link:](magicsuggest/magicsuggest.d.ts) [MagicSuggest](http://nicolasbize.com/magicsuggest) by [Leonardo Chaia](http://github.com/leonardochaia)
|
||||
* [:link:](mailcheck/mailcheck.d.ts) [Mailcheck](https://github.com/mailcheck/mailcheck) by [Paulo Cesar](http://github.com/pocesar)
|
||||
* [:link:](main-bower-files/main-bower-files.d.ts) [main-bower-files](https://github.com/ck86/main-bower-files) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
|
||||
* [:link:](maker.js/makerjs.d.ts) [Maker.js](https://github.com/Microsoft/maker.js) by [Dan Marshall](https://github.com/danmarshall)
|
||||
* [:link:](mandrill-api/mandrill-api.d.ts) [Mandrill API 1.x](http://mandrill.com) by [Paulo Cesar](https://github.com/pocesar)
|
||||
* [: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:](maquette/maquette.d.ts) [maquette](http://maquettejs.org) by [Johan Gorter](https://github.com/johan-gorter)
|
||||
* [: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)
|
||||
@@ -596,6 +641,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](mCustomScrollbar/mCustomScrollbar.d.ts) [mCustomScrollbar](https://github.com/malihu/malihu-custom-scrollbar-plugin) by [Sarah Williams](https://github.com/flurg)
|
||||
* [:link:](memory-cache/memory-cache.d.ts) [memory-cache](http://github.com/ptarjan/node-cache) by [Jeff Goddard](https://github.com/jedigo)
|
||||
* [:link:](merge-stream/merge-stream.d.ts) [merge-stream](https://github.com/grncdr/merge-stream) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
|
||||
* [:link:](merge2/merge2.d.ts) [merge2](https://github.com/teambition/merge2) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](mess/mess.d.ts) [mess](https://github.com/bobrik/node-mess) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](messenger/messenger.d.ts) [Messenger.js](https://github.com/HubSpot/messenger) by [Derek Cicerone](https://github.com/derekcicerone)
|
||||
* [:link:](meteor/meteor.d.ts) [Meteor](http://www.meteor.com) by [Dave Allen](https://github.com/fullflavedave)
|
||||
@@ -604,6 +650,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](xrm/xrm.d.ts) [Microsoft Dynamics xRM API](http://www.microsoft.com/en-us/download/details.aspx?id=44567) by [David Berry](https://github.com/6ix4our), [Matt Ngan](https://github.com/mattngan)
|
||||
* [:link:](xrm/xrm-6.d.ts) [Microsoft Dynamics xRM API v6](http://msdn.microsoft.com/en-us/library/gg328255.aspx) by [David Berry](https://github.com/6ix4our)
|
||||
* [:link:](xrm/clientglobalcontext.d.ts) [Microsoft Dynamics xRM ClientGlobalContext.js.aspx](http://msdn.microsoft.com/en-us/library/gg328255.aspx) by [David Berry](https://github.com/6ix4our)
|
||||
* [:link:](jquery-validation-unobtrusive/jquery-validation-unobtrusive.d.ts) [Microsoft jQuery Unobtrusive Validation](http://aspnetwebstack.codeplex.com) by [Matt Brooks](https://github.com/EnableSoftware)
|
||||
* [:link:](microsoft-live-connect/microsoft-live-connect.d.ts) [Microsoft Live Connect](http://msdn.microsoft.com/en-us/library/live/hh243643.aspx) by [John Vilk](https://github.com/jvilk)
|
||||
* [:link:](xrm/parature.d.ts) [Microsoft Parature extentions to Xrm.Page - available for CRM Online Only](http://msdn.microsoft.com/en-us/library/gg328255.aspx) by [David Berry](https://github.com/6ix4our)
|
||||
* [:link:](azure-mobile-services-client/AzureMobileServicesClient.d.ts) [Microsoft Windows AzureMobile Service](http://www.windowsazure.com/en-us/develop/mobile) by [Morosinotto Daniele](https://github.com/dmorosinotto)
|
||||
@@ -626,6 +673,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:](mobile-detect/mobile-detect.d.ts) [mobile-detect](http://hgoebl.github.io/mobile-detect.js) by [Martin McWhorter](https://github.com/martinmcwhorter)
|
||||
* [:link:](mocha/mocha.d.ts) [mocha](http://mochajs.org) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid), [otiai10](https://github.com/otiai10), [jt000](https://github.com/jt000), [Vadim Macagon](https://github.com/enlight)
|
||||
* [:link:](mocha/mocha-node.d.ts) [mocha](http://mochajs.org) by [Vadim Macagon](https://github.com/enlight), [vvakame](https://github.com/vvakame)
|
||||
* [:link:](mocha-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)
|
||||
@@ -647,9 +695,10 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [: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:](multer/multer.d.ts) [multer](https://github.com/expressjs/multer) by [jt000](https://github.com/jt000), [vilicvane](https://vilic.github.io)
|
||||
* [:link:](multiplexjs/multiplexjs.d.ts) [Multiplex.js](http://github.com/multiplex/multiplex.js) by [Kamyar Nazeri](http://github.com/KamyarNazeri)
|
||||
* [:link:](mustache/mustache.d.ts) [Mustache](https://github.com/janl/mustache.js) by [Mark Ashley Bell](https://github.com/markashleybell)
|
||||
* [:link:](natural/natural.d.ts) [Natural](https://github.com/NaturalNode/natural) by [Dylan R. E. Moonfire](https://github.com/dmoonfire)
|
||||
* [:link:](navigation/navigation.d.ts) [Navigation](http://grahammendick.github.io/navigation) by [Graham Mendick](https://github.com/grahammendick)
|
||||
* [:link:](nconf/nconf.d.ts) [nconf](https://github.com/flatiron/nconf) by [Jeff Goddard](https://github.com/jedigo), [Jean-Martin Thibault](https://github.com/jmthibault)
|
||||
* [:link:](ncp/ncp.d.ts) [ncp](https://github.com/AvianFlu/ncp) by [Bart van der Schoor](https://github.com/bartvds)
|
||||
@@ -703,8 +752,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](nopt/nopt.d.ts) [nopt](https://github.com/npm/nopt) by [jbondc](https://github.com/jbondc)
|
||||
* [:link:](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:](wnumb/wnumb.d.ts) [nouislider](https://github.com/leongersen/wnumb) by [Corey Jepperson](https://github.com/acoreyj)
|
||||
* [:link:](nouislider/nouislider.d.ts) [nouislider](https://github.com/leongersen/noUiSlider) by [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)
|
||||
@@ -714,12 +763,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](object-path/object-path.d.ts) [objectPath v0.9.x](https://github.com/mariocasciaro/object-path) by [Paulo Cesar](https://github.com/pocesar)
|
||||
* [:link:](oboe/oboe.d.ts) [oboe](https://github.com/jimhigson/oboe.js) by [Jared Klopper](https://github.com/optical)
|
||||
* [:link:](oclazyload/oclazyload.d.ts) [oc.LazyLoad](https://github.com/ocombe/ocLazyLoad) by [Roland Zwaga](https://github.com/rolandzwaga)
|
||||
* [:link:](angular-odata-resources/angular-odata-resources.d.ts) [OData Angular Resources](https://github.com/devnixs/ODataAngularResources) by [Raphael ATALLAH](http://raphael.atallah.me)
|
||||
* [:link:](on-finished/on-finished.d.ts) [on-finished](https://github.com/jshttp/on-finished) by [Honza Dvorsky](http://github.com/czechboy0)
|
||||
* [:link:](onsenui/onsenui.d.ts) [Onsen UI](http://onsen.io) by [Fran Dios](https://github.com/frankdiox)
|
||||
* [:link:](open/open.d.ts) [open](https://github.com/jjrdn/node-open) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](openlayers/openlayers.d.ts) [OpenLayers.js](https://github.com/openlayers/openlayers) by [Ilya Bolkhovsky](https://github.com/bolhovsky)
|
||||
* [:link:](openlayers/openlayers.d.ts) [OpenLayers](http://openlayers.org) by [Wouter Goedhart](https://github.com/woutergd)
|
||||
* [:link:](opn/opn.d.ts) [opn](https://github.com/sindresorhus/opn) by [Shinnosuke Watanabe](https://github.com/shinnn)
|
||||
* [:link:](optimist/optimist.d.ts) [optimist](https://github.com/substack/node-optimist) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
* [:link:](packery/packery.d.ts) [Packery](http://packery.metafizzy.co) by [Piraveen Kamalathas from Kilix](https://github.com/piraveen)
|
||||
* [:link:](page/page.d.ts) [page](http://visionmedia.github.io/page.js) by [Alan Norbauer](http://alan.norbauer.com)
|
||||
* [:link:](papaparse/papaparse.d.ts) [PapaParse](https://github.com/mholt/PapaParse) by [Pedro Flemming](https://github.com/torpedro)
|
||||
* [:link:](parallel/parallel.d.ts) [parallel.js](http://adambom.github.io/parallel.js) by [Josh Baldwin](https://github.com/jbaldwin)
|
||||
@@ -735,6 +786,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [: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:](pdfkit/pdfkit.d.ts) [Pdfkit](http://pdfkit.org) by [Eric Hillah](https://github.com/erichillah)
|
||||
* [:link:](peerjs/peerjs.d.ts) [PeerJS](http://peerjs.com) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
* [:link:](pegjs/pegjs.d.ts) [PEG.js](http://pegjs.majda.cz) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](persona/persona.d.ts) [Persona](http://www.mozilla.org/en-US/persona) by [James Frasca](https://github.com/Nycto)
|
||||
@@ -752,16 +804,13 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](platform/platform.d.ts) [Platform](https://github.com/bestiejs/platform.js) by [Jake Hickman](https://github.com/JakeH)
|
||||
* [:link:](playerframework/playerFramework.d.ts) [Player Framework (MMPPF)](https://playerframework.codeplex.com) by [Ricardo Sabino](https://github.com/ricardosabino)
|
||||
* [:link:](pleasejs/please.d.ts) [PleaseJS](http://www.checkman.io/please) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
* [:link:](plottable/plottable.d.ts) [Plottable](http://plottablejs.org) by [Plottable Team](https://github.com/palantir/plottable)
|
||||
* [:link:](pluralize/pluralize.d.ts) [pluralize](https://www.npmjs.com/package/pluralize) by [Syu Kato](https://github.com/ukyo)
|
||||
* [:link:](png-async/png-async.d.ts) [png-async](https://github.com/kanreisa/node-png-async) by [Yuki KAN](https://github.com/kanreisa)
|
||||
* [:link:](podcast/podcast.d.ts) [podcast](http://github.com/maxnowack/node-podcast) by [Niklas Mollenhauer](https://github.com/nikeee)
|
||||
* [:link:](poly2tri/poly2tri.d.ts) [poly2tri](http://github.com/r3mi/poly2tri.js) by [Elemar Junior](https://github.com/elemarjr)
|
||||
* [:link:](polymer/polymer.d.ts) [polymer](https://github.com/polymer) by [Louis Grignon](https://github.com/lgrignon)
|
||||
* [:link:](polymer/polymer.paper-dialog.d.ts) [polymer's paper-dialog](https://github.com/Polymer/paper-dialog) by [Louis Grignon](https://github.com/lgrignon)
|
||||
* [:link:](polymer/polymer.core-selector.d.ts) [polymer's paper-toast](https://github.com/Polymer/core-selector) by [Louis Grignon](https://github.com/lgrignon)
|
||||
* [:link:](polymer/polymer.core-drawer-panel.d.ts) [polymer's paper-toast](https://github.com/Polymer/core-drawer-panel) by [Louis Grignon](https://github.com/lgrignon)
|
||||
* [:link:](polymer/polymer.core-overlay.d.ts) [polymer's paper-toast](https://github.com/Polymer/core-selector) by [Louis Grignon](https://github.com/lgrignon)
|
||||
* [:link:](polymer/polymer.paper-toast.d.ts) [polymer's paper-toast](https://github.com/Polymer/paper-toast) by [Louis Grignon](https://github.com/lgrignon)
|
||||
* [:link:](polyline/polyline.d.ts) [Polyline](https://github.com/mapbox/polyline) by [Arseniy Maximov](https://github.com/Kern0)
|
||||
* [:link:](polymer/polymer.d.ts) [polymer](https://github.com/Polymer/polymer) by [Louis Grignon](https://github.com/lgrignon), [Suguru Inatomi](https://github.com/laco0416)
|
||||
* [:link:](popcorn/popcorn.d.ts) [Popcorn](https://github.com/mozilla/popcorn-js) by [grapswiz](https://github.com/grapswiz)
|
||||
* [:link:](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)
|
||||
@@ -784,15 +833,17 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](qtip2/qtip2.d.ts) [qtip2](http://qtip2.com) by [Nathan Pitman](https://github.com/Seltzer)
|
||||
* [:link:](quixote/quixote.d.ts) [quixote](http://quixote-css.com) by [Aleksandr Filatov](https://github.com/greybax)
|
||||
* [:link:](qunit/qunit.d.ts) [QUnit](http://qunitjs.com) by [Diullei Gomes](https://github.com/diullei)
|
||||
* [:link:](qwest/qwest.d.ts) [qwest](https://github.com/pyrsmk/qwest) by [Lindsay Evans](https://github.com/lindsayevans)
|
||||
* [: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](http://ractivejs.org) by [Han Lin Yap](http://yap.nu)
|
||||
* [:link:](random-string/random-string.d.ts) [random-string](https://github.com/valiton/node-random-string) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [: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:](raygun4js/raygun4js.d.ts) [raygun4js](https://github.com/MindscapeHQ/raygun4js) by [Brian Surowiec](https://github.com/xt0rted)
|
||||
* [:link:](react/react.d.ts) [React (external module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com)
|
||||
* [: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 (external module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com)
|
||||
* [:link:](react/react-global.d.ts) [React (internal module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com)
|
||||
* [:link:](react-router/react-router.d.ts) [React Router](https://github.com/rackt/react-router) by [Yuichi Murata](https://github.com/mrk21), [Václav Ostrožlík](https://github.com/vasek17)
|
||||
* [:link:](react/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)
|
||||
@@ -803,6 +854,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](ref-struct/ref-struct.d.ts) [ref-struct](https://github.com/TooTallNate/ref-struct) by [Paul Loyd](https://github.com/loyd)
|
||||
* [: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:](request-promise/request-promise.d.ts) [request-promise](https://www.npmjs.com/package/request-promise) by [Christopher Glantschnig](https://github.com/cglantschnig)
|
||||
* [:link:](requirejs/require.d.ts) [RequireJS](http://requirejs.org) by [Josh Baldwin](https://github.com/jbaldwin)
|
||||
* [:link:](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)
|
||||
@@ -813,6 +865,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](rimraf/rimraf.d.ts) [rimraf](https://github.com/isaacs/rimraf) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
* [:link:](riotjs/riotjs.d.ts) [riot.js](https://github.com/moot/riotjs) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](rivets/rivets.d.ts) [rivets](http://rivetsjs.com) by [Trevor Baron](https://github.com/TrevorDev)
|
||||
* [:link:](route-recognizer/route-recognizer.d.ts) [route-recognizer](https://github.com/tildeio/route-recognizer) by [Dave Keen](http://www.keendevelopment.ch)
|
||||
* [:link:](routie/routie.d.ts) [routie](https://github.com/jgallen23/routie) by [Adilson](https://github.com/Adilson)
|
||||
* [:link:](rtree/rtree.d.ts) [rtree](https://github.com/leaflet-extras/RTree) by [Omede Firouz](https://github.com/oefirouz)
|
||||
* [:link:](run-sequence/run-sequence.d.ts) [run-sequence](https://github.com/OverZealous/run-sequence) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
|
||||
@@ -838,17 +891,19 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](sax/sax.d.ts) [sax js](https://github.com/isaacs/sax-js) by [Asana](https://asana.com)
|
||||
* [:link:](screenfull/screenfull.d.ts) [screenfull.js](https://github.com/sindresorhus/screenfull.js) by [Ilia Choly](http://github.com/icholy)
|
||||
* [:link:](scrolltofixed/scrolltofixed.d.ts) [ScrollToFixed](https://github.com/bigspotteddog/ScrollToFixed) by [Ben Dixon](https://github.com/bmdixon)
|
||||
* [:link:](seedrandom/seedrandom.d.ts) [seedrandom](https://github.com/davidbau/seedrandom) by [Kern Handa](https://github.com/kernhanda)
|
||||
* [:link:](select2/select2.d.ts) [Select2](http://ivaynberg.github.com/select2) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](selectize/selectize.d.ts) [Selectize](https://github.com/brianreavis/selectize.js) by [Adi Dahiya](https://github.com/adidahiya)
|
||||
* [:link:](selenium-webdriver/selenium-webdriver.d.ts) [Selenium WebDriverJS](https://code.google.com/p/selenium) by [Bill Armstrong](https://github.com/BillArmstrong)
|
||||
* [: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:](on-headers/on-headers.d.ts) [serve-favicon](https://github.com/jshttp/on-headers) by [John Jeffery](https://github.com/jjeffery)
|
||||
* [:link:](serve-favicon/serve-favicon.d.ts) [serve-favicon](https://github.com/expressjs/serve-favicon) by [Uros Smolnik](https://github.com/urossmolnik)
|
||||
* [:link:](serve-static/serve-static.d.ts) [serve-static](https://github.com/expressjs/serve-static) by [Uros Smolnik](https://github.com/urossmolnik)
|
||||
* [:link:](sharedworker/SharedWorker.d.ts) [SharedWorker](http://www.w3.org/TR/workers) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
* [:link:](shelljs/shelljs.d.ts) [ShellJS](http://shelljs.org) by [Niklas Mollenhauer](https://github.com/nikeee)
|
||||
* [:link:](shortid/shortid.d.ts) [shortid](https://github.com/dylang/shortid) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](should-promised/should-promised.d.ts) [should-promised](https://github.com/shouldjs/promised) by [Yaroslav Admin](https://github.com/devoto13)
|
||||
* [:link:](should/should.d.ts) [should.js](https://github.com/visionmedia/should.js) by [Alex Varju](https://github.com/varju), [Maxime LUCE](https://github.com/SomaticIT)
|
||||
* [:link:](showdown/showdown.d.ts) [Showdown](https://github.com/coreyti/showdown) by [cbowdon](https://github.com/cbowdon)
|
||||
@@ -862,6 +917,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](sinon-chai/sinon-chai.d.ts) [sinon-chai](https://github.com/domenic/sinon-chai) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid), [Jed Mao](https://github.com/jedmao)
|
||||
* [:link:](sipml/sipml.d.ts) [SIPml5](http://sipml5.org) by [A. Groenenboom](https://github.com/chookies)
|
||||
* [:link:](sjcl/sjcl.d.ts) [sjcl](http://crypto.stanford.edu/sjcl) by [Eugene Chernyshov](https://github.com/Evgenus)
|
||||
* [:link:](skyway/skyway.d.ts) [SkyWay](http://nttcom.github.io/skyway) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
* [:link:](slickgrid/SlickGrid.d.ts) [SlickGrid](https://github.com/mleibman/SlickGrid) by [Josh Baldwin](https://github.com/jbaldwin)
|
||||
* [:link:](slickgrid/slick.autotooltips.d.ts) [SlickGrid AutoToolTips Plugin](https://github.com/mleibman/SlickGrid) by [Ryo Iwamoto](https://github.com/ryiwamoto)
|
||||
* [:link:](slickgrid/slick.headerbuttons.d.ts) [SlickGrid HeaderButtons Plugin](https://github.com/mleibman/SlickGrid) by [Derek Cicerone](https://github.com/derekcicerone)
|
||||
@@ -886,10 +942,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](squirejs/squirejs.d.ts) [Squire](https://github.com/iammerrick/Squire.js) by [Bradley Ayers](https://github.com/bradleyayers)
|
||||
* [:link:](stack-mapper/stack-mapper.d.ts) [stack-mapper](https://github.com/thlorenz/stack-mapper) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](stacktrace-js/stacktrace-js.d.ts) [stacktrace.js](https://github.com/stacktracejs/stacktrace.js) by [Exceptionless](https://github.com/exceptionless)
|
||||
* [:link:](stampit/stampit.d.ts) [stampit](https://github.com/ericelliott/stampit) by [Vasyl Boroviak](https://github.com/koresar)
|
||||
* [:link:](stampit/stampit.d.ts) [stampit](https://github.com/stampit-org/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:](statsd-client/statsd-client.d.ts) [statsd-client](https://github.com/msiebuhr/node-statsd-client) by [Peter Kooijmans](https://github.com/peterkooijmans)
|
||||
* [:link:](status-bar/status-bar.d.ts) [status-bar](https://github.com/atom/status-bar) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](steam/steam.d.ts) [steam](https://github.com/seishun/node-steam) by [Andrey Kurdyumov](https://github.com/kant2002)
|
||||
* [:link:](storejs/storejs.d.ts) [store.js](https://github.com/marcuswestin/store.js) by [Vincent Bortone](https://github.com/vbortone)
|
||||
* [:link:](stream-series/stream-series.d.ts) [stream-series](https://github.com/rschmukler/stream-series) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
|
||||
* [:link:](stream-to-array/stream-to-array.d.ts) [stream-to-array](https://github.com/stream-utils/stream-to-array) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
@@ -915,6 +972,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](swipeview/swipeview.d.ts) [SwipeView](http://cubiq.org/swipeview) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](switchery/switchery.d.ts) [switchery](https://github.com/abpetkov/switchery) by [Bruno Grieder](https://github.com/bgrieder)
|
||||
* [:link:](swiz/swiz.d.ts) [swiz](https://github.com/racker/node-swiz) by [Jeff Goddard](https://github.com/jedigo)
|
||||
* [:link:](tabtab/tabtab.d.ts) [tabtab](https://github.com/mklabs/node-tabtab) by [Vojtěch Habarta](https://github.com/vojtechhabarta)
|
||||
* [:link:](tape/tape.d.ts) [tape](https://github.com/substack/tape) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](tar/tar.d.ts) [tar](https://github.com/npm/node-tar) by [Maxime LUCE](https://github.com/SomaticIT)
|
||||
* [:link:](tcomb/tcomb.d.ts) [tcomb](http://gcanti.github.io/tcomb/guide/index.html) by [Hans Windhoff](https://github.com/hansrwindhoff)
|
||||
@@ -937,6 +995,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](threejs/three-renderpass.d.ts) [three.js (RenderPass.js)](https://github.com/mrdoob/three.js/blob/r68/examples/js/postprocessing/RenderPass.js) by [Satoru Kimura](https://github.com/gyohk)
|
||||
* [:link:](threejs/three-shaderpass.d.ts) [three.js (ShaderPass.js)](https://github.com/mrdoob/three.js/blob/r68/examples/js/postprocessing/ShaderPass.js) by [Satoru Kimura](https://github.com/gyohk)
|
||||
* [:link:](threejs/three-trackballcontrols.d.ts) [three.js (TrackballControls.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/controls/TrackballControls.js) by [Satoru Kimura](https://github.com/gyohk)
|
||||
* [:link:](threejs/three-vrcontrols.d.ts) [three.js (VRControls.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/controls/VRControls.js) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
* [:link:](threejs/three-vreffect.d.ts) [three.js (VREffect.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/effects/VREffect.js) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
* [:link:](threejs/three.d.ts) [three.js r71](http://mrdoob.github.com/three.js) by [Kon](http://phyzkit.net), [Satoru Kimura](https://github.com/gyohk)
|
||||
* [:link:](through/through.d.ts) [through](https://github.com/dominictarr/through) by [Andrew Gaspar](https://github.com/AndrewGaspar)
|
||||
* [:link:](through2/through2.d.ts) [through2 v](https://github.com/rvagg/through2) by [Bart van der Schoor](https://github.com/Bartvds), [jedmao](https://github.com/jedmao)
|
||||
@@ -946,6 +1006,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](tv4/tv4.d.ts) [Tiny Validator tv4](https://github.com/geraintluff/tv4) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](tinycolor/tinycolor.d.ts) [tinycolor](https://github.com/bgrins/TinyColor) by [Mordechai Zuber](https://github.com/M-Zuber)
|
||||
* [:link:](titanium/titanium.d.ts) [Titanium Mobile](http://www.appcelerator.com) by [Craig Younkins](https://github.com/cyounkins)
|
||||
* [:link:](title-case/title-case.d.ts) [title-case](https://github.com/blakeembrey/title-case) by [Sam Saint-Pettersen](https://github.com/stpettersens)
|
||||
* [:link:](tmp/tmp.d.ts) [tmp](https://www.npmjs.com/package/tmp) by [Jared Klopper](https://github.com/optical)
|
||||
* [:link:](toastr/toastr.d.ts) [Toastr](https://github.com/CodeSeven/toastr) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](sencha_touch/SenchaTouch.d.ts) [Touch](http://www.sencha.com/products/touch) by [Brian Kotek](https://github.com/brian428)
|
||||
@@ -967,6 +1028,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](typescript-deferred/typescript-deferred.d.ts) [typescript-deferred](https://github.com/DirtyHairy/typescript-deferred) by [Christian Speckner](https://github.com/DirtyHairy)
|
||||
* [:link:](typescript-services/typescriptServices.d.ts) [TypeScript-Services](https://www.npmjs.org/package/typescript-services) by [Basarat Ali Syed](http://github.com/basarat)
|
||||
* [:link:](unity-webapi/unity-webapi.d.ts) [Ubuntu Unity Web API](https://launchpad.net/libunity-webapps) by [John Vrbanac](jhttps://github.com/jmvrbanac)
|
||||
* [:link:](ui-grid/ui-grid.d.ts) [ui-grid](http://www.ui-grid.info) by [Ben Tesser](https://github.com/btesser)
|
||||
* [:link:](underscore/underscore.d.ts) [Underscore](http://underscorejs.org) by [Boris Yankov](https://github.com/borisyankov), [Josh Baldwin](https://github.com/jbaldwin)
|
||||
* [:link:](underscore-ko/underscore-ko.d.ts) [Underscore-ko 1.2.2 with underscore](https://github.com/kamranayub/UnderscoreKO) by [Maurits Elbers](https://github.com/MagicMau)
|
||||
* [:link:](underscore.string/underscore.string.d.ts) [underscore.string](https://github.com/epeli/underscore.string) by [Ry Racherbaumer](http://github.com/rygine)
|
||||
@@ -1008,6 +1070,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](webrtc/MediaStream.d.ts) [WebRTC](http://dev.w3.org/2011/webrtc) by [Ken Smith](https://github.com/smithkl42)
|
||||
* [:link:](websocket/websocket.d.ts) [websocket](https://github.com/Worlize/WebSocket-Node) by [Paul Loyd](https://github.com/loyd)
|
||||
* [:link:](websql/websql.d.ts) [websql](http://www.w3.org/TR/webdatabase) by [TeamworkGuy2](https://github.com/TeamworkGuy2)
|
||||
* [:link:](webvr-api/webvr-api.d.ts) [WebVR API](http://mozvr.github.io/webvr-spec/webvr.html) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
* [:link:](when/when.d.ts) [When](https://github.com/cujojs/when) by [Derek Cicerone](https://github.com/derekcicerone), [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](which/which.d.ts) [which](https://github.com/isaacs/node-which) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](jquery.window/jquery.window.d.ts) [Window plugin for jQuery](http://fstoke.me/jquery/window) by [Ryan Graham](https://github.com/ryan-codingintrigue)
|
||||
@@ -1041,7 +1104,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](node_zeromq/zmq.d.ts) [ZeroMQ Node](https://github.com/JustinTulloss/zeromq.node) by [Dave McKeown](http://github.com/davemckeown)
|
||||
* [:link:](zip.js/zip.js.d.ts) [zip.js 2.x](https://github.com/gildas-lormeau/zip.js) by [Louis Grignon](https://github.com/lgrignon)
|
||||
* [:link:](scroller/easyscroller.d.ts) [Zynga EasyScroller](https://github.com/zynga/scroller) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](scroller/scroller.d.ts) [Zynga Scroller](https://github.com/zynga/scroller) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](zynga-scroller/zynga-scroller.d.ts) [Zynga Scroller](http://zynga.github.com/scroller) by [Marcelo Haskell Camargo](https://github.com/haskellcamargo)
|
||||
* [:link:](scroller/scroller.d.ts) [Zynga Scroller](https://github.com/zynga/scroller) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](viewporter/viewporter.d.ts) [Zynga Viewporter](https://github.com/zynga/viewporter) by [Boris Yankov](https://github.com/borisyankov)
|
||||
|
||||
|
||||
+1
-1
@@ -144,7 +144,7 @@ declare module angular.material {
|
||||
|
||||
interface IToastService {
|
||||
show(optionsOrPreset: IToastOptions|IToastPreset<any>): angular.IPromise<any>;
|
||||
showSimple(): angular.IPromise<any>;
|
||||
showSimple(content: string): angular.IPromise<any>;
|
||||
simple(): ISimpleToastPreset;
|
||||
build(): IToastPreset<any>;
|
||||
updateContent(): void;
|
||||
|
||||
@@ -165,6 +165,7 @@ var users = odataResourceClass.odata().query();
|
||||
|
||||
users[0].name;
|
||||
users[0].$save;
|
||||
users[0].$update;
|
||||
|
||||
var user = odataResourceClass.odata()
|
||||
.filter(new Value("1", OData.ValueTypes.Int32), new Property("abc"))
|
||||
|
||||
@@ -90,6 +90,12 @@ declare module OData {
|
||||
save(data: Object, success: Function, error?: Function): IResource<T>;
|
||||
save(params: Object, data: Object, success?: Function, error?: Function): IResource<T>;
|
||||
|
||||
update(): IResource<T>;
|
||||
update(data: Object): IResource<T>;
|
||||
update(success: Function, error?: Function): IResource<T>;
|
||||
update(data: Object, success: Function, error?: Function): IResource<T>;
|
||||
update(params: Object, data: Object, success?: Function, error?: Function): IResource<T>;
|
||||
|
||||
remove(): IResource<T>;
|
||||
remove(params: Object): IResource<T>;
|
||||
remove(success: Function, error?: Function): IResource<T>;
|
||||
@@ -120,6 +126,10 @@ declare module OData {
|
||||
$save(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
|
||||
$save(success: Function, error?: Function): angular.IPromise<T>;
|
||||
|
||||
$update(): angular.IPromise<T>;
|
||||
$update(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
|
||||
$update(success: Function, error?: Function): angular.IPromise<T>;
|
||||
|
||||
$remove(): angular.IPromise<T>;
|
||||
$remove(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
|
||||
$remove(success: Function, error?: Function): angular.IPromise<T>;
|
||||
|
||||
+3
@@ -88,6 +88,9 @@ declare module angular.ui {
|
||||
compile(pattern: string): IUrlMatcher;
|
||||
isMatcher(o: any): boolean;
|
||||
type(name: string, definition: any, definitionFn?: any): any;
|
||||
caseInsensitive(value: boolean): void;
|
||||
defaultSquashPolicy(value: string): void;
|
||||
strictMode(value: boolean): void;
|
||||
}
|
||||
|
||||
interface IUrlRouterProvider extends angular.IServiceProvider {
|
||||
|
||||
+6137
File diff suppressed because it is too large
Load Diff
Vendored
+2740
-3478
File diff suppressed because it is too large
Load Diff
Vendored
+459
@@ -0,0 +1,459 @@
|
||||
// Type definitions for Angular v2.0.0-alpha.31
|
||||
// Project: http://angular.io/
|
||||
// Definitions by: angular team <https://github.com/angular/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// ***********************************************************
|
||||
// This file is generated by the Angular build process.
|
||||
// Please do not create manual edits or send pull requests
|
||||
// modifying this file.
|
||||
// ***********************************************************
|
||||
///<reference path="./angular2.d.ts"/>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @module
|
||||
* @description
|
||||
* Maps application URLs into application states, to support deep-linking and navigation.
|
||||
*/
|
||||
declare module ng {
|
||||
interface List<T> extends Array<T> {}
|
||||
interface Map<K,V> {}
|
||||
interface StringMap<K,V> extends Map<K,V> {}
|
||||
|
||||
export class Instruction {
|
||||
// "capturedUrl" is the part of the URL captured by this instruction
|
||||
// "accumulatedUrl" is the part of the URL captured by this instruction and all children
|
||||
accumulatedUrl: string;
|
||||
reuse: boolean;
|
||||
specificity: number;
|
||||
|
||||
private _params: StringMap<string, string>;
|
||||
|
||||
constructor (component: any, capturedUrl: string,
|
||||
_recognizer: PathRecognizer, child: Instruction);
|
||||
|
||||
params(): StringMap<string, string>;
|
||||
}
|
||||
|
||||
class TouchMap {
|
||||
map: StringMap<string, string>;
|
||||
keys: StringMap<string, boolean>;
|
||||
|
||||
constructor(map: StringMap<string, any>);
|
||||
|
||||
get(key: string): string;
|
||||
|
||||
getUnused(): StringMap<string, any>;
|
||||
}
|
||||
|
||||
export class Segment {
|
||||
name: string;
|
||||
regex: string;
|
||||
generate(params: TouchMap): string;
|
||||
}
|
||||
|
||||
export class PathRecognizer {
|
||||
segments: List<Segment>;
|
||||
regex: RegExp;
|
||||
specificity: number;
|
||||
terminal: boolean;
|
||||
path: string;
|
||||
handler: RouteHandler;
|
||||
|
||||
constructor(path: string, handler: RouteHandler);
|
||||
|
||||
parseParams(url: string): StringMap<string, string>;
|
||||
|
||||
generate(params: StringMap<string, any>): string;
|
||||
|
||||
resolveComponentType(): Promise<any>;
|
||||
}
|
||||
|
||||
|
||||
export interface RouteHandler {
|
||||
componentType: Function;
|
||||
resolveComponentType(): Promise<any>;
|
||||
}
|
||||
|
||||
/**
|
||||
* # Router
|
||||
* The router is responsible for mapping URLs to components.
|
||||
*
|
||||
* You can see the state of the router by inspecting the read-only field `router.navigating`.
|
||||
* This may be useful for showing a spinner, for instance.
|
||||
*
|
||||
* ## Concepts
|
||||
* Routers and component instances have a 1:1 correspondence.
|
||||
*
|
||||
* The router holds reference to a number of "outlets." An outlet is a placeholder that the
|
||||
* router dynamically fills in depending on the current URL.
|
||||
*
|
||||
* When the router navigates from a URL, it must first recognizes it and serialize it into an
|
||||
* `Instruction`.
|
||||
* The router uses the `RouteRegistry` to get an `Instruction`.
|
||||
*/
|
||||
class Router {
|
||||
|
||||
navigating: boolean;
|
||||
|
||||
lastNavigationAttempt: string;
|
||||
|
||||
registry: RouteRegistry;
|
||||
|
||||
parent: Router;
|
||||
|
||||
hostComponent: any;
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a child router. You probably don't need to use this unless you're writing a reusable
|
||||
* component.
|
||||
*/
|
||||
childRouter(hostComponent: any): Router;
|
||||
|
||||
|
||||
/**
|
||||
* Register an object to notify of route changes. You probably don't need to use this unless
|
||||
* you're writing a reusable component.
|
||||
*/
|
||||
registerOutlet(outlet: RouterOutlet): Promise<boolean>;
|
||||
|
||||
|
||||
/**
|
||||
* Dynamically update the routing configuration and trigger a navigation.
|
||||
*
|
||||
* # Usage
|
||||
*
|
||||
* ```
|
||||
* router.config({ 'path': '/', 'component': IndexCmp});
|
||||
* ```
|
||||
*
|
||||
* Or:
|
||||
*
|
||||
* ```
|
||||
* router.config([
|
||||
* { 'path': '/', 'component': IndexComp },
|
||||
* { 'path': '/user/:id', 'component': UserComp },
|
||||
* ]);
|
||||
* ```
|
||||
*/
|
||||
config(config: StringMap<string, any>| List<StringMap<string, any>>): Promise<any>;
|
||||
|
||||
|
||||
/**
|
||||
* Navigate to a URL. Returns a promise that resolves when navigation is complete.
|
||||
*
|
||||
* If the given URL begins with a `/`, router will navigate absolutely.
|
||||
* If the given URL does not begin with `/`, the router will navigate relative to this component.
|
||||
*/
|
||||
navigate(url: string): Promise<any>;
|
||||
|
||||
|
||||
/**
|
||||
* Updates this router and all descendant routers according to the given instruction
|
||||
*/
|
||||
commit(instruction: Instruction): Promise<any>;
|
||||
|
||||
|
||||
/**
|
||||
* Subscribe to URL updates from the router
|
||||
*/
|
||||
subscribe(onNext: any): void;
|
||||
|
||||
|
||||
/**
|
||||
* Removes the contents of this router's outlet and all descendant outlets
|
||||
*/
|
||||
deactivate(instruction: Instruction): Promise<any>;
|
||||
|
||||
|
||||
/**
|
||||
* Given a URL, returns an instruction representing the component graph
|
||||
*/
|
||||
recognize(url: string): Promise<Instruction>;
|
||||
|
||||
|
||||
/**
|
||||
* Navigates to either the last URL successfully navigated to, or the last URL requested if the
|
||||
* router has yet to successfully navigate.
|
||||
*/
|
||||
renavigate(): Promise<any>;
|
||||
|
||||
|
||||
/**
|
||||
* Generate a URL from a component name and optional map of parameters. The URL is relative to the
|
||||
* app's base href.
|
||||
*/
|
||||
generate(linkParams: List<any>): string;
|
||||
}
|
||||
|
||||
class RootRouter extends Router {
|
||||
|
||||
commit(instruction: any): Promise<any>;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A router outlet is a placeholder that Angular dynamically fills based on the application's route.
|
||||
*
|
||||
* ## Use
|
||||
*
|
||||
* ```
|
||||
* <router-outlet></router-outlet>
|
||||
* ```
|
||||
*/
|
||||
class RouterOutlet {
|
||||
|
||||
childRouter: Router;
|
||||
|
||||
|
||||
/**
|
||||
* Given an instruction, update the contents of this outlet.
|
||||
*/
|
||||
commit(instruction: Instruction): Promise<any>;
|
||||
|
||||
|
||||
/**
|
||||
* Called by Router during recognition phase
|
||||
*/
|
||||
canDeactivate(nextInstruction: Instruction): Promise<boolean>;
|
||||
|
||||
|
||||
/**
|
||||
* Called by Router during recognition phase
|
||||
*/
|
||||
canReuse(nextInstruction: Instruction): Promise<boolean>;
|
||||
|
||||
deactivate(nextInstruction: Instruction): Promise<any>;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The RouterLink directive lets you link to specific parts of your app.
|
||||
*
|
||||
* Consider the following route configuration:
|
||||
*
|
||||
* ```
|
||||
* @RouteConfig({
|
||||
* path: '/user', component: UserCmp, as: 'user'
|
||||
* });
|
||||
* class MyComp {}
|
||||
* ```
|
||||
*
|
||||
* When linking to this `user` route, you can write:
|
||||
*
|
||||
* ```
|
||||
* <a [router-link]="['./user']">link to user component</a>
|
||||
* ```
|
||||
*
|
||||
* RouterLink expects the value to be an array of route names, followed by the params
|
||||
* for that level of routing. For instance `['/team', {teamId: 1}, 'user', {userId: 2}]`
|
||||
* means that we want to generate a link for the `team` route with params `{teamId: 1}`,
|
||||
* and with a child route `user` with params `{userId: 2}`.
|
||||
*
|
||||
* The first route name should be prepended with `/`, `./`, or `../`.
|
||||
* If the route begins with `/`, the router will look up the route from the root of the app.
|
||||
* If the route begins with `./`, the router will instead look in the current component's
|
||||
* children for the route. And if the route begins with `../`, the router will look at the
|
||||
* current component's parent.
|
||||
*/
|
||||
class RouterLink {
|
||||
|
||||
visibleHref: string;
|
||||
|
||||
routeParams: void;
|
||||
|
||||
onClick(): boolean;
|
||||
}
|
||||
|
||||
class RouteParams {
|
||||
|
||||
params: StringMap<string, string>;
|
||||
|
||||
get(param: string): string;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The RouteRegistry holds route configurations for each component in an Angular app.
|
||||
* It is responsible for creating Instructions from URLs, and generating URLs based on route and
|
||||
* parameters.
|
||||
*/
|
||||
class RouteRegistry {
|
||||
|
||||
|
||||
/**
|
||||
* Given a component and a configuration object, add the route to this registry
|
||||
*/
|
||||
config(parentComponent: any, config: StringMap<string, any>): void;
|
||||
|
||||
|
||||
/**
|
||||
* Reads the annotations of a component and configures the registry based on them
|
||||
*/
|
||||
configFromComponent(component: any): void;
|
||||
|
||||
|
||||
/**
|
||||
* Given a URL and a parent component, return the most specific instruction for navigating
|
||||
* the application into the state specified by the url
|
||||
*/
|
||||
recognize(url: string, parentComponent: any): Promise<Instruction>;
|
||||
|
||||
|
||||
/**
|
||||
* Given a normalized list with component names and params like: `['user', {id: 3 }]`
|
||||
* generates a url with a leading slash relative to the provided `parentComponent`.
|
||||
*/
|
||||
generate(linkParams: List<any>, parentComponent: any): string;
|
||||
}
|
||||
|
||||
class LocationStrategy {
|
||||
|
||||
path(): string;
|
||||
|
||||
pushState(ctx: any, title: string, url: string): void;
|
||||
|
||||
forward(): void;
|
||||
|
||||
back(): void;
|
||||
|
||||
onPopState(fn: any): void;
|
||||
|
||||
getBaseHref(): string;
|
||||
}
|
||||
|
||||
class HashLocationStrategy extends LocationStrategy {
|
||||
|
||||
onPopState(fn: EventListener): void;
|
||||
|
||||
getBaseHref(): string;
|
||||
|
||||
path(): string;
|
||||
|
||||
pushState(state: any, title: string, url: string): void;
|
||||
|
||||
forward(): void;
|
||||
|
||||
back(): void;
|
||||
}
|
||||
|
||||
class HTML5LocationStrategy extends LocationStrategy {
|
||||
|
||||
onPopState(fn: EventListener): void;
|
||||
|
||||
getBaseHref(): string;
|
||||
|
||||
path(): string;
|
||||
|
||||
pushState(state: any, title: string, url: string): void;
|
||||
|
||||
forward(): void;
|
||||
|
||||
back(): void;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is the service that an application developer will directly interact with.
|
||||
*
|
||||
* Responsible for normalizing the URL against the application's base href.
|
||||
* A normalized URL is absolute from the URL host, includes the application's base href, and has no
|
||||
* trailing slash:
|
||||
* - `/my/app/user/123` is normalized
|
||||
* - `my/app/user/123` **is not** normalized
|
||||
* - `/my/app/user/123/` **is not** normalized
|
||||
*/
|
||||
class Location {
|
||||
|
||||
path(): string;
|
||||
|
||||
normalize(url: string): string;
|
||||
|
||||
normalizeAbsolutely(url: string): string;
|
||||
|
||||
go(url: string): void;
|
||||
|
||||
forward(): void;
|
||||
|
||||
back(): void;
|
||||
|
||||
subscribe(onNext: any, onThrow?: any, onReturn?: any): void;
|
||||
}
|
||||
|
||||
var appBaseHrefToken : OpaqueToken ;
|
||||
|
||||
|
||||
/**
|
||||
* Responsible for performing each step of navigation.
|
||||
* "Steps" are conceptually similar to "middleware"
|
||||
*/
|
||||
class Pipeline {
|
||||
|
||||
steps: List<Function>;
|
||||
|
||||
process(instruction: Instruction): Promise<any>;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Defines route lifecycle method [onActivate]
|
||||
*/
|
||||
interface OnActivate {
|
||||
|
||||
onActivate(nextInstruction: Instruction, prevInstruction: Instruction): any;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Defines route lifecycle method [onDeactivate]
|
||||
*/
|
||||
interface OnDeactivate {
|
||||
|
||||
onDeactivate(nextInstruction: Instruction, prevInstruction: Instruction): any;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Defines route lifecycle method [onReuse]
|
||||
*/
|
||||
interface OnReuse {
|
||||
|
||||
onReuse(nextInstruction: Instruction, prevInstruction: Instruction): any;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Defines route lifecycle method [canDeactivate]
|
||||
*/
|
||||
interface CanDeactivate {
|
||||
|
||||
canDeactivate(nextInstruction: Instruction, prevInstruction: Instruction): any;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Defines route lifecycle method [canReuse]
|
||||
*/
|
||||
interface CanReuse {
|
||||
|
||||
canReuse(nextInstruction: Instruction, prevInstruction: Instruction): any;
|
||||
}
|
||||
|
||||
var CanActivate:any;
|
||||
|
||||
var routerDirectives : List<any> ;
|
||||
|
||||
var routerInjectables : List<any> ;
|
||||
|
||||
var RouteConfig:any;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
declare module "angular2/router" {
|
||||
export = ng;
|
||||
}
|
||||
Vendored
+216
-109
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Angular v2.0.0-alpha.30
|
||||
// Type definitions for Angular v2.0.0-alpha.31
|
||||
// Project: http://angular.io/
|
||||
// Definitions by: angular team <https://github.com/angular/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
@@ -14,71 +14,124 @@
|
||||
|
||||
/**
|
||||
* @module
|
||||
* @public
|
||||
* @description
|
||||
* Maps application URLs into application states, to support deep-linking and navigation.
|
||||
*/
|
||||
declare module ng {
|
||||
interface List<T> extends Array<T> {}
|
||||
interface Map<K,V> {}
|
||||
interface StringMap<K,V> extends Map<K,V> {}
|
||||
|
||||
export class Instruction {
|
||||
// "capturedUrl" is the part of the URL captured by this instruction
|
||||
// "accumulatedUrl" is the part of the URL captured by this instruction and all children
|
||||
accumulatedUrl: string;
|
||||
reuse: boolean;
|
||||
specificity: number;
|
||||
|
||||
private _params: StringMap<string, string>;
|
||||
|
||||
constructor (component: any, capturedUrl: string,
|
||||
_recognizer: PathRecognizer, child: Instruction);
|
||||
|
||||
params(): StringMap<string, string>;
|
||||
}
|
||||
|
||||
class TouchMap {
|
||||
map: StringMap<string, string>;
|
||||
keys: StringMap<string, boolean>;
|
||||
|
||||
constructor(map: StringMap<string, any>);
|
||||
|
||||
get(key: string): string;
|
||||
|
||||
getUnused(): StringMap<string, any>;
|
||||
}
|
||||
|
||||
export class Segment {
|
||||
name: string;
|
||||
regex: string;
|
||||
generate(params: TouchMap): string;
|
||||
}
|
||||
|
||||
export class PathRecognizer {
|
||||
segments: List<Segment>;
|
||||
regex: RegExp;
|
||||
specificity: number;
|
||||
terminal: boolean;
|
||||
path: string;
|
||||
handler: RouteHandler;
|
||||
|
||||
constructor(path: string, handler: RouteHandler);
|
||||
|
||||
parseParams(url: string): StringMap<string, string>;
|
||||
|
||||
generate(params: StringMap<string, any>): string;
|
||||
|
||||
resolveComponentType(): Promise<any>;
|
||||
}
|
||||
|
||||
|
||||
export interface RouteHandler {
|
||||
componentType: Function;
|
||||
resolveComponentType(): Promise<any>;
|
||||
}
|
||||
|
||||
/**
|
||||
* # Router
|
||||
* The router is responsible for mapping URLs to components.
|
||||
*
|
||||
*
|
||||
* You can see the state of the router by inspecting the read-only field `router.navigating`.
|
||||
* This may be useful for showing a spinner, for instance.
|
||||
*
|
||||
*
|
||||
* ## Concepts
|
||||
* Routers and component instances have a 1:1 correspondence.
|
||||
*
|
||||
*
|
||||
* The router holds reference to a number of "outlets." An outlet is a placeholder that the
|
||||
* router dynamically fills in depending on the current URL.
|
||||
*
|
||||
*
|
||||
* When the router navigates from a URL, it must first recognizes it and serialize it into an
|
||||
* `Instruction`.
|
||||
* The router uses the `RouteRegistry` to get an `Instruction`.
|
||||
*
|
||||
* @exportedAs angular2/router
|
||||
*/
|
||||
class Router {
|
||||
|
||||
|
||||
navigating: boolean;
|
||||
|
||||
|
||||
lastNavigationAttempt: string;
|
||||
|
||||
previousUrl: string;
|
||||
|
||||
|
||||
registry: RouteRegistry;
|
||||
|
||||
|
||||
parent: Router;
|
||||
|
||||
|
||||
hostComponent: any;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a child router. You probably don't need to use this unless you're writing a reusable
|
||||
* component.
|
||||
*/
|
||||
childRouter(hostComponent: any): Router;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Register an object to notify of route changes. You probably don't need to use this unless
|
||||
* you're writing a reusable component.
|
||||
*/
|
||||
registerOutlet(outlet: RouterOutlet): Promise<boolean>;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Dynamically update the routing configuration and trigger a navigation.
|
||||
*
|
||||
*
|
||||
* # Usage
|
||||
*
|
||||
*
|
||||
* ```
|
||||
* router.config({ 'path': '/', 'component': IndexCmp});
|
||||
* ```
|
||||
*
|
||||
*
|
||||
* Or:
|
||||
*
|
||||
*
|
||||
* ```
|
||||
* router.config([
|
||||
* { 'path': '/', 'component': IndexComp },
|
||||
@@ -87,47 +140,47 @@ declare module ng {
|
||||
* ```
|
||||
*/
|
||||
config(config: StringMap<string, any>| List<StringMap<string, any>>): Promise<any>;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Navigate to a URL. Returns a promise that resolves when navigation is complete.
|
||||
*
|
||||
*
|
||||
* If the given URL begins with a `/`, router will navigate absolutely.
|
||||
* If the given URL does not begin with `/`, the router will navigate relative to this component.
|
||||
*/
|
||||
navigate(url: string): Promise<any>;
|
||||
|
||||
|
||||
/**
|
||||
* Subscribe to URL updates from the router
|
||||
*/
|
||||
subscribe(onNext: any): void;
|
||||
|
||||
|
||||
/**
|
||||
* Updates this router and all descendant routers according to the given instruction
|
||||
*/
|
||||
commit(instruction: Instruction): Promise<any>;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Subscribe to URL updates from the router
|
||||
*/
|
||||
subscribe(onNext: any): void;
|
||||
|
||||
|
||||
/**
|
||||
* Removes the contents of this router's outlet and all descendant outlets
|
||||
*/
|
||||
deactivate(): Promise<any>;
|
||||
|
||||
deactivate(instruction: Instruction): Promise<any>;
|
||||
|
||||
|
||||
/**
|
||||
* Given a URL, returns an instruction representing the component graph
|
||||
*/
|
||||
recognize(url: string): Promise<Instruction>;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Navigates to either the last URL successfully navigated to, or the last URL requested if the
|
||||
* router has yet to successfully navigate.
|
||||
*/
|
||||
renavigate(): Promise<any>;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Generate a URL from a component name and optional map of parameters. The URL is relative to the
|
||||
@@ -135,83 +188,93 @@ declare module ng {
|
||||
*/
|
||||
generate(linkParams: List<any>): string;
|
||||
}
|
||||
|
||||
|
||||
class RootRouter extends Router {
|
||||
|
||||
|
||||
commit(instruction: any): Promise<any>;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* A router outlet is a placeholder that Angular dynamically fills based on the application's route.
|
||||
*
|
||||
*
|
||||
* ## Use
|
||||
*
|
||||
*
|
||||
* ```
|
||||
* <router-outlet></router-outlet>
|
||||
* ```
|
||||
*/
|
||||
class RouterOutlet {
|
||||
|
||||
|
||||
childRouter: Router;
|
||||
|
||||
|
||||
/**
|
||||
* Given an instruction, update the contents of this outlet.
|
||||
*/
|
||||
activate(instruction: Instruction): Promise<any>;
|
||||
|
||||
deactivate(): Promise<any>;
|
||||
|
||||
canDeactivate(instruction: Instruction): Promise<boolean>;
|
||||
commit(instruction: Instruction): Promise<any>;
|
||||
|
||||
|
||||
/**
|
||||
* Called by Router during recognition phase
|
||||
*/
|
||||
canDeactivate(nextInstruction: Instruction): Promise<boolean>;
|
||||
|
||||
|
||||
/**
|
||||
* Called by Router during recognition phase
|
||||
*/
|
||||
canReuse(nextInstruction: Instruction): Promise<boolean>;
|
||||
|
||||
deactivate(nextInstruction: Instruction): Promise<any>;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The RouterLink directive lets you link to specific parts of your app.
|
||||
*
|
||||
*
|
||||
* Consider the following route configuration:
|
||||
*
|
||||
*
|
||||
* ```
|
||||
* @RouteConfig({
|
||||
* path: '/user', component: UserCmp, as: 'user'
|
||||
* });
|
||||
* class MyComp {}
|
||||
* ```
|
||||
*
|
||||
*
|
||||
* When linking to this `user` route, you can write:
|
||||
*
|
||||
*
|
||||
* ```
|
||||
* <a [router-link]="['./user']">link to user component</a>
|
||||
* ```
|
||||
*
|
||||
*
|
||||
* RouterLink expects the value to be an array of route names, followed by the params
|
||||
* for that level of routing. For instance `['/team', {teamId: 1}, 'user', {userId: 2}]`
|
||||
* means that we want to generate a link for the `team` route with params `{teamId: 1}`,
|
||||
* and with a child route `user` with params `{userId: 2}`.
|
||||
*
|
||||
*
|
||||
* The first route name should be prepended with `/`, `./`, or `../`.
|
||||
* If the route begins with `/`, the router will look up the route from the root of the app.
|
||||
* If the route begins with `./`, the router will instead look in the current component's
|
||||
* children for the route. And if the route begins with `../`, the router will look at the
|
||||
* current component's parent.
|
||||
*
|
||||
* @exportedAs angular2/router
|
||||
*/
|
||||
class RouterLink {
|
||||
|
||||
|
||||
visibleHref: string;
|
||||
|
||||
|
||||
routeParams: void;
|
||||
|
||||
|
||||
onClick(): boolean;
|
||||
}
|
||||
|
||||
|
||||
class RouteParams {
|
||||
|
||||
|
||||
params: StringMap<string, string>;
|
||||
|
||||
|
||||
get(param: string): string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The RouteRegistry holds route configurations for each component in an Angular app.
|
||||
@@ -219,26 +282,26 @@ declare module ng {
|
||||
* parameters.
|
||||
*/
|
||||
class RouteRegistry {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Given a component and a configuration object, add the route to this registry
|
||||
*/
|
||||
config(parentComponent: any, config: StringMap<string, any>): void;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reads the annotations of a component and configures the registry based on them
|
||||
*/
|
||||
configFromComponent(component: any): void;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Given a URL and a parent component, return the most specific instruction for navigating
|
||||
* the application into the state specified by the url
|
||||
*/
|
||||
recognize(url: string, parentComponent: any): Promise<Instruction>;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Given a normalized list with component names and params like: `['user', {id: 3 }]`
|
||||
@@ -246,56 +309,56 @@ declare module ng {
|
||||
*/
|
||||
generate(linkParams: List<any>, parentComponent: any): string;
|
||||
}
|
||||
|
||||
|
||||
class LocationStrategy {
|
||||
|
||||
|
||||
path(): string;
|
||||
|
||||
|
||||
pushState(ctx: any, title: string, url: string): void;
|
||||
|
||||
|
||||
forward(): void;
|
||||
|
||||
|
||||
back(): void;
|
||||
|
||||
|
||||
onPopState(fn: any): void;
|
||||
|
||||
|
||||
getBaseHref(): string;
|
||||
}
|
||||
|
||||
|
||||
class HashLocationStrategy extends LocationStrategy {
|
||||
|
||||
|
||||
onPopState(fn: EventListener): void;
|
||||
|
||||
|
||||
getBaseHref(): string;
|
||||
|
||||
|
||||
path(): string;
|
||||
|
||||
|
||||
pushState(state: any, title: string, url: string): void;
|
||||
|
||||
|
||||
forward(): void;
|
||||
|
||||
|
||||
back(): void;
|
||||
}
|
||||
|
||||
|
||||
class HTML5LocationStrategy extends LocationStrategy {
|
||||
|
||||
|
||||
onPopState(fn: EventListener): void;
|
||||
|
||||
|
||||
getBaseHref(): string;
|
||||
|
||||
|
||||
path(): string;
|
||||
|
||||
|
||||
pushState(state: any, title: string, url: string): void;
|
||||
|
||||
|
||||
forward(): void;
|
||||
|
||||
|
||||
back(): void;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This is the service that an application developer will directly interact with.
|
||||
*
|
||||
*
|
||||
* Responsible for normalizing the URL against the application's base href.
|
||||
* A normalized URL is absolute from the URL host, includes the application's base href, and has no
|
||||
* trailing slash:
|
||||
@@ -304,49 +367,93 @@ declare module ng {
|
||||
* - `/my/app/user/123/` **is not** normalized
|
||||
*/
|
||||
class Location {
|
||||
|
||||
|
||||
path(): string;
|
||||
|
||||
|
||||
normalize(url: string): string;
|
||||
|
||||
|
||||
normalizeAbsolutely(url: string): string;
|
||||
|
||||
|
||||
go(url: string): void;
|
||||
|
||||
|
||||
forward(): void;
|
||||
|
||||
|
||||
back(): void;
|
||||
|
||||
|
||||
subscribe(onNext: any, onThrow?: any, onReturn?: any): void;
|
||||
}
|
||||
|
||||
|
||||
var appBaseHrefToken : OpaqueToken ;
|
||||
|
||||
class Instruction {
|
||||
reuseComponentsFrom(oldInstruction: Instruction): void;
|
||||
params(): StringMap<string, string>;
|
||||
hasChild(): boolean;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Responsible for performing each step of navigation.
|
||||
* "Steps" are conceptually similar to "middleware"
|
||||
*/
|
||||
class Pipeline {
|
||||
|
||||
|
||||
steps: List<Function>;
|
||||
|
||||
|
||||
process(instruction: Instruction): Promise<any>;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Defines route lifecycle method [onActivate]
|
||||
*/
|
||||
interface OnActivate {
|
||||
|
||||
onActivate(nextInstruction: Instruction, prevInstruction: Instruction): any;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Defines route lifecycle method [onDeactivate]
|
||||
*/
|
||||
interface OnDeactivate {
|
||||
|
||||
onDeactivate(nextInstruction: Instruction, prevInstruction: Instruction): any;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Defines route lifecycle method [onReuse]
|
||||
*/
|
||||
interface OnReuse {
|
||||
|
||||
onReuse(nextInstruction: Instruction, prevInstruction: Instruction): any;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Defines route lifecycle method [canDeactivate]
|
||||
*/
|
||||
interface CanDeactivate {
|
||||
|
||||
canDeactivate(nextInstruction: Instruction, prevInstruction: Instruction): any;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Defines route lifecycle method [canReuse]
|
||||
*/
|
||||
interface CanReuse {
|
||||
|
||||
canReuse(nextInstruction: Instruction, prevInstruction: Instruction): any;
|
||||
}
|
||||
|
||||
var CanActivate:any;
|
||||
|
||||
var routerDirectives : List<any> ;
|
||||
|
||||
|
||||
var routerInjectables : List<any> ;
|
||||
|
||||
|
||||
var RouteConfig:any;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
declare module "angular2/router" {
|
||||
export = ng;
|
||||
}
|
||||
|
||||
Vendored
+2151
-1245
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
||||
[*.ts]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
@@ -0,0 +1,24 @@
|
||||
/// <reference path="./atom-keymap.d.ts" />
|
||||
|
||||
import atomKeymap = require('atom-keymap');
|
||||
var KeymapManager = atomKeymap.KeymapManager;
|
||||
type ICompleteMatchEvent = AtomKeymap.ICompleteMatchEvent;
|
||||
// The import and type aliasing above can be done more concisely in TypeScript 1.5+:
|
||||
//import { KeymapManager, ICompleteMatchEvent } from "atom-keymap";
|
||||
|
||||
var manager = new KeymapManager();
|
||||
manager.add('some/unique/path', {
|
||||
'.workspace': {
|
||||
'ctrl-x': 'package:do-something',
|
||||
'ctrl-y': 'package:do-something-else'
|
||||
},
|
||||
'.mini.editor': {
|
||||
'enter': 'core:confirm'
|
||||
}
|
||||
});
|
||||
|
||||
manager.onDidMatchBinding((event: ICompleteMatchEvent): void => {
|
||||
console.log(event.binding.command);
|
||||
})
|
||||
|
||||
manager.destroy();
|
||||
Vendored
+135
@@ -0,0 +1,135 @@
|
||||
// Type definitions for atom-keymap v5.1.5
|
||||
// Project: https://github.com/atom/atom-keymap/
|
||||
// Definitions by: Vadim Macagon <https://github.com/enlight/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../event-kit/event-kit.d.ts" />
|
||||
|
||||
declare module AtomKeymap {
|
||||
type Disposable = AtomEventKit.Disposable;
|
||||
|
||||
/** Instance side of KeyBinding class. */
|
||||
interface KeyBinding {
|
||||
enabled: boolean;
|
||||
source: string;
|
||||
command: string;
|
||||
keystrokes: string;
|
||||
keystrokeCount: number;
|
||||
selector: string;
|
||||
specificity: number;
|
||||
|
||||
matches(keystroke: string): boolean;
|
||||
compare(keyBinding: KeyBinding): number;
|
||||
}
|
||||
|
||||
interface ICompleteMatchEvent {
|
||||
/** Keystrokes that matched the binding. */
|
||||
keystrokes: string;
|
||||
/** Binding that was matched to the keystrokes. */
|
||||
binding: KeyBinding;
|
||||
/** DOM element that was the target of the most recent `KeyboardEvent`. */
|
||||
keyboardEventTarget: Element;
|
||||
}
|
||||
|
||||
interface IPartialMatchEvent {
|
||||
/** Keystrokes that matched the binding. */
|
||||
keystrokes: string;
|
||||
/** Bindings that were partially matched to the keystrokes. */
|
||||
partiallyMatchedBindings: KeyBinding[];
|
||||
/** DOM element that was the target of the most recent `KeyboardEvent`. */
|
||||
keyboardEventTarget: Element;
|
||||
}
|
||||
|
||||
interface IFailedMatchEvent {
|
||||
/** Keystrokes that failed to match a binding. */
|
||||
keystrokes: string;
|
||||
/** DOM element that was the target of the most recent `KeyboardEvent`. */
|
||||
keyboardEventTarget: Element;
|
||||
}
|
||||
|
||||
interface IKeymapLoadEvent {
|
||||
/** Path to a keymap file. */
|
||||
path: string;
|
||||
}
|
||||
|
||||
/** Static side of KeymapManager class. */
|
||||
interface KeymapManagerStatic {
|
||||
prototype: KeymapManager;
|
||||
new (options?: { defaultTarget?: Element }): KeymapManager;
|
||||
}
|
||||
|
||||
/** Instance side of KeymapManager class. */
|
||||
interface KeymapManager {
|
||||
constructor: KeymapManagerStatic;
|
||||
/** Unwatches all watched paths. */
|
||||
destroy(): void;
|
||||
|
||||
// Event Subscription
|
||||
|
||||
/** Sets callback to invoke when one or more keystrokes completely match a key binding. */
|
||||
onDidMatchBinding(callback: (event: ICompleteMatchEvent) => void): Disposable;
|
||||
/** Sets callback to invoke when one or more keystrokes partially match a binding. */
|
||||
onDidPartiallyMatchBindings(callback: (event: IPartialMatchEvent) => void): Disposable;
|
||||
/** Sets callback to invoke when one or more keystrokes fail to match any bindings. */
|
||||
onDidFailToMatchBinding(callback: (event: IFailedMatchEvent) => void): Disposable;
|
||||
/** Sets callback to invoke when a keymap file is reloaded. */
|
||||
onDidReloadKeymap(callback: (event: IKeymapLoadEvent) => void): Disposable;
|
||||
/** Sets callback to invoke when a keymap file is unloaded. */
|
||||
onDidUnloadKeymap(callback: (event: IKeymapLoadEvent) => void): Disposable;
|
||||
/** Sets callback to invoke when a keymap file could not to be loaded. */
|
||||
onDidFailToReadFile(callback: (error: Error) => void): Disposable;
|
||||
|
||||
// Adding and Removing Bindings
|
||||
|
||||
/** Adds sets of key bindings grouped by CSS selector. */
|
||||
add(source: string, keyBindingsBySelector: any): Disposable;
|
||||
|
||||
// Accessing Bindings
|
||||
|
||||
getKeyBindings(): KeyBinding[];
|
||||
findKeyBindings(params?: {
|
||||
keystrokes: string; // e.g. 'ctrl-x ctrl-s'
|
||||
command: string; // e.g. 'editor:backspace'
|
||||
target?: Element;
|
||||
}): KeyBinding[];
|
||||
|
||||
// Managing Keymap Files
|
||||
|
||||
/**
|
||||
* Loads the key bindings from the given path.
|
||||
*
|
||||
* @param bindingsPath A path to a file or a directory. If the path is a directory all files
|
||||
* inside it will be loaded.
|
||||
*/
|
||||
loadKeymap(bindingsPath: string, options?: { watch: boolean }): void;
|
||||
/**
|
||||
* Starts watching the given file/directory for changes, reloading any keymaps at that location
|
||||
* when changes are detected.
|
||||
*
|
||||
* @param filePath A path to a file or a directory.
|
||||
*/
|
||||
watchKeymap(filePath: string): void;
|
||||
|
||||
// Managing Keyboard Events
|
||||
|
||||
/**
|
||||
* Dispatches a custom event associated with the matching key binding for the given
|
||||
* `KeyboardEvent` if one can be found.
|
||||
*/
|
||||
handleKeyboardEvent(event: KeyboardEvent): void;
|
||||
/** Translates a keydown event to a keystroke string. */
|
||||
keystrokeForKeyboardEvent(event: KeyboardEvent): string;
|
||||
/**
|
||||
* @return The number of milliseconds allowed before pending states caused by partial matches of
|
||||
* multi-keystroke bindings are terminated.
|
||||
*/
|
||||
getPartialMatchTimeout(): number;
|
||||
}
|
||||
|
||||
/** Allows commands to be associated with keystrokes in a context-sensitive way.*/
|
||||
var KeymapManager: KeymapManagerStatic;
|
||||
}
|
||||
|
||||
declare module 'atom-keymap' {
|
||||
export = AtomKeymap;
|
||||
}
|
||||
Vendored
+2
-2
@@ -181,8 +181,8 @@ declare module Backbone {
|
||||
comparator(element: TModel): number;
|
||||
comparator(compare: TModel, to?: TModel): number;
|
||||
|
||||
add(model: TModel, options?: AddOptions): Collection<TModel>;
|
||||
add(models: TModel[], options?: AddOptions): Collection<TModel>;
|
||||
add(model: {}|TModel, options?: AddOptions): TModel;
|
||||
add(models: ({}|TModel)[], options?: AddOptions): TModel[];
|
||||
at(index: number): TModel;
|
||||
/**
|
||||
* Get a model from a collection, specified by an id, a cid, or by passing in a model.
|
||||
|
||||
@@ -0,0 +1,386 @@
|
||||
/// <reference path="./baconjs.d.ts" />
|
||||
|
||||
function CreatingStreams() {
|
||||
$("#my-div").asEventStream("click");
|
||||
$("#my-div").asEventStream("click", ".more-specific-selector");
|
||||
$("#my-div").asEventStream("click", (event, args) => args[0]);
|
||||
$("#my-div").asEventStream("click", ".more-specific-selector", (event, args) => args[0]);
|
||||
|
||||
Bacon.fromPromise($.ajax("https://baconjs.github.io/"));
|
||||
Bacon.fromPromise(Promise.resolve(1));
|
||||
|
||||
Bacon.fromPromise($.ajax("https://baconjs.github.io/"), true);
|
||||
Bacon.fromPromise(Promise.resolve(1), false);
|
||||
|
||||
Bacon.fromPromise($.ajax("https://baconjs.github.io/"), true, (n:string) => {
|
||||
return [new Bacon.Next(n), new Bacon.Next(() => n), new Bacon.End()];
|
||||
});
|
||||
Bacon.fromPromise(Promise.resolve(1), false, n => {
|
||||
return [new Bacon.Next(n), new Bacon.Next(() => n), new Bacon.End()];
|
||||
});
|
||||
|
||||
Bacon.fromEvent(document.body, "click").onValue(() => {
|
||||
alert("Bacon!");
|
||||
});
|
||||
Bacon.fromEvent(document.body, "click", (event:MouseEvent) => event.clientX).onValue(clientX => {
|
||||
alert("Bacon!");
|
||||
});
|
||||
Bacon.fromEvent(process.stdin, "readable", () => {
|
||||
alert("Bacon!");
|
||||
});
|
||||
|
||||
// This would create a stream that outputs a single value "Bacon!" and ends after that. The use of setTimeout causes the value to be delayed by 1 second.
|
||||
Bacon.fromCallback(callback => {
|
||||
setTimeout(() => {
|
||||
callback("Bacon!");
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
// You can also give any number of arguments to `fromCallback`, which will be passed to the function. These arguments can be simple variables, Bacon EventStreams or Properties. For example the following will output "Bacon rules":
|
||||
Bacon.fromCallback((a, b, callback) => {
|
||||
callback(a + " " + b);
|
||||
}, Bacon.constant("bacon"), "rules").log();
|
||||
|
||||
{
|
||||
var fs = require("fs"),
|
||||
read = Bacon.fromNodeCallback(fs.readFile, "input.txt");
|
||||
read.onError(error => {
|
||||
console.log("Reading failed: " + error);
|
||||
});
|
||||
read.onValue(value => {
|
||||
console.log("Read contents: " + value);
|
||||
});
|
||||
}
|
||||
|
||||
Bacon.once(new Bacon.Error("fail"));
|
||||
|
||||
// The following would lead to `1,2,3,1,2,3...` to be repeated indefinitely:
|
||||
Bacon.fromArray([1, new Bacon.Error("")]);
|
||||
|
||||
Bacon.repeatedly(10, [1, 2, 3]);
|
||||
|
||||
// The following will produce values `0,1,2`.
|
||||
Bacon.repeat(i => {
|
||||
if (i < 3) {
|
||||
return Bacon.once(i);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}).log();
|
||||
|
||||
{
|
||||
var stream = Bacon.fromBinder(sink => {
|
||||
sink("first value");
|
||||
sink([new Bacon.Next("2nd"), new Bacon.Next("3rd")]);
|
||||
sink(new Bacon.Next(() => {
|
||||
return "This one will be evaluated lazily"
|
||||
}));
|
||||
sink(new Bacon.Error("oops, an error"));
|
||||
sink(new Bacon.End());
|
||||
return () => {
|
||||
// unsub functionality here, this one's a no-op
|
||||
};
|
||||
});
|
||||
stream.log();
|
||||
}
|
||||
|
||||
new Bacon.Next("value");
|
||||
new Bacon.Next(() => "value");
|
||||
}
|
||||
|
||||
function CommonMethodsInEventStreamsAndProperties() {
|
||||
// Converting strings to integers, skipping empty values:
|
||||
Bacon.once("").flatMap(text => {
|
||||
return text != "" ? parseInt(text) : Bacon.never();
|
||||
});
|
||||
|
||||
Bacon.sequentially(1, [1, 2, 3]).scan(0, (a, b) => a + b);
|
||||
|
||||
Bacon.sequentially(1, [1, 2, 3]).diff(0, (a, b) => Math.abs(b - a));
|
||||
|
||||
// If you have a EventStream `s` with a value sequence `1,2,3,4,5`, the respective values in `s.slidingWindow(2)` would be `[],[1],[1,2],[2,3],[3,4],[4,5]`:
|
||||
Bacon.fromArray([1, 2, 3, 4, 5]).slidingWindow(2);
|
||||
// The values of `s.slidingWindow(2,2)`would be `[1,2],[2,3],[3,4],[4,5]`:
|
||||
Bacon.fromArray([1, 2, 3, 4, 5]).slidingWindow(2, 2);
|
||||
|
||||
{
|
||||
var x = Bacon.fromArray([1, 2]), y = Bacon.fromArray([3, 4]);
|
||||
x.zip(y, (x, y) => x + y);
|
||||
}
|
||||
|
||||
{
|
||||
var stream = Bacon.fromArray([1, 2]);
|
||||
stream.log("New event in myStream");
|
||||
stream.log();
|
||||
}
|
||||
|
||||
Bacon.fromArray([1, 2, 3]).withStateMachine(0, (sum, event) => {
|
||||
if (event.hasValue()) {
|
||||
// had to cast to `number` because event:Bacon.Next<number>|Bacon.Error<{}>
|
||||
return [sum + <number>event.value(), []];
|
||||
}
|
||||
else if (event.isEnd()) {
|
||||
return [undefined, [new Bacon.Next(sum), event]];
|
||||
}
|
||||
else {
|
||||
return [sum, [event]];
|
||||
}
|
||||
});
|
||||
|
||||
{
|
||||
var property = Bacon.fromArray([1, 2, 3]).toProperty(),
|
||||
who = Bacon.fromArray(["A", "B", "C"]).toProperty();
|
||||
property.decode({1: "mike", 2: who});
|
||||
|
||||
property.decode({1: {type: "mike"}, 2: {type: "other", whoThen: who}});
|
||||
}
|
||||
|
||||
{
|
||||
// This is handy for keeping track whether we are currently awaiting an AJAX response:
|
||||
var ajaxRequest = <Bacon.Observable<Error, JQueryXHR>>{},
|
||||
ajaxResponse = <Bacon.Observable<Error, JQueryXHR>>{},
|
||||
showAjaxIndicator = ajaxRequest.awaiting(ajaxResponse);
|
||||
}
|
||||
|
||||
Bacon.fromArray([1, 2, -3, 3]).withHandler(function (event) {
|
||||
if (event.hasValue() && event.value() < 0) {
|
||||
this.push(new Bacon.Error("Value below zero"));
|
||||
return this.push(new Bacon.End());
|
||||
} else {
|
||||
return this.push(event);
|
||||
}
|
||||
});
|
||||
|
||||
{
|
||||
var src = Bacon.once(1),
|
||||
obs = src.map(x => -x);
|
||||
console.log(obs.toString()); // > "Bacon.once(1).map(function)"
|
||||
|
||||
obs.withDescription(src, "times", -1);
|
||||
console.log(obs.toString()); // > "Bacon.once(1).times(-1)"
|
||||
}
|
||||
|
||||
{
|
||||
// Calculator for grouped consecutive values until group is cancelled:
|
||||
var events = [
|
||||
{id: 1, type: "add", val: 3},
|
||||
{id: 2, type: "add", val: -1},
|
||||
{id: 1, type: "add", val: 2},
|
||||
{id: 2, type: "cancel"},
|
||||
{id: 3, type: "add", val: 2},
|
||||
{id: 3, type: "cancel"},
|
||||
{id: 1, type: "add", val: 1},
|
||||
{id: 1, type: "add", val: 2},
|
||||
{id: 1, type: "cancel"}
|
||||
],
|
||||
keyF = (event:{id:number}) => event.id,
|
||||
limitF = (groupedStream:Bacon.EventStream<string, {id:number; type:string; val?:number}>) => {
|
||||
var cancel = groupedStream.filter(x => x.type === "cancel").take(1),
|
||||
adds = groupedStream.filter(x => x.type === "add");
|
||||
return adds.takeUntil(cancel).map(x => x.val);
|
||||
};
|
||||
|
||||
Bacon.sequentially(2, events)
|
||||
.groupBy(keyF, limitF)
|
||||
.flatMap(groupedStream => groupedStream.fold(0, (acc, x) => acc + x))
|
||||
.onValue(sum => {
|
||||
console.log(sum); // returns [-1, 2, 8] in an order
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function EventStream() {
|
||||
// This creates the stream which doesn't produce any events and never ends:
|
||||
Bacon.interval(1e1, 0).last();
|
||||
|
||||
Bacon.fromArray([1, 2, 2, 1])
|
||||
.skipDuplicates().log(); // > returns [1, 2, 1] in an order
|
||||
|
||||
// You might get two events containing [1,2,3,4] and [5,6,7] respectively, given that the flush occurs between numbers 4 and 5:
|
||||
Bacon.fromArray([1, 2, 3, 4, 5, 6, 7]).bufferWithTime(0);
|
||||
|
||||
// Here's an equivalent to `stream.bufferWithTime(10)`:
|
||||
{
|
||||
var stream = Bacon.fromArray([1, 2, 3, 4, 5, 6, 7]);
|
||||
stream.bufferWithTime(f => {
|
||||
setTimeout(f, 10);
|
||||
});
|
||||
}
|
||||
|
||||
// You will get output events with values `[1, 2]`, `[3, 4]` and `[5]`.
|
||||
Bacon.fromArray([1, 2, 3, 4, 5]).bufferWithCount(2);
|
||||
}
|
||||
|
||||
function Property() {
|
||||
// This creates the property which doesn't produce any events and never ends:
|
||||
Bacon.interval(1e1, 0).toProperty().last();
|
||||
|
||||
{
|
||||
var property = Bacon.fromArray([1, 2, 3, 4, 5]).toProperty();
|
||||
// If you want to assign your Property to the "disabled" attribute of a JQuery object, you can do this:
|
||||
property.assign($("#my-button"), "attr", "disabled");
|
||||
|
||||
// A simpler example would be to toggle the visibility of an element based on a Property:
|
||||
property.assign($("#my-button"), "toggle");
|
||||
}
|
||||
|
||||
Bacon.fromArray([1, 2, 2, 1]).toProperty()
|
||||
.skipDuplicates().log(); // > returns [1, 2, 1] in an order
|
||||
}
|
||||
|
||||
function CombiningMultipleStreamsAndProperties() {
|
||||
{
|
||||
var property = Bacon.constant(1),
|
||||
stream = Bacon.once(2),
|
||||
constant = 3;
|
||||
Bacon.combineAsArray(property, stream, constant)
|
||||
.log(); // > returns [1, 2, 3]
|
||||
}
|
||||
|
||||
{
|
||||
// To calculate the current sum of three numeric Properties, you can do:
|
||||
var property = Bacon.constant(1),
|
||||
stream = Bacon.once(2),
|
||||
constant = 3;
|
||||
// NOTE: had to explicitly specify the typing for `x:number, y:number, z:number`
|
||||
Bacon.combineWith((x:number, y:number, z:number) => x + y + z, property, stream, constant);
|
||||
}
|
||||
|
||||
{
|
||||
// Assuming you've got streams or properties named `password`, `username`, `firstname` and `lastname`, you can do:
|
||||
var password = Bacon.constant("easy"),
|
||||
username = Bacon.constant("juha"),
|
||||
firstname = Bacon.constant("juha"),
|
||||
lastname = Bacon.constant("paananen"),
|
||||
// NOTE: you should provide `combineTemplate` typing explicitly!
|
||||
loginInfo = Bacon.combineTemplate<string, {
|
||||
magicNumber:number; userid:string; passwd:string;
|
||||
name:{first:string; last:string}
|
||||
}>({
|
||||
magicNumber: 3,
|
||||
userid: username,
|
||||
passwd: password,
|
||||
name: {first: firstname, last: lastname}
|
||||
}).onValue(loginInfo => {
|
||||
// and your new `loginInfo` property will combine values from all these streams using that template, whenever any of the streams/properties get a new value. It would yield a value:
|
||||
console.log("`loginInfo` expected", {
|
||||
magicNumber: 3,
|
||||
userid: "juha",
|
||||
passwd: "easy",
|
||||
name: {first: "juha", last: "paananen"}
|
||||
});
|
||||
console.log("`loginInfo` actual", loginInfo);
|
||||
});
|
||||
|
||||
// Note that all Bacon.combine* methods produce a `Property` instead of an `EventStream`. If you need the result as an `EventStream` you might want to use `property.changes()`:
|
||||
Bacon.combineWith((firstname, lastname) => `${firstname} ${lastname}`, firstname, lastname).changes();
|
||||
}
|
||||
|
||||
{
|
||||
var x = Bacon.fromArray([1, 2, 3]),
|
||||
y = Bacon.fromArray([10, 20, 30]),
|
||||
z = Bacon.fromArray([100, 200, 300]);
|
||||
Bacon.zipAsArray(x, y, z)
|
||||
.log(); // > returns values `[1, 10, 100]`, `[2, 20, 200]` and `[3, 30, 300]`
|
||||
}
|
||||
|
||||
// The following example would log the number 3.
|
||||
// NOTE: had to explicitly specify the typing for `a:number, b:number`
|
||||
Bacon.onValues(Bacon.constant(1), Bacon.constant(2), (a:number, b:number) => {
|
||||
console.log(a + b);
|
||||
});
|
||||
}
|
||||
|
||||
function $Event() {
|
||||
new Bacon.Next("value");
|
||||
new Bacon.Next(() => "value");
|
||||
}
|
||||
|
||||
function Errors() {
|
||||
// In case you want to convert (some) value events into Error events, you may use `flatMap` like this:
|
||||
// NOTE: had to explicitly specify the typing for `flatMap`
|
||||
Bacon.fromArray([1, 2, 3, 4]).flatMap<number>(x => {
|
||||
return x > 2 ? new Bacon.Error("too big") : x;
|
||||
});
|
||||
|
||||
// Conversely, if you want to convert some Error events into value events, you may use `flatMapError`:
|
||||
Bacon.fromArray<string, number>([1, 2, 3, 4]).flatMapError<number>(error => {
|
||||
var isNonCriticalError = (error:string) => Math.random() < .5,
|
||||
handleNonCriticalError = (error:string) => 42;
|
||||
return isNonCriticalError(error) ? handleNonCriticalError(error) : new Bacon.Error(error);
|
||||
});
|
||||
|
||||
// Note also that Bacon.js combinators do not catch errors that are thrown. Especially `map` doesn't do so. If you want to map things and wrap caught errors into Error events, you can do the following:
|
||||
Bacon.fromArray([1, 2, 3, 4]).flatMap(x => {
|
||||
var dangerousFunction = (x:number) => {
|
||||
throw new Error("dangerous function!");
|
||||
};
|
||||
try {
|
||||
return dangerousFunction(x);
|
||||
} catch (e) {
|
||||
return new Bacon.Error(e);
|
||||
}
|
||||
});
|
||||
|
||||
Bacon.once("https://baconjs.github.io/").flatMap(url => {
|
||||
// `ajaxCall` gives `Error`s on network or server `Error`s.
|
||||
var ajaxCall = (url:string) => {
|
||||
return Bacon.fromPromise<JQueryXHR, JQueryXHR>($.ajax(url));
|
||||
};
|
||||
return Bacon.retry({
|
||||
source: () => ajaxCall(url),
|
||||
retries: 5,
|
||||
isRetryable: (error:JQueryXHR) => error.status !== 404,
|
||||
delay: context => 100 // Just use the same delay always
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function JoinPatterns() {
|
||||
{
|
||||
// Consider implementing a game with discrete time ticks. We want to handle key-events synchronized on tick-events, with at most one key event handled per tick. If there are no key events, we want to just process a tick:
|
||||
var tick = Bacon.interval(1e2, 0),
|
||||
keyEvent = Bacon.fromEvent(document.body, "click", _ => Date.now()),
|
||||
handleTick = (_:number) => `timestamp: NONE`,
|
||||
handleKeyEvent = (timestamp:number) => `timestamp: ${timestamp}`;
|
||||
Bacon.when(
|
||||
[tick, keyEvent], (_:number, timestamp:number) => handleKeyEvent(timestamp),
|
||||
[tick], handleTick
|
||||
);
|
||||
// Order is important here. If the [tick] patterns had been written first, this would have been tried first, and preferred at each tick.
|
||||
}
|
||||
|
||||
{
|
||||
// Join patterns are indeed a generalization of `zip`, and `zip` is equivalent to a single-rule join pattern. The following `Observable`s have the same output:
|
||||
var a = Bacon.once("a"),
|
||||
b = Bacon.once("b"),
|
||||
c = Bacon.once("c"),
|
||||
f = (a:string, b:string, c:string) => `a = ${a}; b = ${b}; c = ${c}.`;
|
||||
Bacon.zipWith(f, a, b, c);
|
||||
Bacon.when([a, b, c], f);
|
||||
}
|
||||
{
|
||||
// The inputs to `Bacon.update` are defined like this:
|
||||
var initial = 0,
|
||||
x = Bacon.interval(1e3, 1),
|
||||
y = Bacon.interval(2e3, 1),
|
||||
z = Bacon.interval(1.5e3, 1);
|
||||
// NOTE: had to explicitly specify the typing for `previous:number`
|
||||
Bacon.update(initial,
|
||||
[x, y, z], (previous:number, x:number, y:number, z:number) => previous + x + y + z,
|
||||
[x, y], (previous:number, x:number, y:number) => previous + x + y
|
||||
);
|
||||
// As input, each function above will get the previous value of the `result` Property, along with values from the listed Observables. The value returned by the function will be used as the next value of `result`. Just like in `Bacon.when`, only EventStreams will trigger an update, while Properties will be just sampled. So, if you list a single EventStream and several Properties, the value will be updated only when an event occurs in the EventStream.
|
||||
}
|
||||
{
|
||||
// Here's a simple gaming example:
|
||||
var scoreMultiplier = Bacon.constant(1),
|
||||
hitUfo = new Bacon.Bus(),
|
||||
hitMotherShip = new Bacon.Bus(),
|
||||
score = Bacon.update(0,
|
||||
[hitUfo, scoreMultiplier], (score:number, _:number, multiplier:number) => score + 100 * multiplier,
|
||||
[hitMotherShip], (score:number, _:number) => score + 2000
|
||||
);
|
||||
// In the example, the `score` property is updated when either `hitUfo` or `hitMotherShip` occur. The `scoreMultiplier` Property is sampled to take multiplier into account when `hitUfo` occurs.
|
||||
}
|
||||
}
|
||||
Vendored
+2746
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,282 @@
|
||||
/// <reference path="bardjs.d.ts" />
|
||||
/// <reference path="../mocha/mocha.d.ts" />
|
||||
/// <reference path="../chai/chai.d.ts" />
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
/// <reference path="../angularjs/angular-mocks.d.ts" />
|
||||
|
||||
module bardTests {
|
||||
var expect = chai.expect,
|
||||
assert = chai.assert;
|
||||
|
||||
class MyService {
|
||||
constructor(private $q: angular.IQService) {}
|
||||
|
||||
remoteCall(): angular.IPromise<string[]> {
|
||||
return new this.$q((resolve, reject) => {
|
||||
resolve(['Hello', 'World']);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
myService.$inject = ['$q'];
|
||||
function myService($q: angular.IQService) {
|
||||
return new MyService($q);
|
||||
}
|
||||
|
||||
class MyController {
|
||||
myProperty: string;
|
||||
}
|
||||
|
||||
angular
|
||||
.module('myModule')
|
||||
.service('myService', myService)
|
||||
.controller('MyController', MyController);
|
||||
|
||||
/*
|
||||
* bard.$httpBackend
|
||||
*/
|
||||
function test_$httpBackend() {
|
||||
var myService: MyService;
|
||||
var $rootScope: angular.IRootScopeService;
|
||||
|
||||
beforeEach(module(bard.$httpBackend, 'myModule'));
|
||||
|
||||
beforeEach(inject(function(_myService_: MyService, _$rootScope_: angular.IRootScopeService) {
|
||||
myService = _myService_;
|
||||
$rootScope = _$rootScope_;
|
||||
}));
|
||||
|
||||
it('should return valid data', function(done) {
|
||||
myService.remoteCall()
|
||||
.then(function(data) {
|
||||
expect(data).to.exist;
|
||||
})
|
||||
.then(done, done);
|
||||
|
||||
$rootScope.$apply; // Because not using bard.$q, must flush the $http and $q queues
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* bard.$q
|
||||
*/
|
||||
function test_$q() {
|
||||
var myService: MyService;
|
||||
|
||||
beforeEach(module(bard.$q, bard.$httpBackend, 'myModule'));
|
||||
|
||||
beforeEach(inject(function(_myService_: MyService) {
|
||||
myService = _myService_;
|
||||
}));
|
||||
|
||||
it('should return valid data', (done) => {
|
||||
myService.remoteCall()
|
||||
.then((data) => {
|
||||
expect(data).to.exist;
|
||||
})
|
||||
.then(done, done);
|
||||
|
||||
// No need to flush
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* bard.addGlobals
|
||||
*/
|
||||
function test_addGlobals() {
|
||||
describe('someting', function() {
|
||||
var ctx = this;
|
||||
|
||||
it('should work', function() {
|
||||
var bar = 'bar';
|
||||
bard.addGlobals(this, 'foo'); // where `this` is the spec context
|
||||
bard.addGlobals(this, 'foo', bar);
|
||||
bard.addGlobals.bind(this)('foo', 'bar');
|
||||
bard.addGlobals(ctx, ['foo', 'bar']) // where ctx is the spec context
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
/*
|
||||
* bard.appModule
|
||||
*/
|
||||
function test_appModule() {
|
||||
beforeEach(bard.appModule('myModule'));
|
||||
////
|
||||
beforeEach(bard.appModule('myModule', function() {}, {}));
|
||||
}
|
||||
|
||||
/*
|
||||
* bard.assertFail
|
||||
*/
|
||||
function test_assertFail() {
|
||||
bard.assertFail('FAIL!');
|
||||
}
|
||||
|
||||
/*
|
||||
* bard.asyncModule
|
||||
*/
|
||||
function test_asyncModule() {
|
||||
beforeEach(bard.asyncModule('myModule'));
|
||||
////
|
||||
beforeEach(bard.asyncModule('myModule', function() {}, {}));
|
||||
}
|
||||
|
||||
/*
|
||||
* bard.debugging
|
||||
*/
|
||||
function test_debugging() {
|
||||
console.log(
|
||||
bard.debugging(true), // should return true
|
||||
bard.debugging(false), // should return false
|
||||
bard.debugging(42), // should return true
|
||||
bard.debugging(''), // should return false
|
||||
bard.debugging() // should return false
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
* bard.fakeLogger
|
||||
*/
|
||||
function test_fakeLogger() {
|
||||
beforeEach(module('myModule', bard.fakeLogger));
|
||||
////
|
||||
beforeEach(bard.appModule('myModule', bard.fakeLogger));
|
||||
////
|
||||
beforeEach(bard.asyncModule('myModule', bard.fakeLogger));
|
||||
}
|
||||
|
||||
/*
|
||||
* bard.fakeRouteHelperProvider
|
||||
*/
|
||||
function test_fakeRouteHelperProvider() {
|
||||
beforeEach(module('myModule', bard.fakeRouteHelperProvider));
|
||||
////
|
||||
beforeEach(bard.appModule('myModule', bard.fakeRouteHelperProvider));
|
||||
////
|
||||
beforeEach(bard.asyncModule('myModule', bard.fakeRouteHelperProvider));
|
||||
}
|
||||
|
||||
/*
|
||||
* bard.fakeRouteProvider
|
||||
*/
|
||||
function test_fakeRouteProvider() {
|
||||
beforeEach(module('myModule', bard.fakeRouteProvider));
|
||||
////
|
||||
beforeEach(bard.appModule('myModule', bard.fakeRouteProvider));
|
||||
////
|
||||
beforeEach(bard.asyncModule('myModule', bard.fakeRouteProvider));
|
||||
}
|
||||
|
||||
/*
|
||||
* bard.fakeStateProvider
|
||||
*/
|
||||
function test_fakeStateProvider() {
|
||||
beforeEach(module('myModule', bard.fakeStateProvider));
|
||||
////
|
||||
beforeEach(bard.appModule('myModule', bard.fakeStateProvider));
|
||||
////
|
||||
beforeEach(bard.asyncModule('myModule', bard.fakeStateProvider));
|
||||
}
|
||||
|
||||
/*
|
||||
* bard.fakeToastr
|
||||
*/
|
||||
function test_fakeToastr() {
|
||||
beforeEach(module('myModule', bard.fakeToastr));
|
||||
////
|
||||
beforeEach(bard.appModule('myModule', bard.fakeToastr));
|
||||
////
|
||||
beforeEach(bard.asyncModule('myModule', bard.fakeToastr));
|
||||
}
|
||||
|
||||
/*
|
||||
* bard.inject
|
||||
*/
|
||||
function test_inject() {
|
||||
beforeEach(() => bard.inject(this, '$controller', '$log', '$q', '$rootScope', 'myService'));
|
||||
}
|
||||
|
||||
/*
|
||||
* bard.log
|
||||
*/
|
||||
function test_log() {
|
||||
bard.log('We got the goods');
|
||||
}
|
||||
|
||||
/*
|
||||
* bard.mochaRunnerListener
|
||||
*/
|
||||
function test_mochaRunnerListener() {
|
||||
var runner = mocha.run();
|
||||
bard.mochaRunnerListener(runner);
|
||||
}
|
||||
|
||||
/*
|
||||
* bard.mockService
|
||||
*/
|
||||
function test_mockService() {
|
||||
var controller: MyController,
|
||||
myArray = ['This', 'is', 'some', 'mocked', 'data'];
|
||||
var $controller: angular.IControllerService,
|
||||
$q: angular.IQService,
|
||||
$rootScope: angular.IRootScopeService,
|
||||
myService: MyService;
|
||||
|
||||
beforeEach(function() {
|
||||
bard.appModule('myModule');
|
||||
bard.inject(this, '$controller', '$q', '$rootScope', 'myService');
|
||||
|
||||
bard.mockService(myService, {
|
||||
remoteCall: $q.when(myArray),
|
||||
_default: $q.when([])
|
||||
});
|
||||
|
||||
controller = $controller('MyController');
|
||||
$rootScope.$apply();
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* bard.replaceAccentChars
|
||||
*/
|
||||
function test_replaceAccentChars() {
|
||||
console.log(bard.replaceAccentChars('àáâãäåèéêëìíîïòóôõöùúûüýÿ') === 'aaaaaaeeeeeeeeooooouuuuyy');
|
||||
}
|
||||
|
||||
/*
|
||||
* bard.verifyNoOutstandingHttpRequests
|
||||
*/
|
||||
function test_verifyNoOutstandingHttpRequests() {
|
||||
var controller: MyController,
|
||||
myArray = ['This', 'is', 'some', 'mocked', 'data'];
|
||||
var $controller: angular.IControllerService,
|
||||
$q: angular.IQService,
|
||||
$rootScope: angular.IRootScopeService,
|
||||
myService: MyService;
|
||||
|
||||
beforeEach(function() {
|
||||
bard.appModule('myModule');
|
||||
bard.inject(this, '$controller', '$q', '$rootScope', 'myService');
|
||||
|
||||
bard.mockService(myService, {
|
||||
remoteCall: $q.when(myArray),
|
||||
_default: $q.when([])
|
||||
});
|
||||
|
||||
controller = $controller('MyController');
|
||||
$rootScope.$apply();
|
||||
});
|
||||
|
||||
bard.verifyNoOutstandingHttpRequests();
|
||||
}
|
||||
|
||||
/*
|
||||
* bard.wrapWithDone
|
||||
*/
|
||||
function test_wrapWithDone() {
|
||||
function callback() { console.log('Doing something...'); }
|
||||
function done() { console.log('...Done'); }
|
||||
bard.wrapWithDone(callback, done);
|
||||
}
|
||||
}
|
||||
Vendored
+174
@@ -0,0 +1,174 @@
|
||||
// Type definitions for bardjs 0.1.4
|
||||
// Project: https://github.com/wardbell/bardjs
|
||||
// Definitions by: Andrew Archibald <https://github.com/TepigMC>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
/// <reference path="../chai/chai.d.ts" />
|
||||
/// <reference path="../mocha/mocha.d.ts" />
|
||||
|
||||
/**
|
||||
* Module for bardjs functions
|
||||
*/
|
||||
declare module bard {
|
||||
/**
|
||||
* Replaces the ngMock'ed $httpBackend with the real one from ng thus
|
||||
* restoring the ability to issue AJAX calls to the backend with $http.
|
||||
*
|
||||
* Note that $q remains ngMocked so you must flush $http calls ($rootScope.$digest).
|
||||
* Use $rootScope.$apply() for this purpose.
|
||||
*
|
||||
* Could restore $q with $qReal in which case don't need to flush.
|
||||
*/
|
||||
function $httpBackend($provide: angular.auto.IProvideService): any;
|
||||
|
||||
/**
|
||||
* Replaces the ngMock'ed $q with the real one from ng thus
|
||||
* obviating the need to flush $http and $q queues
|
||||
* at the expense of ability to control $q timing.
|
||||
*/
|
||||
function $q($provide: angular.auto.IProvideService): any;
|
||||
|
||||
/**
|
||||
* Add names of globals to list of OK globals for this mocha spec
|
||||
* NB: Call this method ONLY if you're using mocha!
|
||||
* NB: Turn off browser-sync else mocha detects the browser-sync globals
|
||||
* like ` ___browserSync___`
|
||||
*/
|
||||
function addGlobals(...globals: any[]): void;
|
||||
|
||||
/**
|
||||
* Prepare ngMocked application feature module
|
||||
* along with faked toastr, routehelper,
|
||||
* and faked router services.
|
||||
* Especially useful for controller testing
|
||||
* Use it as you would the ngMocks#module method
|
||||
*
|
||||
* DO NOT USE IF YOU NEED THE REAL ROUTER SERVICES!
|
||||
* Fall back to `angular.mock.module(...)` or just `module(...)`
|
||||
*/
|
||||
function appModule(...fns: (string | Function | Object)[]): () => void;
|
||||
|
||||
/**
|
||||
* Assert a failure in mocha, without condition
|
||||
*/
|
||||
function assertFail(message: string): Chai.AssertionError;
|
||||
|
||||
/**
|
||||
* Prepare ngMocked module definition that makes real $http and $q calls
|
||||
* Also adds fakeLogger to the end of the definition
|
||||
* Use it as you would the ngMocks#module method
|
||||
*/
|
||||
function asyncModule(...fns: (string | Function | Object)[]): () => void;
|
||||
|
||||
/**
|
||||
* Get or set bard debugging flag
|
||||
*/
|
||||
function debugging(newFlag?: any): boolean;
|
||||
|
||||
/**
|
||||
* Registers a fake logger service that you can spy on
|
||||
*/
|
||||
function fakeLogger($provide: angular.auto.IProvideService): void;
|
||||
|
||||
/**
|
||||
* Registers a fake route helper provider service that you can spy on
|
||||
*/
|
||||
function fakeRouteHelperProvider($provide: angular.auto.IProvideService): void;
|
||||
|
||||
/**
|
||||
* Stub out the $routeProvider so we avoid
|
||||
* all routing calls, including the default route
|
||||
* which runs on every test otherwise.
|
||||
* Make sure this goes before the inject in the spec.
|
||||
*/
|
||||
function fakeRouteProvider($provide: angular.auto.IProvideService): void;
|
||||
|
||||
/**
|
||||
* Stub out the $stateProvider so we avoid
|
||||
* all routing calls, including the default state
|
||||
* which runs on every test otherwise.
|
||||
* Make sure this goes before the inject in the spec.
|
||||
*/
|
||||
function fakeStateProvider($provide: angular.auto.IProvideService): void;
|
||||
|
||||
/**
|
||||
* Registers a fake toastr service that you can spy on
|
||||
*/
|
||||
function fakeToastr($provide: angular.auto.IProvideService): void;
|
||||
|
||||
/**
|
||||
* Inject selected services into the windows object during test
|
||||
* then remove them when test ends with an `afterEach`.
|
||||
*
|
||||
* spares us the repetition of creating common service vars and injecting them
|
||||
*
|
||||
* Option: the first argument may be the mocha spec context object (`this`)
|
||||
* It MUST be `this` if you what to check for mocha global leaks.
|
||||
* Do NOT supply `this` as the first arg if you're not running mocha specs.
|
||||
*
|
||||
* remaining inject arguments may take one of 3 forms :
|
||||
*
|
||||
* function - This fn will be passed to ngMocks.inject.
|
||||
* Annotations extracted after inject does its thing.
|
||||
* [strings] - same string array you'd use to set fn.$inject
|
||||
* (...string) - string arguments turned into a string array
|
||||
*/
|
||||
function inject(context?: Function, ...args: string[]): void;
|
||||
|
||||
/**
|
||||
* Write to console if bard debugging flag is on
|
||||
*/
|
||||
function log(message: any): void;
|
||||
|
||||
/**
|
||||
* Listen to mocha test runner events
|
||||
* Usage in browser:
|
||||
* var runner = mocha.run();
|
||||
* bard.mochaRunnerListener(runner);
|
||||
*/
|
||||
function mochaRunnerListener(runner: Mocha.IRunner): void;
|
||||
|
||||
/**
|
||||
* Mocks out a service with sinon stubbed functions
|
||||
* that return the values specified in the config
|
||||
*
|
||||
* If the config value is `undefined`,
|
||||
* stub the service method with a dummy that doesn't return a value
|
||||
*
|
||||
* If the config value is a function, set service property with it
|
||||
*
|
||||
* If a service member is a property, not a function,
|
||||
* set it with the config value
|
||||
* If a service member name is not a key in config,
|
||||
* follow the same logic as above to set its members
|
||||
* using the config._default value (which is `undefined` if omitted)
|
||||
*
|
||||
* If there is a config entry that is NOT a member of the service
|
||||
* add mocked function to the service using the config value
|
||||
*/
|
||||
function mockService(service: any, config: any): any;
|
||||
|
||||
/**
|
||||
* Replaces the accented characters of many European languages w/ unaccented chars
|
||||
* Use it in JavaScript string sorts where such characters may be encountered
|
||||
* Matches the default string comparers of most databases.
|
||||
* Ex: replaceAccentChars(a.Name) < replaceAccentChars(b.Name)
|
||||
* instead of: a.Name < b.Name
|
||||
*/
|
||||
function replaceAccentChars(text: string): string;
|
||||
|
||||
/**
|
||||
* Assert that there are no outstanding HTTP requests after test is complete
|
||||
* For use with ngMocks; doesn't work for async server integration tests
|
||||
*/
|
||||
function verifyNoOutstandingHttpRequests(): void;
|
||||
|
||||
/**
|
||||
* Returns a function that execute a callback function
|
||||
* (typically a fn making asserts) within a try/catch
|
||||
* The try/catch then calls the ambient "done" function
|
||||
* in the appropriate way for both success and failure
|
||||
*/
|
||||
function wrapWithDone(callback: Function, done: Function): Function;
|
||||
}
|
||||
Vendored
+5
-5
@@ -6,7 +6,7 @@
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
interface BrowserifyObject extends NodeJS.EventEmitter {
|
||||
add(file:string): BrowserifyObject;
|
||||
add(file:string, opts?:any): BrowserifyObject;
|
||||
require(file:string, opts?:{
|
||||
expose: string;
|
||||
}): BrowserifyObject;
|
||||
@@ -18,10 +18,10 @@ interface BrowserifyObject extends NodeJS.EventEmitter {
|
||||
insertGlobalVars?: any;
|
||||
}, cb?:(err:any, src:any) => void): NodeJS.ReadableStream;
|
||||
|
||||
external(file:string): BrowserifyObject;
|
||||
ignore(file:string): BrowserifyObject;
|
||||
transform(tr:string): BrowserifyObject;
|
||||
transform(tr:Function): BrowserifyObject;
|
||||
external(file:string, opts?:any): BrowserifyObject;
|
||||
ignore(file:string, opts?:any): BrowserifyObject;
|
||||
transform(tr:string, opts?:any): BrowserifyObject;
|
||||
transform(tr:Function, opts?:any): BrowserifyObject;
|
||||
plugin(plugin:string, opts?:any): BrowserifyObject;
|
||||
plugin(plugin:Function, opts?:any): BrowserifyObject;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/// <reference path="camel-case.d.ts" />
|
||||
|
||||
import camelCase = require('camel-case');
|
||||
|
||||
console.log(camelCase('string')); // => "string"
|
||||
console.log(camelCase('dot.case')); // => "dotCase"
|
||||
console.log(camelCase('PascalCase')); // => "pascalCase"
|
||||
console.log(camelCase('version 1.2.10')); // => "version1_2_10"
|
||||
|
||||
console.log(camelCase('STRING 1.2', 'tr')); // => "strıng1_2"
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// Type definitions for camel-case
|
||||
// Project: https://github.com/blakeembrey/camel-case
|
||||
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "camel-case" {
|
||||
function camelCase(string: string, locale?: string): string;
|
||||
export = camelCase;
|
||||
}
|
||||
Vendored
+1
@@ -44,6 +44,7 @@ interface Cheerio {
|
||||
// Traversing
|
||||
|
||||
find(selector: string): Cheerio;
|
||||
find(element: Cheerio): Cheerio;
|
||||
|
||||
parent(selector?: string): Cheerio;
|
||||
parents(selector?: string): Cheerio;
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/// <reference path='./connect-modrewrite.d.ts' />
|
||||
/// <reference path='../express/express.d.ts' />
|
||||
|
||||
import modRewrite = require('connect-modrewrite');
|
||||
import express = require('express');
|
||||
|
||||
var app = express();
|
||||
|
||||
app.use(modRewrite([
|
||||
'^/test$ /index.html',
|
||||
'^/test/\\d*$ /index.html [L]',
|
||||
'^/test/\\d*/\\d*$ /flag.html [L]',
|
||||
]));
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// Type definitions for connect-modrewrite
|
||||
// Project: https://github.com/tinganho/connect-modrewrite
|
||||
// Definitions by: Tingan Ho <https://github.com/tinganho/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
|
||||
declare module 'connect-modrewrite' {
|
||||
import express = require('express');
|
||||
function modrewrite(rewrites: string[]): express.RequestHandler;
|
||||
export = modrewrite;
|
||||
}
|
||||
Vendored
+1
-1
@@ -386,7 +386,7 @@ declare module d3 {
|
||||
/**
|
||||
* Returns the first non-null element in the selection, or null otherwise.
|
||||
*/
|
||||
node(): EventTarget;
|
||||
node(): Node;
|
||||
|
||||
/**
|
||||
* Returns the total number of elements in the selection.
|
||||
|
||||
Vendored
+1
-1
@@ -34,7 +34,7 @@ declare module deepDiff {
|
||||
}
|
||||
}
|
||||
|
||||
declare var diff: deepDiff.IDeepDiff;
|
||||
declare var DeepDiff: deepDiff.IDeepDiff;
|
||||
|
||||
declare module "deep-diff" {
|
||||
var diff: deepDiff.IDeepDiff;
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* Created by karl on 14/07/15.
|
||||
*/
|
||||
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
/// <reference path="./easy-api-request.d.ts" />
|
||||
|
||||
import express = require('express');
|
||||
import APIRequest = require('easy-api-request');
|
||||
|
||||
APIRequest.create({
|
||||
name: 'testAPI',
|
||||
config: {
|
||||
url: 'http://example.com'
|
||||
}
|
||||
});
|
||||
|
||||
var app = express();
|
||||
|
||||
app.get('/', function (req:any, res:express.Response) {
|
||||
var rMaker = <APIRequest.RequestMaker>req.testAPI;
|
||||
var r = rMaker();
|
||||
r.get('/', function (err, resp) {
|
||||
if(err) {
|
||||
console.error(err);
|
||||
}
|
||||
res.json(err || resp);
|
||||
});
|
||||
});
|
||||
|
||||
app.get('/', function (req:any, res:express.Response) {
|
||||
var rMaker = <APIRequest.RequestMaker>req.testAPI;
|
||||
var r = rMaker();
|
||||
r.get('/')
|
||||
.then(function (resp) {
|
||||
res.json(resp);
|
||||
})
|
||||
.catch(function (err){
|
||||
if(err) {
|
||||
console.error(err);
|
||||
}
|
||||
res.json(err);
|
||||
});
|
||||
});
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
// Type definitions for easy-api-request
|
||||
// Project: https://github.com/DeadAlready/easy-api-request
|
||||
// Definitions by: Karl Düüna <https://github.com/DeadAlready/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../q/Q.d.ts" />
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
/// <reference path="../request/request.d.ts" />
|
||||
/// <reference path="../bunyan/bunyan.d.ts" />
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
|
||||
declare module "easy-api-request" {
|
||||
import stream = require('stream');
|
||||
import http = require('http');
|
||||
import request = require('request');
|
||||
import bunyan = require('bunyan');
|
||||
import express = require('express');
|
||||
|
||||
export function create(opts: {
|
||||
name: any;
|
||||
config: {
|
||||
url: string;
|
||||
internal?: boolean;
|
||||
headers?: string[];
|
||||
cookies?: string[];
|
||||
replyCookies?: string[];
|
||||
jSend?: boolean;
|
||||
opts?: Object;
|
||||
};
|
||||
}): void;
|
||||
|
||||
import Q = require('q');
|
||||
interface Result {
|
||||
response: http.IncomingMessage;
|
||||
body: any;
|
||||
err?: any;
|
||||
data?: any;
|
||||
}
|
||||
class BaseRequest {
|
||||
protected base: request.Request;
|
||||
protected req: express.Request;
|
||||
protected log: bunyan.Logger;
|
||||
protected replyCookies: string[];
|
||||
protected jSend: boolean;
|
||||
constructor(opts: any);
|
||||
_parseOptions(args: IArguments, type: string): {
|
||||
opts: any;
|
||||
cb: any;
|
||||
};
|
||||
_do(args: IArguments, type?: string): any;
|
||||
_request(opts?: any, cb?:any): any;
|
||||
|
||||
get(url?: any, opts?: any, cb?: any): any;
|
||||
post(url?: any, opts?: any, cb?: any): any;
|
||||
patch(url?: any, opts?: any, cb?: any): any;
|
||||
del(url?: any, opts?: any, cb?: any): any;
|
||||
}
|
||||
|
||||
class StreamRequest extends BaseRequest {
|
||||
_request(opts: Object): stream.Stream;
|
||||
|
||||
get(url: string, params: Object): stream.Stream;
|
||||
get(opts: Object): stream.Stream;
|
||||
get(url: string): stream.Stream;
|
||||
|
||||
post(url: string, params: Object): stream.Stream;
|
||||
post(opts: Object): stream.Stream;
|
||||
post(url: string): stream.Stream;
|
||||
|
||||
patch(url: string, params: Object): stream.Stream;
|
||||
patch(opts: Object): stream.Stream;
|
||||
patch(url: string): stream.Stream;
|
||||
|
||||
del(url: string, params: Object): stream.Stream;
|
||||
del(opts: Object): stream.Stream;
|
||||
del(url: string): stream.Stream;
|
||||
}
|
||||
|
||||
class CBPromiseRequest extends BaseRequest {
|
||||
_request(opts: Object): stream.Stream;
|
||||
|
||||
get(url: string, params: Object, cb:(err?:any, resp?: Result) => void): void;
|
||||
get(url: string, cb:(err?:any, resp?: Result) => void): void;
|
||||
get(opts: Object, cb:(err?:any, resp?: Result) => void): void;
|
||||
get(url: string, params: Object): Q.Promise<Result>;
|
||||
get(opts: Object): Q.Promise<Result>;
|
||||
get(url: string): Q.Promise<Result>;
|
||||
|
||||
post(url: string, params: Object, cb:(err?:any, resp?: Result) => void): void;
|
||||
post(url: string, cb:(err?:any, resp?: Result) => void): void;
|
||||
post(opts: Object, cb:(err?:any, resp?: Result) => void): void;
|
||||
post(url: string, params: Object): Q.Promise<Result>;
|
||||
post(opts: Object): Q.Promise<Result>;
|
||||
post(url: string): Q.Promise<Result>;
|
||||
|
||||
patch(url: string, params: Object, cb:(err?:any, resp?: Result) => void): void;
|
||||
patch(url: string, cb:(err?:any, resp?: Result) => void): void;
|
||||
patch(opts: Object, cb:(err?:any, resp?: Result) => void): void;
|
||||
patch(url: string, params: Object): Q.Promise<Result>;
|
||||
patch(opts: Object): Q.Promise<Result>;
|
||||
patch(url: string): Q.Promise<Result>;
|
||||
|
||||
del(url: string, params: Object, cb:(err?:any, resp?: Result) => void): void;
|
||||
del(url: string, cb:(err?:any, resp?: Result) => void): void;
|
||||
del(opts: Object, cb:(err?:any, resp?: Result) => void): void;
|
||||
del(url: string, params: Object): Q.Promise<Result>;
|
||||
del(opts: Object): Q.Promise<Result>;
|
||||
del(url: string): Q.Promise<Result>;
|
||||
}
|
||||
|
||||
export interface RequestMaker {
|
||||
(): CBPromiseRequest;
|
||||
(stream: boolean): StreamRequest | CBPromiseRequest;
|
||||
}
|
||||
}
|
||||
Vendored
+2
-2
@@ -27,7 +27,7 @@ declare module Express {
|
||||
export interface Response {
|
||||
success (data?: any, status?: number): void;
|
||||
fail (data: any, status?: number): void;
|
||||
error (err: any): void;
|
||||
error (err: any, status?: number): void;
|
||||
partial? (data: PartialInput, status?: number): void;
|
||||
makePartial? (data: MakePartialInput): void;
|
||||
}
|
||||
@@ -35,4 +35,4 @@ declare module Express {
|
||||
|
||||
declare module "easy-jsend" {
|
||||
export function init(conf?:{partial:boolean}): void;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Created by karl on 14/07/15.
|
||||
*/
|
||||
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
/// <reference path="./easy-x-headers.d.ts" />
|
||||
|
||||
import express = require('express');
|
||||
import xHeaders = require('easy-x-headers');
|
||||
|
||||
var app = express();
|
||||
app.use(xHeaders.getMiddleware());
|
||||
|
||||
app.get('/', function (req, res) {
|
||||
res.json(req.info);
|
||||
});
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
// Type definitions for easy-x-headers
|
||||
// Project: https://github.com/DeadAlready/easy-x-headers
|
||||
// Definitions by: Karl Düüna <https://github.com/DeadAlready/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
|
||||
declare module Express {
|
||||
export interface Request {
|
||||
info: any;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "easy-x-headers" {
|
||||
import express = require('express');
|
||||
|
||||
export function getMiddleware(defaults?: Object): express.RequestHandler;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Created by karl on 14/07/15.
|
||||
*/
|
||||
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
/// <reference path="./easy-xapi-supertest.d.ts" />
|
||||
|
||||
import express = require('express');
|
||||
import eSupertest = require('easy-xapi-supertest');
|
||||
|
||||
var app = express();
|
||||
|
||||
var getAgent = eSupertest.getAgentFactory(app);
|
||||
|
||||
var agent = getAgent({
|
||||
user: 'Jack',
|
||||
role: 'user'
|
||||
});
|
||||
|
||||
var getAgent2 = eSupertest.getAgentFactory(app, function (user:string, role?:string) {
|
||||
return {
|
||||
user: user,
|
||||
role: role || 'user'
|
||||
}
|
||||
});
|
||||
|
||||
var agent = getAgent2('Jack');
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
// Type definitions for easy-x-headers
|
||||
// Project: https://github.com/DeadAlready/easy-x-headers
|
||||
// Definitions by: Karl Düüna <https://github.com/DeadAlready/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
|
||||
declare module "easy-xapi-supertest" {
|
||||
import express = require('express');
|
||||
|
||||
export interface BodyAgent {
|
||||
send(data: Object): any;
|
||||
attach(arg1: any, arg2?: any): any;
|
||||
}
|
||||
|
||||
export interface Agent {
|
||||
get(url:string): any;
|
||||
delete(url:string): any;
|
||||
post(url:string): BodyAgent;
|
||||
patch(url:string): BodyAgent;
|
||||
put(url:string): BodyAgent;
|
||||
}
|
||||
|
||||
interface getAgent {
|
||||
(...args:any[]): Agent
|
||||
}
|
||||
|
||||
export function getAgentFactory(app: express.Application, transform?: Function): getAgent;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Created by karl on 14/07/15.
|
||||
*/
|
||||
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
/// <reference path="./easy-xapi.d.ts" />
|
||||
|
||||
import express = require('express');
|
||||
import eXapi = require('easy-xapi');
|
||||
|
||||
eXapi.init({
|
||||
jSend: {
|
||||
partial: true
|
||||
}
|
||||
});
|
||||
|
||||
var xApi = eXapi.create({
|
||||
root: __dirname,
|
||||
log: {
|
||||
name: 'Log',
|
||||
level: 'info'
|
||||
},
|
||||
port: 3000,
|
||||
name: 'test',
|
||||
mount: function (app) {
|
||||
app.get('/', function (req, res) {
|
||||
res.send('ok');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
xApi.listen();
|
||||
Vendored
+47
@@ -0,0 +1,47 @@
|
||||
// Type definitions for easy-xapi
|
||||
// Project: https://github.com/DeadAlready/easy-xapi
|
||||
// Definitions by: Karl Düüna <https://github.com/DeadAlready/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
/// <reference path="../easy-jsend/easy-jsend.d.ts" />
|
||||
/// <reference path="../bunyan/bunyan.d.ts" />
|
||||
|
||||
declare module Express {
|
||||
export interface Request {
|
||||
log: any;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "easy-xapi" {
|
||||
import express = require('express');
|
||||
import http = require('http');
|
||||
import bunyan = require('bunyan');
|
||||
|
||||
interface InitConfig {
|
||||
jSend?: {partial: boolean};
|
||||
}
|
||||
|
||||
interface Config {
|
||||
root: string;
|
||||
port: number;
|
||||
name: string;
|
||||
xHeaderDefaults?: Object;
|
||||
log: {
|
||||
name: string;
|
||||
level: string
|
||||
}
|
||||
mount: (app: express.Application) => void
|
||||
}
|
||||
|
||||
interface Result {
|
||||
express: any;
|
||||
app: express.Application;
|
||||
server: http.Server;
|
||||
log: bunyan.Logger;
|
||||
listen: () => void;
|
||||
}
|
||||
|
||||
export function init(conf: InitConfig): void;
|
||||
export function create(conf: Config): Result;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
/// <reference path="git-config.d.ts" />
|
||||
|
||||
import gitConfig = require('git-config');
|
||||
|
||||
var config: Object = gitConfig.sync();
|
||||
console.log(JSON.stringify(config));
|
||||
|
||||
config = gitConfig.sync('gitconfig');
|
||||
console.log(JSON.stringify(config));
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
// Type definitions for git-config
|
||||
// Project: https://github.com/eugeneware/git-config
|
||||
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "git-config" {
|
||||
export function sync(gitFile?: string): Object; // Synchronous version.
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
[user]
|
||||
name = A Git User
|
||||
email = git.user@domain.xyz
|
||||
[push]
|
||||
default = simple
|
||||
Vendored
+5
-5
@@ -85,8 +85,8 @@ interface I18nextStatic {
|
||||
toLanguages(language: string): string[];
|
||||
regexEscape(str: string): string;
|
||||
};
|
||||
init(callback?: (t: (key: string, options?: any) => string) => void ): JQueryDeferred<any>;
|
||||
init(options?: I18nextOptions, callback?: (t: (key: string, options?: any) => string) => void ): JQueryDeferred<any>;
|
||||
init(callback?: (err: any, t: (key: string, options?: any) => string) => void ): JQueryDeferred<any>;
|
||||
init(options?: I18nextOptions, callback?: (err: any, t: (key: string, options?: any) => string) => void ): JQueryDeferred<any>;
|
||||
lng(): string;
|
||||
loadNamespace(namespace: string, callback?: () => void ): void;
|
||||
loadNamespaces(namespaces: string[], callback?: () => void ): void;
|
||||
@@ -100,10 +100,10 @@ interface I18nextStatic {
|
||||
rules: any;
|
||||
setCurrentLng: (language: string) => void;
|
||||
};
|
||||
preload(language: string, callback?: (t: (key: string, options?: any) => string) => void ): void;
|
||||
preload(languages: string[], callback?: (t: (key: string, options?: any) => string) => void ): void;
|
||||
preload(language: string, callback?: (err: any, t: (key: string, options?: any) => string) => void ): void;
|
||||
preload(languages: string[], callback?: (err: any, t: (key: string, options?: any) => string) => void ): void;
|
||||
setDefaultNamespace(namespace: string): void;
|
||||
setLng(language: string, callback?: (t: (key: string, options?: any) => string) => void ): void;
|
||||
setLng(language: string, callback?: (err: any, t: (key: string, options?: any) => string) => void ): void;
|
||||
sync: {
|
||||
load: (languages: string[], options: I18nextOptions, callback: (err: Error, store: IResourceStore) => void ) => void;
|
||||
postMissing: (language: string, namespace: string, key: string, defaultValue: any, languages: string[]) => void;
|
||||
|
||||
Vendored
+1
@@ -107,6 +107,7 @@ declare module jasmine {
|
||||
uninstall(): void;
|
||||
/** Calls to any registered callback are triggered when the clock is ticked forward via the jasmine.clock().tick function, which takes a number of milliseconds. */
|
||||
tick(ms: number): void;
|
||||
mockDate(date?: Date): void;
|
||||
}
|
||||
|
||||
interface CustomEqualityTester {
|
||||
|
||||
@@ -47,5 +47,4 @@ jsdom.env({
|
||||
}
|
||||
});
|
||||
|
||||
var window: Window = jsdom.jsdom("<div>foobar</div>").parentWindow;
|
||||
var document: Document = jsdom.jsdom("<html></html>");
|
||||
var document: Document = jsdom.jsdom("<html></html>");
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
/// <reference path="kue.d.ts" />
|
||||
|
||||
import kue = require('kue');
|
||||
|
||||
// create our job queue
|
||||
|
||||
var jobs = kue.createQueue();
|
||||
|
||||
// start redis with $ redis-server
|
||||
|
||||
// create some jobs at random,
|
||||
// usually you would create these
|
||||
// in your http processes upon
|
||||
// user input etc.
|
||||
|
||||
function create() {
|
||||
var name = [ 'tobi', 'loki', 'jane', 'manny' ][ Math.random() * 4 | 0 ];
|
||||
var job = jobs.create( 'video conversion', {
|
||||
title: 'converting ' + name + '\'s to avi', user: 1, frames: 200
|
||||
});
|
||||
|
||||
job.on('complete', function() {
|
||||
console.log(" Job complete");
|
||||
}).on('failed', function() {
|
||||
console.log(" Job failed");
|
||||
}).on('progress', function(progress: number) {
|
||||
process.stdout.write('\r job #' + job.id + ' ' + progress + '% complete');
|
||||
});
|
||||
|
||||
job.save();
|
||||
|
||||
setTimeout( create, Math.random() * 2000 | 0 );
|
||||
}
|
||||
|
||||
create();
|
||||
|
||||
// process video conversion jobs, 1 at a time.
|
||||
|
||||
jobs.process('video conversion', 1, function(job: kue.Job, done: Function) {
|
||||
var frames: number = job.data.frames;
|
||||
|
||||
function next(i: number) {
|
||||
// pretend we are doing some work
|
||||
convertFrame(i, function(err: Error) {
|
||||
if (err) return done(err);
|
||||
// report progress, i/frames complete
|
||||
job.progress(i, frames);
|
||||
if (i >= frames) done();
|
||||
else next(i + Math.random() * 10);
|
||||
} );
|
||||
}
|
||||
|
||||
next(0);
|
||||
} );
|
||||
|
||||
function convertFrame(i: number, fn: Function) {
|
||||
setTimeout(fn, Math.random() * 50);
|
||||
}
|
||||
|
||||
// one minute
|
||||
|
||||
var minute = 60000;
|
||||
|
||||
var email = jobs.create('email', {
|
||||
title: 'Account renewal required', to: 'tj@learnboost.com', template: 'renewal-email'
|
||||
}).delay(minute)
|
||||
.priority('high')
|
||||
.save();
|
||||
|
||||
|
||||
email.on('promotion', function() {
|
||||
console.log('renewal job promoted');
|
||||
} );
|
||||
|
||||
email.on('complete', function() {
|
||||
console.log('renewal job completed' );
|
||||
} );
|
||||
|
||||
jobs.create('email', {
|
||||
title: 'Account expired', to: 'tj@learnboost.com', template: 'expired-email'
|
||||
} ).delay( minute * 10 )
|
||||
.priority('high')
|
||||
.save();
|
||||
|
||||
jobs.promote();
|
||||
|
||||
jobs.process('email', 10, function(job: kue.Job, done: Function) {
|
||||
setTimeout(function() {
|
||||
done();
|
||||
}, Math.random() * 5000);
|
||||
});
|
||||
|
||||
// start the UI
|
||||
kue.app.listen(3000);
|
||||
console.log('UI started on port 3000');
|
||||
Vendored
+149
@@ -0,0 +1,149 @@
|
||||
// Type definitions for kue 0.9.x
|
||||
// Project: https://github.com/Automattic/kue
|
||||
// Definitions by: Nicholas Penree <http://github.com/drudge>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
/// <reference path="../redis/redis.d.ts" />
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
|
||||
declare module "kue" {
|
||||
import events = require('events');
|
||||
import express = require('express');
|
||||
import redis = require('redis');
|
||||
|
||||
export class Queue extends events.EventEmitter {
|
||||
name: string;
|
||||
id: string;
|
||||
promoter: any;
|
||||
workers: Worker[];
|
||||
shuttingDown: boolean;
|
||||
client: redis.RedisClient;
|
||||
testMode: TestMode;
|
||||
|
||||
static singleton: Queue;
|
||||
|
||||
constructor(options: Object);
|
||||
create(type: string, data: Object): Job;
|
||||
createJob(type: string, data: Object): Job;
|
||||
promote(ms?: number): void;
|
||||
setupTimer(): void;
|
||||
checkJobPromotion(ms: number): void;
|
||||
checkActiveJobTtl(ttlOptions: Object): void;
|
||||
watchStuckJobs(ms: number): void;
|
||||
setting(name: string, fn: Function): Queue;
|
||||
process(type: string, n?: number, fn?: Function): void;
|
||||
shutdown(timeout: number, type: string, fn: Function): Queue;
|
||||
types(fn: Function): Queue;
|
||||
state(string: string, fn: Function): Queue;
|
||||
workTime(fn: Function): Queue;
|
||||
cardByType(type: string, state: string, fn: Function): Queue;
|
||||
card(state: string, fn: Function): Queue;
|
||||
complete(fn: Function): Queue;
|
||||
failed(fn: Function): Queue;
|
||||
inactive(fn: Function): Queue;
|
||||
active(fn: Function): Queue;
|
||||
delayed(fn: Function): Queue;
|
||||
completeCount(type: string, fn: Function): Queue;
|
||||
failedCount(type: string, fn: Function): Queue;
|
||||
inactiveCount(type: string, fn: Function): Queue;
|
||||
activeCount(type: string, fn: Function): Queue;
|
||||
delayedCount(type: string, fn: Function): Queue;
|
||||
}
|
||||
|
||||
interface Priorities {
|
||||
low: number;
|
||||
normal: number;
|
||||
medium: number;
|
||||
high: number;
|
||||
critical: number;
|
||||
}
|
||||
|
||||
export class Job extends events.EventEmitter {
|
||||
public id: number;
|
||||
public type: string;
|
||||
public data: any;
|
||||
public client: redis.RedisClient;
|
||||
private _max_attempts;
|
||||
|
||||
static priorities: Priorities;
|
||||
static disableSearch: boolean;
|
||||
static jobEvents: boolean;
|
||||
static get(id: number, fn: Function): void;
|
||||
static remove(id: number, fn?: Function): void;
|
||||
static removeBadJob(id: number): void;
|
||||
static log(id: number, fn: Function): void;
|
||||
static range(from: number, to: number, order: string, fn: Function): void;
|
||||
static rangeByState(state: string, from: number, to: number, order: string, fn: Function): void;
|
||||
static rangeByType(type: string, state: string, from: number, to: number, order: string, fn: Function): void;
|
||||
|
||||
constructor(type: string, data?: any);
|
||||
toJSON(): Object;
|
||||
log(str: string): Job;
|
||||
set(key: string, val: string, fn?: Function): Job;
|
||||
get(key: string, fn?: Function): Job;
|
||||
progress(complete: number, total: number, data?: any): Job;
|
||||
delay(ms:number|Date): Job;
|
||||
removeOnComplete(param: any): void;
|
||||
backoff(param: any): void;
|
||||
ttl(param: any): void;
|
||||
private _getBackoffImpl(): void;
|
||||
priority(level: string|number): Job;
|
||||
attempt(fn: Function): Job;
|
||||
reattempt(attempt: number, fn?: Function): void;
|
||||
attempts(n: number): Job;
|
||||
searchKeys(keys: string[]|string): Job;
|
||||
remove(fn?: Function): Job;
|
||||
state(state: string, fn?: Function): Job;
|
||||
error(err: Error): Job;
|
||||
complete(fn?: Function): Job;
|
||||
failed(fn?: Function): Job;
|
||||
inactive(fn?: Function): Job;
|
||||
active(fn?: Function): Job;
|
||||
delayed(fn?: Function): Job;
|
||||
save(fn?: Function): Job;
|
||||
update(fn?: Function): Job;
|
||||
subscribe(fn?: Function): Job;
|
||||
}
|
||||
|
||||
class Worker extends events.EventEmitter {
|
||||
queue: Queue;
|
||||
type: string;
|
||||
client: redis.RedisClient;
|
||||
job: Job;
|
||||
|
||||
constructor(queue: Queue, type: string);
|
||||
start(fn: Function): Worker;
|
||||
error(err: Error, job: Job): Worker;
|
||||
failed(job: Job, theErr: Object, fn?: Function): Worker;
|
||||
process(job: Job, fn: Function): Worker;
|
||||
private zpop(key: string, fn: Function): void;
|
||||
private getJob(fn: Function): void;
|
||||
idle(): Worker;
|
||||
shutdown(timeout: number, fn: Function): void;
|
||||
emitJobEvent(event: Object, job: Job, arg1: any, arg2: any): void;
|
||||
resume(): boolean;
|
||||
}
|
||||
|
||||
interface Redis {
|
||||
configureFactory(options: Object, queue: Queue): void;
|
||||
createClient(): redis.RedisClient;
|
||||
createClientFactory(options: Object): redis.RedisClient;
|
||||
client(): redis.RedisClient;
|
||||
pubsubClient(): redis.RedisClient;
|
||||
reset(): void;
|
||||
}
|
||||
|
||||
interface TestMode {
|
||||
jobs: Job[];
|
||||
enter(): void;
|
||||
exit(): void;
|
||||
clear(): void;
|
||||
}
|
||||
|
||||
export var app: express.Application;
|
||||
export var redis: Redis;
|
||||
export var workers: Worker[];
|
||||
|
||||
export function createQueue(options?: Object): Queue;
|
||||
}
|
||||
+26
-1
@@ -1020,6 +1020,9 @@ result = <boolean>_.isUndefined(void 0);
|
||||
result = <string[]>_.keys({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
result = <string[]>_({ 'one': 1, 'two': 2, 'three': 3 }).keys().value();
|
||||
|
||||
result = <string[]>_.keysIn({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
result = <string[]>_({ 'one': 1, 'two': 2, 'three': 3 }).keysIn().value();
|
||||
|
||||
var mergeNames = {
|
||||
'stooges': [
|
||||
{ 'name': 'moe' },
|
||||
@@ -1091,7 +1094,29 @@ result = <{ a: number; b: number; c: number; }>_.transform(<{ [index: string]: n
|
||||
r[key] = num * 3;
|
||||
});
|
||||
|
||||
result = <number[]>_.values({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
// _.values
|
||||
class TestValues {
|
||||
public a = 1;
|
||||
public b = 2;
|
||||
public c: string;
|
||||
}
|
||||
TestValues.prototype.c = 'a';
|
||||
result = <number[]>_.values<number>(new TestValues());
|
||||
// → [1, 2] (iteration order is not guaranteed)
|
||||
result = <number[]>_(new TestValues()).values<number>().value();
|
||||
// → [1, 2] (iteration order is not guaranteed)
|
||||
|
||||
// _.valueIn
|
||||
class TestValueIn {
|
||||
public a = 1;
|
||||
public b = 2;
|
||||
public c: number;
|
||||
}
|
||||
TestValueIn.prototype.c = 3;
|
||||
result = <number[]>_.valuesIn<number>(new TestValueIn());
|
||||
// → [1, 2, 3]
|
||||
result = <number[]>_(new TestValueIn()).valuesIn<number>().value();
|
||||
// → [1, 2, 3]
|
||||
|
||||
/**********
|
||||
* Utilities *
|
||||
|
||||
Vendored
+44
-3
@@ -6017,6 +6017,23 @@ declare module _ {
|
||||
keys(): LoDashArrayWrapper<string>
|
||||
}
|
||||
|
||||
//_.keysIn
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates an array of the own and inherited enumerable property names of object.
|
||||
* @param object The object to query.
|
||||
* @return An array of property names.
|
||||
**/
|
||||
keysIn(object?: any): string[];
|
||||
}
|
||||
|
||||
interface LoDashObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.keysIn
|
||||
**/
|
||||
keysIn(): LoDashArrayWrapper<string>
|
||||
}
|
||||
|
||||
//_.mapValues
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
@@ -6298,11 +6315,35 @@ declare module _ {
|
||||
//_.values
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates an array composed of the own enumerable property values of object.
|
||||
* @param object The object to inspect.
|
||||
* Creates an array of the own enumerable property values of object.
|
||||
* @param object The object to query.
|
||||
* @return Returns an array of property values.
|
||||
**/
|
||||
values(object?: any): any[];
|
||||
values<T>(object?: any): T[];
|
||||
}
|
||||
|
||||
interface LoDashObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.values
|
||||
**/
|
||||
values<TResult>(): LoDashObjectWrapper<TResult[]>;
|
||||
}
|
||||
|
||||
//_.valuesIn
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates an array of the own and inherited enumerable property values of object.
|
||||
* @param object The object to query.
|
||||
* @return Returns the array of property values.
|
||||
**/
|
||||
valuesIn<T>(object?: any): T[];
|
||||
}
|
||||
|
||||
interface LoDashObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.valuesIn
|
||||
**/
|
||||
valuesIn<TResult>(): LoDashObjectWrapper<TResult[]>;
|
||||
}
|
||||
|
||||
/**********
|
||||
|
||||
@@ -75,7 +75,8 @@ function test() {
|
||||
];
|
||||
}
|
||||
|
||||
function testPath() {
|
||||
function testPath() {
|
||||
makerjs.path.breakAtPoint(paths.arc, [0,0]).type;
|
||||
makerjs.path.intersection(paths.circle, paths.arc).intersectionPoints;
|
||||
makerjs.path.mirror(paths.arc, true, true);
|
||||
makerjs.path.moveRelative(paths.circle, [0,0]);
|
||||
|
||||
Vendored
+13
-5
@@ -94,10 +94,6 @@ declare module MakerJs {
|
||||
* The main point of reference for this path.
|
||||
*/
|
||||
origin: IPoint;
|
||||
/**
|
||||
* Optional CSS style properties to be emitted into SVG. Useful for creating guidelines and debugging your model.
|
||||
*/
|
||||
cssStyle?: string;
|
||||
}
|
||||
/**
|
||||
* Test to see if an object implements the required properties of a path.
|
||||
@@ -425,6 +421,18 @@ declare module MakerJs.path {
|
||||
*/
|
||||
function scale(pathToScale: IPath, scaleValue: number): IPath;
|
||||
}
|
||||
declare module MakerJs.path {
|
||||
/**
|
||||
* Breaks a path in two. The supplied path will end at the supplied pointOfBreak,
|
||||
* a new path is returned which begins at the pointOfBreak and ends at the supplied path's initial end point.
|
||||
* For Circle, the original path will be converted in place to an Arc, and null is returned.
|
||||
*
|
||||
* @param pathToBreak The path to break.
|
||||
* @param pointOfBreak The point at which to break the path.
|
||||
* @returns A new path of the same type, when path type is line or arc. Returns null for circle.
|
||||
*/
|
||||
function breakAtPoint(pathToBreak: IPath, pointOfBreak: IPoint): IPath;
|
||||
}
|
||||
declare module MakerJs.paths {
|
||||
/**
|
||||
* Class for arc path.
|
||||
@@ -661,7 +669,7 @@ declare module MakerJs.path {
|
||||
*
|
||||
* @param path1 First path to find intersection.
|
||||
* @param path2 Second path to find intersection.
|
||||
* @result IPathIntersection object, with points(s) of intersection (and angles, when a path is an arc or circle); or null if the paths did not intersect.
|
||||
* @returns IPathIntersection object, with points(s) of intersection (and angles, when a path is an arc or circle); or null if the paths did not intersect.
|
||||
*/
|
||||
function intersection(path1: IPath, path2: IPath): IPathIntersection;
|
||||
}
|
||||
|
||||
@@ -196,10 +196,17 @@ moment.isMoment();
|
||||
moment.isMoment(new Date());
|
||||
moment.isMoment(moment());
|
||||
|
||||
moment.isDate(new Date());
|
||||
moment.isDate(/regexp/);
|
||||
|
||||
moment.isDuration();
|
||||
moment.isDuration(new Date());
|
||||
moment.isDuration(moment.duration());
|
||||
|
||||
moment().isBetween(moment(), moment());
|
||||
moment().isBetween(new Date(), new Date());
|
||||
moment().isBetween([1,1,2000], [1,1,2001], "year");
|
||||
|
||||
moment.localeData('fr');
|
||||
moment(1316116057189).fromNow();
|
||||
|
||||
|
||||
Vendored
+10
-45
@@ -69,6 +69,7 @@ declare module moment {
|
||||
subtract(d: Duration): Duration;
|
||||
|
||||
toISOString(): string;
|
||||
toJSON(): string;
|
||||
|
||||
}
|
||||
|
||||
@@ -215,11 +216,8 @@ declare module moment {
|
||||
dayOfYear(): number;
|
||||
dayOfYear(d: number): Moment;
|
||||
|
||||
from(f: Moment): string;
|
||||
from(f: Moment, suffix: boolean): string;
|
||||
from(d: Date): string;
|
||||
from(s: string): string;
|
||||
from(date: number[]): string;
|
||||
from(f: Moment|string|number|Date|number[], suffix?: boolean): string;
|
||||
to(f: Moment|string|number|Date|number[], suffix?: boolean): string;
|
||||
|
||||
diff(b: Moment): number;
|
||||
diff(b: Moment, unitOfTime: string): number;
|
||||
@@ -242,39 +240,13 @@ declare module moment {
|
||||
isDST(): boolean;
|
||||
|
||||
isBefore(): boolean;
|
||||
isBefore(b: Moment): boolean;
|
||||
isBefore(b: string): boolean;
|
||||
isBefore(b: Number): boolean;
|
||||
isBefore(b: Date): boolean;
|
||||
isBefore(b: number[]): boolean;
|
||||
isBefore(b: Moment, granularity: string): boolean;
|
||||
isBefore(b: String, granularity: string): boolean;
|
||||
isBefore(b: Number, granularity: string): boolean;
|
||||
isBefore(b: Date, granularity: string): boolean;
|
||||
isBefore(b: number[], granularity: string): boolean;
|
||||
isBefore(b: Moment|string|number|Date|number[], granularity?: string): boolean;
|
||||
|
||||
isAfter(): boolean;
|
||||
isAfter(b: Moment): boolean;
|
||||
isAfter(b: string): boolean;
|
||||
isAfter(b: Number): boolean;
|
||||
isAfter(b: Date): boolean;
|
||||
isAfter(b: number[]): boolean;
|
||||
isAfter(b: Moment, granularity: string): boolean;
|
||||
isAfter(b: String, granularity: string): boolean;
|
||||
isAfter(b: Number, granularity: string): boolean;
|
||||
isAfter(b: Date, granularity: string): boolean;
|
||||
isAfter(b: number[], granularity: string): boolean;
|
||||
isAfter(b: Moment|string|number|Date|number[], granularity?: string): boolean;
|
||||
|
||||
isSame(b: Moment): boolean;
|
||||
isSame(b: string): boolean;
|
||||
isSame(b: Number): boolean;
|
||||
isSame(b: Date): boolean;
|
||||
isSame(b: number[]): boolean;
|
||||
isSame(b: Moment, granularity: string): boolean;
|
||||
isSame(b: String, granularity: string): boolean;
|
||||
isSame(b: Number, granularity: string): boolean;
|
||||
isSame(b: Date, granularity: string): boolean;
|
||||
isSame(b: number[], granularity: string): boolean;
|
||||
isSame(b: Moment|string|number|Date|number[], granularity?: string): boolean;
|
||||
isBetween(a: Moment|string|number|Date|number[], b: Moment|string|number|Date|number[], granularity?: string): boolean;
|
||||
|
||||
// Deprecated as of 2.8.0.
|
||||
lang(language: string): Moment;
|
||||
@@ -290,20 +262,12 @@ declare module moment {
|
||||
localeData(): MomentLanguage;
|
||||
|
||||
// Deprecated as of 2.7.0.
|
||||
max(date: Date): Moment;
|
||||
max(date: number): Moment;
|
||||
max(date: any[]): Moment;
|
||||
max(date: string): Moment;
|
||||
max(date: Moment|string|number|Date|any[]): Moment;
|
||||
max(date: string, format: string): Moment;
|
||||
max(clone: Moment): Moment;
|
||||
|
||||
// Deprecated as of 2.7.0.
|
||||
min(date: Date): Moment;
|
||||
min(date: number): Moment;
|
||||
min(date: any[]): Moment;
|
||||
min(date: string): Moment;
|
||||
min(date: Moment|string|number|Date|any[]): Moment;
|
||||
min(date: string, format: string): Moment;
|
||||
min(clone: Moment): Moment;
|
||||
|
||||
get(unit: string): number;
|
||||
set(unit: string, value: number): Moment;
|
||||
@@ -412,6 +376,7 @@ declare module moment {
|
||||
invalid(parsingFlags?: Object): Moment;
|
||||
isMoment(): boolean;
|
||||
isMoment(m: any): boolean;
|
||||
isDate(m: any): boolean;
|
||||
isDuration(): boolean;
|
||||
isDuration(d: any): boolean;
|
||||
|
||||
|
||||
@@ -196,10 +196,17 @@ moment.isMoment();
|
||||
moment.isMoment(new Date());
|
||||
moment.isMoment(moment());
|
||||
|
||||
moment.isDate(new Date());
|
||||
moment.isDate(/regexp/);
|
||||
|
||||
moment.isDuration();
|
||||
moment.isDuration(new Date());
|
||||
moment.isDuration(moment.duration());
|
||||
|
||||
moment().isBetween(moment(), moment());
|
||||
moment().isBetween(new Date(), new Date());
|
||||
moment().isBetween([1,1,2000], [1,1,2001], "year");
|
||||
|
||||
moment.localeData('fr');
|
||||
moment(1316116057189).fromNow();
|
||||
|
||||
@@ -228,6 +235,8 @@ moment.duration(500).seconds();
|
||||
moment.duration(500).asSeconds();
|
||||
moment.duration().minutes();
|
||||
moment.duration().asMinutes();
|
||||
moment.duration().toISOString();
|
||||
moment.duration().toJSON();
|
||||
|
||||
var adur = moment.duration(3, 'd');
|
||||
var bdur = moment.duration(2, 'd');
|
||||
|
||||
Vendored
+30
-26
@@ -5,31 +5,34 @@
|
||||
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
|
||||
|
||||
declare module Express {
|
||||
export interface Request {
|
||||
files: {
|
||||
[fieldname: string]: {
|
||||
/** Field name specified in the form */
|
||||
fieldname: string;
|
||||
/** Name of the file on the user's computer */
|
||||
originalname: string;
|
||||
/** Renamed file name */
|
||||
name: string;
|
||||
/** Encoding type of the file */
|
||||
encoding: string;
|
||||
/** Mime type of the file */
|
||||
mimetype: string;
|
||||
/** Location of the uploaded file */
|
||||
path: string;
|
||||
/** Extension of the file */
|
||||
extension: string;
|
||||
/** Size of the file in bytes */
|
||||
size: number;
|
||||
/** If the file was truncated due to size limitation */
|
||||
truncated: boolean;
|
||||
/** Raw data (is null unless the inMemory option is true) */
|
||||
buffer: Buffer;
|
||||
}
|
||||
[fieldname: string]: Multer.File
|
||||
}
|
||||
}
|
||||
|
||||
module Multer {
|
||||
export interface File {
|
||||
/** Field name specified in the form */
|
||||
fieldname: string;
|
||||
/** Name of the file on the user's computer */
|
||||
originalname: string;
|
||||
/** Encoding type of the file */
|
||||
encoding: string;
|
||||
/** Mime type of the file */
|
||||
mimetype: string;
|
||||
/** Size of the file in bytes */
|
||||
size: number;
|
||||
/** The folder to which the file has been saved (DiskStorage) */
|
||||
destination: string;
|
||||
/** The name of the file within the destination (DiskStorage) */
|
||||
filename: string;
|
||||
/** Location of the uploaded file (DiskStorage) */
|
||||
path: string;
|
||||
/** A Buffer of the entire file (MemoryStorage) */
|
||||
buffer: Buffer;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,6 +43,7 @@ declare module "multer" {
|
||||
function multer(options?: multer.Options): express.RequestHandler;
|
||||
|
||||
module multer {
|
||||
|
||||
type Options = {
|
||||
/** The destination directory for the uploaded files. */
|
||||
dest?: string;
|
||||
@@ -69,11 +73,11 @@ declare module "multer" {
|
||||
/** Function to rename the directory in which to place uploaded files. The dest parameter is the default value originally assigned or passed into multer. The req and res parameters are also passed into the function because they may contain information (eg session data) needed to create the path (eg get userid from the session). */
|
||||
changeDest?: (dest: string, req: Express.Request, res: Express.Response) => string;
|
||||
/** Event handler triggered when a file starts to be uploaded. A file object, with the following properties, is available to this function: fieldname, originalname, name, encoding, mimetype, path, and extension. */
|
||||
onFileUploadStart?: (file: string, req: Express.Request, res: Express.Response) => void;
|
||||
onFileUploadStart?: (file: Express.Multer.File, req: Express.Request, res: Express.Response) => void;
|
||||
/** Event handler triggered when a chunk of buffer is received. A buffer object along with a file object is available to the function. */
|
||||
onFileUploadData?: (file: string, data: Buffer, req: Express.Request, res: Express.Response) => void;
|
||||
onFileUploadData?: (file: Express.Multer.File, data: Buffer, req: Express.Request, res: Express.Response) => void;
|
||||
/** Event handler trigger when a file is completely uploaded. A file object is available to the function. */
|
||||
onFileUploadComplete?: (file: string, req: Express.Request, res: Express.Response) => void;
|
||||
onFileUploadComplete?: (file: Express.Multer.File, req: Express.Request, res: Express.Response) => void;
|
||||
/** Event handler triggered when the form parsing starts. */
|
||||
onParseStart?: () => void;
|
||||
/** Event handler triggered when the form parsing completes. The request object and the next objects are are passed to the function. */
|
||||
@@ -81,7 +85,7 @@ declare module "multer" {
|
||||
/** Event handler for any errors encountering while processing the form. The error object and the next object is available to the function. If you are handling errors yourself, make sure to terminate the request or call the next() function, else the request will be left hanging. */
|
||||
onError?: () => void;
|
||||
/** Event handler triggered when a file size exceeds the specification in the limit object. No more files will be parsed after the limit is reached. */
|
||||
onFileSizeLimit?: (file: string) => void;
|
||||
onFileSizeLimit?: (file: Express.Multer.File) => void;
|
||||
/** Event handler triggered when the number of files exceed the specification in the limit object. No more files will be parsed after the limit is reached. */
|
||||
onFilesLimit?: () => void;
|
||||
/** Event handler triggered when the number of fields exceed the specification in the limit object. No more fields will be parsed after the limit is reached. */
|
||||
|
||||
+136
-115
@@ -1,117 +1,138 @@
|
||||
/// <reference path="navigation.d.ts" />
|
||||
|
||||
// History Manager
|
||||
class LogHistoryManager extends Navigation.HashHistoryManager {
|
||||
addHistory(state: Navigation.State, url: string) {
|
||||
console.log('add history');
|
||||
super.addHistory(state, url);
|
||||
}
|
||||
}
|
||||
|
||||
// State Router
|
||||
class LogStateRouter extends Navigation.StateRouter {
|
||||
getData(route: string): { state: Navigation.State; data: any } {
|
||||
console.log('get data');
|
||||
return super.getData(route);
|
||||
}
|
||||
}
|
||||
|
||||
// Settings
|
||||
Navigation.settings.router = new LogStateRouter();
|
||||
Navigation.settings.historyManager = new LogHistoryManager();
|
||||
Navigation.settings.stateIdKey = 'state';
|
||||
|
||||
// Configuration
|
||||
Navigation.StateInfoConfig.build([
|
||||
{ key: 'home', initial: 'page', states: [
|
||||
{ key: 'page', route: '' }
|
||||
]},
|
||||
{ key: 'person', initial: 'list', states: [
|
||||
{ key: 'list', route: 'people/{page}', transitions: [
|
||||
{ key: 'select', to: 'details' }
|
||||
], defaults: { page: 1 }, trackCrumbTrail: false },
|
||||
{ key: 'details', route: 'person/{id}', defaultTypes: { id: 'number' } }
|
||||
]}
|
||||
]);
|
||||
|
||||
// StateInfo
|
||||
var dialogs = Navigation.StateInfoConfig.dialogs;
|
||||
var home = dialogs['home'];
|
||||
var homePage = home.states['page'];
|
||||
var homeKey = home.key;
|
||||
var homePageKey = homePage.key;
|
||||
homePage = home.initial;
|
||||
var person = dialogs['person'];
|
||||
var personList = person.states['list'];
|
||||
var personDetails = person.states['details'];
|
||||
var personListSelect = personList.transitions['select'];
|
||||
personList = personListSelect.parent;
|
||||
personDetails = personListSelect.to;
|
||||
var pageDefault = personList.defaults.page;
|
||||
var idDefaultType = personDetails.defaultTypes.id;
|
||||
|
||||
// StateNavigator
|
||||
personList.dispose = () => {};
|
||||
personList.navigating = (data, url, navigate) => {
|
||||
navigate();
|
||||
};
|
||||
personList.navigated = (data) => {};
|
||||
|
||||
// State Handler
|
||||
class LogStateHandler extends Navigation.StateHandler {
|
||||
getNavigationData(state: Navigation.State, url: string): any {
|
||||
console.log('get navigation data');
|
||||
super.getNavigationData(state, url);
|
||||
}
|
||||
}
|
||||
homePage.stateHandler = new LogStateHandler();
|
||||
personList.stateHandler = new LogStateHandler();
|
||||
personDetails.stateHandler = new LogStateHandler();
|
||||
|
||||
// Navigation Event
|
||||
var navigationListener =
|
||||
(oldState: Navigation.State, state: Navigation.State, data: any) => {
|
||||
Navigation.StateController.offNavigate(navigationListener);
|
||||
};
|
||||
Navigation.StateController.onNavigate(navigationListener);
|
||||
|
||||
// Navigation
|
||||
Navigation.start('home');
|
||||
Navigation.StateController.navigate('person');
|
||||
Navigation.StateController.refresh();
|
||||
Navigation.StateController.refresh({ page: 2 });
|
||||
Navigation.StateController.navigate('select', { id: 10 });
|
||||
var canGoBack: boolean = Navigation.StateController.canNavigateBack(1);
|
||||
Navigation.StateController.navigateBack(1);
|
||||
|
||||
// Navigation Link
|
||||
var link = Navigation.StateController.getNavigationLink('person');
|
||||
link = Navigation.StateController.getRefreshLink();
|
||||
link = Navigation.StateController.getRefreshLink({ page: 2 });
|
||||
link = Navigation.StateController.getNavigationLink('select', { id: 10 });
|
||||
var nextDialog = Navigation.StateController.getNextState('select').parent;
|
||||
person = nextDialog;
|
||||
Navigation.StateController.navigateLink(link);
|
||||
link = Navigation.StateController.getNavigationBackLink(1);
|
||||
var crumb = Navigation.StateController.crumbs[0];
|
||||
link = crumb.navigationLink;
|
||||
|
||||
// StateContext
|
||||
Navigation.StateController.navigate('home');
|
||||
Navigation.StateController.navigate('person');
|
||||
home = Navigation.StateContext.previousDialog;
|
||||
homePage = Navigation.StateContext.previousState;
|
||||
person === Navigation.StateContext.dialog;
|
||||
personList === Navigation.StateContext.state;
|
||||
var url: string = Navigation.StateContext.url;
|
||||
var page: number = Navigation.StateContext.data.page;
|
||||
|
||||
// Navigation Data
|
||||
Navigation.StateController.refresh({ page: 2 });
|
||||
var data = Navigation.StateContext.includeCurrentData({ sort: 'name' }, ['page']);
|
||||
Navigation.StateController.refresh(data);
|
||||
Navigation.StateContext.clear('sort');
|
||||
var data = Navigation.StateContext.includeCurrentData({ pageSize: 10 });
|
||||
Navigation.StateController.refresh(data);
|
||||
Navigation.StateContext.clear();
|
||||
Navigation.StateController.refresh();
|
||||
module NavigationTests {
|
||||
// History Manager
|
||||
class LogHistoryManager extends Navigation.HashHistoryManager {
|
||||
addHistory(state: Navigation.State, url: string) {
|
||||
console.log('add history');
|
||||
super.addHistory(state, url);
|
||||
}
|
||||
}
|
||||
|
||||
// Crumb Trail Persister
|
||||
class LogCrumbTrailPersister extends Navigation.CrumbTrailPersister {
|
||||
load(crumbTrail: string): string {
|
||||
console.log('load');
|
||||
return crumbTrail;
|
||||
}
|
||||
|
||||
save(crumbTrail: string): string {
|
||||
console.log('save');
|
||||
return crumbTrail;
|
||||
}
|
||||
}
|
||||
|
||||
// State Router
|
||||
class LogStateRouter extends Navigation.StateRouter {
|
||||
getData(route: string): { state: Navigation.State; data: any } {
|
||||
console.log('get data');
|
||||
return super.getData(route);
|
||||
}
|
||||
}
|
||||
|
||||
// Settings
|
||||
Navigation.settings.router = new LogStateRouter();
|
||||
Navigation.settings.historyManager = new LogHistoryManager();
|
||||
Navigation.settings.crumbTrailPersister = new LogCrumbTrailPersister();
|
||||
Navigation.settings.stateIdKey = 'state';
|
||||
|
||||
// Configuration
|
||||
Navigation.StateInfoConfig.build([
|
||||
{ key: 'home', initial: 'page', states: [
|
||||
{ key: 'page', route: '' }
|
||||
]},
|
||||
{ key: 'person', initial: 'list', states: [
|
||||
{ key: 'list', route: ['people/{page}', 'people/{page}/sort/{sort}'], transitions: [
|
||||
{ key: 'select', to: 'details' }
|
||||
], defaults: { page: 1 }, trackCrumbTrail: false },
|
||||
{ key: 'details', route: 'person/{id}', trackTypes: false, defaultTypes: { id: 'number' } }
|
||||
]}
|
||||
]);
|
||||
|
||||
// StateInfo
|
||||
var dialogs = Navigation.StateInfoConfig.dialogs;
|
||||
var home = dialogs['home'];
|
||||
var homePage = home.states['page'];
|
||||
var homeKey = home.key;
|
||||
var homePageKey = homePage.key;
|
||||
homePage = home.initial;
|
||||
var person = dialogs['person'];
|
||||
var personList = person.states['list'];
|
||||
var personDetails = person.states['details'];
|
||||
var personListSelect = personList.transitions['select'];
|
||||
personList = personListSelect.parent;
|
||||
personDetails = personListSelect.to;
|
||||
var pageDefault = personList.defaults.page;
|
||||
var idDefaultType = personDetails.defaultTypes.id;
|
||||
|
||||
// StateNavigator
|
||||
personList.dispose = () => {};
|
||||
personList.navigating = (data, url, navigate) => {
|
||||
navigate([]);
|
||||
};
|
||||
personList.navigated = (data, asyncData) => {};
|
||||
personDetails.navigating = (data, url, navigate) => {
|
||||
navigate();
|
||||
};
|
||||
personDetails.navigated = (data) => {};
|
||||
|
||||
// State Handler
|
||||
class LogStateHandler extends Navigation.StateHandler {
|
||||
getNavigationData(state: Navigation.State, url: string): any {
|
||||
console.log('get navigation data');
|
||||
super.getNavigationData(state, url);
|
||||
}
|
||||
}
|
||||
homePage.stateHandler = new LogStateHandler();
|
||||
personList.stateHandler = new LogStateHandler();
|
||||
personDetails.stateHandler = new LogStateHandler();
|
||||
|
||||
// Navigation Event
|
||||
var navigationListener =
|
||||
(oldState: Navigation.State, state: Navigation.State, data: any) => {
|
||||
Navigation.StateController.offNavigate(navigationListener);
|
||||
};
|
||||
Navigation.StateController.onNavigate(navigationListener);
|
||||
|
||||
// Navigation
|
||||
Navigation.start('home');
|
||||
Navigation.StateController.navigate('person');
|
||||
Navigation.StateController.refresh();
|
||||
Navigation.StateController.refresh({ page: 2 });
|
||||
Navigation.StateController.navigate('select', { id: 10 });
|
||||
var canGoBack: boolean = Navigation.StateController.canNavigateBack(1);
|
||||
Navigation.StateController.navigateBack(1);
|
||||
|
||||
// Navigation Link
|
||||
var link = Navigation.StateController.getNavigationLink('person');
|
||||
link = Navigation.StateController.getRefreshLink();
|
||||
link = Navigation.StateController.getRefreshLink({ page: 2 });
|
||||
link = Navigation.StateController.getNavigationLink('select', { id: 10 });
|
||||
var nextDialog = Navigation.StateController.getNextState('select').parent;
|
||||
person = nextDialog;
|
||||
Navigation.StateController.navigateLink(link);
|
||||
link = Navigation.StateController.getNavigationBackLink(1);
|
||||
var crumb = Navigation.StateController.crumbs[0];
|
||||
link = crumb.navigationLink;
|
||||
Navigation.StateController.navigateLink(link, true);
|
||||
|
||||
// StateContext
|
||||
Navigation.StateController.navigate('home');
|
||||
Navigation.StateController.navigate('person');
|
||||
home = Navigation.StateContext.previousDialog;
|
||||
homePage = Navigation.StateContext.previousState;
|
||||
person === Navigation.StateContext.dialog;
|
||||
personList === Navigation.StateContext.state;
|
||||
var url: string = Navigation.StateContext.url;
|
||||
var page: number = Navigation.StateContext.data.page;
|
||||
|
||||
// Navigation Data
|
||||
Navigation.StateController.refresh({ page: 2 });
|
||||
var data = Navigation.StateContext.includeCurrentData({ sort: 'name' }, ['page']);
|
||||
Navigation.StateController.refresh(data);
|
||||
Navigation.StateContext.clear('sort');
|
||||
var data = Navigation.StateContext.includeCurrentData({ pageSize: 10 });
|
||||
Navigation.StateController.refresh(data);
|
||||
Navigation.StateContext.clear();
|
||||
Navigation.StateController.refresh();
|
||||
}
|
||||
Vendored
+143
-9
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Navigation 1.0
|
||||
// Type definitions for Navigation 1.1.0
|
||||
// Project: http://grahammendick.github.io/navigation/
|
||||
// Definitions by: Graham Mendick <https://github.com/grahammendick>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
@@ -61,15 +61,20 @@ declare module Navigation {
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* Gets the route Url pattern
|
||||
* Gets the route Url patterns
|
||||
*/
|
||||
route: string;
|
||||
route: string | string[];
|
||||
/**
|
||||
* Gets a value that indicates whether to maintain crumb trail
|
||||
* information e.g PreviousState. This can be used together with Route
|
||||
* to produce user friendly Urls
|
||||
*/
|
||||
trackCrumbTrail?: boolean;
|
||||
/**
|
||||
* Gets a value that indicates whether NavigationData Types are
|
||||
* preserved when navigating
|
||||
*/
|
||||
trackTypes?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -175,20 +180,35 @@ declare module Navigation {
|
||||
*/
|
||||
title: string;
|
||||
/**
|
||||
* Gets the route Url pattern
|
||||
* Gets the route Url patterns
|
||||
*/
|
||||
route: string;
|
||||
route: string | string[];
|
||||
/**
|
||||
* Gets a value that indicates whether to maintain crumb trail
|
||||
* information e.g PreviousState. This can be used together with Route
|
||||
* to produce user friendly Urls
|
||||
*/
|
||||
trackCrumbTrail: boolean;
|
||||
/**
|
||||
* Gets a value that indicates whether NavigationData Types are
|
||||
* preserved when navigating
|
||||
*/
|
||||
trackTypes: boolean;
|
||||
/**
|
||||
* Gets or sets the IStateHandler responsible for building and parsing
|
||||
* avigation links to this State
|
||||
* navigation links to this State
|
||||
*/
|
||||
stateHandler: IStateHandler;
|
||||
/**
|
||||
* Called on the old State (this is not the same as the previous
|
||||
* State) before navigating to a different State
|
||||
* @param state The new State
|
||||
* @param data The new NavigationData
|
||||
* @param url The new target location
|
||||
* @param unload The function to call to continue to navigate
|
||||
* @param history A value indicating whether browser history was used
|
||||
*/
|
||||
unloading: (state: State, data: any, url: string, unload: () => void, history?: boolean) => void;
|
||||
/**
|
||||
* Called on the old State (this is not the same as the previous
|
||||
* State) after navigating to a different State
|
||||
@@ -197,15 +217,17 @@ declare module Navigation {
|
||||
/**
|
||||
* Called on the current State after navigating to it
|
||||
* @param data The current NavigationData
|
||||
* @param asyncData The data passed asynchronously while navigating
|
||||
*/
|
||||
navigated: (data: any) => void;
|
||||
navigated: (data: any, asyncData?: any) => void;
|
||||
/**
|
||||
* Called on the new State before navigating to it
|
||||
* @param data The new NavigationData
|
||||
* @param url The new target location
|
||||
* @param navigate The function to call to continue to navigate
|
||||
* @param navigate The function to call to continue to navigate
|
||||
* @param history A value indicating whether browser history was used
|
||||
*/
|
||||
navigating: (data: any, url: string, navigate: () => void) => void;
|
||||
navigating: (data: any, url: string, navigate: (asyncData?: any) => void, history?: boolean) => void;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -366,6 +388,84 @@ declare module Navigation {
|
||||
*/
|
||||
getUrl(anchor: HTMLAnchorElement): string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides the base functionality for crumb trail persistence mechanisms
|
||||
*/
|
||||
class CrumbTrailPersister {
|
||||
/**
|
||||
* Overridden by derived classes to return the persisted crumb trail
|
||||
* @param crumbTrail The key, returned from the save function, to
|
||||
* identify the persisted crumb trail
|
||||
* @returns The crumb trail holding navigation and data information
|
||||
*/
|
||||
load(crumbTrail: string): string;
|
||||
/**
|
||||
* Overridden by derived classes to persist the crumb trail
|
||||
* @param crumbTrail The crumb trail holding navigation and data
|
||||
* information
|
||||
* @returns The key to be passed to load function for crumb trail
|
||||
* retrieval
|
||||
*/
|
||||
save(crumbTrail: string): string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Persists crumb trails, over a specified length, in localStorage.
|
||||
* Prevents the creation of unmanageably long Urls. If used in a browser
|
||||
* without localStorage or outside of a browser environment, then in memory
|
||||
* storage is used
|
||||
*/
|
||||
class StorageCrumbTrailPersister extends CrumbTrailPersister {
|
||||
/**
|
||||
* Initializes a new instance of the StorageCrumbTrailPersister class
|
||||
* with a maxLength of 500, historySize of 100 and localStorage as the
|
||||
* storage mechanism
|
||||
*/
|
||||
constructor();
|
||||
/**
|
||||
* Initializes a new instance of the StorageCrumbTrailPersister class
|
||||
* with a historySize of 100 and localStorage as the storage mechanism
|
||||
* @param maxLength The length above which any crumb trail will be
|
||||
* stored in localStorage
|
||||
*/
|
||||
constructor(maxLength: number);
|
||||
/**
|
||||
* Initializes a new instance of the StorageCrumbTrailPersister class
|
||||
* with localStorage as the storage mechanism
|
||||
* @param maxLength The length above which any crumb trail will be
|
||||
* stored in localStorage
|
||||
* @param historySize The maximum number of crumb trails that will be
|
||||
* held at any one time in localStorage
|
||||
*/
|
||||
constructor(maxLength: number, historySize: number);
|
||||
/**
|
||||
* Initializes a new instance of the StorageCrumbTrailPersister class
|
||||
* @param maxLength The length above which any crumb trail will be
|
||||
* stored in the storage
|
||||
* @param historySize The maximum number of crumb trails that will be
|
||||
* held at any one time in the storage
|
||||
* @param storage The storage mechanism
|
||||
*/
|
||||
constructor(maxLength: number, historySize: number, storage: Storage);
|
||||
/**
|
||||
* Uses the crumbTrail parameter to determine whether to retrieve the
|
||||
* crumb trail from storage. If retrieved from storage it may be null
|
||||
* @param Key generated by the save function
|
||||
* @returns Either the crumbTrail or the one retrieved value from
|
||||
* storage; can be null if retrieved from storage
|
||||
*/
|
||||
load(crumbTrail: string): string;
|
||||
/**
|
||||
* If the crumbTrail is not over the maxLength it is returned.
|
||||
* Otherwise the crumbTrail is stored in storage using a short key,
|
||||
* unique within a given storage session. Also expunges old items from
|
||||
* storage, if the historySize is breached when a new item is added
|
||||
* @param crumbTrail The crumb trail to persist
|
||||
* @returns crumbTrail or short, generated key pointing at crumbTrail
|
||||
*/
|
||||
save(crumbTrail: string): string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines a contract a class must implement in order to build and parse
|
||||
@@ -434,6 +534,14 @@ declare module Navigation {
|
||||
navigationLink: string;
|
||||
/**
|
||||
* Initializes a new instance of the Crumb class
|
||||
* @param data The Context Data held at the time of navigating away
|
||||
* from this State
|
||||
* @param state The configuration information associated with this
|
||||
* navigation
|
||||
* @param link The hyperlink navigation to return to the State and pass
|
||||
* the associated Data
|
||||
* @param last A value indicating whether the Crumb is the last in the
|
||||
* crumb trail
|
||||
*/
|
||||
constructor(data: any, state: State, link: string, last: boolean);
|
||||
}
|
||||
@@ -442,8 +550,18 @@ declare module Navigation {
|
||||
* Provides access to the Navigation Settings configuration
|
||||
*/
|
||||
class NavigationSettings {
|
||||
/**
|
||||
* Gets or sets the builder and parser of State routes
|
||||
*/
|
||||
router: IRouter;
|
||||
/**
|
||||
* Gets or sets the manager of the browser Url
|
||||
*/
|
||||
historyManager: IHistoryManager;
|
||||
/**
|
||||
* Gets or sets the crumb trail persistence mechanism
|
||||
*/
|
||||
crumbTrailPersister: CrumbTrailPersister;
|
||||
/**
|
||||
* Gets or sets the key that identifies the StateId
|
||||
*/
|
||||
@@ -464,6 +582,11 @@ declare module Navigation {
|
||||
* Gets or sets the application path
|
||||
*/
|
||||
applicationPath: string;
|
||||
/**
|
||||
* Gets or sets a value indicating whether the PreviousStateId and
|
||||
* ReturnData should be part of the CrumbTrail
|
||||
*/
|
||||
combineCrumbTrail: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -650,6 +773,12 @@ declare module Navigation {
|
||||
* @param url The target location
|
||||
*/
|
||||
static navigateLink(url: string): void;
|
||||
/**
|
||||
* Navigates to the url
|
||||
* @param url The target location
|
||||
* @param history A value indicating whether browser history was used
|
||||
*/
|
||||
static navigateLink(url: string, history: boolean): void;
|
||||
/**
|
||||
* Gets the next State. Depending on the action will either return the
|
||||
* 'to' State of a Transition or the 'initial' State of a Dialog
|
||||
@@ -831,6 +960,11 @@ declare module Navigation {
|
||||
* @returns The matched route and data
|
||||
*/
|
||||
match(path: string): { route: Route; data: any; };
|
||||
/**
|
||||
* Sorts the routes by the comparer
|
||||
* @param compare The route comparer function
|
||||
*/
|
||||
sort(compare: (routeA: Route, routeB: Route) => number): void;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,6 +45,9 @@ inst = inst.merge(str, data);
|
||||
inst = inst.merge(str, obj);
|
||||
inst = inst.merge(str, regex);
|
||||
|
||||
inst = inst.query(obj);
|
||||
inst = inst.query(bool);
|
||||
|
||||
inst = inst.intercept(str, str);
|
||||
inst = inst.intercept(str, str, str);
|
||||
inst = inst.intercept(str, str, obj);
|
||||
|
||||
Vendored
+4
-1
@@ -45,6 +45,9 @@ declare module "nock" {
|
||||
merge(path: string, data?: Object): Scope;
|
||||
merge(path: string, regex?: RegExp): Scope;
|
||||
|
||||
query(params: any): Scope;
|
||||
query(acceptAnyParams: boolean): Scope;
|
||||
|
||||
intercept(path: string, verb: string, body?: string, options?: any): Scope;
|
||||
intercept(path: string, verb: string, body?: Object, options?: any): Scope;
|
||||
intercept(path: string, verb: string, body?: RegExp, options?: any): Scope;
|
||||
@@ -55,7 +58,7 @@ declare module "nock" {
|
||||
replyWithFile(responseCode: number, fileName: string): Scope;
|
||||
|
||||
defaultReplyHeaders(headers: Object): Scope;
|
||||
|
||||
|
||||
matchHeader(name: string, value: string): Scope;
|
||||
matchHeader(name: string, regex: RegExp): Scope;
|
||||
matchHeader(name: string, fn: (value: string) => boolean): Scope;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/// <reference path="path-exists.d.ts" />
|
||||
|
||||
import pathExists = require("path-exists");
|
||||
|
||||
pathExists("test/path-exists.d.ts", (error, exists) => {
|
||||
console.log(exists);
|
||||
});
|
||||
console.log(pathExists.sync("test/__path-exists.d.ts"));
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// Type definitions for path-exists 1.0.0
|
||||
// Project: https://github.com/sindresorhus/path-exists
|
||||
// Definitions by: Shogo Iwano <https://github.com/shiwano>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "path-exists" {
|
||||
interface PathExists {
|
||||
(path: string, callback: (error: Error, exists: boolean) => void): void;
|
||||
sync(path: string): boolean;
|
||||
}
|
||||
|
||||
var pathExists: PathExists;
|
||||
export = pathExists;
|
||||
}
|
||||
@@ -0,0 +1,908 @@
|
||||
/// <reference path="./photonui.d.ts" />
|
||||
|
||||
// All exemple scripts from PhotonUI documentation:
|
||||
|
||||
// Accel Manager
|
||||
// We add a field to test accels
|
||||
var field = new photonui.TextField({
|
||||
value: "Text Field"
|
||||
});
|
||||
photonui.domInsert(field, "demo");
|
||||
|
||||
// ... And a label to display things
|
||||
var label = new photonui.Label({text: ""});
|
||||
photonui.domInsert(label, "demo");
|
||||
|
||||
// We create the accel
|
||||
var accel = new photonui.AccelManager();
|
||||
|
||||
// "Ctrl+A" / "Command+A" accelerator that is disabled if
|
||||
// a field is focused
|
||||
accel.addAccel("accel1", "ctrl + a", function() {
|
||||
label.text += "'Ctrl + A' accelerator\n";
|
||||
});
|
||||
accel.addAccel("accel1-mac", "command + a", function() {
|
||||
label.text += "'Command + A' accelerator\n";
|
||||
});
|
||||
|
||||
// "Ctrl+R" accelerator that works even if the field is focused
|
||||
accel.addAccel("accel3", "ctrl + r", function() {
|
||||
label.text += "'Ctrl + R' accelerator\n";
|
||||
}, false);
|
||||
|
||||
// A more complexe sequence (hold "Ctrl+X", and then press "C")
|
||||
accel.addAccel("accel4", "ctrl + x > c", function() {
|
||||
label.text += "'Ctrl + X > C' accelerator\n";
|
||||
});
|
||||
|
||||
// BoxLayout
|
||||
var box = new photonui.BoxLayout({
|
||||
orientation: "vertical", // "vertical" or "horizontal"
|
||||
spacing: 5, // spacing between widgets
|
||||
children: [
|
||||
new photonui.Button(),
|
||||
new photonui.Button(),
|
||||
new photonui.Button()
|
||||
]
|
||||
});
|
||||
|
||||
photonui.domInsert(box, "demo");
|
||||
|
||||
// Button
|
||||
var btn = new photonui.Button({
|
||||
text: "My Button",
|
||||
leftIcon: new photonui.FAIcon("fa-send"),
|
||||
callbacks: {
|
||||
click: function(widget: any, event: any) {
|
||||
alert("Someone clicked on " + widget.text);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
photonui.domInsert(btn, "demo");
|
||||
|
||||
// canvas
|
||||
var canvas = new photonui.Canvas({
|
||||
width: 200,
|
||||
height: 150
|
||||
});
|
||||
|
||||
photonui.domInsert(canvas, "demo");
|
||||
|
||||
var ctx = canvas.getContext("2d");
|
||||
|
||||
ctx.lineWidth = 3;
|
||||
ctx.strokeStyle = "#DB624F";
|
||||
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(10, 10);
|
||||
ctx.lineTo(40, 140);
|
||||
ctx.lineTo(50, 30);
|
||||
ctx.lineTo(190, 100);
|
||||
ctx.stroke();
|
||||
|
||||
// Checkbox
|
||||
var check = new photonui.CheckBox({
|
||||
value: true
|
||||
});
|
||||
|
||||
photonui.domInsert(check, "demo");
|
||||
|
||||
// Color
|
||||
var color = new photonui.Color("red");
|
||||
|
||||
console.log(color.hexString);
|
||||
// "#FF0000"
|
||||
var color = new photonui.Color("red");
|
||||
|
||||
console.log(color.hexString);
|
||||
// "#FF0000"
|
||||
|
||||
console.log(color.rgbString);
|
||||
// "rgb(255, 0, 0)"
|
||||
|
||||
console.log(color.rgbaString);
|
||||
// "rgb(255, 0, 0, 1)"
|
||||
|
||||
console.log(color.getRGB());
|
||||
// Array [ 255, 0, 0 ]
|
||||
|
||||
console.log(color.getRGBA());
|
||||
// Array [ 255, 0, 0, 255 ]
|
||||
|
||||
console.log(color.red, color.green, color.blue);
|
||||
// 255 0 0
|
||||
|
||||
console.log(color.hue, color.saturation, color.brightness);
|
||||
// 0 100 100
|
||||
|
||||
color.brightness = 50;
|
||||
console.log(color.hexString);
|
||||
// "#7F0000"
|
||||
|
||||
color.hue = 204;
|
||||
console.log(color.hexString);
|
||||
// #004C7F
|
||||
|
||||
// ColorButton
|
||||
var btn2 = new photonui.ColorButton({
|
||||
value: "#4EC8DB",
|
||||
callbacks: {
|
||||
"value-changed": function(widget: any, value: any) {
|
||||
var header = document.getElementsByTagName("header")[0];
|
||||
header.style.backgroundColor = value;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
photonui.domInsert(btn2, "demo");
|
||||
|
||||
// colorpalette
|
||||
var palette = new photonui.ColorPalette({
|
||||
callbacks: {
|
||||
"value-changed": function(widget: any, value: any) {
|
||||
var header = document.getElementsByTagName("header")[0];
|
||||
header.style.backgroundColor = value;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
photonui.domInsert(palette, "demo");
|
||||
|
||||
var palette = new photonui.ColorPalette({
|
||||
palette: [
|
||||
["#D32F2F", "#F44336", "#E91E63", "#9C27B0", "#673AB7"],
|
||||
["#3F51B5", "#2196F3", "#03A9F4", "#00BCD4", "#009688"],
|
||||
["#4CAF50", "#8BC34A", "#CDDC39", "#FFEB3B", "#FFC107"],
|
||||
["#FF9800", "#FF5722", "#795548", "#9E9E9E", "#607D8B"]
|
||||
],
|
||||
callbacks: {
|
||||
"value-changed": function(widget: any, value: any) {
|
||||
var header = document.getElementsByTagName("header")[0];
|
||||
header.style.backgroundColor = value;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
photonui.domInsert(palette, "demo");
|
||||
|
||||
// ColorPicker
|
||||
var colorPicker = new photonui.ColorPicker({
|
||||
value: "#4EC8DB",
|
||||
callbacks: {
|
||||
"value-changed": function(widget: any, value: any) {
|
||||
var header = document.getElementsByTagName("header")[0];
|
||||
header.style.backgroundColor = value;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
photonui.domInsert(colorPicker, "demo");
|
||||
|
||||
// ColorPickerDialog
|
||||
var dlg = new photonui.ColorPickerDialog({
|
||||
value: "#4EC8DB",
|
||||
callbacks: {
|
||||
"value-changed": function(widget: any, value: any) {
|
||||
var header = document.getElementsByTagName("header")[0];
|
||||
header.style.backgroundColor = value;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Add a button to show up the dialog
|
||||
var btn = new photonui.Button({
|
||||
text: "Display the dialog",
|
||||
callbacks: {
|
||||
click: dlg.show.bind(dlg)
|
||||
}
|
||||
});
|
||||
|
||||
photonui.domInsert(btn, "demo");
|
||||
|
||||
// Dialog
|
||||
var pos = photonui.Helpers.getAbsolutePosition("demo");
|
||||
|
||||
new photonui.Dialog({
|
||||
title: "My Dialog",
|
||||
visible: true,
|
||||
x: pos.x, y: pos.y,
|
||||
child: new photonui.Label("Hello, I'm a dialog"),
|
||||
padding: 10,
|
||||
buttons: [
|
||||
new photonui.Button()
|
||||
],
|
||||
callbacks: {
|
||||
"close-button-clicked": function(widget: any) {
|
||||
widget.destroy();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// FAIcon
|
||||
var icon = new photonui.FAIcon({
|
||||
iconName: "fa-camera",
|
||||
size: "fa-3x", // "", "fa-lg", "fa-2x", "fa-3x", "fa-4x", "fa5x"
|
||||
color: "#DB624F"
|
||||
});
|
||||
|
||||
photonui.domInsert(icon, "demo");
|
||||
|
||||
// FileManager
|
||||
// File manager that accepts PNG, JPEG, BMP and SVG files
|
||||
var fm = new photonui.FileManager({
|
||||
acceptedMimes: ["image/png", "image/jpeg"],
|
||||
acceptedExts: ["bmp", "svg"],
|
||||
dropZone: document, // Enable file d&d
|
||||
multiselect: true, // Allow to select more than one file
|
||||
callbacks: {
|
||||
"file-open": function(widget: any, file: any, x: number, y: number) {
|
||||
// x and y are defined only with d&d
|
||||
if (x !== undefined) {
|
||||
alert(file.name + " dropped at ("+x+", "+y+")");
|
||||
}
|
||||
else {
|
||||
alert(file.name + " opened");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Button to show the "file open" dialog
|
||||
var btn = new photonui.Button({
|
||||
text: "Open",
|
||||
callbacks: {
|
||||
click: function(widget: any, event: any) {
|
||||
fm.open();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
photonui.domInsert(btn, "demo");
|
||||
|
||||
// FluidLayout
|
||||
var fl = new photonui.FluidLayout({
|
||||
children: [
|
||||
new photonui.Button(),
|
||||
new photonui.Button(),
|
||||
new photonui.Button(),
|
||||
new photonui.Button(),
|
||||
new photonui.Button(),
|
||||
new photonui.Button(),
|
||||
new photonui.Button()
|
||||
]
|
||||
});
|
||||
|
||||
photonui.domInsert(fl, "demo");
|
||||
|
||||
// FontSelect
|
||||
var select = new photonui.FontSelect({
|
||||
value: "item1",
|
||||
fonts: [
|
||||
"Arial",
|
||||
"Arial Black",
|
||||
"Cantarell",
|
||||
"Courier New",
|
||||
"Impact",
|
||||
"Time New Roman",
|
||||
"Titillium Web",
|
||||
"Verdana"
|
||||
],
|
||||
callbacks: {
|
||||
"value-changed": function(widget: any, value: any) {
|
||||
alert("Value changed: " + value);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
photonui.domInsert(select, "demo");
|
||||
|
||||
// GridLayout
|
||||
var grid = new photonui.GridLayout({
|
||||
horizontalPadding: 0,
|
||||
verticalPadding: 0,
|
||||
horizontalSpacing: 5,
|
||||
verticalSpacing: 5,
|
||||
children: [
|
||||
new photonui.Button({
|
||||
text: "Widget 1",
|
||||
layoutOptions: {
|
||||
x: 0, y: 0,
|
||||
cols: 1, rows: 1
|
||||
}
|
||||
}),
|
||||
new photonui.Button({
|
||||
text: "Widget 2",
|
||||
layoutOptions: {
|
||||
x: 1, y: 0,
|
||||
cols: 1, rows: 1
|
||||
}
|
||||
}),
|
||||
new photonui.Button({
|
||||
text: "Widget 3",
|
||||
layoutOptions: {
|
||||
x: 2, y: 0,
|
||||
cols: 1, rows: 2
|
||||
}
|
||||
}),
|
||||
new photonui.Button({
|
||||
text: "Widget 4",
|
||||
layoutOptions: {
|
||||
x: 0, y: 1,
|
||||
cols: 2, rows: 1
|
||||
}
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
photonui.domInsert(grid, "demo");
|
||||
|
||||
// Image
|
||||
var img = new photonui.Image({
|
||||
url: "../../images/favicon.png"
|
||||
});
|
||||
|
||||
photonui.domInsert(img, "demo");
|
||||
|
||||
// Label
|
||||
var label = new photonui.Label({
|
||||
text: "My Label",
|
||||
textAlign: "left"
|
||||
});
|
||||
|
||||
photonui.domInsert(label, "demo");
|
||||
|
||||
// Menu
|
||||
var menu = new photonui.Menu({
|
||||
iconVisible: true,
|
||||
children: [
|
||||
new photonui.MenuItem({
|
||||
text: "Menu Item 1",
|
||||
icon: new photonui.FAIcon("fa-paper-plane")
|
||||
}),
|
||||
new photonui.MenuItem({
|
||||
text: "Menu Item 2",
|
||||
icon: new photonui.FAIcon("fa-gears")
|
||||
}),
|
||||
new photonui.MenuItem({
|
||||
text: "Menu Item 3",
|
||||
icon: new photonui.FAIcon("fa-paw")
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
photonui.domInsert(menu, "demo");
|
||||
|
||||
// MenuItem
|
||||
var menu = new photonui.Menu({
|
||||
iconVisible: true,
|
||||
children: [
|
||||
new photonui.MenuItem({
|
||||
text: "Menu Item 1",
|
||||
icon: new photonui.FAIcon("fa-paper-plane"),
|
||||
callbacks: {
|
||||
click: function(widget: any, event: any) {
|
||||
alert("You clicked on me!");
|
||||
}
|
||||
}
|
||||
}),
|
||||
new photonui.MenuItem({
|
||||
text: "Menu Item 2",
|
||||
icon: new photonui.FAIcon("fa-gears")
|
||||
}),
|
||||
new photonui.MenuItem({
|
||||
text: "Menu Item 3",
|
||||
icon: new photonui.FAIcon("fa-paw")
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
photonui.domInsert(menu, "demo");
|
||||
|
||||
// Mouse Manager
|
||||
var img = new photonui.Image({
|
||||
url: "../../images/favicon.png"
|
||||
});
|
||||
|
||||
var mouse = new photonui.MouseManager({
|
||||
element: img,
|
||||
callbacks: {
|
||||
"click": function(manager: any, mstate: any) {
|
||||
alert("You clicked on the image at " +
|
||||
mstate.x + ", " + mstate.y);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
photonui.domInsert(img, "demo");
|
||||
|
||||
// Numeric Filed
|
||||
var field2 = new photonui.NumericField({
|
||||
placeholder: "placeholder",
|
||||
decimalDigits: 2,
|
||||
min: -10, max: 10,
|
||||
step: 0.5, // When scrolling over the field
|
||||
decimalSymbol: ".", // "." or ","
|
||||
value: 5.5
|
||||
});
|
||||
|
||||
photonui.domInsert(field2, "demo");
|
||||
|
||||
// PopupMenu
|
||||
var pos = photonui.Helpers.getAbsolutePosition("demo");
|
||||
|
||||
var popup = new photonui.PopupMenu({
|
||||
children: [
|
||||
new photonui.MenuItem({
|
||||
text: "Menu Item 1",
|
||||
icon: new photonui.FAIcon("fa-paper-plane"),
|
||||
callbacks: {
|
||||
click: function(widget: any, event: any) {
|
||||
alert("You clicked on me!");
|
||||
}
|
||||
}
|
||||
}),
|
||||
new photonui.MenuItem({
|
||||
text: "Menu Item 2",
|
||||
icon: new photonui.FAIcon("fa-gears")
|
||||
}),
|
||||
new photonui.MenuItem({
|
||||
text: "Menu Item 3",
|
||||
icon: new photonui.FAIcon("fa-paw")
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
popup.popupXY(pos.x, pos.y);
|
||||
|
||||
// PopupWindow
|
||||
var pos = photonui.Helpers.getAbsolutePosition("demo");
|
||||
|
||||
var popup = new photonui.PopupWindow({
|
||||
padding: 10,
|
||||
width: 200,
|
||||
height: 200,
|
||||
child: new photonui.Label({
|
||||
text: "Click anywhere to close"
|
||||
})
|
||||
});
|
||||
|
||||
popup.popupXY(pos.x, pos.y);
|
||||
|
||||
// ProgressBar
|
||||
var pb = new photonui.ProgressBar({
|
||||
textVisible: true,
|
||||
value: 0.42
|
||||
});
|
||||
|
||||
photonui.domInsert(pb, "demo");
|
||||
|
||||
// Select
|
||||
var select2 = new photonui.Select({
|
||||
value: "item1",
|
||||
children: [
|
||||
new photonui.MenuItem({value: "item1", text: "Item 1"}),
|
||||
new photonui.MenuItem({value: "item2", text: "Item 2"}),
|
||||
new photonui.MenuItem({value: "item3", text: "Item 3"})
|
||||
],
|
||||
callbacks: {
|
||||
"value-changed": function(widget: any, value: any) {
|
||||
alert("Value changed: " + value);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
photonui.domInsert(select2, "demo");
|
||||
|
||||
// Separator
|
||||
var separator = new photonui.Separator();
|
||||
|
||||
photonui.domInsert(separator, "demo");
|
||||
|
||||
// Slider
|
||||
var box = new photonui.BoxLayout({
|
||||
children: [
|
||||
new photonui.Slider({
|
||||
fieldVisible: false,
|
||||
min: 0, max: 100,
|
||||
step: 5,
|
||||
value: 50
|
||||
}),
|
||||
new photonui.Slider({
|
||||
fieldVisible: true,
|
||||
min: -100, max: 100,
|
||||
step: 10,
|
||||
value: -50
|
||||
}),
|
||||
new photonui.Slider({
|
||||
fieldVisible: true,
|
||||
min: 0, max: 1,
|
||||
decimalDigits: 2,
|
||||
decimalSymbol: ".",
|
||||
step: 0.05,
|
||||
value: 0.5
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
photonui.domInsert(box, "demo");
|
||||
|
||||
// SpriteIcon
|
||||
// Create the spritesheet
|
||||
var spriteSheet = new photonui.SpriteSheet({
|
||||
name: "default",
|
||||
imageUrl: "./spritesheet.png",
|
||||
size: 16,
|
||||
icons: {
|
||||
"remove": [ 0, 0],
|
||||
"add": [16, 0],
|
||||
"grayHeart": [32, 0],
|
||||
"redHeart": [48, 0],
|
||||
"battery1": [ 0, 16],
|
||||
"battery2": [16, 16],
|
||||
"battery3": [32, 16],
|
||||
"battery4": [48, 16]
|
||||
}
|
||||
});
|
||||
|
||||
// Create an icon from the spritesheet
|
||||
var icon2 = new photonui.SpriteIcon("default/redHeart");
|
||||
|
||||
photonui.domInsert(icon2, "demo");
|
||||
|
||||
// SubMenuItem
|
||||
var menu = new photonui.Menu({
|
||||
iconVisible: true,
|
||||
children: [
|
||||
new photonui.SubMenuItem({
|
||||
text: "Submenu Item",
|
||||
menuName: "submenu1",
|
||||
icon: new photonui.FAIcon("fa-paw")
|
||||
}),
|
||||
new photonui.Menu({
|
||||
visible: true, // false to hide it by default
|
||||
name: "submenu1",
|
||||
iconVisible: true,
|
||||
children: [
|
||||
new photonui.MenuItem({
|
||||
text: "Submenu Item 1",
|
||||
icon: new photonui.FAIcon("fa-gamepad")
|
||||
}),
|
||||
new photonui.MenuItem({
|
||||
text: "Sumbenu Item 2",
|
||||
icon: new photonui.FAIcon("fa-flask")
|
||||
})
|
||||
]
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
photonui.domInsert(menu, "demo");
|
||||
|
||||
// Switch
|
||||
var sw = new photonui.Switch({
|
||||
value: true
|
||||
});
|
||||
|
||||
photonui.domInsert(sw, "demo");
|
||||
|
||||
// TabItem
|
||||
var tabs = new photonui.TabLayout({
|
||||
tabsPosition: "top", // "top", "bottom", "left" or "right"
|
||||
children: [
|
||||
new photonui.TabItem({
|
||||
title: "Tab 1",
|
||||
child: new photonui.Label("Widget inside the first tab")
|
||||
}),
|
||||
new photonui.TabItem({
|
||||
title: "Tab 2",
|
||||
child: new photonui.Button()
|
||||
}),
|
||||
new photonui.TabItem({
|
||||
title: "Tab 3"
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
photonui.domInsert(tabs, "demo");
|
||||
document.getElementById("demo")
|
||||
.className += " photonui-container-expand-child";
|
||||
|
||||
// TabLayout
|
||||
var tabs = new photonui.TabLayout({
|
||||
tabsPosition: "top", // "top", "bottom", "left" or "right"
|
||||
children: [
|
||||
new photonui.TabItem({
|
||||
title: "Tab 1",
|
||||
child: new photonui.Label("Widget inside the first tab")
|
||||
}),
|
||||
new photonui.TabItem({
|
||||
title: "Tab 2",
|
||||
child: new photonui.Button()
|
||||
}),
|
||||
new photonui.TabItem({
|
||||
title: "Tab 3"
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
photonui.domInsert(tabs, "demo");
|
||||
document.getElementById("demo")
|
||||
.className += " photonui-container-expand-child";
|
||||
|
||||
// Text
|
||||
var text = new photonui.Text({
|
||||
rawHtml: "<strong>Lorem ipsum</strong> dolor sit amet..."
|
||||
});
|
||||
|
||||
photonui.domInsert(text, "demo");
|
||||
|
||||
// TextAreaField
|
||||
var field3 = new photonui.TextAreaField({
|
||||
placeholder: "placeholder",
|
||||
value: "This is a\nTextArea"
|
||||
});
|
||||
|
||||
photonui.domInsert(field3, "demo");
|
||||
|
||||
// TextField
|
||||
var field = new photonui.TextField({
|
||||
placeholder: "placeholder",
|
||||
value: "Text"
|
||||
});
|
||||
|
||||
photonui.domInsert(field, "demo");
|
||||
|
||||
var grid = new photonui.GridLayout({
|
||||
verticalSpacing: 5,
|
||||
horizontalSpacing: 5,
|
||||
children: [
|
||||
new photonui.Label({
|
||||
text: "Username:",
|
||||
forInputName: "username-field",
|
||||
layoutOptions: {
|
||||
gridX: 0,
|
||||
gridY: 0
|
||||
}
|
||||
}),
|
||||
new photonui.TextField({
|
||||
name: "username-field",
|
||||
placeholder: "Username",
|
||||
value: "Anakin",
|
||||
layoutOptions: {
|
||||
gridX: 1,
|
||||
gridY: 0
|
||||
}
|
||||
}),
|
||||
new photonui.Label({
|
||||
text: "Password:",
|
||||
forInputName: "password-field",
|
||||
layoutOptions: {
|
||||
gridX: 0,
|
||||
gridY: 1
|
||||
}
|
||||
}),
|
||||
new photonui.TextField({
|
||||
name: "password-field",
|
||||
type: "password",
|
||||
placeholder: "password",
|
||||
value: "D4RK51D3",
|
||||
layoutOptions: {
|
||||
gridX: 1,
|
||||
gridY: 1
|
||||
}
|
||||
}),
|
||||
new photonui.Button({
|
||||
text: "Login",
|
||||
leftIcon: new photonui.FAIcon("fa-sign-in"),
|
||||
callbacks: {
|
||||
click: function(widget: any, event: any) {
|
||||
var usernameField = photonui.getWidget("username-field");
|
||||
var passwordField = photonui.getWidget("password-field");
|
||||
alert(
|
||||
"Username: " + (<photonui.TextField>usernameField).value +
|
||||
", Password: " + (<photonui.TextField>passwordField).value
|
||||
);
|
||||
}
|
||||
},
|
||||
layoutOptions: {
|
||||
gridX: 0,
|
||||
gridY: 2,
|
||||
gridWidth: 2
|
||||
}
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
photonui.domInsert(grid, "demo");
|
||||
|
||||
// ToggleButton
|
||||
var toggle = new photonui.ToggleButton({
|
||||
value: false,
|
||||
text: "Toggle Button"
|
||||
});
|
||||
|
||||
photonui.domInsert(toggle, "demo");
|
||||
|
||||
var toggle2 = new photonui.ToggleButton({
|
||||
value: false,
|
||||
text: "Value: off",
|
||||
buttonColor: "red",
|
||||
callbacks: {
|
||||
"value-changed": function(widget: any, value: any) {
|
||||
widget.text = "Value: " + ((value) ? "on" : "off");
|
||||
widget.buttonColor = (value) ? "green" : "red";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
photonui.domInsert(toggle2, "demo");
|
||||
|
||||
// Translation
|
||||
var translation = new photonui.Translation();
|
||||
|
||||
translation.addCatalogs({
|
||||
"fr": {
|
||||
"messages": {
|
||||
"Hello World": ["Bonjour le monde"]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
translation.locale = "fr"; // Change the locale to test
|
||||
|
||||
var label = new photonui.Label({
|
||||
text: _("Hello World"),
|
||||
text2: translation.lazyGettext("Hello World")
|
||||
});
|
||||
|
||||
photonui.domInsert(label, "demo");
|
||||
|
||||
var tr = new photonui.Translation();
|
||||
tr.addCatalogs({
|
||||
"fr": {
|
||||
"plural-forms": "nplurals=2; plural=(n > 1);",
|
||||
"messages": {
|
||||
"Hello World": ["Bonjour le monde"],
|
||||
'Browser language is "{lang}".': ["La langue du navigateur est « {lang} »."],
|
||||
"Close": ["Fermer"]
|
||||
}
|
||||
},
|
||||
"it": {
|
||||
"plural-forms": "nplurals=2; plural=(n != 1);",
|
||||
"messages": {
|
||||
"Hello World": ["Buongiorno il mondo"],
|
||||
'Browser language is "{lang}".': ['La lingua del browser è "{lang}".'],
|
||||
"Close": ["Chiudere"]
|
||||
}
|
||||
}
|
||||
});
|
||||
tr.locale = tr.guessUserLanguage(); // Browser language
|
||||
|
||||
// Language selector
|
||||
var layout = new photonui.BoxLayout({
|
||||
orientation: "vertical",
|
||||
children: [
|
||||
new photonui.Label({
|
||||
text: _('Browser language is "{lang}".', {
|
||||
lang: tr.guessUserLanguage()
|
||||
})
|
||||
}),
|
||||
new photonui.Select({
|
||||
name: "lang",
|
||||
placeholder: "Choose a language...",
|
||||
value: tr.locale,
|
||||
children: [
|
||||
new photonui.MenuItem({value: "en", text: "English"}),
|
||||
new photonui.MenuItem({value: "fr", text: "Français"}),
|
||||
new photonui.MenuItem({value: "it", text: "Italiano"}),
|
||||
],
|
||||
callbacks: {
|
||||
"value-changed": function(widget: any, value: any) {
|
||||
tr.locale = value;
|
||||
}
|
||||
}
|
||||
})
|
||||
]
|
||||
});
|
||||
photonui.domInsert(layout, "demo");
|
||||
|
||||
// A window
|
||||
var pos = photonui.Helpers.getAbsolutePosition("demo");
|
||||
var win = new photonui.Window({
|
||||
visible: true,
|
||||
title: _("Hello World"),
|
||||
x: pos.x, y: pos.y + 100,
|
||||
width: 250,
|
||||
padding: 20,
|
||||
child: new photonui.Button({
|
||||
text: _("Close"),
|
||||
callbacks: {
|
||||
"click": function() { win.hide(); }
|
||||
}
|
||||
}),
|
||||
callbacks: {
|
||||
"close-button-clicked": function(widget: any) { widget.hide(); }
|
||||
}
|
||||
});
|
||||
|
||||
// Viewport
|
||||
var viewport = new photonui.Viewport({
|
||||
width: 300,
|
||||
height: 200,
|
||||
padding: 5,
|
||||
horizontalScrollbar: false, // true, false or null (= auto)
|
||||
verticalScrollbar: null, // true, false or null (= auto)
|
||||
child: new photonui.BoxLayout({
|
||||
children: [
|
||||
new photonui.Button(),
|
||||
new photonui.Button(),
|
||||
new photonui.Button(),
|
||||
new photonui.Button(),
|
||||
new photonui.Button(),
|
||||
new photonui.Button(),
|
||||
new photonui.Button(),
|
||||
new photonui.Button(),
|
||||
new photonui.Button(),
|
||||
new photonui.Button()
|
||||
]
|
||||
})
|
||||
});
|
||||
|
||||
photonui.domInsert(viewport, "demo");
|
||||
|
||||
// Window
|
||||
var pos = photonui.Helpers.getAbsolutePosition("demo");
|
||||
|
||||
new photonui.Window({
|
||||
title: "My Window",
|
||||
visible: true,
|
||||
x: pos.x, y: pos.y,
|
||||
width: 300, height: 100,
|
||||
callbacks: {
|
||||
"close-button-clicked": function(widget: any) {
|
||||
widget.destroy();
|
||||
},
|
||||
"position-changed": function(widget: any, x: number, y: number) {
|
||||
widget.title = "My Window (x: " + x + ", y: " + y + ")";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Get the position of the #demo area to display windows
|
||||
// in the right place
|
||||
var pos = photonui.Helpers.getAbsolutePosition("demo");
|
||||
|
||||
// Create a window with a button to center it (x axis) on the page
|
||||
var win1 = new photonui.Window({
|
||||
title: "Window 1",
|
||||
visible: true,
|
||||
padding: 10,
|
||||
x: pos.x + 20, y: pos.y + 50,
|
||||
child: new photonui.Button({
|
||||
text: "Center Me",
|
||||
callbacks: {
|
||||
click: function(widget: any, event: any) {
|
||||
win1.center();
|
||||
win1.y = pos.y;
|
||||
}
|
||||
}
|
||||
}),
|
||||
callbacks: {
|
||||
"close-button-clicked": function(widget: any) {
|
||||
widget.destroy();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Create a second window without "close" button
|
||||
var win2 = new photonui.Window({
|
||||
title: "Window 2",
|
||||
visible: true,
|
||||
height: 100,
|
||||
closeButtonVisible: false,
|
||||
x: pos.x, y: pos.y
|
||||
});
|
||||
|
||||
// Focus the first window
|
||||
win1.show();
|
||||
Vendored
+435
@@ -0,0 +1,435 @@
|
||||
// Type definitions for PhotonUI v1.0.0
|
||||
// Project: https://github.com/wanadev/PhotonUI
|
||||
// Definitions by: Florent Poujol <https://github.com/florentpoujol/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module photonui {
|
||||
// Base
|
||||
module Helpers {
|
||||
function escapeHtml(string: string): void;
|
||||
function uuid4(): string;
|
||||
function cleanNode(node: HTMLElement): void;
|
||||
function getAbsolutePosition(element: HTMLElement|string): { x: number; y: number };
|
||||
function numberToCssSize(value: number, defaultValue?: number, nullValue?: string): string;
|
||||
}
|
||||
|
||||
class Base {
|
||||
constructor(params?: { [key: string]: any });
|
||||
destroy(): void;
|
||||
registerCallback(id: string, wEvent: string, callback: Function, thisArg: any): void;
|
||||
removeCallback(id: string): void;
|
||||
}
|
||||
|
||||
class Widget extends Base {
|
||||
absolutePosition: { x: number; y: number; }; // readonly
|
||||
contextMenu: PopupWindow;
|
||||
contextMenuName: string;
|
||||
html: HTMLElement; // readonly
|
||||
layoutOptions: { [key: string]: any };
|
||||
name: string;
|
||||
offsetWidth: number; // readonly
|
||||
offsetHeight: number; // readonly
|
||||
parent: Widget;
|
||||
parentName: string;
|
||||
tooltip: string;
|
||||
visible: boolean;
|
||||
|
||||
show(): void;
|
||||
hide(): void;
|
||||
unparent(): void;
|
||||
addClass(className: string): void;
|
||||
removeClass(className: string): void;
|
||||
|
||||
static getWidget(name: string): Widget;
|
||||
static domInsert(widget: Widget, element?: HTMLElement|string): void;
|
||||
}
|
||||
|
||||
// Methods
|
||||
function domInsert(widget: Widget, element?: HTMLElement|string): void;
|
||||
function getWidget(name: string): Widget;
|
||||
|
||||
//Widgets
|
||||
class FileManager extends Base {
|
||||
acceptedExts: string[];
|
||||
acceptedMimes: string[];
|
||||
dropZone: HTMLElement;
|
||||
multiselect: boolean;
|
||||
|
||||
open(): void;
|
||||
}
|
||||
|
||||
class Translation extends Base {
|
||||
locale: string;
|
||||
|
||||
addCatalogs(catalogs: { [key: string]: any }): void;
|
||||
guessUserLanguage(): string;
|
||||
gettext(string: string, replacements?: { [key: string]: string }): string;
|
||||
lazyGettext(string: string, replacements?: { [key: string]: string }): string;
|
||||
enableDomScan(enable: boolean): void;
|
||||
updateDomTranslation(): void;
|
||||
}
|
||||
|
||||
class AccelManager extends Base {
|
||||
addAccel(id: string, keys: string, callback: Function, safe?: boolean): void;
|
||||
removeAccel(id: string): void;
|
||||
}
|
||||
|
||||
class MouseManager extends Base {
|
||||
constructor(params?: { [key: string]: any });
|
||||
constructor(element?: Widget|HTMLElement, params?: { [key: string]: any });
|
||||
|
||||
element: HTMLElement;
|
||||
threshold: number;
|
||||
|
||||
action: string; // readonly
|
||||
btnLeft: boolean; // readonly
|
||||
btnMiddle: boolean; // readonly
|
||||
btnRight: boolean; // readonly
|
||||
button: string; // readonly
|
||||
pageX: number; // readonly
|
||||
pageY: number; // readonly
|
||||
x: number; // readonly
|
||||
y: number; // readonly
|
||||
deltaX: number; // readonly
|
||||
deltaY: number; // readonly
|
||||
}
|
||||
|
||||
// -----------------------------------
|
||||
|
||||
class BaseIcon extends Widget {}
|
||||
|
||||
class FAIcon extends BaseIcon {
|
||||
constructor(params?: { [key: string]: any });
|
||||
constructor(name: string, params?: { [key: string]: any });
|
||||
|
||||
color: string;
|
||||
iconName: string;
|
||||
size: string;
|
||||
}
|
||||
|
||||
class SpriteIcon extends BaseIcon {
|
||||
constructor(params?: { [key: string]: any });
|
||||
constructor(name: string, params?: { [key: string]: any });
|
||||
|
||||
icon: string;
|
||||
iconName: string;
|
||||
spriteSheetName: string;
|
||||
}
|
||||
|
||||
// -----------------------------------
|
||||
|
||||
class Image extends Widget {
|
||||
width: number;
|
||||
height: number;
|
||||
url: string;
|
||||
}
|
||||
|
||||
class SpriteSheet extends Base {
|
||||
name: string;
|
||||
imageUrl: string;
|
||||
size: string;
|
||||
icons: { [iconName: string]: number[] };
|
||||
|
||||
addIcon(iconName: string, x: number, y: number): void;
|
||||
removeIcon(iconName: string): void;
|
||||
getIconPosition(iconName: string): { x: number; y: number; };
|
||||
getIconCSS(iconName: string): string;
|
||||
|
||||
static getSpriteSheet(name: string): SpriteSheet;
|
||||
}
|
||||
|
||||
class Canvas extends Widget {
|
||||
canvas: HTMLElement;
|
||||
interactiveMode: HTMLElement;
|
||||
width: number;
|
||||
height: number;
|
||||
getContext(contextId: string): any;
|
||||
setContext(contextId: string): void;
|
||||
supportsContext(contextId: string): boolean;
|
||||
toBlod(imageFormat: string): any; // returns Blob
|
||||
toBlodHD(imageFormat: string): any; // returns Blob
|
||||
toDataUrl(imageFormat: string): string;
|
||||
toDataUrlHD(imageFormat: string): string;
|
||||
transferControlToProxy(): void;
|
||||
}
|
||||
|
||||
class Label extends Widget {
|
||||
constructor(params?: { [key: string]: any });
|
||||
constructor(name: string, params?: { [key: string]: any });
|
||||
|
||||
forInput: Field|CheckBox;
|
||||
forInputName: string;
|
||||
text: string;
|
||||
textAlign: string;
|
||||
}
|
||||
|
||||
class Text extends Widget {
|
||||
rawHtml: string;
|
||||
text: string;
|
||||
}
|
||||
|
||||
class ProgressBar extends Widget {
|
||||
orientation: string;
|
||||
pulsate: boolean;
|
||||
textVisible: boolean;
|
||||
value: number;
|
||||
}
|
||||
|
||||
class Separator extends Widget {
|
||||
orientation: string;
|
||||
}
|
||||
|
||||
class Button extends Widget {
|
||||
appearance: string; // normal | flat
|
||||
buttonColor: string;
|
||||
|
||||
leftIconName: string;
|
||||
leftIcon: BaseIcon;
|
||||
leftIconVisible: boolean;
|
||||
|
||||
rightIconName: string;
|
||||
rightIcon: BaseIcon;
|
||||
rightIconVisible: boolean;
|
||||
|
||||
text: string;
|
||||
textVisible: boolean;
|
||||
}
|
||||
|
||||
class ColorButton extends Widget {
|
||||
color: Color;
|
||||
dialogOnly: boolean;
|
||||
value: string;
|
||||
}
|
||||
|
||||
class CheckBox extends Widget {
|
||||
value: boolean;
|
||||
}
|
||||
class Switch extends CheckBox {}
|
||||
class ToggleButton extends CheckBox {}
|
||||
|
||||
// -----------------------------------
|
||||
|
||||
class Color extends Base {
|
||||
constructor(color: string);
|
||||
constructor(params?: { [key: string]: any });
|
||||
|
||||
hexString: string;
|
||||
rgbString: string; // readonly
|
||||
rgbaString: string; // readonly
|
||||
|
||||
red: number;
|
||||
green: number;
|
||||
blue: number;
|
||||
alpha: number;
|
||||
|
||||
hue: number;
|
||||
saturation: number;
|
||||
brightness: number;
|
||||
|
||||
setRGB(red: number, green: number, blue: number): void;
|
||||
getRGB(): number[];
|
||||
setRGBA(red: number, green: number, blue: number, alpha: number): void;
|
||||
getRGBA(): number[];
|
||||
setHSB(hue: number, saturation: number, brightness: number): void;
|
||||
}
|
||||
|
||||
class ColorPalette extends Widget {
|
||||
color: Color;
|
||||
palette: Array<string[]>;
|
||||
value: string;
|
||||
|
||||
static palette: Array<string[]>;
|
||||
}
|
||||
|
||||
class ColorPicker extends Widget {
|
||||
color: Color;
|
||||
value: string;
|
||||
}
|
||||
|
||||
// -----------------------------------
|
||||
|
||||
class Field extends Widget {
|
||||
placeholder: string;
|
||||
value: boolean;
|
||||
}
|
||||
|
||||
class NumericField extends Field {
|
||||
min: number;
|
||||
max: number;
|
||||
step: number;
|
||||
decimalDigits: number;
|
||||
decimalSymbol: string;
|
||||
}
|
||||
|
||||
class Slider extends NumericField {
|
||||
fieldVisible: boolean;
|
||||
}
|
||||
|
||||
class TextAreaField extends Field {
|
||||
cols: number;
|
||||
rows: number;
|
||||
}
|
||||
|
||||
class TextField extends Field {
|
||||
type: string; // text, password, email, search, tel, url
|
||||
}
|
||||
|
||||
// -----------------------------------
|
||||
|
||||
class Select extends Widget {
|
||||
children: Widget[];
|
||||
childrenNames: string[];
|
||||
iconVisible: boolean;
|
||||
placeholder: string;
|
||||
popupWidth: number;
|
||||
popupHeight: number;
|
||||
popupMaxWidth: number;
|
||||
popupMinWidth: number;
|
||||
popupMaxHeight: number;
|
||||
popupMinHeight: number;
|
||||
popupOffsetWidth: number; // readonly
|
||||
popupOffsetHeight: number; // readonly
|
||||
popupPadding: number;
|
||||
value: any; // string (maybe)
|
||||
|
||||
addChild(widget: Widget, layoutOptions?: any): void;
|
||||
}
|
||||
|
||||
class FontSelect extends Select {
|
||||
fonts: string[];
|
||||
|
||||
addFont(fontName: string): void;
|
||||
}
|
||||
|
||||
// -----------------------------------
|
||||
|
||||
class Container extends Widget {
|
||||
child: Widget;
|
||||
childName: string;
|
||||
containerNode: HTMLElement; // readonly
|
||||
horizontalChildExpansion: boolean;
|
||||
verticalChildExpansion: boolean;
|
||||
|
||||
removeChild(widget: Widget): void;
|
||||
}
|
||||
|
||||
class Layout extends Container {
|
||||
children: Widget[];
|
||||
childrenNames: string[];
|
||||
|
||||
addChild(widget: Widget, layoutOptions?: { [key: string]: any }): void;
|
||||
empty(): void;
|
||||
}
|
||||
|
||||
class BoxLayout extends Layout {
|
||||
horizontalPadding: number;
|
||||
verticalPadding: number;
|
||||
orientation: string;
|
||||
spacing: number;
|
||||
}
|
||||
|
||||
class FluidLayout extends Layout {
|
||||
horizontalPadding: number;
|
||||
verticalPadding: number;
|
||||
}
|
||||
|
||||
class GridLayout extends Layout {
|
||||
horizontalPadding: number;
|
||||
verticalPadding: number;
|
||||
horizontalSpacing: number;
|
||||
verticalSpacing: number;
|
||||
}
|
||||
|
||||
class Menu extends Layout {
|
||||
iconVisible: boolean;
|
||||
}
|
||||
|
||||
class MenuItem extends Menu {
|
||||
active: boolean;
|
||||
icon: BaseIcon;
|
||||
iconName: string;
|
||||
text: string;
|
||||
value: any; // string (maybe)
|
||||
}
|
||||
|
||||
class SubMenuItem extends MenuItem {
|
||||
menu: Menu;
|
||||
menuName: string;
|
||||
}
|
||||
|
||||
// -----------------------------------
|
||||
|
||||
class Viewport extends Container {
|
||||
width: number;
|
||||
minWidth: number;
|
||||
maxWidth: number;
|
||||
height: number;
|
||||
minHeight: number;
|
||||
maxHeight: number;
|
||||
padding: number;
|
||||
horizontalScrollbar: boolean;
|
||||
verticalScrollbar: boolean;
|
||||
}
|
||||
|
||||
// -----------------------------------
|
||||
|
||||
class BaseWindow extends Container {
|
||||
width: number;
|
||||
minWidth: number;
|
||||
maxWidth: number;
|
||||
height: number;
|
||||
minHeight: number;
|
||||
maxHeight: number;
|
||||
padding: number;
|
||||
position: { x: number; y: number };
|
||||
x: number;
|
||||
y: number;
|
||||
|
||||
center(): void;
|
||||
}
|
||||
|
||||
class PopupWindow extends BaseWindow {
|
||||
popupXY(x: number, y: number): void;
|
||||
popupWidget(widget: Widget): void;
|
||||
}
|
||||
|
||||
class PopupMenu extends PopupWindow {}
|
||||
|
||||
class Window extends BaseWindow {
|
||||
closeButtonVisible: boolean;
|
||||
modal: boolean;
|
||||
movable: boolean;
|
||||
title: string;
|
||||
|
||||
moveToFront(): void;
|
||||
moveToBack(): void;
|
||||
}
|
||||
|
||||
class Dialog extends Window {
|
||||
buttons: Widget[];
|
||||
buttonNames: string[];
|
||||
|
||||
addButton(widget: Widget, layoutOptions: any): void;
|
||||
removeButton(widget: Widget): void;
|
||||
}
|
||||
|
||||
class ColorPickerDialog extends Dialog {
|
||||
color: Color;
|
||||
}
|
||||
|
||||
// -----------------------------------
|
||||
|
||||
class TabItem extends Container {
|
||||
tabHtml: HTMLElement; // readonly
|
||||
title: string;
|
||||
}
|
||||
|
||||
class TabLayout extends Layout {
|
||||
activeTab: Widget;
|
||||
activeTabName: string;
|
||||
padding: number;
|
||||
tabsPosition: string; // top, bottom, left, right
|
||||
}
|
||||
}
|
||||
|
||||
declare function _(string: string, replacements?: { [key: string]: string }): string; // alias of Translation.lazyGettext()
|
||||
@@ -0,0 +1,11 @@
|
||||
/// <reference path="random-string.d.ts" />
|
||||
|
||||
import randomString = require('random-string');
|
||||
|
||||
console.log(randomString());
|
||||
console.log(randomString({
|
||||
length: 20,
|
||||
numeric: true,
|
||||
letters: true,
|
||||
special: true
|
||||
}));
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// Type definitions for random-string
|
||||
// Project: https://github.com/valiton/node-random-string
|
||||
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "random-string" {
|
||||
function randomString(opts?: Object): string;
|
||||
export = randomString;
|
||||
}
|
||||
Vendored
+16
-13
@@ -7,6 +7,8 @@
|
||||
///<reference path='../react/react-addons.d.ts' />
|
||||
|
||||
declare module ReactRouter {
|
||||
import React = __React;
|
||||
|
||||
//
|
||||
// Transition
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -276,42 +278,43 @@ declare module "react-router" {
|
||||
export = ReactRouter;
|
||||
}
|
||||
|
||||
declare module React {
|
||||
declare module __React {
|
||||
|
||||
// for DefaultRoute
|
||||
function createElement(
|
||||
type: ReactRouter.DefaultRouteClass,
|
||||
props: ReactRouter.DefaultRouteProp,
|
||||
...children: React.ReactNode[]): ReactRouter.DefaultRoute;
|
||||
...children: __React.ReactNode[]): ReactRouter.DefaultRoute;
|
||||
|
||||
// for Link
|
||||
function createElement(
|
||||
type: ReactRouter.LinkClass,
|
||||
props: ReactRouter.LinkProp,
|
||||
...children: React.ReactNode[]): ReactRouter.Link;
|
||||
...children: __React.ReactNode[]): ReactRouter.Link;
|
||||
|
||||
// for NotFoundRoute
|
||||
function createElement(
|
||||
type: ReactRouter.NotFoundRouteClass,
|
||||
props: ReactRouter.NotFoundRouteProp,
|
||||
...children: React.ReactNode[]): ReactRouter.NotFoundRoute;
|
||||
...children: __React.ReactNode[]): ReactRouter.NotFoundRoute;
|
||||
|
||||
// for Redirect
|
||||
function createElement(
|
||||
type: ReactRouter.RedirectClass,
|
||||
props: ReactRouter.RedirectProp,
|
||||
...children: React.ReactNode[]): ReactRouter.Redirect;
|
||||
...children: __React.ReactNode[]): ReactRouter.Redirect;
|
||||
|
||||
// for Route
|
||||
function createElement(
|
||||
type: ReactRouter.RouteClass,
|
||||
props: ReactRouter.RouteProp,
|
||||
...children: React.ReactNode[]): ReactRouter.Route;
|
||||
...children: __React.ReactNode[]): ReactRouter.Route;
|
||||
|
||||
// for RouteHandler
|
||||
function createElement(
|
||||
type: ReactRouter.RouteHandlerClass,
|
||||
props: ReactRouter.RouteHandlerProp,
|
||||
...children: React.ReactNode[]): ReactRouter.RouteHandler;
|
||||
...children: __React.ReactNode[]): ReactRouter.RouteHandler;
|
||||
}
|
||||
|
||||
declare module "react/addons" {
|
||||
@@ -319,35 +322,35 @@ declare module "react/addons" {
|
||||
function createElement(
|
||||
type: ReactRouter.DefaultRouteClass,
|
||||
props: ReactRouter.DefaultRouteProp,
|
||||
...children: React.ReactNode[]): ReactRouter.DefaultRoute;
|
||||
...children: __React.ReactNode[]): ReactRouter.DefaultRoute;
|
||||
|
||||
// for Link
|
||||
function createElement(
|
||||
type: ReactRouter.LinkClass,
|
||||
props: ReactRouter.LinkProp,
|
||||
...children: React.ReactNode[]): ReactRouter.Link;
|
||||
...children: __React.ReactNode[]): ReactRouter.Link;
|
||||
|
||||
// for NotFoundRoute
|
||||
function createElement(
|
||||
type: ReactRouter.NotFoundRouteClass,
|
||||
props: ReactRouter.NotFoundRouteProp,
|
||||
...children: React.ReactNode[]): ReactRouter.NotFoundRoute;
|
||||
...children: __React.ReactNode[]): ReactRouter.NotFoundRoute;
|
||||
|
||||
// for Redirect
|
||||
function createElement(
|
||||
type: ReactRouter.RedirectClass,
|
||||
props: ReactRouter.RedirectProp,
|
||||
...children: React.ReactNode[]): ReactRouter.Redirect;
|
||||
...children: __React.ReactNode[]): ReactRouter.Redirect;
|
||||
|
||||
// for Route
|
||||
function createElement(
|
||||
type: ReactRouter.RouteClass,
|
||||
props: ReactRouter.RouteProp,
|
||||
...children: React.ReactNode[]): ReactRouter.Route;
|
||||
...children: __React.ReactNode[]): ReactRouter.Route;
|
||||
|
||||
// for RouteHandler
|
||||
function createElement(
|
||||
type: ReactRouter.RouteHandlerClass,
|
||||
props: ReactRouter.RouteHandlerProp,
|
||||
...children: React.ReactNode[]): ReactRouter.RouteHandler;
|
||||
...children: __React.ReactNode[]): ReactRouter.RouteHandler;
|
||||
}
|
||||
|
||||
Vendored
+1
@@ -150,6 +150,7 @@ declare module Rx {
|
||||
|
||||
immediate: IScheduler;
|
||||
currentThread: ICurrentThreadScheduler;
|
||||
default: IScheduler; // alias for Scheduler.timeout
|
||||
timeout: IScheduler;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -49,7 +49,7 @@ declare module "serve-static" {
|
||||
* By default this module will send "index.html" files in response to a request on a directory.
|
||||
* To disable this set false or to supply a new index pass a string or an array in preferred order.
|
||||
*/
|
||||
index?: boolean;
|
||||
index?: boolean|string|string[];
|
||||
|
||||
/**
|
||||
* Enable or disable Last-Modified header, defaults to true. Uses the file system's last modified value.
|
||||
@@ -59,7 +59,7 @@ declare module "serve-static" {
|
||||
/**
|
||||
* Provide a max-age in milliseconds for http caching, defaults to 0. This can also be a string accepted by the ms module.
|
||||
*/
|
||||
maxAge?: number;
|
||||
maxAge?: number|string;
|
||||
|
||||
/**
|
||||
* Redirect to trailing "/" when the pathname is a dir. Defaults to true.
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/// <reference path="shortid.d.ts" />
|
||||
|
||||
import shortid = require('shortid');
|
||||
|
||||
var my_short_id: string = shortid.generate();
|
||||
console.log(my_short_id);
|
||||
|
||||
console.log('Is valid short id? => %s', shortid.isValid(my_short_id)); // => true
|
||||
console.log('Is valid short id? => %s', shortid.isValid(5)); // => false
|
||||
console.log('Is valid short id? => %s', shortid.isValid('i have spaces')); // => false
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// Type definitions for shortid
|
||||
// Project: https://github.com/dylang/shortid
|
||||
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "shortid" {
|
||||
export function generate(): string;
|
||||
export function characters(string: string): string;
|
||||
export function isValid(id: any): boolean;
|
||||
export function worker(integer: number): void;
|
||||
export function seed(float: number): void;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/// <reference path="./skyway.d.ts" />
|
||||
/// <reference path="../webrtc/RTCPeerConnection.d.ts" />
|
||||
|
||||
var peerByOption: PeerJs.Peer = new Peer({
|
||||
key: 'peerKey',
|
||||
debug: 3,
|
||||
logFunction: ()=>{
|
||||
}
|
||||
});
|
||||
|
||||
peerByOption.listAllPeers(function(items){
|
||||
for(var i in items){
|
||||
console.log(decodeURI(items[i]));
|
||||
}
|
||||
});
|
||||
|
||||
var peerById: PeerJs.Peer = new Peer("peerid");
|
||||
|
||||
var peerByIdAndOption: PeerJs.Peer = new Peer(
|
||||
"peerId",
|
||||
{
|
||||
key: 'peerKey',
|
||||
debug: 3,
|
||||
logFunction: ()=>{
|
||||
}
|
||||
});
|
||||
|
||||
var id = peerByOption.id;
|
||||
var connections = peerByOption.connections;
|
||||
var flag = peerByOption.disconnected;
|
||||
flag = peerByOption.destroyed;
|
||||
|
||||
peerByOption.disconnect();
|
||||
peerByOption.destroy();
|
||||
|
||||
var connection = peerById.connect("id", {
|
||||
label: 'chat',
|
||||
serialization: 'none',
|
||||
metadata: {message: 'hi i want to chat with you!'}
|
||||
});
|
||||
|
||||
var call = peerById.call('callto-id', (<any>window).localStream);
|
||||
|
||||
var openHandler=()=> console.log("open");
|
||||
peerById.on("open", openHandler);
|
||||
peerById.on("connection", (c)=> console.log("connection"));
|
||||
peerById.on("call", (media)=> console.log("call"));
|
||||
peerById.on("close", ()=> console.log("close"));
|
||||
peerById.on("disconnected", ()=> console.log("disconnected"));
|
||||
peerById.on("error", (err)=> console.log(err));
|
||||
peerById.off("open", openHandler);
|
||||
Vendored
+184
@@ -0,0 +1,184 @@
|
||||
// Type definitions for SkyWay
|
||||
// Project: http://nttcom.github.io/skyway/
|
||||
// Definitions by: Toshiya Nakakura <https://github.com/nakakura>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path='../webrtc/RTCPeerConnection.d.ts' />
|
||||
|
||||
declare module PeerJs{
|
||||
interface PeerJSOption{
|
||||
key?: string;
|
||||
host?: string;
|
||||
port?: number;
|
||||
path?: string;
|
||||
secure?: boolean;
|
||||
turn?: boolean;
|
||||
config?: RTCPeerConnectionConfig;
|
||||
debug?: number;
|
||||
}
|
||||
|
||||
interface PeerConnectOption{
|
||||
label?: string;
|
||||
metadata?: any;
|
||||
serialization?: string;
|
||||
reliable?: boolean;
|
||||
}
|
||||
|
||||
interface DataConnection{
|
||||
send(data: any): void;
|
||||
close(): void;
|
||||
on(event: string, cb: ()=>void): void;
|
||||
on(event: 'data', cb: (data: any)=>void): void;
|
||||
on(event: 'open', cb: ()=>void): void;
|
||||
on(event: 'close', cb: ()=>void): void;
|
||||
on(event: 'error', cb: (err: any)=>void): void;
|
||||
off(event: string, fn: Function, once?: boolean): void;
|
||||
bufferSize: number;
|
||||
dataChannel: RTCDataChannel;
|
||||
label: string;
|
||||
metadata: any;
|
||||
open: boolean;
|
||||
peerConnection: any;
|
||||
peer: string;
|
||||
reliable: boolean;
|
||||
serialization: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
interface MediaConnection{
|
||||
answer(stream?: any): void;
|
||||
close(): void;
|
||||
on(event: string, cb: ()=>void): void;
|
||||
on(event: 'stream', cb: (stream: any)=>void): void;
|
||||
on(event: 'close', cb: ()=>void): void;
|
||||
on(event: 'error', cb: (err: any)=>void): void;
|
||||
off(event: string, fn: Function, once?: boolean): void;
|
||||
open: boolean;
|
||||
metadata: any;
|
||||
peer: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
interface utilSupportsObj {
|
||||
audioVideo: boolean;
|
||||
data: boolean;
|
||||
binary: boolean;
|
||||
reliable: boolean;
|
||||
}
|
||||
|
||||
interface util{
|
||||
browser: string;
|
||||
supports: utilSupportsObj;
|
||||
}
|
||||
|
||||
export interface Peer{
|
||||
/**
|
||||
*
|
||||
* @param id The brokering ID of the remote peer (their peer.id).
|
||||
* @param options for specifying details about Peer Connection
|
||||
*/
|
||||
connect(id: string, options?: PeerJs.PeerJSOption): PeerJs.DataConnection;
|
||||
/**
|
||||
* Connects to the remote peer specified by id and returns a data connection.
|
||||
* @param id The brokering ID of the remote peer (their peer.id).
|
||||
* @param stream The caller's media stream
|
||||
*/
|
||||
call(id: string, stream: any): PeerJs.MediaConnection;
|
||||
/**
|
||||
* Calls the remote peer specified by id and returns a media connection.
|
||||
* @param event Event name
|
||||
* @param cb Callback Function
|
||||
*/
|
||||
on(event: string, cb: ()=>void): void;
|
||||
/**
|
||||
* Emitted when a connection to the PeerServer is established.
|
||||
* @param event Event name
|
||||
* @param cb id is the brokering ID of the peer
|
||||
*/
|
||||
on(event: 'open', cb: (id: string)=>void): void;
|
||||
/**
|
||||
* Emitted when a new data connection is established from a remote peer.
|
||||
* @param event Event name
|
||||
* @param cb Callback Function
|
||||
*/
|
||||
on(event: 'connection', cb: (dataConnection: PeerJs.DataConnection)=>void): void;
|
||||
/**
|
||||
* Emitted when a remote peer attempts to call you.
|
||||
* @param event Event name
|
||||
* @param cb Callback Function
|
||||
*/
|
||||
on(event: 'call', cb: (mediaConnection: PeerJs.MediaConnection)=>void): void;
|
||||
/**
|
||||
* Emitted when the peer is destroyed and can no longer accept or create any new connections.
|
||||
* @param event Event name
|
||||
* @param cb Callback Function
|
||||
*/
|
||||
on(event: 'close', cb: ()=>void): void;
|
||||
/**
|
||||
* Emitted when the peer is disconnected from the signalling server
|
||||
* @param event Event name
|
||||
* @param cb Callback Function
|
||||
*/
|
||||
on(event: 'disconnected', cb: ()=>void): void;
|
||||
/**
|
||||
* Errors on the peer are almost always fatal and will destroy the peer.
|
||||
* @param event Event name
|
||||
* @param cb Callback Function
|
||||
*/
|
||||
on(event: 'error', cb: (err: any)=>void): void;
|
||||
/**
|
||||
* Remove event listeners.(EventEmitter3)
|
||||
* @param {String} event The event we want to remove.
|
||||
* @param {Function} fn The listener that we need to find.
|
||||
* @param {Boolean} once Only remove once listeners.
|
||||
*/
|
||||
off(event: string, fn: Function, once?: boolean): void;
|
||||
/**
|
||||
* Close the connection to the server, leaving all existing data and media connections intact.
|
||||
*/
|
||||
disconnect(): void;
|
||||
/**
|
||||
* Close the connection to the server and terminate all existing connections.
|
||||
*/
|
||||
destroy(): void;
|
||||
/**
|
||||
* Get a list of available peer IDs
|
||||
* @param callback
|
||||
*/
|
||||
listAllPeers(callback: (peerIds: Array<string>)=>void): void;
|
||||
|
||||
/**
|
||||
* The brokering ID of this peer
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* A hash of all connections associated with this peer, keyed by the remote peer's ID.
|
||||
*/
|
||||
connections: any;
|
||||
/**
|
||||
* false if there is an active connection to the PeerServer.
|
||||
*/
|
||||
disconnected: boolean;
|
||||
/**
|
||||
* true if this peer and all of its connections can no longer be used.
|
||||
*/
|
||||
destroyed: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
declare var Peer: {
|
||||
prototype: RTCIceServer;
|
||||
/**
|
||||
* A peer can connect to other peers and listen for connections.
|
||||
* @param id Other peers can connect to this peer using the provided ID.
|
||||
* If no ID is given, one will be generated by the brokering server.
|
||||
* @param options for specifying details about PeerServer
|
||||
*/
|
||||
new (id: string, options?: PeerJs.PeerJSOption): PeerJs.Peer;
|
||||
|
||||
/**
|
||||
* A peer can connect to other peers and listen for connections.
|
||||
* @param options for specifying details about PeerServer
|
||||
*/
|
||||
new (options: PeerJs.PeerJSOption): PeerJs.Peer;
|
||||
};
|
||||
Vendored
+1
-1
@@ -1557,7 +1557,7 @@ declare module Slick {
|
||||
|
||||
public getLength(): number;
|
||||
public getItem(index: number): T;
|
||||
public getItemMetadata(): void;
|
||||
public getItemMetadata(index?: number): void;
|
||||
|
||||
public onRowCountChanged: Slick.Event<OnRowCountChangedEventData>;
|
||||
public onRowsChanged: Slick.Event<OnRowsChangedEventData>;
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
/// <reference path="title-case.d.ts" />
|
||||
|
||||
import titleCase = require('title-case');
|
||||
|
||||
console.log(titleCase('string')); // => "String"
|
||||
console.log(titleCase('PascalCase')); // => "Pascal Case"
|
||||
console.log(titleCase('STRING', 'tr')); // => "Strıng"
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// Type definitions for title-case
|
||||
// Project: https://github.com/blakeembrey/title-case
|
||||
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "title-case" {
|
||||
function titleCase(string1: string, string2?: string): string;
|
||||
export = titleCase;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
/// <reference path="to-title-case-gouch.d.ts" />
|
||||
|
||||
import fs = require('fs');
|
||||
|
||||
fs.readFile('to-title-case.js', 'utf-8', function(err: any, code: string) {
|
||||
eval(code);
|
||||
var lowerCase: string = 'this title is in lowercase and will be title case';
|
||||
console.log(lowerCase.toTitleCase()); // Now in title case.
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
// Type definitions for to-title-case
|
||||
// Project: https://github.com/gouch/to-title-case
|
||||
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
interface String {
|
||||
toTitleCase(): string;
|
||||
}
|
||||
+10
@@ -34,6 +34,16 @@ declare module jquery.velocity {
|
||||
animate(options: {elements: NodeListOf<HTMLElement>; properties: Object; options: VelocityOptions}): void;
|
||||
animate(elements: NodeListOf<HTMLElement>, properties: Object, options: VelocityOptions): void;
|
||||
animate(element: HTMLElement, properties: Object, options: VelocityOptions): void;
|
||||
/**
|
||||
* Get a hook value. Hooks are the subvalues of multi-value CSS properties.
|
||||
* It features the same API as $.css().
|
||||
*/
|
||||
hook(element: HTMLElement|JQuery, cssKey: string): string;
|
||||
/**
|
||||
* Set a hook value. Hooks are the subvalues of multi-value CSS properties.
|
||||
* It features the same API as $.css().
|
||||
*/
|
||||
hook(element: HTMLElement|JQuery, cssKey: string, cssValue: string): void;
|
||||
}
|
||||
|
||||
interface VelocityOptions {
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/// <reference path="webfontloader" />
|
||||
import webfontloader = require("webfontloader");
|
||||
|
||||
var config: webfontloader.Config = {
|
||||
classes: false,
|
||||
events: false,
|
||||
loading: function() {},
|
||||
active: function() {},
|
||||
inactive: function() {},
|
||||
fontloading: function(familyName:string, fvd:string) {},
|
||||
fontactive: function(familyName:string, fvd:string) {},
|
||||
fontinactive: function(familyName:string, fvd:string) {},
|
||||
google: {
|
||||
families: ['Droid Sans', 'Droid Serif:bold'],
|
||||
text: 'abcdedfghijklmopqrstuvwxyz!'
|
||||
},
|
||||
custom: {
|
||||
families: ['My Font', 'My Other Font:n4,i4,n7'],
|
||||
urls: ['/fonts.css']
|
||||
},
|
||||
fontdeck: {
|
||||
id: 'xxxx'
|
||||
},
|
||||
monotype: {
|
||||
projectId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
|
||||
version: 12345
|
||||
},
|
||||
timeout: 2000
|
||||
}
|
||||
webfontloader.load(config);
|
||||
@@ -0,0 +1 @@
|
||||
--noImplicitAny --module commonjs --target es5
|
||||
Vendored
+60
@@ -0,0 +1,60 @@
|
||||
// Type definitions for typekit-webfontloader 1.6.4
|
||||
// Project: https://github.com/typekit/webfontloader
|
||||
// Definitions by: doskallemaskin <https://github.com/doskallemaskin/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module WebFont {
|
||||
export function load(config:WebFont.Config):void;
|
||||
export interface Config {
|
||||
/** Setting this to false will disable html classes (defaults to true) */
|
||||
classes?:boolean;
|
||||
/** Settings this to false will disable callbacks/events (defaults to true) */
|
||||
events?:boolean;
|
||||
/** Time (in ms) until the fontinactive callback will be triggered (defaults to 5000) */
|
||||
timeout?:number;
|
||||
/** This event is triggered when all fonts have been requested. */
|
||||
loading?():void;
|
||||
/** This event is triggered when the fonts have rendered. */
|
||||
active?():void;
|
||||
/** This event is triggered when the browser does not support linked fonts or if none of the fonts could be loaded. */
|
||||
inactive?():void;
|
||||
/** This event is triggered once for each font that's loaded. */
|
||||
fontloading?(familyName:string, fvd:string):void;
|
||||
/** This event is triggered once for each font that renders. */
|
||||
fontactive?(familyName:string, fvd:string):void;
|
||||
/** This event is triggered if the font can't be loaded. */
|
||||
fontinactive?(familyName:string, fvd:string):void;
|
||||
|
||||
/** Child window or iframes to manage fonts for */
|
||||
context?:Array<string>;
|
||||
|
||||
custom?:Custom;
|
||||
google?:Google;
|
||||
typekit?:Typekit;
|
||||
fontdeck?:Fontdeck;
|
||||
monotype?:Monotype;
|
||||
}
|
||||
export interface Google {
|
||||
families?:Array<string>;
|
||||
text: string;
|
||||
}
|
||||
export interface Typekit {
|
||||
id?:Array<string>;
|
||||
}
|
||||
export interface Custom {
|
||||
families?:Array<string>;
|
||||
urls?:Array<string>;
|
||||
testStrings?:{[fontFamily:string]:string};
|
||||
}
|
||||
export interface Fontdeck {
|
||||
id?:string;
|
||||
}
|
||||
export interface Monotype {
|
||||
projectId?:string;
|
||||
version?:number;
|
||||
}
|
||||
|
||||
}
|
||||
declare module "webfontloader" {
|
||||
export = WebFont;
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/// <reference path="./webvr-api.d.ts" />
|
||||
|
||||
function fieldOfViewToProjectionMatrix(fov: WebVRApi.VRFieldOfView, zNear: number, zFar: number) {
|
||||
var upTan = Math.tan(fov.upDegrees * Math.PI/180.0);
|
||||
var downTan = Math.tan(fov.downDegrees * Math.PI/180.0);
|
||||
var leftTan = Math.tan(fov.leftDegrees * Math.PI/180.0);
|
||||
var rightTan = Math.tan(fov.rightDegrees * Math.PI/180.0);
|
||||
var xScale = 2.0 / (leftTan + rightTan);
|
||||
var yScale = 2.0 / (upTan + downTan);
|
||||
|
||||
var out = new Float32Array(16);
|
||||
out[0] = xScale;
|
||||
out[1] = 0.0;
|
||||
out[2] = 0.0;
|
||||
out[3] = 0.0;
|
||||
out[4] = 0.0;
|
||||
out[5] = yScale;
|
||||
out[6] = 0.0;
|
||||
out[7] = 0.0;
|
||||
out[8] = -((leftTan - rightTan) * xScale * 0.5);
|
||||
out[9] = ((upTan - downTan) * yScale * 0.5);
|
||||
out[10] = -(zNear + zFar) / (zFar - zNear);
|
||||
out[11] = -1.0;
|
||||
out[12] = 0.0;
|
||||
out[13] = 0.0;
|
||||
out[14] = -(2.0 * zFar * zNear) / (zFar - zNear);
|
||||
out[15] = 0.0;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
var hmd: HMDVRDevice;
|
||||
var leftEyeParams = hmd.getEyeParameters("left");
|
||||
var rightEyeParams = hmd.getEyeParameters("right");
|
||||
var leftEyeRect = leftEyeParams.renderRect;
|
||||
var rightEyeRect = rightEyeParams.renderRect;
|
||||
|
||||
var canvas: HTMLCanvasElement;
|
||||
canvas.width = rightEyeRect.x + rightEyeRect.width;
|
||||
canvas.height = Math.max(leftEyeRect.y + leftEyeRect.height, rightEyeRect.y + rightEyeRect.height);
|
||||
|
||||
var gHMD: WebVRApi.VRDevice;
|
||||
var gPositionSensor: WebVRApi.VRDevice;
|
||||
|
||||
navigator.getVRDevices().then(function(devices) {
|
||||
for (var i = 0; i < devices.length; ++i) {
|
||||
if (devices[i] instanceof HMDVRDevice) {
|
||||
gHMD = devices[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (gHMD) {
|
||||
for (var i = 0; i < devices.length; ++i) {
|
||||
if (devices[i] instanceof PositionSensorVRDevice &&
|
||||
devices[i].hardwareUnitId == gHMD.hardwareUnitId) {
|
||||
gPositionSensor = devices[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
Vendored
+175
@@ -0,0 +1,175 @@
|
||||
// Type definitions for WebVR API
|
||||
// Project: http://mozvr.github.io/webvr-spec/webvr.html
|
||||
// Definitions by: Toshiya Nakakura <https://github.com/nakakura>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../geometry-dom/geometry-dom.d.ts" />
|
||||
/// <reference path="../es6-promise/es6-promise.d.ts" />
|
||||
|
||||
declare type VREye = string;
|
||||
|
||||
declare module WebVRApi {
|
||||
export interface VRFieldOfViewReadOnly {
|
||||
upDegrees: number;
|
||||
rightDegrees: number;
|
||||
downDegrees: number;
|
||||
leftDegrees: number;
|
||||
}
|
||||
|
||||
export interface VRFieldOfViewInit {
|
||||
upDegrees: number;
|
||||
rightDegrees: number;
|
||||
downDegrees: number;
|
||||
leftDegrees: number;
|
||||
}
|
||||
|
||||
export interface VRFieldOfView extends VRFieldOfViewReadOnly {
|
||||
constructor(upDegrees:number, rightDegrees:number, downDegrees:number, leftDegrees:number): VRFieldOfView;
|
||||
upDegrees: number;
|
||||
rightDegrees: number;
|
||||
downDegrees: number;
|
||||
leftDegrees: number;
|
||||
}
|
||||
|
||||
export interface VRPositionState {
|
||||
/**
|
||||
* Monotonically increasing value that allows the author to determine if position state data been updated from the hardware.
|
||||
*/
|
||||
timeStamp: number;
|
||||
/**
|
||||
* True if the position attribute is valid. If false position MUST be null.
|
||||
*/
|
||||
hasPosition: boolean;
|
||||
/**
|
||||
* Position of the sensor at timeStamp as a 3D vector.
|
||||
*/
|
||||
position?: GeometryDom.DOMPoint;
|
||||
/**
|
||||
* Linear velocity of the sensor at timeStamp.
|
||||
*/
|
||||
linearVelocity?: GeometryDom.DOMPoint;
|
||||
/**
|
||||
* Linear acceleration of the sensor at timeStamp.
|
||||
*/
|
||||
linearAcceleration?: GeometryDom.DOMPoint;
|
||||
/**
|
||||
* True if the orientation attribute is valid. If false orientation MUST be null.
|
||||
*/
|
||||
hasOrientation: boolean;
|
||||
/**
|
||||
* Orientation of the sensor at timeStamp as a quaternion.
|
||||
*/
|
||||
orientation?: GeometryDom.DOMPoint;
|
||||
/**
|
||||
* Angular velocity of the sensor at timeStamp.
|
||||
*/
|
||||
angularVelocity?: GeometryDom.DOMPoint;
|
||||
/**
|
||||
* Angular acceleration of the sensor at timeStamp.
|
||||
*/
|
||||
angularAcceleration?: GeometryDom.DOMPoint;
|
||||
}
|
||||
|
||||
export interface VREyeParameters {
|
||||
/**
|
||||
* Describes the minimum supported field of view for the eye.
|
||||
*/
|
||||
minimumFieldOfView: VRFieldOfView;
|
||||
/**
|
||||
* Describes the maximum supported field of view for the eye.
|
||||
*/
|
||||
maximumFieldOfView: VRFieldOfView;
|
||||
/**
|
||||
* Describes the recommended field of view for the eye.
|
||||
*/
|
||||
recommendedFieldOfView: VRFieldOfView;
|
||||
/**
|
||||
* Offset from the center of the users head to the eye in meters.
|
||||
*/
|
||||
eyeTranslation: GeometryDom.DOMPoint;
|
||||
/**
|
||||
* The current field of view for the eye, as specified by setFieldOfView.
|
||||
*/
|
||||
currentFieldOfView: VRFieldOfView;
|
||||
/**
|
||||
* Describes the viewport of a canvas into which visuals for this eye should be rendered.
|
||||
*/
|
||||
renderRect: GeometryDom.DOMRect;
|
||||
}
|
||||
|
||||
export interface VRDevice {
|
||||
/**
|
||||
* An identifier for the distinct hardware unit that this VRDevice is a part of.
|
||||
*/
|
||||
hardwareUnitId: string;
|
||||
/**
|
||||
* An identifier for this distinct sensor/device on a physical hardware device.
|
||||
*/
|
||||
deviceId: string;
|
||||
/**
|
||||
* A user-readable name identifying the device.
|
||||
*/
|
||||
deviceName: string;
|
||||
}
|
||||
}
|
||||
|
||||
declare class HMDVRDevice implements WebVRApi.VRDevice {
|
||||
/**
|
||||
* An identifier for the distinct hardware unit that this VRDevice is a part of.
|
||||
*/
|
||||
hardwareUnitId: string;
|
||||
/**
|
||||
* An identifier for this distinct sensor/device on a physical hardware device.
|
||||
*/
|
||||
deviceId: string;
|
||||
/**
|
||||
* A user-readable name identifying the device.
|
||||
*/
|
||||
deviceName: string;
|
||||
|
||||
/**
|
||||
* Return the current VREyeParameters for the given eye.
|
||||
*/
|
||||
getEyeParameters(whichEye: VREye): WebVRApi.VREyeParameters;
|
||||
/**
|
||||
* Set the field of view for both eyes. If
|
||||
*/
|
||||
setFieldOfView(leftFOV?: WebVRApi.VRFieldOfViewInit, rightFOV?: WebVRApi.VRFieldOfViewInit, zNear?: number, zFar?: number): void;
|
||||
}
|
||||
|
||||
declare class PositionSensorVRDevice implements WebVRApi.VRDevice {
|
||||
/**
|
||||
* An identifier for the distinct hardware unit that this VRDevice is a part of.
|
||||
*/
|
||||
hardwareUnitId: string;
|
||||
/**
|
||||
* An identifier for this distinct sensor/device on a physical hardware device.
|
||||
*/
|
||||
deviceId: string;
|
||||
/**
|
||||
* A user-readable name identifying the device.
|
||||
*/
|
||||
deviceName: string;
|
||||
|
||||
/**
|
||||
* Return a VRPositionState dictionary containing the state of this position sensor state for the current frame (if within a requestAnimationFrame context) or for the previous frame.
|
||||
*/
|
||||
getState(): WebVRApi.VRPositionState;
|
||||
/**
|
||||
* Return the current instantaneous sensor state.
|
||||
*/
|
||||
getImmediateState(): WebVRApi.VRPositionState;
|
||||
|
||||
/**
|
||||
* Reset this sensor, treating its current position and orientation yaw as the "origin/zero" values.
|
||||
*/
|
||||
resetSensor(): void;
|
||||
}
|
||||
|
||||
interface Navigator {
|
||||
/**
|
||||
* Return a Promise which resolves to a list of available VRDevices.
|
||||
*/
|
||||
getVRDevices(): Promise<Array<WebVRApi.VRDevice>>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user