mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-27 11:40:08 +08:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[{*.json,*.yml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
+2
-6
@@ -28,13 +28,9 @@ _infrastructure/tests/build
|
||||
.idea
|
||||
*.iml
|
||||
*.js.map
|
||||
|
||||
#rx.js
|
||||
!rx.js
|
||||
|
||||
#zip.js
|
||||
!zip.js
|
||||
!*.js/
|
||||
|
||||
node_modules
|
||||
|
||||
.sublimets
|
||||
.settings/launch.json
|
||||
|
||||
+169
-33
@@ -12,33 +12,42 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](amcharts/AmCharts.d.ts) [amCharts](http://www.amcharts.com) by [aleksey-bykov](https://github.com/aleksey-bykov)
|
||||
* [:link:](amplifyjs/amplifyjs.d.ts) [AmplifyJs](http://amplifyjs.com) by [Jonas Eriksson](https://github.com/joeriks)
|
||||
* [:link:](amqp-rpc/amqp-rpc.d.ts) [amqp-rpc](https://github.com/demchenkoe/node-amqp-rpc) by [Wonshik Kim](https://github.com/wokim)
|
||||
* [:link:](angular-file-upload/angular-file-upload.d.ts) [Angular File Upload](https://github.com/danialfarid/angular-file-upload) by [John Reilly](https://github.com/johnnyreilly)
|
||||
* [:link:](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-cookies.d.ts) [Angular JS (ngCookies module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar)
|
||||
* [: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)
|
||||
* [:link:](angularjs/angular-route.d.ts) [Angular JS (ngRoute module)](http://angularjs.org) by [Jonathan Park](https://github.com/park9140)
|
||||
* [:link:](angularjs/angular-sanitize.d.ts) [Angular JS (ngSanitize module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar)
|
||||
* [:link:](angular-ui-router/angular-ui-router.d.ts) [Angular JS (ui.router module)](https://github.com/angular-ui/ui-router) by [Michel Salib](https://github.com/michelsalib)
|
||||
* [:link:](angular-material/angular-material.d.ts) [Angular Material (ng.material module)](https://github.com/angular/material) by [Matt Traynham](https://github.com/mtraynham)
|
||||
* [:link:](angular-meteor/angular-meteor.d.ts) [Angular JS Meteor (angular.meteor module)](https://github.com/Urigo/angular-meteor) by [Peter Grman](https://github.com/pgrm)
|
||||
* [:link:](angular-material/angular-material.d.ts) [Angular Material (angular.material module)](https://github.com/angular/material) by [Matt Traynham](https://github.com/mtraynham)
|
||||
* [:link:](angular-protractor/angular-protractor.d.ts) [Angular Protractor](https://github.com/angular/protractor) by [Bill Armstrong](https://github.com/BillArmstrong)
|
||||
* [:link:](angular-scenario/angular-scenario.d.ts) [Angular Scenario Testing (ngScenario module)](http://angularjs.org) by [RomanoLindano](https://github.com/RomanoLindano)
|
||||
* [:link:](angular-translate/angular-translate.d.ts) [Angular Translate (pascalprecht.translate module)](https://github.com/PascalPrecht/angular-translate) by [Michel Salib](https://github.com/michelsalib)
|
||||
* [:link:](angular-ui-bootstrap/angular-ui-bootstrap.d.ts) [Angular UI Bootstrap](https://github.com/angular-ui/bootstrap) by [Brian Surowiec](https://github.com/xt0rted)
|
||||
* [:link:](angular-wizard/angular-wizard.d.ts) [Angular Wizard](https://github.com/mgonto/angular-wizard) by [Marko Jurisic](https://github.com/mjurisic)
|
||||
* [:link:](angular-bootstrap-lightbox/angular-bootstrap-lightbox.d.ts) [angular-bootstrap-lightbox](https://github.com/compact/angular-bootstrap-lightbox) by [Roland Zwaga](https://github.com/rolandzwaga)
|
||||
* [:link:](angular-dynamic-locale/angular-dynamic-locale.d.ts) [angular-dynamic-locale](https://github.com/lgalfaso/angular-dynamic-locale) by [Stephen Lautier](https://github.com/stephenlautier)
|
||||
* [:link:](angular-hotkeys/angular-hotkeys.d.ts) [angular-hotkeys](https://github.com/chieffancypants/angular-hotkeys) by [Jason Zhao](https://github.com/jlz27), [Stefan Steinhart](https://github.com/reppners)
|
||||
* [:link:](angular-http-auth/angular-http-auth.d.ts) [angular-http-auth](https://github.com/witoldsz/angular-http-auth) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](angular-jwt/angular-jwt.d.ts) [angular-jwt](https://github.com/auth0/angular-jwt) by [Reto Rezzonico](https://github.com/rerezz)
|
||||
* [:link:](angular-local-storage/angular-local-storage.d.ts) [angular-local-storage](https://github.com/grevory/angular-local-storage) by [Ken Fukuyama](https://github.com/kenfdev)
|
||||
* [:link:](angular-localForage/angular-localForage.d.ts) [angular-localForage](https://github.com/ocombe/angular-localForage) by [Stefan Steinhart](https://github.com/reppners)
|
||||
* [:link:](angular-notify/angular-notify.d.ts) [angular-notify](https://github.com/cgross/angular-notify) by [Suwato](https://github.com/Suwato/DefinitelyTyped)
|
||||
* [:link:](angular-scroll/angular-scroll.d.ts) [angular-scroll](https://github.com/oblador/angular-scroll) by [Sam Herrmann](https://github.com/samherrmann)
|
||||
* [:link:](angular-spinner/angular-spinner.d.ts) [angular-spinner.js](https://github.com/urish/angular-spinner) by [Marcin Biegała](https://github.com/Biegal)
|
||||
* [:link:](angular-storage/angular-storage.d.ts) [angular-storage](https://github.com/auth0/angular-storage) by [Matthew DeKrey](https://github.com/mdekrey)
|
||||
* [: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:](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)
|
||||
* [:link:](ansi-styles/ansi-styles.d.ts) [ansi-styles](https://github.com/sindresorhus/ansi-styles) by [bryn austin bellomy](https://github.com/brynbellomy)
|
||||
* [:link:](ansicolors/ansicolors.d.ts) [ansicolors](https://github.com/thlorenz/ansicolors) by [rogierschouten](https://github.com/rogierschouten)
|
||||
* [:link:](any-db/any-db.d.ts) [any-db](https://github.com/grncdr/node-any-db) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](any-db-transaction/any-db-transaction.d.ts) [any-db-transaction](https://github.com/grncdr/node-any-db-transaction) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
@@ -46,6 +55,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](cordova-plugin-email-composer/cordova-plugin-email-composer.d.ts) [Apache Cordova Email Composer plugin](https://github.com/katzer/cordova-plugin-email-composer) by [Dave Taylor](http://davetayls.me)
|
||||
* [:link:](polymer/polymer.app-router.d.ts) [app-router](https://github.com/erikringsmuth/app-router) by [Louis Grignon](https://github.com/lgrignon)
|
||||
* [:link:](appframework/appframework.d.ts) [AppFramework](http://app-framework-software.intel.com) by [kyo_ago](https://github.com/kyo-ago)
|
||||
* [:link:](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)
|
||||
* [:link:](arcgis-js-api/arcgis-js-api.d.ts) [ArcGIS API for JavaScript](http://js.arcgis.com) by [Esri](http://www.esri.com)
|
||||
* [:link:](archy/archy.d.ts) [archy](https://github.com/substack/node-archy) by [vvakame](https://github.com/vvakame)
|
||||
@@ -53,15 +63,17 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](aspnet-identity-pw/aspnet-identity-pw.d.ts) [aspnet-identity-pw](https://github.com/Syncbak-Git/aspnet-identity-pw) by [jt000](https://github.com/jt000)
|
||||
* [:link:](assert/assert.d.ts) [assert and power-assert](https://github.com/Jxck/assert) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](assertion-error/assertion-error.d.ts) [assertion-error](https://github.com/chaijs/assertion-error) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](async/async.d.ts) [Async](https://github.com/caolan/async) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](async/async.d.ts) [Async](https://github.com/caolan/async) by [Boris Yankov](https://github.com/borisyankov), [Arseniy Maximov](https://github.com/kern0)
|
||||
* [:link:](asyncblock/asyncblock.d.ts) [asyncblock](https://github.com/scriby/asyncblock) by [Hiroki Horiuchi](https://github.com/horiuchi)
|
||||
* [:link:](atmosphere/atmosphere.d.ts) [Atmosphere](https://github.com/Atmosphere/atmosphere-javascript) by [Kai Toedter](https://github.com/toedter)
|
||||
* [:link:](atom/atom.d.ts) [Atom](https://atom.io) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](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:](atpl/atpl.d.ts) [atpl](https://github.com/soywiz/atpl.js) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
* [:link:](auth0/auth0.d.ts) [Auth0.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
|
||||
* [:link:](auth0.widget/auth0.widget.d.ts) [Auth0Widget.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
|
||||
* [:link:](auth0.lock/auth0.lock.d.ts) [Auth0Widget.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
|
||||
* [:link:](auth0.widget/auth0.widget.d.ts) [Auth0Widget.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
|
||||
* [:link:](autobahn/autobahn.d.ts) [AutobahnJS](http://autobahn.ws/js) by [Elad Zelingher](https://github.com/darkl)
|
||||
* [:link:](autoprefixer-core/autoprefixer-core.d.ts) [Autoprefixer Core](https://github.com/postcss/autoprefixer-core) by [Asana](https://asana.com)
|
||||
* [:link:](aws-sdk/aws-sdk.d.ts) [aws-sdk](https://github.com/aws/aws-sdk-js) by [midknight41](https://github.com/midknight41)
|
||||
* [:link:](axios/axios.d.ts) [axios](https://github.com/mzabriskie/axios) by [Marcel Buesing](https://github.com/marcelbuesing)
|
||||
* [: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)
|
||||
@@ -85,7 +97,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [: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:](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)
|
||||
* [:link:](bootstrap-notify/bootstrap-notify.d.ts) [bootstrap-notify](https://github.com/Nijikokun/bootstrap-notify) by [Blake Niemyjski](https://github.com/niemyjski)
|
||||
* [: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)
|
||||
@@ -97,39 +111,48 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](bucks/bucks.d.ts) [bucks.js](https://github.com/CyberAgent/bucks.js) by [Shunsuke Ohtani](https://github.com/zaneli)
|
||||
* [:link:](buffer-equal/buffer-equal.d.ts) [buffer-equal](https://github.com/substack/node-buffer-equal) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](bl/bl.d.ts) [BufferList](https://github.com/rvagg/bl) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](buffers/buffers.d.ts) [buffers](https://github.com/substack/node-buffers) by [Robert Hencke](https://github.com/rhencke)
|
||||
* [:link:](bufferstream/bufferstream.d.ts) [bufferstream](https://github.com/dodo/node-bufferstream) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](bunyan-prettystream/bunyan-prettystream.d.ts) [bunyan-prettystream](https://www.npmjs.com/package/bunyan-prettystream) by [Jason Swearingen](https://github.com/jasonswearingen)
|
||||
* [:link:](bunyan-prettystream/bunyan-prettystream.d.ts) [bunyan-prettystream](https://www.npmjs.com/package/bunyan-prettystream) by [Jason Swearingen](https://github.com/jasonswearingen), [Vadim Macagon](https://github.com/enlight)
|
||||
* [:link:](business-rules-engine/business-rules-engine.d.ts) [business-rules-engine](https://github.com/rsamec/form) by [Roman Samec](https://github.com/rsamec)
|
||||
* [:link:](byline/byline.d.ts) [byline](https://github.com/jahewson/node-byline) by [Stefan Steinhart](https://github.com/reppners)
|
||||
* [:link:](calq/calq.d.ts) [calq](https://calq.io/docs/client/javascript/reference) by [Eirik Hoem](https://github.com/eirikhm)
|
||||
* [:link:](camljs/camljs.d.ts) [camljs](http://camljs.codeplex.com) by [Andrey Markeev](http://markeev.com)
|
||||
* [:link:](canvasjs/canvasjs.d.ts) [CanvasJS](http://canvasjs.com) by [Mark Overholt](https://github.com/mover5)
|
||||
* [:link:](casperjs/casperjs.d.ts) [CasperJS](http://casperjs.org) by [Jed Mao](https://github.com/jedmao)
|
||||
* [:link:](chai/chai.d.ts) [chai](http://chaijs.com) by [Jed Hunsaker](https://github.com/jedhunsaker), [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](chai/chai.d.ts) [chai](http://chaijs.com) by [Jed Mao](https://github.com/jedmao), [Bart van der Schoor](https://github.com/Bartvds), [Andrew Brown](https://github.com/AGBrown)
|
||||
* [:link:](chai-as-promised/chai-as-promised.d.ts) [chai-as-promised](https://github.com/domenic/chai-as-promised) by [jt000](https://github.com/jt000)
|
||||
* [:link:](chai-datetime/chai-datetime.d.ts) [chai-datetime](https://github.com/gaslight/chai-datetime.git) by [Cliff Burger](https://github.com/cliffburger)
|
||||
* [:link:](chai-fuzzy/chai-fuzzy.d.ts) [chai-fuzzy](http://chaijs.com/plugins/chai-fuzzy) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](chai-http/chai-http.d.ts) [chai-http](https://github.com/chaijs/chai-http) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](chai-jquery/chai-jquery.d.ts) [chai-jquery](https://github.com/chaijs/chai-jquery) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid)
|
||||
* [:link:](chai-subset/chai-subset.d.ts) [chai-subset](https://github.com/e-conomic/chai-subset) by [Sam Noedel](https://github.com/delta62), [Andrew Brown](https://github.com/AGBrown)
|
||||
* [:link:](chalk/chalk.d.ts) [chalk](https://github.com/sindresorhus/chalk) by [Diullei Gomes](https://github.com/Diullei), [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](chance/chance.d.ts) [Chance](http://chancejs.com) by [Chris Bowdon](https://github.com/cbowdon)
|
||||
* [:link:](change-case/change-case.d.ts) [change-case](https://github.com/blakeembrey/change-case) by [Asana](https://asana.com)
|
||||
* [:link:](chartjs/chart.d.ts) [Chart.js](https://github.com/nnnick/Chart.js) by [Steve Fenton](https://github.com/Steve-Fenton)
|
||||
* [:link:](checksum/checksum.d.ts) [checksum](https://github.com/dshaw/checksum) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](cheerio/cheerio.d.ts) [Cheerio](https://github.com/cheeriojs/cheerio) by [Bret Little](https://github.com/blittle), [VILIC VANE](http://vilic.info), [Wayne Maurer](https://github.com/wmaurer)
|
||||
* [:link:](chocolatechipjs/chocolatechipjs.d.ts) [chocolatechip](https://github.com/chocolatechipui/ChocolateChipJS) by [Robert Biggs](http://chocolatechip-ui.com)
|
||||
* [:link:](chokidar/chokidar.d.ts) [chokidar](https://github.com/paulmillr/chokidar) by [Stefan Steinhart](https://github.com/reppners)
|
||||
* [:link:](chosen/chosen.jquery.d.ts) [Chosen.JQuery](http://harvesthq.github.com/chosen) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](chroma-js/chroma-js.d.ts) [Chroma.js](https://github.com/gka/chroma.js) by [Sebastian Brückner](https://github.com/invliD)
|
||||
* [: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:](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:](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)
|
||||
* [:link:](colorbrewer/colorbrewer.d.ts) [colorbrewer](https://github.com/jeanlauliac/colorbrewer) by [Matt Traynham](https://github.com/mtraynham)
|
||||
* [: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:](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:](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)
|
||||
@@ -140,6 +163,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](cordovarduino/cordovarduino.d.ts) [Cordovarduino plugin](https://github.com/stereolux/cordovarduino) by [Hendrik Maus](https://github.com/hendrikmaus)
|
||||
* [:link:](couchbase/couchbase.d.ts) [Couchbase Couchnode](https://github.com/couchbase/couchnode) by [Basarat Ali Syed](https://github.com/basarat)
|
||||
* [:link:](createjs/createjs.d.ts) [CreateJS](http://www.createjs.com) by [Pedro Ferreira](https://bitbucket.org/drk4), [Chris Smith](https://github.com/evilangelist), [Satoru Kimura](https://github.com/gyohk)
|
||||
* [:link:](cron/cron.d.ts) [cron](https://www.npmjs.com/package/cron) by [Hiroki Horiuchi](https://github.com/horiuchi)
|
||||
* [:link:](crossfilter/crossfilter.d.ts) [CrossFilter](https://github.com/square/crossfilter) by [Schmulik Raskin](https://github.com/schmuli)
|
||||
* [:link:](crossroads/crossroads.d.ts) [Crossroads.js](http://millermedeiros.github.io/crossroads.js) by [Diullei Gomes](https://github.com/diullei)
|
||||
* [:link:](crypto-js/crypto-js.d.ts) [crypto-js](https://github.com/evanvosberg/crypto-js) by [Michael Zabka](https://github.com/misak113)
|
||||
@@ -147,45 +171,56 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [: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:](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 [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](d3/d3.d.ts) [d3JS](http://d3js.org) by [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](d3.cloud.layout/d3.cloud.layout.d.ts) [d3JS cloud layout plugin by Jason Davies](https://github.com/jasondavies/d3-cloud) by [hans windhoff](https://github.com/hansrwindhoff)
|
||||
* [:link:](dagre/dagre.d.ts) [dagre](https://github.com/cpettitt/dagre) by [Qinfeng Chen](https://github.com/qinfchen)
|
||||
* [:link:](dagre-d3/dagre-d3.d.ts) [dagre-d3.core.js](https://github.com/cpettitt/dagre-d3) by [Mark Wong Siang Kai](https://github.com/markwongsk)
|
||||
* [:link:](dat-gui/dat-gui.d.ts) [dat.GUI](https://github.com/dataarts/dat.gui) by [Satoru Kimura](https://github.com/gyohk)
|
||||
* [:link:](DataStream.js/DataStream.js.d.ts) [DataStream.js](https://github.com/kig/DataStream.js) by [Tat](https://github.com/tatchx)
|
||||
* [:link:](date.format.js/date.format.d.ts) [Date Format](http://blog.stevenlevithan.com/archives/date-time-format) by [Rob Stutton](https://github.com/balrob)
|
||||
* [:link:](datejs/datejs.d.ts) [DateJS](http://www.datejs.com) by [David Khristepher Santos](http://github.com/rupertavery)
|
||||
* [:link:](dcjs/dc.d.ts) [DCJS](https://github.com/dc-js/dc.js) by [hans windhoff](https://github.com/hansrwindhoff), [matt traynham](https://github.com/mtraynham)
|
||||
* [:link:](debug/debug.d.ts) [debug](https://github.com/visionmedia/debug) by [Seon-Wook Park](https://github.com/swook)
|
||||
* [:link:](decimal.js/decimal.js.d.ts) [decimal.js](http://mikemcl.github.io/decimal.js) by [Joseph Rossi](http://github.com/musicist288)
|
||||
* [:link:](deep-diff/deep-diff.d.ts) [deep-diff](https://github.com/flitbit/diff) by [ZauberNerd](https://github.com/ZauberNerd)
|
||||
* [:link:](deep-freeze/deep-freeze.d.ts) [deep-freeze](https://github.com/substack/deep-freeze) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](del/del.d.ts) [del](https://github.com/sindresorhus/del) by [Asana](https://asana.com)
|
||||
* [:link:](deployJava/deployJava.d.ts) [deployJava.js](https://www.java.com/js/deployJava.txt) by [Cyril Schumacher](https://github.com/cyrilschumacher)
|
||||
* [:link:](detect-indent/detect-indent.d.ts) [detect-indent](https://github.com/sindresorhus/detect-indent) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](devextreme/dx.devextreme.d.ts) [DevExtreme](http://js.devexpress.com) by [DevExpress Inc.](http://devexpress.com)
|
||||
* [:link:](dexie/dexie.d.ts) [Dexie](https://github.com/dfahlander/Dexie.js) by [David Fahlander](http://github.com/dfahlander)
|
||||
* [:link:](dhtmlxgantt/dhtmlxgantt.d.ts) [dhtmlxGantt](http://dhtmlx.com/docs/products/dhtmlxGantt) by [Maksim Kozhukh](http://github.com/mkozhukh)
|
||||
* [:link:](dhtmlxscheduler/dhtmlxscheduler.d.ts) [dhtmlxScheduler](http://dhtmlx.com/docs/products/dhtmlxScheduler) by [Maksim Kozhukh](http://github.com/mkozhukh)
|
||||
* [:link:](di-lite/di-lite.d.ts) [di-lite](https://github.com/NickQiZhu/di.js) by [Timothy Morris](https://github.com/dcrusader)
|
||||
* [:link:](diff/diff.d.ts) [diff](https://github.com/kpdecker/jsdiff) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](docCookies/docCookies.d.ts) [docCookies](https://developer.mozilla.org/en-US/docs/Web/API/document.cookie) by [Jon Egerton](https://github.com/jonegerton)
|
||||
* [:link:](dock-spawn/dock-spawn.d.ts) [Dock Spawn](http://dockspawn.com) by [Drew Noakes](https://drewnoakes.com)
|
||||
* [:link:](documentdb/documentdb.d.ts) [DocumentDB](https://github.com/Azure/azure-documentdb-node) by [Noel Abrahams](https://github.com/NoelAbrahams)
|
||||
* [:link:](documentdb/documentdb.d.ts) [DocumentDB](https://github.com/Azure/azure-documentdb-node) by [Noel Abrahams](https://github.com/NoelAbrahams), [Brett Gutstein](https://github.com/brettferdosi)
|
||||
* [:link:](dojo/dojo.d.ts) [Dojo](http://dojotoolkit.org) by [Michael Van Sickle](https://github.com/vansimke)
|
||||
* [:link:](dompurify/dompurify.d.ts) [DOM Purify](https://github.com/cure53/DOMPurify) by [Dave Taylor](http://davetayls.me)
|
||||
* [:link:](domo/domo.d.ts) [Domo](http://domo-js.com) by [Steve Fenton](https://github.com/Steve-Fenton)
|
||||
* [:link:](domready/domready.d.ts) [domready](https://github.com/ded/domready) by [Christian Holm Nielsen](https://github.com/dotnetnerd)
|
||||
* [:link:](donna/donna.d.ts) [donna](https://github.com/atom/donna) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](dot/dot.d.ts) [doT](https://github.com/olado/doT) by [ZombieHunter](https://github.com/ZombieHunter)
|
||||
* [:link:](dotdotdot/dotdotdot.d.ts) [dotdotdot](http://dotdotdot.frebsite.nl) by [Milan Jaros](https://github.com/milanjaros)
|
||||
* [:link:](doublearray/doublearray.d.ts) [doublearray](https://github.com/takuyaa/doublearray) by [MIZUSHIMA Junki](https://github.com/mzsm)
|
||||
* [:link:](drop/drop.d.ts) [Drop](http://github.hubspot.com/drop) by [Adi Dahiya](https://github.com/adidahiya)
|
||||
* [:link:](dropboxjs/dropboxjs.d.ts) [dropbox-js](https://github.com/dropbox/dropbox-js) by [Steve Fenton](https://github.com/Steve-Fenton), [Pedro Casaubon](https://github.com/xperiments)
|
||||
* [:link:](dropzone/dropzone.d.ts) [Dropzone](http://www.dropzonejs.com) by [Natan Vivo](https://github.com/nvivo)
|
||||
* [:link:](dsv/dsv.d.ts) [dsv](https://www.npmjs.com/package/dsv) by [Jason Swearingen](https://jasonswearingen.github.io)
|
||||
* [:link:](dts-bundle/dts-bundle.d.ts) [dts-bundle](https://github.com/TypeStrong/dts-bundle) by [Asana](https://asana.com)
|
||||
* [:link:](durandal/durandal.d.ts) [Durandal](http://durandaljs.com) by [Blue Spire](https://github.com/BlueSpire)
|
||||
* [: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-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:](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)
|
||||
* [:link:](jquery.elang/jquery.elang.d.ts) [eLang](https://github.com/sumegizoltan/ELang) by [Zoltan Sumegi](https://github.com/sumegizoltan)
|
||||
* [:link:](github-electron/github-electron.d.ts) [Electron (shared between main and rederer processes)](http://electron.atom.io) by [jedmao](https://github.com/jedmao)
|
||||
* [:link:](element-resize-event/element-resize-event.d.ts) [element-resize-event](https://github.com/KyleAMathews/element-resize-event) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](elm/elm.d.ts) [Elm](http://elm-lang.org) by [Dénes Harmath](https://github.com/thSoft)
|
||||
* [:link:](ember/ember.d.ts) [Ember.js](http://emberjs.com) by [Jed Mao](https://github.com/jedmao)
|
||||
@@ -205,6 +240,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](expect.js/expect.js.d.ts) [expect.js](https://github.com/LearnBoost/expect.js) by [Teppei Sato](https://github.com/teppeis)
|
||||
* [:link:](expectations/expectations.d.ts) [expectations.js](https://github.com/spmason/expectations) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](express/express.d.ts) [Express 4.x](http://expressjs.com) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](express-debug/express-debug.d.ts) [express-debug](https://github.com/devoidfury/express-debug) by [Federico Bond](https://github.com/federicobond)
|
||||
* [:link:](express-jwt/express-jwt.d.ts) [express-jwt](https://www.npmjs.org/package/express-jwt) by [Wonshik Kim](https://github.com/wokim)
|
||||
* [:link:](express-myconnection/express-myconnection.d.ts) [express-myconnection](https://www.npmjs.org/package/express-myconnection) by [Michael Ferris](https://github.com/Cellule)
|
||||
* [:link:](express-partials/express-partials.d.ts) [express-partials](https://github.com/publicclass/express-partials) by [jt000](https://github.com/jt000)
|
||||
@@ -213,9 +249,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](express-validator/express-validator.d.ts) [express-validator](https://github.com/ctavan/express-validator) by [Nathan Ridley](https://github.com/axefrog), [Jonathan Häberle](http://dreampulse.de)
|
||||
* [:link:](extend/extend.d.ts) [extend](https://www.npmjs.com/package/extend) by [Stefan Steinhart](https://github.com/reppners)
|
||||
* [:link:](extjs/ExtJS.d.ts) [ExtJS](http://www.sencha.com/products/extjs) by [Brian Kotek](https://github.com/brian428)
|
||||
* [:link:](fabricjs/fabricjs.d.ts) [FabricJS](http://fabricjs.com) by [Oliver Klemencic](https://github.com/oklemencic)
|
||||
* [:link:](eyes/eyes.d.ts) [eyes](https://github.com/cloudhead/eyes.js) by [bryn austin bellomy](https://github.com/brynbellomy)
|
||||
* [:link:](fabricjs/fabricjs.d.ts) [FabricJS](http://fabricjs.com) by [Oliver Klemencic](https://github.com/oklemencic), [Joseph Livecchi](https://github.com/joewashear007)
|
||||
* [:link:](fbsdk/fbsdk.d.ts) [Facebook Javascript SDK](https://developers.facebook.com/docs/javascript) by [Joshua Strobl](https://github.com/JoshStrobl)
|
||||
* [:link:](fancybox/fancybox.d.ts) [fancyBox](https://github.com/fancyapps/fancyBox) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](farbtastic/farbtastic.d.ts) [Farbtastic: jQuery Color Wheel](http://mattfarina.github.io/farbtastic) by [Matt Brooks](https://github.com/EnableSoftware)
|
||||
* [:link:](fast-stats/fast-stats.d.ts) [fast-stats](https://github.com/bluesmoon/node-faststats) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [: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)
|
||||
@@ -236,9 +274,10 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](flux/flux.d.ts) [Flux](http://facebook.github.io/flux) by [Steve Baker](https://github.com/stkb)
|
||||
* [:link:](fluxxor/fluxxor.d.ts) [Fluxxor](https://github.com/BinaryMuse/fluxxor) by [Yuichi Murata](https://github.com/mrk21)
|
||||
* [:link:](ion.rangeSlider/ion.rangeSlider.d.ts) [for Ion.RangeSlider](https://github.com/IonDen/ion.rangeSlider) by [Sixin Li](https://github.com/sixinli)
|
||||
* [: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)
|
||||
* [: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:](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)
|
||||
@@ -255,6 +294,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [: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:](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)
|
||||
@@ -266,10 +306,12 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](gapi/gapi.d.ts) [Google API Client](https://code.google.com/p/google-api-javascript-client) by [Frank M](https://github.com/sgtfrankieboy)
|
||||
* [:link:](google.feeds/google.feed.api.d.ts) [Google Feed Apis](https://developers.google.com/feed) by [RodneyJT](https://github.com/RodneyJT)
|
||||
* [:link:](google.geolocation/google.geolocation.d.ts) [Google Geolocation](https://code.google.com/p/geo-location-javascript) by [Vincent Bortone](https://github.com/vbortone)
|
||||
* [:link:](googlemaps/google.maps.d.ts) [Google Geolocation](https://developers.google.com/maps) by [Folia A/S](http://www.folia.dk)
|
||||
* [:link:](googlemaps/google.maps.d.ts) [Google Maps JavaScript API](https://developers.google.com/maps) by [Folia A/S](http://www.folia.dk), [Chris Wrench](https://github.com/cgwrench)
|
||||
* [:link:](gapi.pagespeedonline/gapi.pagespeedonline.d.ts) [Google Page Speed Online Api](https://developers.google.com/speed/pagespeed) by [Frank M](https://github.com/sgtfrankieboy)
|
||||
* [:link:](google.picker/google.picker.d.ts) [Google Picker API](https://developers.google.com/picker) by [grapswiz](https://github.com/grapswiz)
|
||||
* [:link:](google-drive-realtime-api/google-drive-realtime-api.d.ts) [Google Realtime API](https://developers.google.com/google-apps/realtime) by [Dustin Wehr](http://cs.toronto.edu/~wehr)
|
||||
* [:link:](recaptcha/recaptcha.d.ts) [Google Recaptcha](https://www.google.com/recaptcha) by [Brent Jenkins](https://github.com/brentj73)
|
||||
* [:link:](grecaptcha/grecaptcha.d.ts) [Google Recaptcha v2](https://www.google.com/recaptcha) by [Kristof Mattei](http://kristofmattei.be)
|
||||
* [:link:](gapi.translate/gapi.translate.d.ts) [Google Translate API](https://developers.google.com/translate) by [Frank M](https://github.com/sgtfrankieboy)
|
||||
* [:link:](gapi.urlshortener/gapi.urlshortener.d.ts) [Google Url Shortener API](https://developers.google.com/url-shortener) by [Frank M](https://github.com/sgtfrankieboy)
|
||||
* [:link:](google.visualization/google.visualization.d.ts) [Google Visualisation Apis](https://developers.google.com/chart) by [Dan Ludwig](https://github.com/danludwig)
|
||||
@@ -279,9 +321,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](greensock/greensock.d.ts) [GreenSock Animation Platform](http://www.greensock.com/get-started-js) by [Robert S](https://github.com/codebelt)
|
||||
* [:link:](gridfs-stream/gridfs-stream.d.ts) [gridfs-stream](https://github.com/aheckmann/gridfs-stream) by [Lior Mualem](https://github.com/liorm)
|
||||
* [:link:](gruntjs/gruntjs.d.ts) [Grunt 0.4.x](http://gruntjs.com) by [Jeff May](https://github.com/jeffmay), [Basarat Ali Syed](https://github.com/basarat)
|
||||
* [:link:](gsap/TweenLite.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
|
||||
* [:link:](gsap/Ease.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
|
||||
* [:link:](gsap/Core.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
|
||||
* [:link:](gsap/Ease.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
|
||||
* [:link:](gsap/TweenLite.d.ts) [GSAP](http://greensock.com) by [VILIC VANE](https://vilic.github.io)
|
||||
* [:link:](gulp/gulp.d.ts) [Gulp v3.8.x](http://gulpjs.com) by [Drew Noakes](https://drewnoakes.com)
|
||||
* [:link:](gulp-autoprefixer/gulp-autoprefixer.d.ts) [gulp-autoprefixer](https://github.com/sindresorhus/gulp-autoprefixer) by [Asana](https://asana.com)
|
||||
* [:link:](gulp-concat/gulp-concat.d.ts) [gulp-concat](http://github.com/wearefractal/gulp-concat) by [Keita Kagurazaka](https://github.com/k-kagurazaka)
|
||||
@@ -306,14 +348,17 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](handlebars/handlebars.d.ts) [Handlebars](http://handlebarsjs.com) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](hapi/hapi.d.ts) [hapi](http://github.com/spumko/hapi) by [Jason Swearingen](http://github.com/jasonswearingen)
|
||||
* [:link:](hasher/hasher.d.ts) [Hasher.js](https://github.com/millermedeiros/hasher) by [flyfishMT](https://github.com/flyfishMT)
|
||||
* [:link:](hashids/hashids.d.ts) [Hashids.js 1.x](https://github.com/ivanakimov/hashids.node.js) by [Paulo Cesar](https://github.com/pocesar)
|
||||
* [:link:](hashmap/hashmap.d.ts) [HashMap](https://github.com/flesler/hashmap) by [Rafał Wrzeszcz](http://wrzasq.pl)
|
||||
* [:link:](he/he.d.ts) [he](https://github.com/mathiasbynens/he) by [Simon Edwards](https://github.com/sedwards2009)
|
||||
* [:link:](Headroom/headroom.d.ts) [headroom.js](http://wicky.nillia.ms/headroom.js) by [Jakub Olek](https://github.com/hakubo)
|
||||
* [:link:](heap/heap.d.ts) [heap](https://github.com/qiao/heap.js) by [Ryan McNamara](https://github.com/ryan10132)
|
||||
* [:link:](heatmap.js/heatmap.d.ts) [heatmap.js](https://github.com/pa7/heatmap.js) by [Yang Guan](https://github.com/lookuptable)
|
||||
* [:link:](hellojs/hellojs.d.ts) [hello.js](http://adodson.com/hello.js) by [Pavel Zika](https://github.com/PavelPZ)
|
||||
* [:link:](highcharts/highcharts.d.ts) [Highcharts](http://www.highcharts.com) by [Damiano Gambarotto](http://github.com/damianog)
|
||||
* [:link:](highland/highland.d.ts) [Highland](http://highlandjs.org) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](highlightjs/highlightjs.d.ts) [highlight.js](https://github.com/isagalaev/highlight.js) by [Niklas Mollenhauer](https://github.com/nikeee), [Jeremy Hull](https://github.com/sourrust)
|
||||
* [:link:](highcharts/highstock.d.ts) [Highstock](http://www.highcharts.com) by [David Deutsch](http://github.com/DavidKDeutsch)
|
||||
* [:link:](history/history.d.ts) [History.js](https://github.com/browserstate/history.js) by [Boris Yankov](https://github.com/borisyankov), [Gidon Junge](https://github.com/gjunge)
|
||||
* [:link:](howlerjs/howler.d.ts) [howler.js](https://github.com/goldfire/howler.js) by [Pedro Casaubon](https://github.com/xperiments)
|
||||
* [:link:](touch-events/touch-events.d.ts) [HTML Touch Events](http://www.w3.org/TR/touch-events) by [Kevin Barabash](https://github.com/kevinb7)
|
||||
@@ -322,20 +367,25 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](http-status/http-status.d.ts) [http-status](https://github.com/wdavidw/node-http-status) by [Michael Zabka](https://github.com/misak113)
|
||||
* [:link:](http-string-parser/http-string-parser.d.ts) [http-string-parser](https://github.com/apiaryio/http-string-parser) by [MIZUNE Pine](https://github.com/pine613)
|
||||
* [:link:](humane/humane.d.ts) [Humane](http://wavded.github.com/humane-js) by [jmvrbanac](https://github.com/jmvrbanac)
|
||||
* [:link:](hypertext-application-language/hypertext-application-language.d.ts) [Hypertext Application Language Draft 6](https://tools.ietf.org/html/draft-kelly-json-hal-06) by [Maks3w](https://github.com/maks3w)
|
||||
* [:link:](i18n-node/i18n-node.d.ts) [i18n-node](https://github.com/mashpie/i18n-node) by [Maxime LUCE](https://github.com/SomaticIT)
|
||||
* [:link:](i18next/i18next.d.ts) [i18next](http://i18next.com) by [Maarten Docter](https://github.com/mdocter)
|
||||
* [:link:](ng-i18next/ng-i18next.d.ts) [i18next](https://github.com/i18next/ng-i18next) by [Cyril Schumacher](https://github.com/cyrilschumacher)
|
||||
* [:link:](iban/iban.d.ts) [iban.js](https://github.com/arhs/iban.js) by [Cyril Schumacher](https://github.com/cyrilschumacher)
|
||||
* [:link:](icheck/icheck.d.ts) [iCheck](http://damirfoy.com/iCheck) by [Dániel Tar](https://github.com/qcz)
|
||||
* [:link:](imagemagick/imagemagick.d.ts) [imagemagick](http://github.com/rsms/node-imagemagick) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
* [:link:](imagemagick-native/imagemagick-native.d.ts) [imagemagick-native](https://www.npmjs.org/package/imagemagick-native) by [Hiroki Horiuchi](https://github.com/horiuchi)
|
||||
* [:link:](imap/imap.d.ts) [imap](https://www.npmjs.com/package/imap) by [Peter Snider](https://github.com/psnider)
|
||||
* [:link:](imgur-rest-api/imgur-rest-api.d.ts) [Imgur REST API v3](https://api.imgur.com) by [Luke William Westby](http://github.com/lukewestby)
|
||||
* [:link:](impress/impress.d.ts) [Impress.js](https://github.com/bartaz/impress.js) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](inflection/inflection.d.ts) [inflection](https://github.com/dreamerslab/node.inflection) by [Shogo Iwano](https://github.com/shiwano)
|
||||
* [:link:](ini/ini.d.ts) [ini](https://github.com/isaacs/ini) by [Marcin Porębski](https://github.com/marcinporebski)
|
||||
* [:link:](insight/insight.d.ts) [insight](https://github.com/yeoman/insight) by [vvakame](http://github.com/vvakame)
|
||||
* [:link:](interactjs/interact.d.ts) [Interacting for interact.js](https://github.com/taye/interact.js) by [Douglas Eichelberger](https://github.com/dduugg), [Adi Dahiya](https://github.com/adidahiya)
|
||||
* [:link:](interactjs/interact.d.ts) [Interacting for interact.js](https://github.com/taye/interact.js) by [Douglas Eichelberger](https://github.com/dduugg), [Adi Dahiya](https://github.com/adidahiya), [Tom Hasner](https://github.com/thasner)
|
||||
* [:link:](intercomjs/intercom.d.ts) [intercom.js](https://github.com/diy/intercom.js) by [spencerwi](http://github.com/spencerwi)
|
||||
* [:link:](inversify/inversify.d.ts) [inversify](https://github.com/inversify/InversifyJS) by [inversify](https://github.com/inversify)
|
||||
* [:link:](cordova-ionic/cordova-ionic.d.ts) [Ionic Cordova plugins](https://github.com/driftyco) by [Hendrik Maus](https://github.com/hendrikmaus)
|
||||
* [:link:](irc/irc.d.ts) [irc](https://github.com/martynsmith/node-irc) by [phillips1012](https://github.com/phillips1012)
|
||||
* [:link:](is_js/is_js.d.ts) [is.js](http://arasatasaygin.github.io/is.js) by [Rodrigo Cabral](https://github.com/cabralRodrigo)
|
||||
* [:link:](iscroll/iscroll.d.ts) [iScroll](http://cubiq.org/iscroll-4) by [Boris Yankov](https://github.com/borisyankov), [Christiaan Rakowski](https://github.com/csrakowski)
|
||||
* [:link:](iscroll/iscroll-5.d.ts) [iScroll 5](http://cubiq.org/iscroll-5-ready-for-beta-test) by [Christiaan Rakowski](https://github.com/csrakowski)
|
||||
@@ -346,16 +396,19 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](jake/jake.d.ts) [jake](https://github.com/mde/jake) by [Kon](http://phyzkit.net)
|
||||
* [:link:](jasmine/jasmine.d.ts) [Jasmine](http://jasmine.github.io) by [Boris Yankov](https://github.com/borisyankov), [Theodore Brown](https://github.com/theodorejb), [David Pärsson](https://github.com/davidparsson)
|
||||
* [:link:](jasmine-data_driven_tests/jasmine-data_driven_tests.d.ts) [Jasmine Data Driven Tests](https://github.com/gburghardt/jasmine-data_driven_tests) by [Anthony MacKinnon](https://github.com/AnthonyMacKinnon)
|
||||
* [:link:](jasmine-ajax/jasmine-ajax.d.ts) [jasmine-ajax](https://github.com/jasmine/jasmine-ajax) by [Louis Grignon](https://github.com/lgrignon)
|
||||
* [: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:](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)
|
||||
* [:link:](jbinary/jbinary.d.ts) [jBinary](https://github.com/jDataView/jBinary) by [Tim Bureck](https://github.com/tbureck)
|
||||
* [:link:](jdataview/jdataview.d.ts) [jDataView](https://github.com/jDataView/jDataView) by [Ingvar Stepanyan](https://github.com/RReverser)
|
||||
* [:link:](jest/jest.d.ts) [Jest](http://facebook.github.io/jest) by [Asana](https://asana.com)
|
||||
* [:link:](jjv/jjv.d.ts) [JJV](https://github.com/acornejo/jjv) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](jjve/jjve.d.ts) [JJVE](https://github.com/silas/jjve) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](joData/joData.d.ts) [joData](https://github.com/mccow002/joData) by [Chris Wrench](https://github.com/cgwrench)
|
||||
* [:link:](johnny-five/johnny-five.d.ts) [johnny-five](https://github.com/rwaldron/johnny-five) by [Toshiya Nakakura](https://github.com/nakakura)
|
||||
* [:link:](joi/joi.d.ts) [joi](https://github.com/spumko/joi) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](jointjs/jointjs.d.ts) [Joint JS](http://www.jointjs.com) by [Aidan Reel](http://github.com/areel), [David Durman](http://github.com/DavidDurman), [Ewout Van Gossum](https://github.com/DenEwout)
|
||||
@@ -379,6 +432,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](jquery.rowGrid/jquery.rowGrid.d.ts) [jQuery rowGrid.js plugin (v1.0.2)](https://github.com/brunjo/rowGrid.js) by [Vinayak Garg](https://github.com/vinayak-garg)
|
||||
* [:link:](royalslider/royalslider.d.ts) [jQuery royal-slider](http://dimsemenov.com/plugins/royal-slider/documentation) by [Christiaan Rakowski](https://github.com/csrakowski)
|
||||
* [:link:](jquery.simplePagination/jquery.simplePagination.d.ts) [jQuery simplePagination.js](https://github.com/flaviusmatis/simplePagination.js) by [Natan Vivo](https://github.com/nvivo)
|
||||
* [:link:](jquery-sortable/jquery-sortable.d.ts) [jQuery Sortable](http://johnny.github.io/jquery-sortable) by [Nathan Pitman](https://github.com/Seltzer)
|
||||
* [:link:](succinct/succinct.d.ts) [jQuery Succinct](http://mikeking.io/succinct) by [Matt Brooks](https://github.com/EnableSoftware)
|
||||
* [:link:](jquery.tagsmanager/jquery.tagsmanager.d.ts) [jQuery Tags Manager](http://welldonethings.com/tags/manager) by [Vincent Bortone](https://github.com/vbortone)
|
||||
* [:link:](jquery.tinycarousel/jquery.tinycarousel.d.ts) [jQuery tinycarousel](http://baijs.nl/tinycarousel) by [Christiaan Rakowski](https://github.com/csrakowski)
|
||||
* [:link:](jquery.tinyscrollbar/jquery.tinyscrollbar.d.ts) [jQuery tinyscrollbar](http://baijs.nl/tinyscrollbar) by [Christiaan Rakowski](https://github.com/csrakowski)
|
||||
@@ -407,10 +462,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](jquery.gridster/gridster.d.ts) [jQuery.gridster](https://github.com/jbaldwin/gridster) by [Josh Baldwin](https://github.com/jbaldwin)
|
||||
* [:link:](jquery.jnotify/jquery.jnotify.d.ts) [jQuery.jNotify](http://jnotify.codeplex.com) by [James Curran](https://github.com/jamescurran)
|
||||
* [:link:](jquery.jsignature/jquery.jsignature.d.ts) [jQuery.jsignature v2](https://github.com/willowsystems/jSignature) by [Patrick Magee](https://github.com/pjmagee)
|
||||
* [:link:](jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts) [jquery.jsonrpc](https://github.com/Textalk/jquery.jsonrpcclient.js) by [Maksim Karelov](https://github.com/Ty3uK)
|
||||
* [:link:](jquery.noty/jquery.noty.d.ts) [jQuery.noty](http://needim.github.io/noty) by [Aaron King](https://github.com/kingdango)
|
||||
* [:link:](jquery.payment/jquery.payment.d.ts) [jQuery.payment](https://github.com/stripe/jquery.payment) by [Eric J. Smith](https://github.com/ejsmith)
|
||||
* [:link:](jquery.pjax.falsandtru/jquery.pjax.d.ts) [jquery.pjax.ts by falsandtru](https://github.com/falsandtru/jquery.pjax.js) by [新ゝ月 NewNotMoon](http://new.not-moon.net)
|
||||
* [:link:](jquery.placeholder/jquery.placeholder.d.ts) [jquery.placeholder.js](https://github.com/mathiasbynens/jquery-placeholder) by [Peter Gill](https://github.com/majorsilence)
|
||||
* [:link:](jquery.placeholder/jquery.placeholder.d.ts) [jquery.placeholder.js](https://github.com/mathiasbynens/jquery-placeholder) by [Peter Gill](https://github.com/majorsilence), [Neil Culver](https://github.com/EnableSoftware)
|
||||
* [:link:](jquery.pnotify/jquery.pnotify.d.ts) [jquery.pnotify 2.x](https://github.com/sciactive/pnotify) by [David Sichau](https://github.com/DavidSichau)
|
||||
* [:link:](jquery.scrollTo/jquery.scrollTo.d.ts) [jQuery.scrollTo.js](https://github.com/flesler/jquery.scrollTo) by [Neil Stalker](https://github.com/nestalk)
|
||||
* [:link:](jquery.simulate/jquery.simulate.d.ts) [jquery.simulate.js](https://github.com/jquery/jquery-simulate) by [Derek Cicerone](https://github.com/derekcicerone)
|
||||
@@ -425,10 +481,13 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](jquery.timer/jquery.timer.d.ts) [jQueryTimer](https://github.com/jchavannes/jquery-timer) by [Joshua Strobl](https://github.com/JoshStrobl)
|
||||
* [:link:](jquery.total-storage/jquery.total-storage.d.ts) [jQueryTotalStorage](https://github.com/Upstatement/jquery-total-storage) by [Jeremy Brooks](https://github.com/JeremyCBrooks)
|
||||
* [:link:](jqueryui/jqueryui.d.ts) [jQueryUI](http://jqueryui.com) by [Boris Yankov](https://github.com/borisyankov), [John Reilly](https://github.com/johnnyreilly)
|
||||
* [:link:](js-cookie/js-cookie.d.ts) [js-cookie](https://github.com/js-cookie/js-cookie) by [Theodore Brown](https://github.com/theodorejb)
|
||||
* [:link:](js-fixtures/fixtures.d.ts) [js-fixtures](https://github.com/badunk/js-fixtures) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid)
|
||||
* [:link:](js-git/js-git.d.ts) [js-git](https://github.com/creationix/js-git) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](js-signals/js-signals.d.ts) [JS-Signals](http://millermedeiros.github.io/js-signals) by [Diullei Gomes](https://github.com/diullei)
|
||||
* [:link:](js-yaml/js-yaml.d.ts) [js-yaml](https://github.com/nodeca/js-yaml) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](js-beautify/js-beautify.d.ts) [js_beautify](https://github.com/beautify-web/js-beautify) by [Josh Goldberg](https://github.com/JoshuaKGoldberg)
|
||||
* [:link:](blocks/blocks.d.ts) [jsblocks](http://jsblocks.com) by [Krzysztof Śmigiel](https://github.com/ksmigiel)
|
||||
* [:link:](jsbn/jsbn.d.ts) [jsbn](http://www-cs-students.stanford.edu/%7Etjw/jsbn) by [Eugene Chernyshov](https://github.com/Evgenus)
|
||||
* [:link:](jscrollpane/jscrollpane.d.ts) [jScrollPane](http://jscrollpane.kelvinluck.com) by [Dániel Tar](https://github.com/qcz)
|
||||
* [:link:](js-data/js-data.d.ts) [JSData](https://github.com/js-data/js-data) by [Stefan Steinhart](https://github.com/reppners)
|
||||
@@ -442,8 +501,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](hashset/hashset.d.ts) [jshashset](http://www.timdown.co.uk/jshashtable/jshashset.html) by [Sergey Gerasimov](https://github.com/gerich-home)
|
||||
* [:link:](hashtable/hashtable.d.ts) [jshashtable](http://www.timdown.co.uk/jshashtable) by [Sergey Gerasimov](https://github.com/gerich-home)
|
||||
* [:link:](jsnox/jsnox.d.ts) [JSnoX](https://github.com/af/jsnox) by [Steve Baker](https://github.com/stkb)
|
||||
* [:link:](json-patch/json-patch.d.ts) [json-patch](https://github.com/bruth/jsonpatch-js) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](json-pointer/json-pointer.d.ts) [json-pointer 1.0 l](https://www.npmjs.org/package/json-pointer) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](json5/json5.d.ts) [JSON5](http://json5.org) by [Jason Swearingen](https://jasonswearingen.github.io)
|
||||
* [:link:](jsoneditoronline/jsoneditoronline.d.ts) [JSONEditorOnline](https://github.com/josdejong/jsoneditoronline) by [Vincent Bortone](https://github.com/vbortone)
|
||||
* [:link:](jsonpath/jsonpath.d.ts) [jsonpath](https://www.npmjs.org/package/jsonpath) by [Hiroki Horiuchi](https://github.com/horiuchi)
|
||||
* [:link:](JSONStream/JSONStream.d.ts) [JSONStream](http://github.com/dominictarr/JSONStream) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](jsonwebtoken/jsonwebtoken.d.ts) [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) by [Maxime LUCE](https://github.com/SomaticIT)
|
||||
* [:link:](jsplumb/jquery.jsPlumb.d.ts) [jsPlumb 1.3.16 jQuery adapter](http://jsplumb.org) by [Steve Shearn](https://github.com/shearnie)
|
||||
@@ -451,11 +513,13 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](jssha/jssha.d.ts) [jsSHA](https://github.com/Caligatio/jsSHA) by [David Li](https://github.com/randombk)
|
||||
* [:link:](jstorage/jstorage.d.ts) [jStorage](http://www.jstorage.info) by [Danil Flores](https://github.com/dflor003)
|
||||
* [:link:](jstree/jstree.d.ts) [jsTree](http://www.jstree.com) by [Adam Pluciński](https://github.com/adaskothebeast)
|
||||
* [:link:](jsuri/jsuri.d.ts) [jsUri](https://github.com/derek-watson/jsUri) by [Chris Charabaruk](http://github.com/coldacid)
|
||||
* [:link:](jszip/jszip.d.ts) [JSZip](http://stuk.github.com/jszip) by [mzeiher](https://github.com/mzeiher)
|
||||
* [: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-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)
|
||||
* [:link:](keymaster/keymaster.d.ts) [keymaster](https://github.com/madrobby/keymaster) by [Martin W. Kirst](https://github.com/nitram509)
|
||||
* [:link:](keypress/keypress.d.ts) [Keypress](https://github.com/dmauro/Keypress) by [Roger Chen](https://github.com/rcchen)
|
||||
@@ -469,12 +533,15 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](knockout.amd.helpers/knockout-amd-helpers.d.ts) [knockout-amd-helpers](https://github.com/rniemeyer/knockout-amd-helpers) by [David Sichau](https://github.com/DavidSichau)
|
||||
* [:link:](knockout.editables/ko.editables.d.ts) [knockout-editables](http://romanych.github.com/ko.editables) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](knockout.es5/knockout.es5.d.ts) [Knockout-ES5](https://github.com/SteveSanderson/knockout-es5) by [Sebastián Galiano](https://github.com/sgaliano)
|
||||
* [:link:](knockout-paging/knockout-paging.d.ts) [knockout-paging](https://github.com/ErikSchierboom/knockout-paging) by [Erik Schierboom](https://github.com/ErikSchierboom)
|
||||
* [:link:](knockout.postbox/knockout-postbox.d.ts) [knockout-postbox](https://github.com/rniemeyer/knockout-postbox) by [Judah Gabriel Himango](https://debuggerdotbreak.wordpress.com)
|
||||
* [:link:](knockout-pre-rendered/knockout-pre-rendered.d.ts) [knockout-pre-rendered](https://github.com/ErikSchierboom/knockout-pre-rendered) by [Erik Schierboom](https://github.com/ErikSchierboom)
|
||||
* [:link:](knockout.projections/knockout.projections.d.ts) [knockout-projections](https://github.com/stevesanderson/knockout-projections) by [John Reilly](https://github.com/johnnyreilly)
|
||||
* [:link:](knockout-secure-binding/knockout-secure-binding.d.ts) [knockout-secure-binding](https://github.com/brianmhunt/knockout-secure-binding) by [Pine Mizune](https://github.com/pine613)
|
||||
* [:link:](knockout-transformations/knockout-transformations.d.ts) [knockout-transformations](https://github.com/One-com/knockout-transformations) by [John Reilly](https://github.com/johnnyreilly), [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](knockout.mapper/knockout.mapper.d.ts) [Knockout.Mapper](https://github.com/LucasLorentz/knockout.mapper) by [Brandon Meyer](https://github.com/BMeyerKC)
|
||||
* [:link:](knockout.mapping/knockout.mapping.d.ts) [Knockout.Mapping](https://github.com/SteveSanderson/knockout.mapping) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](knockout.punches/knockout.punches.d.ts) [knockout.punches](https://github.com/mbest/knockout.punches) by [Stephen Lautier](https://github.com/johnnyreilly)
|
||||
* [:link:](knockout.rx/knockout.rx.d.ts) [knockout.rx](https://github.com/Igorbek/knockout.rx) by [Igor Oleinikov](https://github.com/Igorbek)
|
||||
* [:link:](knockstrap/knockstrap.d.ts) [Knockstrap](http://faulknercs.github.io/Knockstrap) by [Adam Pluciński](https://github.com/adaskothebeast)
|
||||
* [:link:](knockout.kogrid/ko-grid.d.ts) [ko-grid](http://knockout-contrib.github.io/KoGrid) by [huer12](https://github.com/huer12)
|
||||
@@ -488,7 +555,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](leaflet-label/leaflet-label.d.ts) [Leaflet.label](https://github.com/Leaflet/Leaflet.label) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](jquery.leanModal/jquery.leanModal.d.ts) [leanModal.js](http://leanmodal.finelysliced.com.au) by [FinelySliced](https://github.com/FinelySliced)
|
||||
* [:link:](leapmotionTS/LeapMotionTS.d.ts) [Leap Motion TS](https://github.com/logotype/LeapMotionTS) by [Victor Norgren](https://github.com/logotype)
|
||||
* [:link:](less/less.d.ts) [LESS](http://lesscss.org) by [AndrewGaspar](https://github.com/AndrewGaspar)
|
||||
* [:link:](less/less.d.ts) [LESS](http://lesscss.org) by [Tom Hasner](https://github.com/thasner)
|
||||
* [:link:](less-middleware/less-middleware.d.ts) [less-middleware](https://github.com/emberfeather/less.js-middleware) by [Federico Bond](https://github.com/federicobond)
|
||||
* [:link:](levelup/levelup.d.ts) [LevelUp](https://github.com/rvagg/node-levelup) by [Bret Little](https://github.com/blittle)
|
||||
* [:link:](libxmljs/libxmljs.d.ts) [Libxmljs](https://github.com/polotek/libxmljs) by [François de Campredon](https://github.com/fdecampredon)
|
||||
* [:link:](dustjs-linkedin/dustjs-linkedin.d.ts) [linkedin dustjs](https://github.com/linkedin/dustjs) by [Marcelo Dezem](http://github.com/mdezem)
|
||||
@@ -501,21 +569,30 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](log4js/log4js.d.ts) [log4js](https://github.com/nomiddlename/log4js-node) by [Kentaro Okuno](http://github.com/armorik83)
|
||||
* [:link:](logg/logg.d.ts) [logg](https://github.com/dpup/node-logg) by [Bret Little](https://github.com/blittle)
|
||||
* [:link:](loggly/loggly.d.ts) [loggly](https://github.com/nodejitsu/node-loggly) by [Ray Martone](https://github.com/rmartone)
|
||||
* [:link:](loglevel/loglevel.d.ts) [loglevel](https://github.com/pimterry/loglevel) by [Stefan Profanter](https://github.com/Pro)
|
||||
* [: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:](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:](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:](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:](mariasql/mariasql.d.ts) [mariasql](https://github.com/mscdex/node-mariasql) by [MichaelBennett](https://github.com/bennett000)
|
||||
* [:link:](marionette/marionette.d.ts) [Marionette](https://github.com/marionettejs) by [Zeeshan Hamid](https://github.com/zhamid), [Natan Vivo](https://github.com/nvivo), [Sven Tschui](https://github.com/sventschui)
|
||||
* [:link:](marked/marked.d.ts) [Marked](https://github.com/chjj/marked) by [William Orr](https://github.com/worr)
|
||||
* [:link:](markerclustererplus/markerclustererplus.d.ts) [MarkerClustererPlus for Google Maps V3](http://github.com/mahnunchik/markerclustererplus) by [Mathias Rodriguez](http://github.com/enanox)
|
||||
* [:link:](maskedinput/maskedinput.d.ts) [Masked Input plugin for jQuery](http://digitalbush.com/projects/masked-input-plugin) by [Lokesh Peta](https://github.com/lokeshpeta)
|
||||
* [:link:](mathjax/mathjax.d.ts) [MathJax](https://github.com/mathjax/MathJax) by [Roland Zwaga](https://github.com/rolandzwaga)
|
||||
* [:link:](matter-js/matter-js.d.ts) [Matter.js](https://github.com/liabru/matter-js) by [Ivane Gegia](https://twitter.com/ivanegegia)
|
||||
* [: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)
|
||||
@@ -524,7 +601,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](meteor/meteor.d.ts) [Meteor](http://www.meteor.com) by [Dave Allen](https://github.com/fullflavedave)
|
||||
* [:link:](method-override/method-override.d.ts) [method-override](https://github.com/expressjs/method-override) by [Santi Albo](https://github.com/santialbo)
|
||||
* [:link:](microsoft-ajax/microsoft.ajax.d.ts) [Microsoft ASP.NET Ajax client side library](http://msdn.microsoft.com/en-us/library/ee341002(v=vs.100).aspx) by [Patrick Magee](https://github.com/pjmagee)
|
||||
* [:link:](xrm/xrm.d.ts) [Microsoft Dynamics xRM API](http://www.microsoft.com/en-us/download/details.aspx?id=44567) by [David Berry](https://github.com/6ix4our), [Matt Ngan](https://github.com/mattngan)
|
||||
* [:link:](xrm/xrm-6.d.ts) [Microsoft Dynamics xRM API v6](http://msdn.microsoft.com/en-us/library/gg328255.aspx) by [David Berry](https://github.com/6ix4our)
|
||||
* [:link:](xrm/clientglobalcontext.d.ts) [Microsoft Dynamics xRM ClientGlobalContext.js.aspx](http://msdn.microsoft.com/en-us/library/gg328255.aspx) by [David Berry](https://github.com/6ix4our)
|
||||
* [:link:](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)
|
||||
* [:link:](bingmaps/Microsoft.Maps.d.ts) [Microsoft.Maps](http://msdn.microsoft.com/en-us/library/gg427611.aspx) by [Eric Todd](https://github.com/ericrtodd)
|
||||
* [:link:](bingmaps/Microsoft.Maps.AdvancedShapes.d.ts) [Microsoft.Maps.AdvancedShapes](http://msdn.microsoft.com/en-us/library/hh921952.aspx) by [Eric Todd](https://github.com/ericrtodd)
|
||||
@@ -543,29 +624,33 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](mixto/mixto.d.ts) [mixto](https://github.com/atom/mixto) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](mkdirp/mkdirp.d.ts) [mkdirp](http://github.com/substack/node-mkdirp) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](mkpath/mkpath.d.ts) [mkpath](https://www.npmjs.com/package/mkpath) by [Jared Klopper](https://github.com/optical)
|
||||
* [:link:](mocha/mocha.d.ts) [mocha](http://mochajs.org) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid), [otiai10](https://github.com/otiai10), [jt000](https://github.com/jt000)
|
||||
* [:link:](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-phantomjs/mocha-phantomjs.d.ts) [mocha-phantomjs](http://metaskills.net/mocha-phantomjs) by [Erik Schierboom](https://github.com/ErikSchierboom)
|
||||
* [:link:](mock-fs/mock-fs.d.ts) [mock-fs](https://github.com/tschaub/mock-fs) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](mockery/mockery.d.ts) [mockery](https://github.com/mfncooper/mockery) by [jt000](https://github.com/jt000)
|
||||
* [:link:](modernizr/modernizr.d.ts) [Modernizr](http://modernizr.com) by [Boris Yankov](https://github.com/borisyankov), [Theodore Brown](https://github.com/theodorejb)
|
||||
* [:link:](moment-timezone/moment-timezone.d.ts) [moment-timezone.js](http://momentjs.com/timezone) by [Michel Salib](https://github.com/michelsalib)
|
||||
* [:link:](moment/moment-node.d.ts) [Moment.js](https://github.com/timrwood/moment) by [Michael Lakerveld](https://github.com/Lakerfield), [Aaron King](https://github.com/kingdango), [Hiroki Horiuchi](https://github.com/horiuchi), [Dick van den Brink](https://github.com/DickvdBrink), [Adi Dahiya](https://github.com/adidahiya)
|
||||
* [:link:](moment/moment.d.ts) [Moment.js](https://github.com/timrwood/moment) by [Michael Lakerveld](https://github.com/Lakerfield), [Aaron King](https://github.com/kingdango), [Hiroki Horiuchi](https://github.com/horiuchi), [Dick van den Brink](https://github.com/DickvdBrink), [Adi Dahiya](https://github.com/adidahiya)
|
||||
* [:link:](mongodb/mongodb.d.ts) [MongoDB](https://github.com/mongodb/node-mongodb-native) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](mongoose/mongoose.d.ts) [Mongoose](http://mongoosejs.com) by [horiuchi](https://github.com/horiuchi)
|
||||
* [:link:](mongoose-mock/mongoose-mock.d.ts) [mongoose-mock](https://github.com/JohanObrink/mongoose-mock) by [jt000](https://github.com/jt000)
|
||||
* [:link:](morgan/morgan.d.ts) [morgan](https://github.com/expressjs/morgan) by [James Roland Cabresos](https://github.com/staticfunction)
|
||||
* [:link:](mousetrap/mousetrap.d.ts) [Mousetrap](http://craig.is/killing/mice) by [Dániel Tar](https://github.com/qcz)
|
||||
* [:link:](mousetrap/mousetrap-global-bind.d.ts) [Mousetrap 1.4.6's global-bind extension](http://craig.is/killing/mice#extensions.global) by [Andrew Bradley](https://github.com/cspotcode)
|
||||
* [:link:](mousetrap/mousetrap.d.ts) [Mousetrap 1.5.x](http://craig.is/killing/mice) by [Dániel Tar](https://github.com/qcz)
|
||||
* [:link:](moviedb/moviedb.d.ts) [MovieDB](https://github.com/danzajdband/moviedb) by [Basarat Ali Syed](https://github.com/basarat)
|
||||
* [:link:](mozilla-spidermonkey-parser-api/mozilla-spidermonkey-parser-api.d.ts) [Mozilla SpiderMonkey Parser API](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Parser_API) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](firefox/firefox.d.ts) [Mozilla Web API](https://developer.mozilla.org/en-US/docs/Web/API) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](localForage/localForage.d.ts) [Mozilla's localForage](https://github.com/mozilla/localforage) by [david pichsenmeister](https://github.com/3x14159265)
|
||||
* [:link:](localForage/localForage.d.ts) [Mozilla's localForage](https://github.com/mozilla/localforage) by [yuichi david pichsenmeister](https://github.com/3x14159265)
|
||||
* [:link:](mpromise/mpromise.d.ts) [mpromise](https://github.com/aheckmann/mpromise) by [Seulgi Kim](https://github.com/sgkim126)
|
||||
* [:link:](msgpack/msgpack.d.ts) [msgpack.js - MessagePack JavaScript Implementation](https://github.com/uupaa/msgpack.js) by [Shinya Mochizuki](https://github.com/enrapt-mochizuki)
|
||||
* [:link:](msnodesql/msnodesql.d.ts) [msnodesql](https://github.com/WindowsAzure/node-sqlserver) by [Boris Yankov](https://github.com/borisyankov), [Maxime LUCE](https://github.com/SomaticIT)
|
||||
* [:link:](mssql/mssql.d.ts) [mssql](https://www.npmjs.com/package/mssql) by [COLSA Corporation](http://www.colsa.com)
|
||||
* [:link:](mu2/mu2.d.ts) [mu2](http://github.com/raycmorgan/mu) by [Jeff Goddard](https://github.com/jedigo)
|
||||
* [:link:](multer/multer.d.ts) [multer](https://github.com/expressjs/multer) by [jt000](https://github.com/jt000)
|
||||
* [:link:](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:](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)
|
||||
* [:link:](nedb/nedb.d.ts) [NeDB](https://github.com/louischatriot/nedb) by [Stefan Steinhart](https://github.com/reppners)
|
||||
@@ -579,12 +664,15 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](noble/noble.d.ts) [noble](https://github.com/sandeepmistry/noble) by [Seon-Wook Park](https://github.com/swook)
|
||||
* [:link:](nock/nock.d.ts) [nock](https://github.com/pgte/nock) by [bonnici](https://github.com/bonnici)
|
||||
* [:link:](node-imap/imap.d.ts) [node imap](https://github.com/mscdex/node-imap) by [Steve Fenton](https://github.com/Steve-Fenton)
|
||||
* [:link:](node-sass/node-sass.d.ts) [Node Sass](https://github.com/sass/node-sass) by [Asana](https://asana.com)
|
||||
* [:link:](bunyan/bunyan.d.ts) [node-bunyan](https://github.com/trentm/node-bunyan) by [Alex Mikhalev](https://github.com/amikhalev)
|
||||
* [:link:](bunyan-logentries/bunyan-logentries.d.ts) [node-bunyan-logentries](https://github.com/nemtsov/node-bunyan-logentries) by [Aymeric Beaumet](http://aymericbeaumet.me)
|
||||
* [:link:](node-calendar/node-calendar.d.ts) [node-calendar](https://www.npmjs.com/package/node-calendar) by [Luzian Zagadinow](https://github.com/luzianz)
|
||||
* [:link:](convict/convict.d.ts) [node-convict](https://github.com/mozilla/node-convict) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](node-ffi/node-ffi.d.ts) [node-ffi](https://github.com/rbranson/node-ffi) by [Paul Loyd](https://github.com/loyd)
|
||||
* [:link:](node-fibers/node-fibers.d.ts) [node-fibers](https://github.com/laverdet/node-fibers) by [Cary Haynie](https://github.com/caryhaynie)
|
||||
* [:link:](node-form/node-form.d.ts) [node-form](https://github.com/rsamec/form) by [Roman Samec](https://github.com/rsamec)
|
||||
* [:link:](node-gcm/node-gcm.d.ts) [node-gcm](https://www.npmjs.org/package/node-gcm) by [Hiroki Horiuchi](https://github.com/horiuchi)
|
||||
* [:link:](node-git/node-git.d.ts) [node-git](https://github.com/christkv/node-git) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](ip/ip.d.ts) [node-ip](https://github.com/indutny/node-ip) by [Peter Harris](https://github.com/codeanimal)
|
||||
* [:link:](multiparty/multiparty.d.ts) [node-multiparty](https://github.com/andrewrk/node-multiparty) by [Ken Fukuyama](https://github.com/kenfdev)
|
||||
@@ -593,28 +681,34 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](node-polyglot/node-polyglot.d.ts) [node-polyglot](https://github.com/airbnb/polyglot.js) by [Tim Jackson-Kiely](https://github.com/timjk)
|
||||
* [:link:](promptly/promptly.d.ts) [node-promptly](https://github.com/IndigoUnited/node-promptly) by [Dan Spencer](https://github.com/danrspencer)
|
||||
* [:link:](radius/radius.d.ts) [node-radius](https://github.com/retailnext/node-radius) by [Peter Harris](https://github.com/codeanimal)
|
||||
* [:link:](stack-trace/stack-trace.d.ts) [node-stack-trace](https://github.com/felixge/node-stack-trace) by [Exceptionless](https://github.com/exceptionless)
|
||||
* [:link:](node-uuid/node-uuid.d.ts) [node-uuid.js](https://github.com/broofa/node-uuid) by [Jeff May](https://github.com/jeffmay)
|
||||
* [:link:](node-webkit/node-webkit.d.ts) [node-webkit](https://github.com/rogerwang/node-webkit) by [Pedro Casaubon](https://github.com/xperiments)
|
||||
* [:link:](xml2js/xml2js.d.ts) [node-xml2js](https://github.com/Leonidas-from-XIV/node-xml2js) by [Michel Salib](https://github.com/michelsalib), [Jason McNeil](https://github.com/jasonrm)
|
||||
* [:link:](node/node.d.ts) [Node.js](http://nodejs.org) by [Microsoft TypeScript](http://typescriptlang.org), [DefinitelyTyped](https://github.com/borisyankov/DefinitelyTyped)
|
||||
* [:link:](restify/restify.d.ts) [node.js REST framework](https://github.com/mcavage/node-restify) by [Bret Little](https://github.com/blittle)
|
||||
* [:link:](acl/acl.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo)
|
||||
* [:link:](acl/acl-mongodbBackend.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo)
|
||||
* [:link:](acl/acl-redisBackend.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo)
|
||||
* [:link:](acl/acl-mongodbBackend.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo)
|
||||
* [:link:](acl/acl.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo)
|
||||
* [:link:](mdns/mdns.d.ts) [node_mdns](https://github.com/agnat/node_mdns) by [Stefan Steinhart](https://github.com/reppners)
|
||||
* [:link:](node_redis/node_redis.d.ts) [node_redis](https://github.com/mranney/node_redis) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](each/each.d.ts) [NodeEach](http://www.adaltas.com/projects/node-each) by [Michael Zabka](https://github.com/misak113)
|
||||
* [:link:](nodemailer/nodemailer.d.ts) [Nodemailer](https://github.com/andris9/Nodemailer) by [Vincent Bortone](https://github.com/vbortone)
|
||||
* [:link:](nodemailer/nodemailer-types.d.ts) [Nodemailer](https://github.com/andris9/Nodemailer) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](nodemailer/nodemailer.d.ts) [Nodemailer](https://github.com/andris9/Nodemailer) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](nodemailer-direct-transport/nodemailer-direct-transport.d.ts) [nodemailer-direct-transport](https://github.com/andris9/nodemailer-direct-transport) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](nodemailer-smtp-pool/nodemailer-smtp-pool.d.ts) [nodemailer-smtp-pool](https://github.com/andris9/nodemailer-smtp-pool) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](nodemailer-smtp-transport/nodemailer-smtp-transport.d.ts) [nodemailer-smtp-transport](https://github.com/andris9/nodemailer-smtp-transport) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](nodeunit/nodeunit.d.ts) [nodeunit](https://github.com/caolan/nodeunit) by [Jeff Goddard](https://github.com/jedigo)
|
||||
* [:link:](nomnom/nomnom.d.ts) [nomnom](https://github.com/harthur/nomnom) by [Paul Vick](https://github.com/panopticoncentral)
|
||||
* [:link:](nopt/nopt.d.ts) [nopt](https://github.com/npm/nopt) by [jbondc](https://github.com/jbondc)
|
||||
* [:link:](notifyjs/notifyjs.d.ts) [notify.js](https://github.com/alexgibson/notify.js) by [soundTricker](https://github.com/soundTricker)
|
||||
* [:link:](notify/notify.d.ts) [Notify.js](https://github.com/jpillora/notifyjs) by [Xiaohan Zhang](https://github.com/hellochar)
|
||||
* [:link:](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:](noVNC/noVNC.d.ts) [noVNC](https://github.com/kanaka/noVNC) by [Ken Smith](https://github.com/smithkl42)
|
||||
* [:link:](npm/npm.d.ts) [npm](https://github.com/npm/npm) by [Maxime LUCE](https://github.com/SomaticIT)
|
||||
* [:link:](nprogress/NProgress.d.ts) [NProgress](https://github.com/rstacruz/nprogress) by [Judah Gabriel Himango](http://debuggerdotbreak.wordpress.com)
|
||||
* [:link:](numbro/numbro.d.ts) [Numbro.js](https://github.com/foretagsplatsen/numbro) by [Vincent Bortone](https://github.com/vbortone)
|
||||
* [:link:](numeraljs/numeraljs.d.ts) [Numeral.js](https://github.com/adamwdraper/Numeral-js) by [Vincent Bortone](https://github.com/vbortone)
|
||||
* [:link:](object-hash/object-hash.d.ts) [object-hash](https://github.com/puleos/object-hash) by [Michael Zabka](https://github.com/misak113)
|
||||
* [:link:](object-path/object-path.d.ts) [objectPath v0.9.x](https://github.com/mariocasciaro/object-path) by [Paulo Cesar](https://github.com/pocesar)
|
||||
@@ -627,12 +721,15 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [: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:](page/page.d.ts) [page](http://visionmedia.github.io/page.js) by [Alan Norbauer](http://alan.norbauer.com)
|
||||
* [:link:](papaparse/papaparse.d.ts) [PapaParse](https://github.com/mholt/PapaParse) by [Pedro Flemming](https://github.com/torpedro)
|
||||
* [:link:](parallel/parallel.d.ts) [parallel.js](http://adambom.github.io/parallel.js) by [Josh Baldwin](https://github.com/jbaldwin)
|
||||
* [:link:](parse/parse.d.ts) [Parse](https://parse.com) by [Ullisen Media Group](http://ullisenmedia.com)
|
||||
* [:link:](parsimmon/parsimmon.d.ts) [Parsimmon](https://github.com/jneen/parsimmon) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](passport/passport.d.ts) [Passport](http://passportjs.org) by [Horiuchi_H](https://github.com/horiuchi)
|
||||
* [:link:](passport-strategy/passport-strategy.d.ts) [Passport Strategy module](https://github.com/jaredhanson/passport-strategy) by [Lior Mualem](https://github.com/liorm)
|
||||
* [:link:](passport-twitter/passport-twitter.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
|
||||
* [:link:](passport-facebook/passport-facebook.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
|
||||
* [:link:](passport-google-oauth/passport-google-oauth.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
|
||||
* [:link:](passport-facebook-token/passport-facebook-token.d.ts) [passport-facebook-token](https://github.com/drudge/passport-facebook-token) by [Ray Martone](https://github.com/rmartone)
|
||||
* [:link:](passport-local/passport-local.d.ts) [passport-local](https://github.com/jaredhanson/passport-local) by [Maxime LUCE](https://github.com/SomaticIT)
|
||||
* [:link:](path-to-regexp/path-to-regexp.d.ts) [path-to-regexp](https://github.com/pillarjs/path-to-regexp) by [xica](https://github.com/xica)
|
||||
@@ -648,20 +745,23 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](phonegap/phonegap.d.ts) [PhoneGap](http://phonegap.com) by [Boris Yankov](https://github.com/borisyankov), [Dick van den Brink](https://github.com/DickvdBrink)
|
||||
* [:link:](photoswipe/photoswipe.d.ts) [PhotoSwipe](http://photoswipe.com) by [Xiaohan Zhang](https://github.com/hellochar)
|
||||
* [:link:](physijs/physijs.d.ts) [Physijs](http://chandlerprall.github.io/Physijs) by [Satoru Kimura](https://github.com/gyohk)
|
||||
* [:link:](pickadate/pickadate.d.ts) [pickadate.js](https://github.com/amsul/pickadate.js) by [Adi Dahiya](https://github.com/adidahiya)
|
||||
* [:link:](pickadate/pickadate.d.ts) [pickadate.js](https://github.com/amsul/pickadate.js) by [Theodore Brown](https://github.com/theodorejb)
|
||||
* [:link:](pikaday/pikaday.d.ts) [pikaday](https://github.com/dbushell/Pikaday) by [Rudolph Gottesheim](http://midnight-design.at)
|
||||
* [:link:](piwik-tracker/piwik-tracker.d.ts) [PiwikTracker](https://www.npmjs.com/package/piwik-tracker) by [Guilherme Bernal](https://github.com/lbguilherme)
|
||||
* [:link:](pixi/pixi.d.ts) [PIXI](https://github.com/GoodBoyDigital/pixi.js) by [xperiments](http://github.com/xperiments)
|
||||
* [:link:](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:](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:](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-selector.d.ts) [polymer's paper-toast](https://github.com/Polymer/core-selector) by [Louis Grignon](https://github.com/lgrignon)
|
||||
* [:link:](popcorn/popcorn.d.ts) [Popcorn](https://github.com/mozilla/popcorn-js) by [grapswiz](https://github.com/grapswiz)
|
||||
* [:link:](pouchDB/pouch.d.ts) [Pouch](http://pouchdb.com) by [Bill Sears](https://github.com/MrBigDog2U)
|
||||
* [:link:](power-assert/power-assert.d.ts) [power-assert](https://github.com/twada/power-assert) by [vvakame](https://github.com/vvakame)
|
||||
@@ -674,24 +774,29 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](promises-a-plus/promises-a-plus.d.ts) [promises-a-plus](http://promisesaplus.com) by [Igor Oleinikov](https://github.com/Igorbek)
|
||||
* [:link:](protobufjs/protobufjs.d.ts) [ProtoBuf.js](https://github.com/dcodeIO/ProtoBuf.js) by [Panu Horsmalahti](https://github.com/panuhorsmalahti)
|
||||
* [:link:](proxyquire/proxyquire.d.ts) [Proxyquire](https://github.com/thlorenz/proxyquire) by [jt000](https://github.com/jt000)
|
||||
* [:link:](pty.js/pty.js.d.ts) [pty.js 0.2.7-1](https://github.com/chjj/pty.js) by [Vadim Macagon](https://github.com/enlight)
|
||||
* [:link:](pubsubjs/pubsub.d.ts) [PubSubJS](https://github.com/mroderick/PubSubJS) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](purl/purl.d.ts) [Purl](https://github.com/allmarkedup/purl) by [Daniel Ferreira Monteiro Alves](https://github.com/danfma)
|
||||
* [:link:](q/Q.d.ts) [Q](https://github.com/kriskowal/q) by [Barrie Nemetchek](https://github.com/bnemetchek), [Andrew Gaspar](https://github.com/AndrewGaspar), [John Reilly](https://github.com/johnnyreilly)
|
||||
* [:link:](q-io/Q-io.d.ts) [Q-io](https://github.com/kriskowal/q-io) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](q-retry/q-retry.d.ts) [q-retry](https://github.com/vilic/q-retry) by [VILIC VANE](https://github.com/vilic)
|
||||
* [:link:](qajax/qajax.d.ts) [Qajax](https://github.com/gre/qajax) by [Boltmade](https://github.com/Boltmade)
|
||||
* [: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:](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:](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-addons.d.ts) [ReactWithAddons (external module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com)
|
||||
* [:link:](react/react-addons-global.d.ts) [ReactWithAddons (internal module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com)
|
||||
* [:link:](readdir-stream/readdir-stream.d.ts) [readdir-stream](https://github.com/logicalparadox/readdir-stream) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](recursive-readdir/recursive-readdir.d.ts) [recursive-readdir](https://github.com/jergason/recursive-readdir) by [Elisée Maurer](https://github.com/elisee)
|
||||
* [:link:](redis/redis.d.ts) [redis](https://github.com/mranney/node_redis) by [Carlos Ballesteros Velasco](https://github.com/soywiz), [Peter Harris](https://github.com/CodeAnimal)
|
||||
* [:link:](ref/ref.d.ts) [ref](https://github.com/TooTallNate/ref) by [Paul Loyd](https://github.com/loyd)
|
||||
* [:link:](ref-array/ref-array.d.ts) [ref-array](https://github.com/TooTallNate/ref-array) by [Paul Loyd](https://github.com/loyd)
|
||||
@@ -707,6 +812,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](rickshaw/rickshaw.d.ts) [Rickshaw](http://code.shutterstock.com/rickshaw) by [Blake Niemyjski](https://github.com/niemyjski)
|
||||
* [: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:](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)
|
||||
@@ -728,16 +834,18 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](sammyjs/sammyjs.d.ts) [Sammy.js](http://sammyjs.org) by [Boris Yankov](https://github.com/borisyankov), [Oisin Grehan](https://github.com/oising)
|
||||
* [:link:](sanitize-filename/sanitize-filename.d.ts) [sanitize-filename](https://github.com/parshap/node-sanitize-filename) by [Wim Looman](https://github.com/Nemo157)
|
||||
* [:link:](sanitize-html/sanitize-html.d.ts) [sanitize-html](https://github.com/punkave/sanitize-html) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](sanitizer/sanitizer.d.ts) [Sanitizer](https://github.com/theSmaw/Caja-HTML-Sanitizer) by [Dave Taylor](http://davetayls.me)
|
||||
* [: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:](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:](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:](on-headers/on-headers.d.ts) [serve-favicon](https://github.com/jshttp/on-headers) by [John Jeffery](https://github.com/jjeffery)
|
||||
* [: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)
|
||||
@@ -751,7 +859,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](simple-cw-node/simple-cw-node.d.ts) [simple-cw-node](https://github.com/astronaughts/simple-cw-node) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](jquery.simplemodal/jquery.simplemodal.d.ts) [SimpleModal](http://www.ericmmartin.com/projects/simplemodal) by [Friedrich von Never](https://github.com/ForNeVeR)
|
||||
* [:link:](sinon/sinon.d.ts) [Sinon](http://sinonjs.org) by [William Sears](https://github.com/mrbigdog2u)
|
||||
* [:link:](sinon-chai/sinon-chai.d.ts) [sinon-chai](https://github.com/domenic/sinon-chai) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid)
|
||||
* [: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:](slickgrid/SlickGrid.d.ts) [SlickGrid](https://github.com/mleibman/SlickGrid) by [Josh Baldwin](https://github.com/jbaldwin)
|
||||
@@ -771,18 +879,25 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](spectrum/spectrum.d.ts) [spectrum](https://github.com/bgrins/spectrum) by [Mordechai Zuber](https://github.com/M-Zuber)
|
||||
* [:link:](spin/spin.d.ts) [Spin.js](http://fgnass.github.com/spin.js) by [Boris Yankov](https://github.com/borisyankov), [Theodore Brown](https://github.com/theodorejb)
|
||||
* [:link:](split/split.d.ts) [split](https://github.com/dominictarr/split) by [Marcin Porębski](https://github.com/marcinporebski)
|
||||
* [:link:](sprintf-js/sprintf-js.d.ts) [sprintf-js](https://www.npmjs.com/package/sprintf-js) by [Jason Swearingen](https://jasonswearingen.github.io)
|
||||
* [:link:](sprintf/sprintf.d.ts) [sprintff](https://github.com/maritz/node-sprintff) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
* [:link:](sharepoint/SharePoint.d.ts) [sptypescript](http://sptypescript.codeplex.com) by [Stanislav Vyshchepan](http://gandjustas.blogspot.ru), [Andrey Markeev](http://markeev.com)
|
||||
* [:link:](sqlite3/sqlite3.d.ts) [sqlite3](https://github.com/mapbox/node-sqlite3) by [Nick Malaguti](https://github.com/nmalaguti)
|
||||
* [:link:](squirejs/squirejs.d.ts) [Squire](https://github.com/iammerrick/Squire.js) by [Bradley Ayers](https://github.com/bradleyayers)
|
||||
* [:link:](stack-mapper/stack-mapper.d.ts) [stack-mapper](https://github.com/thlorenz/stack-mapper) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [: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:](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:](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)
|
||||
* [:link:](streamjs/streamjs.d.ts) [streamjs](http://winterbe.github.io/streamjs) by [Bence Eros](https://github.com/erosb)
|
||||
* [:link:](stripe/stripe.d.ts) [stripe](https://stripe.com) by [Eric J. Smith](https://github.com/ejsmith)
|
||||
* [:link:](stripe-checkout/stripe-checkout.d.ts) [Stripe Checkout](https://stripe.com/checkout) by [Chris Wrench](https://github.com/cgwrench)
|
||||
* [:link:](stripe/stripe-node.d.ts) [stripe-node](https://github.com/stripe/stripe-node) by [William Johnston](https://github.com/wjohnsto)
|
||||
* [:link:](strophe/strophe.d.ts) [Strophe.js](http://strophe.im/strophejs) by [David Deutsch](https://github.com/DavidKDeutsch)
|
||||
* [:link:](stylus/stylus.d.ts) [stylus](https://github.com/LearnBoost/stylus) by [Maxime LUCE](https://github.com/SomaticIT)
|
||||
* [:link:](sugar/sugar.d.ts) [Sugar](http://sugarjs.com) by [Josh Baldwin](https://github.com/jbaldwin)
|
||||
* [:link:](superagent/superagent.d.ts) [SuperAgent](https://github.com/visionmedia/superagent) by [Alex Varju](https://github.com/varju)
|
||||
@@ -792,21 +907,25 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](svg2png/svg2png.d.ts) [svg2png node package](https://github.com/domenic/svg2png) by [hans windhoff](https://github.com/hansrwindhoff)
|
||||
* [:link:](svgjs.draggable/svgjs.draggable.d.ts) [svgjs.draggable](http://www.svgjs.com) by [Luigi Trabacchin](https://github.com/LiFeleSs)
|
||||
* [:link:](swag/swag.d.ts) [swag](https://github.com/elving/swag) by [Shogo Iwano](https://github.com/shiwano)
|
||||
* [:link:](sweetalert/sweetalert.d.ts) [SweetAlert](https://github.com/t4t5/sweetalert) by [Markus Peloso](https://github.com/ToastHawaii)
|
||||
* [:link:](swfobject/swfobject.d.ts) [swfobject](https://code.google.com/p/swfobject) by [rou](https://github.com/rou)
|
||||
* [:link:](swig/swig.d.ts) [swig](http://github.com/paularmstrong/swig) by [Peter Harris](https://github.com/CodeAnimal), [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
* [:link:](swipe/swipe.d.ts) [Swipe](https://github.com/thebird/Swipe) by [Andrey Kurdyumov](https://github.com/kant2002)
|
||||
* [:link:](swiper/swiper.d.ts) [Swiper](https://github.com/nolimits4web/Swiper) by [Sebastián Galiano](https://github.com/sgaliano)
|
||||
* [:link:](swipeview/swipeview.d.ts) [SwipeView](http://cubiq.org/swipeview) by [Boris Yankov](https://github.com/borisyankov)
|
||||
* [:link:](switchery/switchery.d.ts) [switchery](https://github.com/abpetkov/switchery) by [Bruno Grieder](https://github.com/bgrieder)
|
||||
* [:link:](swiz/swiz.d.ts) [swiz](https://github.com/racker/node-swiz) by [Jeff Goddard](https://github.com/jedigo)
|
||||
* [:link:](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 [Jed Mao](https://github.com/jedmao)
|
||||
* [:link:](tcomb/tcomb.d.ts) [tcomb](http://gcanti.github.io/tcomb/guide/index.html) by [Hans Windhoff](https://github.com/hansrwindhoff)
|
||||
* [:link:](tedious/tedious.d.ts) [tedious](https://pekim.github.io/tedious) by [Rogier Schouten](https://github.com/rogierschouten)
|
||||
* [:link:](tedious-connection-pool/tedious-connection-pool.d.ts) [tedious-connection-pool](https://github.com/pekim/tedious-connection-pool) by [Cyprien Autexier](https://github.com/sandorfr)
|
||||
* [:link:](teechart/teechart.d.ts) [TeeChart](http://www.steema.com) by [Steema Software](https://steema.com)
|
||||
* [:link:](tether/tether.d.ts) [Tether](http://github.hubspot.com/tether) by [Adi Dahiya](https://github.com/adidahiya)
|
||||
* [:link:](text-buffer/text-buffer.d.ts) [text-buffer](https://github.com/atom/text-buffer) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](text-encoding/text-encoding.d.ts) [text-encoding](https://github.com/inexorabletash/text-encoding) by [MIZUNE Pine](https://github.com/pine613)
|
||||
* [:link:](github-electron/github-electron-main.d.ts) [the Electron 0.25.2 main process](http://electron.atom.io) by [jedmao](https://github.com/jedmao)
|
||||
* [:link:](github-electron/github-electron-renderer.d.ts) [the Electron 0.25.2 renderer process (web page)](http://electron.atom.io) by [jedmao](https://github.com/jedmao)
|
||||
* [:link:](threejs/three-canvasrenderer.d.ts) [three.js (CanvasRenderer.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/renderers/CanvasRenderer.js) by [Satoru Kimura](https://github.com/gyohk)
|
||||
* [:link:](threejs/three-copyshader.d.ts) [three.js (CopyShader.js)](https://github.com/mrdoob/three.js/blob/r68/examples/js/shaders/CopyShader.js) by [Satoru Kimura](https://github.com/gyohk)
|
||||
* [:link:](threejs/three-css3drenderer.d.ts) [three.js (CSS3DRenderer.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/renderers/CSS3DRenderer.js) by [Satoru Kimura](https://github.com/gyohk)
|
||||
@@ -818,7 +937,7 @@ 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.d.ts) [three.js r70](http://mrdoob.github.com/three.js) by [Kon](http://phyzkit.net), [Satoru Kimura](https://github.com/gyohk)
|
||||
* [: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)
|
||||
* [:link:](timelinejs/timelinejs.d.ts) [timelinejs](https://github.com/NUKnightLab/TimelineJS) by [Roland Zwaga](https://github.com/rolandzwaga)
|
||||
@@ -832,13 +951,17 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](sencha_touch/SenchaTouch.d.ts) [Touch](http://www.sencha.com/products/touch) by [Brian Kotek](https://github.com/brian428)
|
||||
* [:link:](traceback/traceback.d.ts) [Traceback](http://github.com/iriscouch/traceback) by [Michael Zabka](https://github.com/misak113)
|
||||
* [:link:](trunk8/trunk8.d.ts) [trunk8](https://github.com/rviscomi/trunk8) by [Blake Niemyjski](https://github.com/niemyjski)
|
||||
* [:link:](tsmonad/tsmonad.d.ts) [TsMonad](https://github.com/cbowdon/TsMonad) by [Chris Bowdon](https://github.com/cbowdon)
|
||||
* [:link:](tspromise/tspromise.d.ts) [tspromise](https://github.com/soywiz/tspromise) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
* [:link:](tween.js/tween.js.d.ts) [tween.js r12](https://github.com/sole/tween.js) by [sunetos](https://github.com/sunetos), [jzarnikov](https://github.com/jzarnikov)
|
||||
* [:link:](tweenjs/tweenjs.d.ts) [TweenJS](http://www.createjs.com/#!/TweenJS) by [Pedro Ferreira](https://bitbucket.org/drk4), [Chris Smith](https://github.com/evilangelist)
|
||||
* [:link:](twig/twig.d.ts) [twig](https://github.com/justjohn/twig.js) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
* [:link:](twitter/twitter.d.ts) [Twitter for Websites](https://dev.twitter.com/web) by [Chitoku](https://github.com/chitoku-k)
|
||||
* [:link:](jquery.bootstrap.wizard/jquery.bootstrap.wizard.d.ts) [twitter-bootstrap-wizard](https://github.com/VinceG/twitter-bootstrap-wizard) by [Blake Niemyjski](https://github.com/niemyjski)
|
||||
* [:link:](twix/twix.d.ts) [twix.js](https://github.com/icambron/twix.js) by [j3ko](https://github.com/j3ko)
|
||||
* [:link:](type-check/type-check.d.ts) [type-check](https://github.com/gkz/type-check) by [Hans Windhoff](https://github.com/hansrwindhoff)
|
||||
* [:link:](type-detect/type-detect.d.ts) [type-detect](https://github.com/chaijs/type-detect) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](type-name/type-name.d.ts) [type-name](https://github.com/twada/type-name) by [OKUNOKENTARO](https://github.com/armorik83)
|
||||
* [:link:](typeahead/typeahead.d.ts) [typeahead.js](http://twitter.github.io/typeahead.js) by [Ivaylo Gochkov](https://github.com/igochkov), [Gidon Junge](https://github.com/gjunge)
|
||||
* [:link:](typescript/typescript.d.ts) [TypeScript API](http://www.typescriptlang.org) by [Microsoft TypeScript](http://typescriptlang.org)
|
||||
* [:link:](typescript-deferred/typescript-deferred.d.ts) [typescript-deferred](https://github.com/DirtyHairy/typescript-deferred) by [Christian Speckner](https://github.com/DirtyHairy)
|
||||
@@ -847,23 +970,30 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [: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)
|
||||
* [:link:](jquery.uniform/jquery.uniform.d.ts) [Uniform.js](https://github.com/pixelmatrix/uniform) by [flyfishMT](https://github.com/flyfishMT)
|
||||
* [:link:](uniq/uniq.d.ts) [uniq](https://www.npmjs.com/package/uniq) by [Hans Windhoff](https://github.com/hansrwindhoff)
|
||||
* [:link:](universal-analytics/universal-analytics.d.ts) [universal-analytics](https://github.com/peaksandpies/universal-analytics) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](unorm/unorm.d.ts) [unorm](https://github.com/walling/unorm) by [Christopher Brown](https://github.com/chbrown)
|
||||
* [:link:](update-notifier/update-notifier.d.ts) [update-notifier](https://github.com/yeoman/update-notifier) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](uri-templates/uri-templates.d.ts) [uri-templates](https://github.com/geraintluff/uri-templates) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](urijs/URI.d.ts) [URI.js](https://github.com/medialize/URI.js) by [RodneyJT](https://github.com/RodneyJT)
|
||||
* [:link:](urijs/URIjs.d.ts) [URI.js](https://github.com/medialize/URI.js) by [RodneyJT](https://github.com/RodneyJT), [Brian Surowiec](https://github.com/xt0rted)
|
||||
* [:link:](js-url/js-url.d.ts) [url](https://github.com/websanova/js-url) by [MIZUNE Pine](https://github.com/pine613)
|
||||
* [:link:](urlrouter/urlrouter.d.ts) [urlrouter](https://github.com/fengmk2/urlrouter) by [soywiz](https://github.com/soywiz)
|
||||
* [:link:](urlsafe-base64/urlsafe-base64.d.ts) [urlsafe-base64](https://github.com/RGBboy/urlsafe-base64) by [Tanguy Krotoff](https://github.com/tkrotoff)
|
||||
* [:link:](UUID/UUID.d.ts) [UUID.js core](https://github.com/LiosK/UUID.js) by [Jason Jarrett](https://github.com/staxmanade)
|
||||
* [:link:](valerie/valerie.d.ts) [valerie](https://github.com/davewatts/valerie) by [Howard Richards](https://github.com/conficient)
|
||||
* [:link:](validator/validator.d.ts) [validator.js](https://github.com/chriso/validator.js) by [tgfjt](https://github.com/tgfjt)
|
||||
* [:link:](vega/vega.d.ts) [Vega](http://trifacta.github.io/vega) by [Tom Crockett](http://github.com/pelotom)
|
||||
* [:link:](velocity-animate/velocity-animate.d.ts) [Velocity](http://velocityjs.org) by [Greg Smith](https://github.com/smrq)
|
||||
* [:link:](vex-js/vex-js.d.ts) [Vex](https://github.com/HubSpot/vex) by [Greg Cohan](https://github.com/gdcohan)
|
||||
* [:link:](victor/victor.d.ts) [Victor.js](http://victorjs.org) by [Ivane Gegia](https://twitter.com/ivanegegia)
|
||||
* [:link:](videojs/videojs.d.ts) [Video.js](https://github.com/zencoder/video-js) by [Vincent Bortone](https://github.com/vbortone)
|
||||
* [:link:](vimeo/froogaloop.d.ts) [Vimeo](http://developer.vimeo.com/player/js-api) by [Daz Wilkin](https://github.com/DazWilkin)
|
||||
* [:link:](vinyl/vinyl.d.ts) [vinyl](https://github.com/wearefractal/vinyl) by [vvakame](https://github.com/vvakame), [jedmao](https://github.com/jedmao)
|
||||
* [:link:](vinyl-fs/vinyl-fs.d.ts) [vinyl-fs](https://github.com/wearefractal/vinyl-fs) by [vvakame](https://github.com/vvakame)
|
||||
* [:link:](vinyl-source-stream/vinyl-source-stream.d.ts) [vinyl-source-stream](https://github.com/hughsk/vinyl-source-stream) by [Asana](https://asana.com)
|
||||
* [:link:](virtual-dom/virtual-dom.d.ts) [virtual-dom](https://github.com/Matt-Esch/virtual-dom) by [Christopher Brown](https://github.com/chbrown)
|
||||
* [:link:](vortex-web-client/vortex-web-client.d.ts) [Vortex Web 1.2.0p1](http://www.prismtech.com/vortex/vortex-web) by [Stefan Profanter](https://github.com/Pro)
|
||||
* [:link:](vue/vue.d.ts) [vuejs](https://github.com/yyx990803/vue) by [odangosan](https://github.com/odangosan)
|
||||
* [:link:](watch/watch.d.ts) [watch](https://github.com/mikeal/watch) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
|
||||
* [:link:](jquery.watermark/jquery.watermark.d.ts) [Watermark plugin for jQuery](http://jquery-watermark.googlecode.com) by [Anwar Javed](https://github.com/anwarjaved)
|
||||
@@ -877,6 +1007,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](webix/webix.d.ts) [Webix UI](http://webix.com) by [Maksim Kozhukh](http://github.com/mkozhukh)
|
||||
* [:link:](webrtc/MediaStream.d.ts) [WebRTC](http://dev.w3.org/2011/webrtc) by [Ken Smith](https://github.com/smithkl42)
|
||||
* [:link:](websocket/websocket.d.ts) [websocket](https://github.com/Worlize/WebSocket-Node) by [Paul Loyd](https://github.com/loyd)
|
||||
* [:link:](websql/websql.d.ts) [websql](http://www.w3.org/TR/webdatabase) by [TeamworkGuy2](https://github.com/TeamworkGuy2)
|
||||
* [: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)
|
||||
@@ -889,10 +1020,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [:link:](ws/ws.d.ts) [ws](https://github.com/einaros/ws) by [Paul Loyd](https://github.com/loyd)
|
||||
* [:link:](x-editable/x-editable.d.ts) [X-Editable](http://vitalets.github.io/x-editable/index.html) by [Chris Kirby](https://github.com/sirkirby)
|
||||
* [:link:](x2js/xml2json.d.ts) [x2js](https://code.google.com/p/x2js) by [Horiuchi_H](https://github.com/horiuchi)
|
||||
* [:link:](xdate/xdate.d.ts) [XDate](http://arshaw.com/xdate) by [yamada28go](https://github.com/yamada28go)
|
||||
* [:link:](jsfl/xJSFL.d.ts) [xJSFL](http://www.xjsfl.com) by [soywiz](https://github.com/soywiz)
|
||||
* [:link:](xlsx/xlsx.d.ts) [xlsx](https://github.com/SheetJS/js-xlsx) by [themauveavenger](https://github.com/themauveavenger)
|
||||
* [:link:](xmlbuilder/xmlbuilder.d.ts) [xmlbuilder](https://github.com/oozcitak/xmlbuilder-js) by [Wallymathieu](http://github.com/wallymathieu)
|
||||
* [:link:](xpath/xpath.d.ts) [xpath](https://github.com/goto100/xpath) by [Andrew Bradley](https://github.com/cspotcode)
|
||||
* [:link:](xregexp/xregexp.d.ts) [XRegExp](http://xregexp.com) by [Bart van der Schoor](https://github.com/Bartvds)
|
||||
* [:link:](xsockets/XSockets.d.ts) [XSockets.NET](http://xsockets.net) by [Jeffery Grajkowski](https://github.com/pushplay)
|
||||
* [:link:](xss-filters/xss-filters.d.ts) [Yahoo XSS Filters](https://github.com/yahoo/xss-filters) by [Dave Taylor](http://davetayls.me)
|
||||
* [:link:](yamljs/yamljs.d.ts) [yamljs](https://github.com/jeremyfa/yaml.js) by [Tim Jonischkat](http://www.tim-jonischkat.de)
|
||||
* [:link:](yargs/yargs.d.ts) [yargs](https://github.com/chevex/yargs) by [Martin Poelstra](https://github.com/poelstra)
|
||||
* [:link:](yeoman-generator/yeoman-generator.d.ts) [yeoman-generator](https://github.com/yeoman/generator) by [Kentaro Okuno](http://github.com/armorik83)
|
||||
@@ -907,5 +1042,6 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
|
||||
* [: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:](viewporter/viewporter.d.ts) [Zynga Viewporter](https://github.com/zynga/viewporter) by [Boris Yankov](https://github.com/borisyankov)
|
||||
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
/// <reference path="DataStream.js.d.ts" />
|
||||
|
||||
var buf = new ArrayBuffer(100);
|
||||
var ds = new DataStream(buf);
|
||||
ds = new DataStream(buf, 10);
|
||||
ds = new DataStream(buf, 10, DataStream.BIG_ENDIAN);
|
||||
|
||||
ds.save('somefile.ext');
|
||||
ds.dynamicSize = true;
|
||||
|
||||
for (var i=0; i<ds.byteLength; i++) {
|
||||
}
|
||||
|
||||
ds.buffer = buf;
|
||||
ds.byteOffset = 10;
|
||||
ds.seek(0);
|
||||
ds.isEof();
|
||||
|
||||
var int32arr: Int32Array;
|
||||
var int16arr: Int16Array;
|
||||
var int8arr: Int8Array;
|
||||
|
||||
var uint32arr: Uint32Array;
|
||||
var uint16arr: Uint16Array;
|
||||
var uint8arr: Uint8Array;
|
||||
|
||||
var float64arr: Float64Array;
|
||||
var float32arr: Float32Array;
|
||||
|
||||
var val: number;
|
||||
var str: string;
|
||||
|
||||
int32arr = ds.mapInt32Array(2);
|
||||
int32arr = ds.mapInt32Array(2, DataStream.LITTLE_ENDIAN);
|
||||
|
||||
int16arr = ds.mapInt16Array(2);
|
||||
int16arr = ds.mapInt16Array(2, DataStream.BIG_ENDIAN);
|
||||
|
||||
int8arr = ds.mapInt8Array(2);
|
||||
|
||||
uint32arr = ds.mapUint32Array(2);
|
||||
uint32arr = ds.mapUint32Array(2, DataStream.LITTLE_ENDIAN);
|
||||
|
||||
uint16arr = ds.mapUint16Array(2);
|
||||
uint16arr = ds.mapUint16Array(2, DataStream.BIG_ENDIAN);
|
||||
|
||||
uint8arr = ds.mapUint8Array(2);
|
||||
|
||||
float64arr = ds.mapFloat64Array(2);
|
||||
float64arr = ds.mapFloat64Array(2, DataStream.LITTLE_ENDIAN);
|
||||
|
||||
float32arr = ds.mapFloat32Array(2);
|
||||
float32arr = ds.mapFloat32Array(2, DataStream.BIG_ENDIAN);
|
||||
|
||||
int32arr = ds.readInt32Array(2);
|
||||
int32arr = ds.readInt32Array(2, DataStream.LITTLE_ENDIAN);
|
||||
|
||||
int16arr = ds.readInt16Array(2);
|
||||
int16arr = ds.readInt16Array(2, DataStream.BIG_ENDIAN);
|
||||
|
||||
int8arr = ds.readInt8Array(2);
|
||||
|
||||
uint32arr = ds.readUint32Array(2);
|
||||
uint32arr = ds.readUint32Array(2, DataStream.LITTLE_ENDIAN);
|
||||
|
||||
uint16arr = ds.readUint16Array(2);
|
||||
uint16arr = ds.readUint16Array(2, DataStream.BIG_ENDIAN);
|
||||
|
||||
uint8arr = ds.readUint8Array(2);
|
||||
|
||||
float64arr = ds.readFloat64Array(2);
|
||||
float64arr = ds.readFloat64Array(2, DataStream.LITTLE_ENDIAN);
|
||||
|
||||
float32arr = ds.readFloat32Array(2);
|
||||
float32arr = ds.readFloat32Array(2, DataStream.BIG_ENDIAN);
|
||||
|
||||
ds.writeInt32Array(new Int32Array([1,2,3]));
|
||||
ds.writeInt32Array(new Int32Array([1,2,3]), DataStream.BIG_ENDIAN);
|
||||
|
||||
ds.writeInt16Array(new Int16Array([1,2,3]));
|
||||
ds.writeInt16Array(new Int16Array([1,2,3]), DataStream.BIG_ENDIAN);
|
||||
|
||||
ds.writeInt8Array(new Int8Array([1,2,3]));
|
||||
|
||||
ds.writeUint32Array(new Uint32Array([1,2,3]));
|
||||
ds.writeUint32Array(new Uint32Array([1,2,3]), DataStream.BIG_ENDIAN);
|
||||
|
||||
ds.writeUint16Array(new Uint16Array([1,2,3]));
|
||||
ds.writeUint16Array(new Uint16Array([1,2,3]), DataStream.BIG_ENDIAN);
|
||||
|
||||
ds.writeUint8Array(new Uint8Array([1,2,3]));
|
||||
|
||||
ds.writeFloat64Array(new Float64Array([1,2,3]));
|
||||
ds.writeFloat64Array(new Float64Array([1,2,3]), DataStream.BIG_ENDIAN);
|
||||
|
||||
ds.writeFloat32Array(new Float32Array([1,2,3]));
|
||||
ds.writeFloat32Array(new Float32Array([1,2,3]), DataStream.BIG_ENDIAN);
|
||||
|
||||
val = ds.readInt32();
|
||||
val = ds.readInt32(DataStream.LITTLE_ENDIAN);
|
||||
|
||||
val = ds.readInt16();
|
||||
val = ds.readInt16(DataStream.BIG_ENDIAN);
|
||||
|
||||
val = ds.readInt8();
|
||||
|
||||
val = ds.readUint32();
|
||||
val = ds.readUint32(DataStream.LITTLE_ENDIAN);
|
||||
|
||||
val = ds.readUint16();
|
||||
val = ds.readUint16(DataStream.BIG_ENDIAN);
|
||||
|
||||
val = ds.readUint8();
|
||||
|
||||
val = ds.readFloat64();
|
||||
val = ds.readFloat64(DataStream.LITTLE_ENDIAN);
|
||||
|
||||
val = ds.readFloat32();
|
||||
val = ds.readFloat32(DataStream.BIG_ENDIAN);
|
||||
|
||||
ds.writeInt32(1);
|
||||
ds.writeInt32(2, DataStream.BIG_ENDIAN);
|
||||
|
||||
ds.writeInt16(1);
|
||||
ds.writeInt16(2, DataStream.LITTLE_ENDIAN);
|
||||
|
||||
ds.writeInt8(1);
|
||||
|
||||
ds.writeUint32(1);
|
||||
ds.writeUint32(2, DataStream.BIG_ENDIAN);
|
||||
|
||||
ds.writeUint16(1);
|
||||
ds.writeUint16(2, DataStream.LITTLE_ENDIAN);
|
||||
|
||||
ds.writeUint8(1);
|
||||
|
||||
ds.writeFloat32(1);
|
||||
ds.writeFloat32(2, DataStream.BIG_ENDIAN);
|
||||
|
||||
ds.writeFloat64(1);
|
||||
ds.writeFloat64(2, DataStream.LITTLE_ENDIAN);
|
||||
|
||||
var embed = [
|
||||
'tag', 'uint32be',
|
||||
'code', 'uint32le',
|
||||
'greet', 'cstring'
|
||||
];
|
||||
|
||||
var def = [
|
||||
'tag', 'cstring:4',
|
||||
'code', 'uint32le',
|
||||
'embed', embed,
|
||||
'length', 'uint16be',
|
||||
'data', ['[]', 'float32be', 'length'],
|
||||
'greet', 'cstring:20',
|
||||
'endNote', 'uint8'
|
||||
];
|
||||
|
||||
var obj = ds.readStruct(def);
|
||||
ds.writeStruct(def, obj);
|
||||
|
||||
str = ds.readUCS2String(2);
|
||||
str = ds.readUCS2String(2, DataStream.LITTLE_ENDIAN);
|
||||
|
||||
ds.writeUCS2String("str");
|
||||
ds.writeUCS2String("str", DataStream.LITTLE_ENDIAN);
|
||||
ds.writeUCS2String("str", DataStream.LITTLE_ENDIAN, 1);
|
||||
|
||||
str = ds.readString(2);
|
||||
str = ds.readString(2, "ASCII");
|
||||
|
||||
ds.writeString("str");
|
||||
ds.writeString("str", "ASCII");
|
||||
ds.writeString("str", "ASCII", 1);
|
||||
|
||||
str = ds.readCString();
|
||||
str = ds.readCString(2);
|
||||
|
||||
ds.writeCString("str");
|
||||
ds.writeCString("str", 1);
|
||||
Vendored
+937
@@ -0,0 +1,937 @@
|
||||
// Type definitions for DataStream.js
|
||||
// Project: https://github.com/kig/DataStream.js
|
||||
// Definitions by: Tat <https://github.com/tatchx/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare class DataStream {
|
||||
|
||||
/**
|
||||
Big-endian const to use as default endianness.
|
||||
*/
|
||||
static BIG_ENDIAN: boolean;
|
||||
|
||||
/**
|
||||
Little-endian const to use as default endianness.
|
||||
*/
|
||||
static LITTLE_ENDIAN: boolean;
|
||||
|
||||
/**
|
||||
DataStream reads scalars, arrays and structs of data from an ArrayBuffer.
|
||||
It's like a file-like DataView on steroids.
|
||||
|
||||
@param {ArrayBuffer} arrayBuffer ArrayBuffer to read from.
|
||||
*/
|
||||
constructor(arrayBuffer: ArrayBuffer);
|
||||
|
||||
/**
|
||||
DataStream reads scalars, arrays and structs of data from an ArrayBuffer.
|
||||
It's like a file-like DataView on steroids.
|
||||
|
||||
@param arrayBuffer ArrayBuffer to read from.
|
||||
@param byteOffset Offset from arrayBuffer beginning for the DataStream.
|
||||
*/
|
||||
constructor(arrayBuffer: ArrayBuffer, byteOffset: number);
|
||||
|
||||
/**
|
||||
DataStream reads scalars, arrays and structs of data from an ArrayBuffer.
|
||||
It's like a file-like DataView on steroids.
|
||||
|
||||
@param arrayBuffer ArrayBuffer to read from.
|
||||
@param byteOffset Offset from arrayBuffer beginning for the DataStream.
|
||||
@param endianness DataStream.BIG_ENDIAN or DataStream.LITTLE_ENDIAN (the default).
|
||||
*/
|
||||
constructor(arrayBuffer: ArrayBuffer, byteOffset: number, endianness: boolean);
|
||||
|
||||
/**
|
||||
Saves the DataStream contents to the given filename.
|
||||
Uses Chrome's anchor download property to initiate download.
|
||||
*
|
||||
@param filename Filename to save as.
|
||||
@return nothing
|
||||
*/
|
||||
save(filename: string): void;
|
||||
|
||||
/**
|
||||
Whether to extend DataStream buffer when trying to write beyond its size.
|
||||
If set, the buffer is reallocated to twice its current size until the
|
||||
requested write fits the buffer.
|
||||
*/
|
||||
dynamicSize: boolean;
|
||||
|
||||
/**
|
||||
Returns the byte length of the DataStream object.
|
||||
*/
|
||||
byteLength: number;
|
||||
|
||||
/**
|
||||
Set/get the backing ArrayBuffer of the DataStream object.
|
||||
The setter updates the DataView to point to the new buffer.
|
||||
*/
|
||||
buffer: ArrayBuffer;
|
||||
|
||||
/**
|
||||
Set/get the byteOffset of the DataStream object.
|
||||
The setter updates the DataView to point to the new byteOffset.
|
||||
*/
|
||||
byteOffset: number;
|
||||
|
||||
/**
|
||||
Set/get the backing DataView of the DataStream object.
|
||||
The setter updates the buffer and byteOffset to point to the DataView values.
|
||||
*/
|
||||
dataView: Object;
|
||||
|
||||
/**
|
||||
Sets the DataStream read/write position to given position.
|
||||
Clamps between 0 and DataStream length.
|
||||
*
|
||||
@param pos Position to seek to.
|
||||
@return nothing
|
||||
*/
|
||||
seek(pos: number): void;
|
||||
|
||||
/**
|
||||
Returns true if the DataStream seek pointer is at the end of buffer and
|
||||
there's no more data to read.
|
||||
*
|
||||
@return true if the seek pointer is at the end of the buffer.
|
||||
*/
|
||||
isEof(): boolean;
|
||||
|
||||
/**
|
||||
Maps an Int32Array into the DataStream buffer, swizzling it to native
|
||||
endianness in-place. The current offset from the start of the buffer needs to
|
||||
be a multiple of element size, just like with typed array views.
|
||||
*
|
||||
Nice for quickly reading in data. Warning: potentially modifies the buffer
|
||||
contents.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@return Int32Array to the DataStream backing buffer.
|
||||
*/
|
||||
mapInt32Array(length: number): Int32Array;
|
||||
|
||||
/**
|
||||
Maps an Int32Array into the DataStream buffer, swizzling it to native
|
||||
endianness in-place. The current offset from the start of the buffer needs to
|
||||
be a multiple of element size, just like with typed array views.
|
||||
*
|
||||
Nice for quickly reading in data. Warning: potentially modifies the buffer
|
||||
contents.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@param e Endianness of the data to read.
|
||||
@return Int32Array to the DataStream backing buffer.
|
||||
*/
|
||||
mapInt32Array(length: number, e: boolean): Int32Array;
|
||||
|
||||
/**
|
||||
Maps an Int16Array into the DataStream buffer, swizzling it to native
|
||||
endianness in-place. The current offset from the start of the buffer needs to
|
||||
be a multiple of element size, just like with typed array views.
|
||||
*
|
||||
Nice for quickly reading in data. Warning: potentially modifies the buffer
|
||||
contents.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@return Int16Array to the DataStream backing buffer.
|
||||
*/
|
||||
mapInt16Array(length: number): Int16Array;
|
||||
|
||||
/**
|
||||
Maps an Int16Array into the DataStream buffer, swizzling it to native
|
||||
endianness in-place. The current offset from the start of the buffer needs to
|
||||
be a multiple of element size, just like with typed array views.
|
||||
*
|
||||
Nice for quickly reading in data. Warning: potentially modifies the buffer
|
||||
contents.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@param e Endianness of the data to read.
|
||||
@return Int16Array to the DataStream backing buffer.
|
||||
*/
|
||||
mapInt16Array(length: number, e: boolean): Int16Array;
|
||||
|
||||
/**
|
||||
Maps an Int8Array into the DataStream buffer.
|
||||
*
|
||||
Nice for quickly reading in data.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@return Int8Array to the DataStream backing buffer.
|
||||
*/
|
||||
mapInt8Array(length: number): Int8Array;
|
||||
|
||||
/**
|
||||
Maps a Uint32Array into the DataStream buffer, swizzling it to native
|
||||
endianness in-place. The current offset from the start of the buffer needs to
|
||||
be a multiple of element size, just like with typed array views.
|
||||
*
|
||||
Nice for quickly reading in data. Warning: potentially modifies the buffer
|
||||
contents.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@return Uint32Array to the DataStream backing buffer.
|
||||
*/
|
||||
mapUint32Array(length: number): Uint32Array;
|
||||
|
||||
/**
|
||||
Maps a Uint32Array into the DataStream buffer, swizzling it to native
|
||||
endianness in-place. The current offset from the start of the buffer needs to
|
||||
be a multiple of element size, just like with typed array views.
|
||||
*
|
||||
Nice for quickly reading in data. Warning: potentially modifies the buffer
|
||||
contents.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@param e Endianness of the data to read.
|
||||
@return Uint32Array to the DataStream backing buffer.
|
||||
*/
|
||||
mapUint32Array(length: number, e: boolean): Uint32Array;
|
||||
|
||||
/**
|
||||
Maps a Uint16Array into the DataStream buffer, swizzling it to native
|
||||
endianness in-place. The current offset from the start of the buffer needs to
|
||||
be a multiple of element size, just like with typed array views.
|
||||
*
|
||||
Nice for quickly reading in data. Warning: potentially modifies the buffer
|
||||
contents.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@return Uint16Array to the DataStream backing buffer.
|
||||
*/
|
||||
mapUint16Array(length: number): Uint16Array;
|
||||
|
||||
/**
|
||||
Maps a Uint16Array into the DataStream buffer, swizzling it to native
|
||||
endianness in-place. The current offset from the start of the buffer needs to
|
||||
be a multiple of element size, just like with typed array views.
|
||||
*
|
||||
Nice for quickly reading in data. Warning: potentially modifies the buffer
|
||||
contents.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@param e Endianness of the data to read.
|
||||
@return Uint16Array to the DataStream backing buffer.
|
||||
*/
|
||||
mapUint16Array(length: number, e: boolean): Uint16Array;
|
||||
|
||||
/**
|
||||
Maps a Uint8Array into the DataStream buffer.
|
||||
*
|
||||
Nice for quickly reading in data.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@return Uint8Array to the DataStream backing buffer.
|
||||
*/
|
||||
mapUint8Array(length: number): Uint8Array;
|
||||
|
||||
/**
|
||||
Maps a Float64Array into the DataStream buffer, swizzling it to native
|
||||
endianness in-place. The current offset from the start of the buffer needs to
|
||||
be a multiple of element size, just like with typed array views.
|
||||
*
|
||||
Nice for quickly reading in data. Warning: potentially modifies the buffer
|
||||
contents.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@return Float64Array to the DataStream backing buffer.
|
||||
*/
|
||||
mapFloat64Array(length: number): Float64Array;
|
||||
|
||||
/**
|
||||
Maps a Float64Array into the DataStream buffer, swizzling it to native
|
||||
endianness in-place. The current offset from the start of the buffer needs to
|
||||
be a multiple of element size, just like with typed array views.
|
||||
*
|
||||
Nice for quickly reading in data. Warning: potentially modifies the buffer
|
||||
contents.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@param e Endianness of the data to read.
|
||||
@return Float64Array to the DataStream backing buffer.
|
||||
*/
|
||||
mapFloat64Array(length: number, e: boolean): Float64Array;
|
||||
|
||||
/**
|
||||
Maps a Float32Array into the DataStream buffer, swizzling it to native
|
||||
endianness in-place. The current offset from the start of the buffer needs to
|
||||
be a multiple of element size, just like with typed array views.
|
||||
*
|
||||
Nice for quickly reading in data. Warning: potentially modifies the buffer
|
||||
contents.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@return Float32Array to the DataStream backing buffer.
|
||||
*/
|
||||
mapFloat32Array(length: number): Float32Array;
|
||||
|
||||
/**
|
||||
Maps a Float32Array into the DataStream buffer, swizzling it to native
|
||||
endianness in-place. The current offset from the start of the buffer needs to
|
||||
be a multiple of element size, just like with typed array views.
|
||||
*
|
||||
Nice for quickly reading in data. Warning: potentially modifies the buffer
|
||||
contents.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@param e Endianness of the data to read.
|
||||
@return Float32Array to the DataStream backing buffer.
|
||||
*/
|
||||
mapFloat32Array(length: number, e: boolean): Float32Array;
|
||||
|
||||
/**
|
||||
Reads an Int32Array of desired length and endianness from the DataStream.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@return The read Int32Array.
|
||||
*/
|
||||
readInt32Array(length: number): Int32Array;
|
||||
|
||||
/**
|
||||
Reads an Int32Array of desired length and endianness from the DataStream.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@param e Endianness of the data to read.
|
||||
@return The read Int32Array.
|
||||
*/
|
||||
readInt32Array(length: number, e: boolean): Int32Array;
|
||||
|
||||
/**
|
||||
Reads an Int16Array of desired length and endianness from the DataStream.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@return The read Int16Array.
|
||||
*/
|
||||
readInt16Array(length: number): Int16Array;
|
||||
|
||||
/**
|
||||
Reads an Int16Array of desired length and endianness from the DataStream.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@param e Endianness of the data to read.
|
||||
@return The read Int16Array.
|
||||
*/
|
||||
readInt16Array(length: number, e: boolean): Int16Array;
|
||||
|
||||
/**
|
||||
Reads an Int8Array of desired length from the DataStream.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@return The read Int8Array.
|
||||
*/
|
||||
readInt8Array(length: number): Int8Array;
|
||||
|
||||
/**
|
||||
Reads an Uint32Array of desired length and endianness from the DataStream.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@return The read Uint32Array.
|
||||
*/
|
||||
readUint32Array(length: number): Uint32Array;
|
||||
|
||||
/**
|
||||
Reads an Uint32Array of desired length and endianness from the DataStream.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@param e Endianness of the data to read.
|
||||
@return The read Uint32Array.
|
||||
*/
|
||||
readUint32Array(length: number, e: boolean): Uint32Array;
|
||||
|
||||
/**
|
||||
Reads an Uint16Array of desired length and endianness from the DataStream.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@return The read Uint16Array.
|
||||
*/
|
||||
readUint16Array(length: number): Uint16Array;
|
||||
|
||||
/**
|
||||
Reads an Uint16Array of desired length and endianness from the DataStream.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@param e Endianness of the data to read.
|
||||
@return The read Uint16Array.
|
||||
*/
|
||||
readUint16Array(length: number, e: boolean): Uint16Array;
|
||||
|
||||
/**
|
||||
Reads an Uint8Array of desired length from the DataStream.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@return The read Uint8Array.
|
||||
*/
|
||||
readUint8Array(length: number): Uint8Array;
|
||||
|
||||
/**
|
||||
Reads a Float64Array of desired length and endianness from the DataStream.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@param e Endianness of the data to read.
|
||||
@return The read Float64Array.
|
||||
*/
|
||||
readFloat64Array(length: number, e: boolean): Float64Array;
|
||||
|
||||
/**
|
||||
Reads a Float64Array of desired length and endianness from the DataStream.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@return The read Float64Array.
|
||||
*/
|
||||
readFloat64Array(length: number): Float64Array;
|
||||
|
||||
/**
|
||||
Reads a Float32Array of desired length and endianness from the DataStream.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@param e Endianness of the data to read.
|
||||
@return The read Float32Array.
|
||||
*/
|
||||
readFloat32Array(length: number, e: boolean): Float32Array;
|
||||
|
||||
/**
|
||||
Reads a Float32Array of desired length and endianness from the DataStream.
|
||||
*
|
||||
@param length Number of elements to map.
|
||||
@return The read Float32Array.
|
||||
*/
|
||||
readFloat32Array(length: number): Float32Array;
|
||||
|
||||
/**
|
||||
Writes an Int32Array of specified endianness to the DataStream.
|
||||
*
|
||||
@param arr The array to write.
|
||||
@param e Endianness of the data to write.
|
||||
*/
|
||||
writeInt32Array(arr: Int32Array, e: boolean): void;
|
||||
|
||||
/**
|
||||
Writes an Int32Array of specified endianness to the DataStream.
|
||||
*
|
||||
@param arr The array to write.
|
||||
*/
|
||||
writeInt32Array(arr: Int32Array): void;
|
||||
|
||||
/**
|
||||
Writes an Int16Array of specified endianness to the DataStream.
|
||||
*
|
||||
@param arr The array to write.
|
||||
@param e Endianness of the data to write.
|
||||
*/
|
||||
writeInt16Array(arr: Int16Array, e: boolean): void;
|
||||
|
||||
/**
|
||||
Writes an Int16Array of specified endianness to the DataStream.
|
||||
*
|
||||
@param arr The array to write.
|
||||
*/
|
||||
writeInt16Array(arr: Int16Array): void;
|
||||
|
||||
/**
|
||||
Writes an Int8Array to the DataStream.
|
||||
*
|
||||
@param arr The array to write.
|
||||
*/
|
||||
writeInt8Array(arr: Int8Array): void;
|
||||
|
||||
/**
|
||||
Writes an Uint32Array of specified endianness to the DataStream.
|
||||
*
|
||||
@param arr The array to write.
|
||||
@param e Endianness of the data to write.
|
||||
*/
|
||||
writeUint32Array(arr: Uint32Array, e: boolean): void;
|
||||
|
||||
/**
|
||||
Writes an Uint32Array of specified endianness to the DataStream.
|
||||
*
|
||||
@param arr The array to write.
|
||||
*/
|
||||
writeUint32Array(arr: Uint32Array): void;
|
||||
|
||||
/**
|
||||
Writes an Uint16Array of specified endianness to the DataStream.
|
||||
*
|
||||
@param arr The array to write.
|
||||
@param e Endianness of the data to write.
|
||||
*/
|
||||
writeUint16Array(arr: Uint16Array, e: boolean): void;
|
||||
|
||||
/**
|
||||
Writes an Uint16Array of specified endianness to the DataStream.
|
||||
*
|
||||
@param arr The array to write.
|
||||
*/
|
||||
writeUint16Array(arr: Uint16Array): void;
|
||||
|
||||
/**
|
||||
Writes an Uint8Array to the DataStream.
|
||||
*
|
||||
@param arr The array to write.
|
||||
*/
|
||||
writeUint8Array(arr: Uint8Array): void;
|
||||
|
||||
/**
|
||||
Writes a Float64Array of specified endianness to the DataStream.
|
||||
*
|
||||
@param arr The array to write.
|
||||
*/
|
||||
writeFloat64Array(arr: Float64Array): void;
|
||||
|
||||
/**
|
||||
Writes a Float64Array of specified endianness to the DataStream.
|
||||
*
|
||||
@param arr The array to write.
|
||||
@param e Endianness of the data to write.
|
||||
*/
|
||||
writeFloat64Array(arr: Float64Array, e: boolean): void;
|
||||
|
||||
/**
|
||||
Writes a Float32Array of specified endianness to the DataStream.
|
||||
*
|
||||
@param arr The array to write.
|
||||
*/
|
||||
writeFloat32Array(arr: Float32Array): void;
|
||||
|
||||
/**
|
||||
Writes a Float32Array of specified endianness to the DataStream.
|
||||
*
|
||||
@param arr The array to write.
|
||||
@param e Endianness of the data to write.
|
||||
*/
|
||||
writeFloat32Array(arr: Float32Array, e: boolean): void;
|
||||
|
||||
/**
|
||||
Reads a 32-bit int from the DataStream with the desired endianness.
|
||||
*
|
||||
@return The read number.
|
||||
*/
|
||||
readInt32(): number;
|
||||
|
||||
/**
|
||||
Reads a 32-bit int from the DataStream with the desired endianness.
|
||||
*
|
||||
@param e Endianness of the number.
|
||||
@return The read number.
|
||||
*/
|
||||
readInt32(e: boolean): number;
|
||||
|
||||
/**
|
||||
Reads a 16-bit int from the DataStream with the desired endianness.
|
||||
*
|
||||
@return The read number.
|
||||
*/
|
||||
readInt16(): number;
|
||||
|
||||
/**
|
||||
Reads a 16-bit int from the DataStream with the desired endianness.
|
||||
*
|
||||
@param e Endianness of the number.
|
||||
@return The read number.
|
||||
*/
|
||||
readInt16(e: boolean): number;
|
||||
|
||||
/**
|
||||
Reads an 8-bit int from the DataStream.
|
||||
*
|
||||
@return The read number.
|
||||
*/
|
||||
readInt8(): number;
|
||||
|
||||
/**
|
||||
Reads a 32-bit unsigned int from the DataStream with the desired endianness.
|
||||
*
|
||||
@return The read number.
|
||||
*/
|
||||
readUint32(): number;
|
||||
|
||||
/**
|
||||
Reads a 32-bit unsigned int from the DataStream with the desired endianness.
|
||||
*
|
||||
@param e Endianness of the number.
|
||||
@return The read number.
|
||||
*/
|
||||
readUint32(e: boolean): number;
|
||||
|
||||
/**
|
||||
Reads a 16-bit unsigned int from the DataStream with the desired endianness.
|
||||
*
|
||||
@return The read number.
|
||||
*/
|
||||
readUint16(): number;
|
||||
|
||||
/**
|
||||
Reads a 16-bit unsigned int from the DataStream with the desired endianness.
|
||||
*
|
||||
@param e Endianness of the number.
|
||||
@return The read number.
|
||||
*/
|
||||
readUint16(e: boolean): number;
|
||||
|
||||
/**
|
||||
Reads an 8-bit unsigned intfrom the DataStream.
|
||||
*
|
||||
@return The read number.
|
||||
*/
|
||||
readUint8(): number;
|
||||
|
||||
/**
|
||||
Reads a 32-bit float from the DataStream with the desired endianness.
|
||||
*
|
||||
@return The read number.
|
||||
*/
|
||||
readFloat32(): number;
|
||||
|
||||
/**
|
||||
Reads a 32-bit float from the DataStream with the desired endianness.
|
||||
*
|
||||
@param e Endianness of the number.
|
||||
@return The read number.
|
||||
*/
|
||||
readFloat32(e: boolean): number;
|
||||
|
||||
/**
|
||||
Reads a 64-bit float from the DataStream with the desired endianness.
|
||||
*
|
||||
@return The read number.
|
||||
*/
|
||||
readFloat64(): number;
|
||||
|
||||
/**
|
||||
Reads a 64-bit float from the DataStream with the desired endianness.
|
||||
*
|
||||
@param e Endianness of the number.
|
||||
@return The read number.
|
||||
*/
|
||||
readFloat64(e: boolean): number;
|
||||
|
||||
/**
|
||||
Writes a 32-bit int to the DataStream with the desired endianness.
|
||||
*
|
||||
@param v Number to write.
|
||||
*/
|
||||
writeInt32(v: number): void;
|
||||
|
||||
/**
|
||||
Writes a 32-bit int to the DataStream with the desired endianness.
|
||||
*
|
||||
@param v Number to write.
|
||||
@param e Endianness of the number.
|
||||
*/
|
||||
writeInt32(v: number, e: boolean): void;
|
||||
|
||||
/**
|
||||
Writes a 16-bit int to the DataStream with the desired endianness.
|
||||
*
|
||||
@param v Number to write.
|
||||
*/
|
||||
writeInt16(v: number): void;
|
||||
|
||||
/**
|
||||
Writes a 16-bit int to the DataStream with the desired endianness.
|
||||
*
|
||||
@param v Number to write.
|
||||
@param e Endianness of the number.
|
||||
*/
|
||||
writeInt16(v: number, e: boolean): void;
|
||||
|
||||
/**
|
||||
Writes an 8-bit int to the DataStream.
|
||||
*
|
||||
@param v Number to write.
|
||||
*/
|
||||
writeInt8(v: number): void;
|
||||
|
||||
/**
|
||||
Writes a 32-bit undigned int to the DataStream with the desired endianness.
|
||||
*
|
||||
@param v Number to write.
|
||||
*/
|
||||
writeUint32(v: number): void;
|
||||
|
||||
/**
|
||||
Writes a 32-bit undigned int to the DataStream with the desired endianness.
|
||||
*
|
||||
@param v Number to write.
|
||||
@param e Endianness of the number.
|
||||
*/
|
||||
writeUint32(v: number, e: boolean): void;
|
||||
|
||||
/**
|
||||
Writes a 16-bit undigned int to the DataStream with the desired endianness.
|
||||
*
|
||||
@param v Number to write.
|
||||
*/
|
||||
writeUint16(v: number): void;
|
||||
|
||||
/**
|
||||
Writes a 16-bit undigned int to the DataStream with the desired endianness.
|
||||
*
|
||||
@param v Number to write.
|
||||
@param e Endianness of the number.
|
||||
*/
|
||||
writeUint16(v: number, e: boolean): void;
|
||||
|
||||
/**
|
||||
Writes an 8-bit undigned int to the DataStream.
|
||||
*
|
||||
@param v Number to write.
|
||||
*/
|
||||
writeUint8(v: number): void;
|
||||
|
||||
/**
|
||||
Writes a 32-bit float to the DataStream with the desired endianness.
|
||||
*
|
||||
@param v Number to write.
|
||||
*/
|
||||
writeFloat32(v: number): void;
|
||||
|
||||
/**
|
||||
Writes a 32-bit float to the DataStream with the desired endianness.
|
||||
*
|
||||
@param v Number to write.
|
||||
@param e Endianness of the number.
|
||||
*/
|
||||
writeFloat32(v: number, e: boolean): void;
|
||||
|
||||
/**
|
||||
Writes a 64-bit float to the DataStream with the desired endianness.
|
||||
*
|
||||
@param v Number to write.
|
||||
*/
|
||||
writeFloat64(v: number): void;
|
||||
|
||||
/**
|
||||
Writes a 64-bit float to the DataStream with the desired endianness.
|
||||
*
|
||||
@param v Number to write.
|
||||
@param e Endianness of the number.
|
||||
*/
|
||||
writeFloat64(v: number, e: boolean): void;
|
||||
|
||||
/**
|
||||
Reads a struct of data from the DataStream. The struct is defined as
|
||||
a flat array of [name, type]-pairs. See the example below:
|
||||
*
|
||||
ds.readStruct([
|
||||
'headerTag', 'uint32', // Uint32 in DataStream endianness.
|
||||
'headerTag2', 'uint32be', // Big-endian Uint32.
|
||||
'headerTag3', 'uint32le', // Little-endian Uint32.
|
||||
'array', ['[]', 'uint32', 16], // Uint32Array of length 16.
|
||||
'array2Length', 'uint32',
|
||||
'array2', ['[]', 'uint32', 'array2Length'] // Uint32Array of length array2Length
|
||||
]);
|
||||
*
|
||||
The possible values for the type are as follows:
|
||||
*
|
||||
// Number types
|
||||
// Unsuffixed number types use DataStream endianness.
|
||||
// To explicitly specify endianness, suffix the type with
|
||||
// 'le' for little-endian or 'be' for big-endian,
|
||||
// e.g. 'int32be' for big-endian int32.
|
||||
'uint8' -- 8-bit unsigned int
|
||||
'uint16' -- 16-bit unsigned int
|
||||
'uint32' -- 32-bit unsigned int
|
||||
'int8' -- 8-bit int
|
||||
'int16' -- 16-bit int
|
||||
'int32' -- 32-bit int
|
||||
'float32' -- 32-bit float
|
||||
'float64' -- 64-bit float
|
||||
*
|
||||
// String types
|
||||
'cstring' -- ASCII string terminated by a zero byte.
|
||||
'string:N' -- ASCII string of length N, where N is a literal integer.
|
||||
'string:variableName' -- ASCII string of length $variableName,
|
||||
where 'variableName' is a previously parsed number in the current struct.
|
||||
'string,CHARSET:N' -- String of byteLength N encoded with given CHARSET.
|
||||
'u16string:N' -- UCS-2 string of length N in DataStream endianness.
|
||||
'u16stringle:N' -- UCS-2 string of length N in little-endian.
|
||||
'u16stringbe:N' -- UCS-2 string of length N in big-endian.
|
||||
*
|
||||
// Complex types
|
||||
[name, type, name_2, type_2, ..., name_N, type_N] -- Struct
|
||||
function(dataStream, struct) {} -- Callback function to read and return data.
|
||||
{get: function(dataStream, struct) {},
|
||||
set: function(dataStream, struct) {}}
|
||||
-- Getter/setter functions to read and return data, handy for using the same
|
||||
struct definition for reading and writing structs.
|
||||
['[]', type, length] -- Array of given type and length. The length can be either
|
||||
a number, a string that references a previously-read
|
||||
field, or a callback function(struct, dataStream, type){}.
|
||||
If length is '*', reads in as many elements as it can.
|
||||
*
|
||||
@param structDefinition Struct definition object.
|
||||
@return The read struct. Null if failed to read struct.
|
||||
*/
|
||||
readStruct(structDefinition: any[]): Object;
|
||||
|
||||
/**
|
||||
Writes a struct to the DataStream. Takes a structDefinition that gives the
|
||||
types and a struct object that gives the values. Refer to readStruct for the
|
||||
structure of structDefinition.
|
||||
*
|
||||
@param structDefinition Type definition of the struct.
|
||||
@param struct The struct data object.
|
||||
*/
|
||||
writeStruct(structDefinition: Object, struct: Object): void;
|
||||
|
||||
/**
|
||||
Read UCS-2 string of desired length and endianness from the DataStream.
|
||||
*
|
||||
@param length The length of the string to read.
|
||||
@return The read string.
|
||||
*/
|
||||
readUCS2String(length: number): string;
|
||||
|
||||
/**
|
||||
Read UCS-2 string of desired length and endianness from the DataStream.
|
||||
*
|
||||
@param length The length of the string to read.
|
||||
@param endianness The endianness of the string data in the DataStream.
|
||||
@return The read string.
|
||||
*/
|
||||
readUCS2String(length: number, endianness: boolean): string;
|
||||
|
||||
/**
|
||||
Write a UCS-2 string of desired endianness to the DataStream. The
|
||||
lengthOverride argument lets you define the number of characters to write.
|
||||
If the string is shorter than lengthOverride, the extra space is padded with
|
||||
zeroes.
|
||||
*
|
||||
@param str The string to write.
|
||||
*/
|
||||
writeUCS2String(str: string): void;
|
||||
|
||||
/**
|
||||
Write a UCS-2 string of desired endianness to the DataStream. The
|
||||
lengthOverride argument lets you define the number of characters to write.
|
||||
If the string is shorter than lengthOverride, the extra space is padded with
|
||||
zeroes.
|
||||
*
|
||||
@param str The string to write.
|
||||
@param endianness The endianness to use for the written string data.
|
||||
*/
|
||||
writeUCS2String(str: string, endianness: boolean): void;
|
||||
|
||||
/**
|
||||
Write a UCS-2 string of desired endianness to the DataStream. The
|
||||
lengthOverride argument lets you define the number of characters to write.
|
||||
If the string is shorter than lengthOverride, the extra space is padded with
|
||||
zeroes.
|
||||
*
|
||||
@param str The string to write.
|
||||
@param endianness The endianness to use for the written string data.
|
||||
@param lengthOverride The number of characters to write.
|
||||
*/
|
||||
writeUCS2String(str: string, endianness: boolean, lengthOverride: number): void;
|
||||
|
||||
/**
|
||||
Read a string of desired length and encoding from the DataStream.
|
||||
*
|
||||
@param length The length of the string to read in bytes.
|
||||
@return The read string.
|
||||
*/
|
||||
readString(length: number): string;
|
||||
|
||||
/**
|
||||
Read a string of desired length and encoding from the DataStream.
|
||||
*
|
||||
@param length The length of the string to read in bytes.
|
||||
@param encoding The encoding of the string data in the DataStream. Defaults to ASCII.
|
||||
@return The read string.
|
||||
*/
|
||||
readString(length: number, encoding: string): string;
|
||||
|
||||
/**
|
||||
Writes a string of desired length and encoding to the DataStream.
|
||||
*
|
||||
@param s The string to write.
|
||||
*/
|
||||
writeString(s: string): void;
|
||||
|
||||
/**
|
||||
Writes a string of desired length and encoding to the DataStream.
|
||||
*
|
||||
@param s The string to write.
|
||||
@param encoding The encoding for the written string data. Defaults to ASCII.
|
||||
*/
|
||||
writeString(s: string, encoding: string): void;
|
||||
|
||||
/**
|
||||
Writes a string of desired length and encoding to the DataStream.
|
||||
*
|
||||
@param s The string to write.
|
||||
@param encoding The encoding for the written string data. Defaults to ASCII.
|
||||
@param length The number of characters to write.
|
||||
*/
|
||||
writeString(s: string, encoding: string, length: number): void;
|
||||
|
||||
/**
|
||||
Read null-terminated string of desired length from the DataStream. Truncates
|
||||
the returned string so that the null byte is not a part of it.
|
||||
*
|
||||
@return The read string.
|
||||
*/
|
||||
readCString(): string;
|
||||
|
||||
/**
|
||||
Read null-terminated string of desired length from the DataStream. Truncates
|
||||
the returned string so that the null byte is not a part of it.
|
||||
*
|
||||
@param length The length of the string to read.
|
||||
@return The read string.
|
||||
*/
|
||||
readCString(length: number): string;
|
||||
|
||||
/**
|
||||
Writes a null-terminated string to DataStream and zero-pads it to length
|
||||
bytes. If length is not given, writes the string followed by a zero.
|
||||
If string is longer than length, the written part of the string does not have
|
||||
a trailing zero.
|
||||
*
|
||||
@param s The string to write.
|
||||
*/
|
||||
writeCString(s: string): void;
|
||||
|
||||
/**
|
||||
Writes a null-terminated string to DataStream and zero-pads it to length
|
||||
bytes. If length is not given, writes the string followed by a zero.
|
||||
If string is longer than length, the written part of the string does not have
|
||||
a trailing zero.
|
||||
*
|
||||
@param s The string to write.
|
||||
@param length The number of characters to write.
|
||||
*/
|
||||
writeCString(s: string, length: number): void;
|
||||
|
||||
/**
|
||||
Reads an object of type t from the DataStream, passing struct as the thus-far
|
||||
read struct to possible callbacks that refer to it. Used by readStruct for
|
||||
reading in the values, so the type is one of the readStruct types.
|
||||
*
|
||||
@param t Type of the object to read.
|
||||
@return Returns the object on successful read, null on unsuccessful.
|
||||
*/
|
||||
readType(t: Object): Object;
|
||||
|
||||
/**
|
||||
Reads an object of type t from the DataStream, passing struct as the thus-far
|
||||
read struct to possible callbacks that refer to it. Used by readStruct for
|
||||
reading in the values, so the type is one of the readStruct types.
|
||||
*
|
||||
@param t Type of the object to read.
|
||||
@param struct Struct to refer to when resolving length references and for calling callbacks.
|
||||
@return Returns the object on successful read, null on unsuccessful.
|
||||
*/
|
||||
readType(t: Object, struct: Object): Object;
|
||||
|
||||
/**
|
||||
Writes object v of type t to the DataStream.
|
||||
*
|
||||
@param t Type of data to write.
|
||||
@param v Value of data to write.
|
||||
@param struct Struct to pass to write callback functions.
|
||||
*/
|
||||
writeType(t: Object, v: Object, struct: Object): void;
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
# DefinitelyTyped [](https://travis-ci.org/borisyankov/DefinitelyTyped)
|
||||
|
||||
[](https://gitter.im/borisyankov/DefinitelyTyped?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
> The repository for *high quality* TypeScript type definitions.
|
||||
|
||||
For more information see the [definitelytyped.org](http://definitelytyped.org) website.
|
||||
|
||||
Vendored
+46
-1
@@ -576,7 +576,7 @@ declare module AceAjax {
|
||||
/**
|
||||
* Returns the current tab size.
|
||||
**/
|
||||
getTabSize(): string;
|
||||
getTabSize(): number;
|
||||
|
||||
/**
|
||||
* Returns `true` if the character at the position is a soft tab.
|
||||
@@ -1034,6 +1034,9 @@ declare module AceAjax {
|
||||
* Event sessions dealing with the mouse and keyboard are bubbled up from `Document` to the `Editor`, which decides what to do with them.
|
||||
**/
|
||||
export interface Editor {
|
||||
|
||||
addEventListener(ev: 'change', callback: (ev: EditorChangeEvent) => any);
|
||||
addEventListener(ev: string, callback: Function);
|
||||
|
||||
inMultiSelectMode: boolean;
|
||||
|
||||
@@ -1060,6 +1063,31 @@ declare module AceAjax {
|
||||
onChangeMode(e?);
|
||||
|
||||
execCommand(command:string, args?: any);
|
||||
|
||||
/**
|
||||
* Sets a Configuration Option
|
||||
**/
|
||||
setOption(optionName: any, optionValue: any);
|
||||
|
||||
/**
|
||||
* Sets Configuration Options
|
||||
**/
|
||||
setOptions(keyValueTuples: any);
|
||||
|
||||
/**
|
||||
* Get a Configuration Option
|
||||
**/
|
||||
getOption(name: any):any;
|
||||
|
||||
/**
|
||||
* Get Configuration Options
|
||||
**/
|
||||
getOptions():any;
|
||||
|
||||
/**
|
||||
* Get rid of console warning by setting this to Infinity
|
||||
**/
|
||||
$blockScrolling:number;
|
||||
|
||||
/**
|
||||
* Sets a new key handler, such as "vim" or "windows".
|
||||
@@ -1710,6 +1738,13 @@ declare module AceAjax {
|
||||
**/
|
||||
new(renderer: VirtualRenderer, session?: IEditSession): Editor;
|
||||
}
|
||||
|
||||
interface EditorChangeEvent {
|
||||
start: Position;
|
||||
end: Position;
|
||||
action: string; // insert, remove
|
||||
lines: any[];
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
/// PlaceHolder
|
||||
@@ -2574,6 +2609,16 @@ declare module AceAjax {
|
||||
* Returns `true` if there are redo operations left to perform.
|
||||
**/
|
||||
hasRedo(): boolean;
|
||||
|
||||
/**
|
||||
* Returns `true` if the dirty counter is 0
|
||||
**/
|
||||
isClean(): boolean;
|
||||
|
||||
/**
|
||||
* Sets dirty counter to 0
|
||||
**/
|
||||
markClean(): void;
|
||||
|
||||
}
|
||||
var UndoManager: {
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
/**
|
||||
* Created by shearerbeard on 6/28/15.
|
||||
*/
|
||||
///<reference path="alt.d.ts"/>
|
||||
///<reference path="../es6-promise/es6-promise.d.ts" />
|
||||
|
||||
import Alt = require("alt");
|
||||
import Promise = require("es6-promise");
|
||||
|
||||
//New alt instance
|
||||
var alt = new Alt();
|
||||
|
||||
//Interfaces for our Action Types
|
||||
interface TestActionsGenerate {
|
||||
notifyTest(str:string):void;
|
||||
}
|
||||
|
||||
interface TestActionsExplicit {
|
||||
doTest(str:string):void;
|
||||
success():void;
|
||||
error():void;
|
||||
loading():void;
|
||||
}
|
||||
|
||||
//Create abstracts to inherit ghost methods
|
||||
class AbstractActions implements AltJS.ActionsClass {
|
||||
constructor( alt:AltJS.Alt){}
|
||||
actions:any;
|
||||
dispatch: ( ...payload:Array<any>) => void;
|
||||
generateActions:( ...actions:Array<string>) => void;
|
||||
}
|
||||
|
||||
class AbstractStoreModel<S> implements AltJS.StoreModel<S> {
|
||||
bindActions:( ...actions:Array<Object>) => void;
|
||||
bindAction:( ...args:Array<any>) => void;
|
||||
bindListeners:(obj:any)=> void;
|
||||
exportPublicMethods:(config:{[key:string]:(...args:Array<any>) => any}) => any;
|
||||
exportAsync:( source:any) => void;
|
||||
waitFor:any;
|
||||
exportConfig:any;
|
||||
getState:() => S;
|
||||
}
|
||||
|
||||
class GenerateActionsClass extends AbstractActions {
|
||||
constructor(config:AltJS.Alt) {
|
||||
this.generateActions("notifyTest");
|
||||
super(config);
|
||||
}
|
||||
}
|
||||
|
||||
class ExplicitActionsClass extends AbstractActions {
|
||||
doTest(str:string) {
|
||||
this.dispatch(str);
|
||||
}
|
||||
success() {
|
||||
this.dispatch();
|
||||
}
|
||||
error() {
|
||||
this.dispatch();
|
||||
}
|
||||
loading() {
|
||||
this.dispatch();
|
||||
}
|
||||
}
|
||||
|
||||
var generatedActions = alt.createActions<TestActionsGenerate>(GenerateActionsClass);
|
||||
var explicitActions = alt.createActions<ExplicitActionsClass>(ExplicitActionsClass);
|
||||
|
||||
interface AltTestState {
|
||||
hello:string;
|
||||
}
|
||||
|
||||
var testSource:AltJS.Source = {
|
||||
fakeLoad():AltJS.SourceModel<string> {
|
||||
return {
|
||||
remote() {
|
||||
return new Promise.Promise<string>((res:any, rej:any) => {
|
||||
setTimeout(() => {
|
||||
if(true) {
|
||||
res("stuff");
|
||||
} else {
|
||||
rej("Things have broken");
|
||||
}
|
||||
}, 250)
|
||||
});
|
||||
},
|
||||
local() {
|
||||
return "local";
|
||||
},
|
||||
success: explicitActions.success,
|
||||
error: explicitActions.error,
|
||||
loading:explicitActions.loading
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
class TestStore extends AbstractStoreModel<AltTestState> implements AltTestState {
|
||||
hello:string = "world";
|
||||
constructor() {
|
||||
super();
|
||||
this.bindAction(generatedActions.notifyTest, this.onTest);
|
||||
this.bindActions(explicitActions);
|
||||
this.exportAsync(testSource);
|
||||
this.exportPublicMethods({
|
||||
split: this.split
|
||||
});
|
||||
}
|
||||
onTest(str:string) {
|
||||
this.hello = str;
|
||||
}
|
||||
|
||||
onDoTest(str:string) {
|
||||
this.hello = str;
|
||||
}
|
||||
|
||||
split():string[] {
|
||||
return this.hello.split("");
|
||||
}
|
||||
}
|
||||
|
||||
interface ExtendedTestStore extends AltJS.AltStore<AltTestState> {
|
||||
fakeLoad():string;
|
||||
split():Array<string>;
|
||||
}
|
||||
|
||||
var testStore = <ExtendedTestStore>alt.createStore<AltTestState>(TestStore);
|
||||
|
||||
function testCallback(state:AltTestState) {
|
||||
console.log(state);
|
||||
}
|
||||
|
||||
//Listen allows a typed state callback
|
||||
testStore.listen(testCallback);
|
||||
testStore.unlisten(testCallback);
|
||||
|
||||
//State generic passes to derived store
|
||||
var name:string = testStore.getState().hello;
|
||||
var nameChars:Array<string> = testStore.split();
|
||||
|
||||
generatedActions.notifyTest("types");
|
||||
explicitActions.doTest("more types");
|
||||
|
||||
export var result = testStore.getState();
|
||||
Vendored
+167
@@ -0,0 +1,167 @@
|
||||
// Type definitions for Alt 0.16.10
|
||||
// Project: https://github.com/goatslacker/alt
|
||||
// Definitions by: Michael Shearer <https://github.com/Shearerbeard>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
///<reference path="../react/react.d.ts"/>
|
||||
///<reference path="../es6-promise/es6-promise.d.ts" />
|
||||
|
||||
declare module AltJS {
|
||||
|
||||
interface StoreReduce {
|
||||
action:any;
|
||||
data: any;
|
||||
}
|
||||
|
||||
export interface StoreModel<S> {
|
||||
//Actions
|
||||
bindAction?( action:Action<any>, handler:ActionHandler):void;
|
||||
bindActions?(actions:ActionsClass):void;
|
||||
|
||||
//Methods/Listeners
|
||||
exportPublicMethods?(exportConfig:any):void;
|
||||
bindListeners?(config:{[methodName:string]:Action<any> | Actions}):void;
|
||||
exportAsync?(source:Source):void;
|
||||
registerAsync?(datasource:Source):void;
|
||||
|
||||
//state
|
||||
setState?(state:S):void;
|
||||
setState?(stateFn:(currentState:S, nextState:S) => S):void;
|
||||
getState?():S;
|
||||
waitFor?(store:AltStore<any>):void;
|
||||
|
||||
//events
|
||||
onSerialize?(fn:(data:any) => any):void;
|
||||
onDeserialize?(fn:(data:any) => any):void;
|
||||
on?(event:AltJS.lifeCycleEvents, callback:() => any):void;
|
||||
emitChange?():void;
|
||||
waitFor?(storeOrStores:AltStore<any> | Array<AltStore<any>>):void;
|
||||
otherwise?(data:any, action:AltJS.Action<any>):void;
|
||||
observe?(alt:Alt):any;
|
||||
reduce?(state:any, config:StoreReduce):Object;
|
||||
preventDefault?():void;
|
||||
afterEach?(payload:Object, state:Object):void;
|
||||
beforeEach?(payload:Object, state:Object):void;
|
||||
// TODO: Embed dispatcher interface in def
|
||||
dispatcher?:any;
|
||||
|
||||
//instance
|
||||
getInstance?():AltJS.AltStore<S>;
|
||||
alt?:Alt;
|
||||
displayName?:string;
|
||||
}
|
||||
|
||||
export type Source = {[name:string]: () => SourceModel<any>};
|
||||
|
||||
export interface SourceModel<S> {
|
||||
local(state:any):any;
|
||||
remote(state:any):Promise<S>;
|
||||
shouldFetch?(fetchFn:(...args:Array<any>) => boolean):void;
|
||||
loading?:(args:any) => void;
|
||||
success?:(state:S) => void;
|
||||
error?:(args:any) => void;
|
||||
interceptResponse?(response:any, action:Action<any>, ...args:Array<any>):any;
|
||||
}
|
||||
|
||||
export interface AltStore<S> {
|
||||
getState():S;
|
||||
listen(handler:(state:S) => any):() => void;
|
||||
unlisten(handler:(state:S) => any):void;
|
||||
emitChange():void;
|
||||
}
|
||||
|
||||
export enum lifeCycleEvents {
|
||||
bootstrap,
|
||||
snapshot,
|
||||
init,
|
||||
rollback,
|
||||
error
|
||||
}
|
||||
|
||||
export type Actions = {[action:string]:Action<any>};
|
||||
|
||||
export interface Action<T> {
|
||||
( args:T):void;
|
||||
defer(data:any):void;
|
||||
}
|
||||
|
||||
export interface ActionsClass {
|
||||
generateActions?( ...action:Array<string>):void;
|
||||
dispatch( ...payload:Array<any>):void;
|
||||
actions?:Actions;
|
||||
}
|
||||
|
||||
type StateTransform = (store:StoreModel<any>) => AltJS.AltStore<any>;
|
||||
|
||||
interface AltConfig {
|
||||
dispatcher?:any;
|
||||
serialize?:(serializeFn:(data:Object) => string) => void;
|
||||
deserialize?:(deserializeFn:(serialData:string) => Object) => void;
|
||||
storeTransforms?:Array<StateTransform>;
|
||||
batchingFunction?:(callback:( ...data:Array<any>) => any) => void;
|
||||
}
|
||||
|
||||
class Alt {
|
||||
constructor(config?:AltConfig);
|
||||
actions:Actions;
|
||||
bootstrap(jsonData:string):void;
|
||||
takeSnapshot( ...storeNames:Array<string>):string;
|
||||
flush():Object;
|
||||
recycle( ...stores:Array<AltJS.AltStore<any>>):void;
|
||||
rollback():void;
|
||||
dispatch(action?:AltJS.Action<any>, data?:Object, details?:any):void;
|
||||
|
||||
//Actions methods
|
||||
addActions(actionsName:string, ActionsClass: ActionsClassConstructor):void;
|
||||
createActions<T>(ActionsClass: ActionsClassConstructor, exportObj?: Object):T;
|
||||
createActions<T>(ActionsClass: ActionsClassConstructor, exportObj?: Object, ...constructorArgs:Array<any>):T;
|
||||
generateActions<T>( ...actions:Array<string>):T;
|
||||
getActions(actionsName:string):AltJS.Actions;
|
||||
|
||||
//Stores methods
|
||||
addStore(name:string, store:StoreModel<any>, saveStore?:boolean):void;
|
||||
createStore<S>(store:StoreModel<S>, name?:string):AltJS.AltStore<S>;
|
||||
getStore(name:string):AltJS.AltStore<any>;
|
||||
}
|
||||
|
||||
export interface AltFactory {
|
||||
new(config?:AltConfig):Alt;
|
||||
}
|
||||
|
||||
type ActionsClassConstructor = new (alt:Alt) => AltJS.ActionsClass;
|
||||
|
||||
type ActionHandler = ( ...data:Array<any>) => any;
|
||||
type ExportConfig = {[key:string]:(...args:Array<any>) => any};
|
||||
}
|
||||
|
||||
declare module "alt/utils/chromeDebug" {
|
||||
function chromeDebug(alt:AltJS.Alt):void;
|
||||
export = chromeDebug;
|
||||
}
|
||||
|
||||
declare module "alt/AltContainer" {
|
||||
|
||||
import React = require("react");
|
||||
|
||||
interface ContainerProps {
|
||||
store?:AltJS.AltStore<any>;
|
||||
stores?:Array<AltJS.AltStore<any>>;
|
||||
inject?:{[key:string]:any};
|
||||
actions?:{[key:string]:Object};
|
||||
render?:(...props:Array<any>) => React.ReactElement<any>;
|
||||
flux?:AltJS.Alt;
|
||||
transform?:(store:AltJS.AltStore<any>, actions:any) => any;
|
||||
shouldComponentUpdate?:(props:any) => boolean;
|
||||
component?:React.Component<any, any>;
|
||||
}
|
||||
|
||||
type AltContainer = React.ReactElement<ContainerProps>;
|
||||
var AltContainer:React.ComponentClass<ContainerProps>;
|
||||
|
||||
export = AltContainer;
|
||||
}
|
||||
|
||||
declare module "alt" {
|
||||
var alt:AltJS.AltFactory;
|
||||
export = alt;
|
||||
}
|
||||
Vendored
+1
-1
@@ -50,7 +50,7 @@ interface amplifyRequest {
|
||||
* success (optional): Function to invoke on success.
|
||||
* error (optional): Function to invoke on error.
|
||||
*/
|
||||
(settings: amplifyRequestSettings);
|
||||
(settings: amplifyRequestSettings): any;
|
||||
|
||||
/***
|
||||
* Define a resource.
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/// <reference path='../angularjs/angular.d.ts' />
|
||||
/// <reference path='angular-dynamic-locale.d.ts' />
|
||||
|
||||
var app = angular.module('testModule', ['tmh.dynamicLocale']);
|
||||
app.config((localStorageServiceProvider: angular.dynamicLocale.tmhDynamicLocaleProvider) => {
|
||||
localStorageServiceProvider
|
||||
.localeLocationPattern("app/config/locales/")
|
||||
.useCookieStorage();
|
||||
});
|
||||
|
||||
class LocaleTestController {
|
||||
|
||||
constructor(tmhDynamicLocaleService: angular.dynamicLocale.tmhDynamicLocaleService) {
|
||||
|
||||
var locale = tmhDynamicLocaleService.get();
|
||||
|
||||
var newLocale = "mt"
|
||||
tmhDynamicLocaleService.set(newLocale);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
app.controller('TestController', LocaleTestController);
|
||||
@@ -0,0 +1,21 @@
|
||||
// Type definitions for angular-dynamic-locale v0.1.27
|
||||
// Project: https://github.com/lgalfaso/angular-dynamic-locale
|
||||
// Definitions by: Stephen Lautier <https://github.com/stephenlautier>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
|
||||
declare module angular.dynamicLocale {
|
||||
|
||||
interface tmhDynamicLocaleService {
|
||||
set(locale: string): void;
|
||||
get(): string;
|
||||
}
|
||||
|
||||
interface tmhDynamicLocaleProvider extends angular.IServiceProvider {
|
||||
localeLocationPattern(location: string): tmhDynamicLocaleProvider;
|
||||
localeLocationPattern(): string;
|
||||
useStorage(storageName: string): void;
|
||||
useCookieStorage(): void;
|
||||
}
|
||||
}
|
||||
@@ -10,35 +10,41 @@ module controllers {
|
||||
|
||||
static $inject = ["$upload"];
|
||||
constructor(
|
||||
private $upload: ng.angularFileUpload.IUploadService
|
||||
private $upload: angular.angularFileUpload.IUploadService
|
||||
) {
|
||||
}
|
||||
|
||||
onFileSelect($files: File[]) {
|
||||
//$files: an array of files selected, each file has name, size, and type.
|
||||
var uploads: ng.IPromise<any>[] = [];
|
||||
// $files: an array of files selected, each file has name, size, and type.
|
||||
for (var i = 0; i < $files.length; i++) {
|
||||
var file = $files[i];
|
||||
uploads.push(this.$upload.upload<any>({
|
||||
url: "/api/upload",
|
||||
method: "POST",
|
||||
data: {
|
||||
extraData: {
|
||||
fileName: file.name, test: "anything"
|
||||
}
|
||||
},
|
||||
file: file
|
||||
this.$upload.upload({
|
||||
url: "/api/upload",
|
||||
method: "POST",
|
||||
data: {
|
||||
extraData: {
|
||||
fileName: file.name,
|
||||
test: "anything"
|
||||
}
|
||||
},
|
||||
file: file
|
||||
})
|
||||
.abort()
|
||||
.xhr((evt: any) => {
|
||||
console.log('xhr');
|
||||
})
|
||||
.progress((evt: any) => {
|
||||
console.log('progress');
|
||||
})
|
||||
.then(success => {
|
||||
// file is uploaded successfully
|
||||
console.log(success.data);
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err);
|
||||
}));
|
||||
.progress((evt: angular.angularFileUpload.IFileProgressEvent) => {
|
||||
var percent = parseInt((100.0 * evt.loaded / evt.total).toString(), 10);
|
||||
console.log("upload progress: " + percent + "% for " + evt.config.file.name);
|
||||
})
|
||||
.error((data: any, status: number, response: any, headers: any) => {
|
||||
console.error(data, status, response, headers);
|
||||
})
|
||||
.success((data: any, status: number, headers: any, config: angular.angularFileUpload.IFileUploadConfig) => {
|
||||
// file is uploaded successfully
|
||||
console.log("Success!", data, status, headers, config);
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+12
-6
@@ -1,5 +1,5 @@
|
||||
// Type definitions for Angular File Upload 1.6.7
|
||||
// Project: https://github.com/danialfarid/angular-file-upload
|
||||
// Type definitions for Angular File Upload 4.2.1
|
||||
// Project: https://github.com/danialfarid/ng-file-upload
|
||||
// Definitions by: John Reilly <https://github.com/johnnyreilly>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
@@ -9,18 +9,24 @@ declare module angular.angularFileUpload {
|
||||
|
||||
interface IUploadService {
|
||||
|
||||
http<T>(config: ng.IRequestConfig): IUploadPromise<T>;
|
||||
http<T>(config: IRequestConfig): IUploadPromise<T>;
|
||||
upload<T>(config: IFileUploadConfig): IUploadPromise<T>;
|
||||
}
|
||||
|
||||
interface IUploadPromise<T> extends IHttpPromise<T> {
|
||||
|
||||
abort(): IUploadPromise<T>;
|
||||
progress(callback: IHttpPromiseCallback<T>): IUploadPromise<T>;
|
||||
xhr(callback: IHttpPromiseCallback<T>): IUploadPromise<T>;
|
||||
}
|
||||
|
||||
interface IFileUploadConfig extends ng.IRequestConfig {
|
||||
interface IFileUploadConfig extends IRequestConfig {
|
||||
|
||||
file: File;
|
||||
fileName?: string;
|
||||
}
|
||||
}
|
||||
|
||||
interface IFileProgressEvent extends ProgressEvent {
|
||||
|
||||
config: IFileUploadConfig;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
/// <reference path="angular-jwt.d.ts" />
|
||||
|
||||
var app = angular.module("angular-jwt-tests", ["angular-jwt"]);
|
||||
|
||||
var $jwtHelper: angular.jwt.IJwtHelper;
|
||||
|
||||
var expToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3NhbXBsZXMuYXV0aDAuY29tLyIsInN1YiI6ImZhY2Vib29rfDEwMTU0Mjg3MDI3NTEwMzAyIiwiYXVkIjoiQlVJSlNXOXg2MHNJSEJ3OEtkOUVtQ2JqOGVESUZ4REMiLCJleHAiOjE0MTIyMzQ3MzAsImlhdCI6MTQxMjE5ODczMH0.7M5sAV50fF1-_h9qVbdSgqAnXVF7mz3I6RjS6JiH0H8';
|
||||
var tokenPayload = $jwtHelper.decodeToken(expToken);
|
||||
var date = $jwtHelper.getTokenExpirationDate(expToken);
|
||||
var bool = $jwtHelper.isTokenExpired(expToken);
|
||||
|
||||
var $jwtInterceptor: angular.jwt.IJwtInterceptor;
|
||||
|
||||
$jwtInterceptor.tokenGetter = () => {
|
||||
return expToken;
|
||||
}
|
||||
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
// Type definitions for angular-jwt 0.0.8
|
||||
// Project: https://github.com/auth0/angular-jwt
|
||||
// Definitions by: Reto Rezzonico <https://github.com/rerezz>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
|
||||
declare module angular.jwt {
|
||||
|
||||
interface JwtToken {
|
||||
iss: string;
|
||||
sub: string;
|
||||
aud: string;
|
||||
exp: number;
|
||||
nbf: number;
|
||||
iat: number;
|
||||
jti: string;
|
||||
unique_name: string;
|
||||
}
|
||||
|
||||
interface IJwtHelper {
|
||||
decodeToken(token: string): JwtToken;
|
||||
getTokenExpirationDate(token: any): Date;
|
||||
isTokenExpired(token: any, offsetSeconds?: number): boolean;
|
||||
}
|
||||
|
||||
interface IJwtInterceptor {
|
||||
tokenGetter(): string;
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ interface TestScope extends ng.IScope {
|
||||
}
|
||||
|
||||
export class TestController {
|
||||
constructor($scope: TestScope, localStorageService: ng.local.storage.ILocalStorageService<string>) {
|
||||
constructor($scope: TestScope, localStorageService: ng.local.storage.ILocalStorageService) {
|
||||
// isSupported
|
||||
if (localStorageService.isSupported) {
|
||||
// do something
|
||||
@@ -29,7 +29,7 @@ export class TestController {
|
||||
|
||||
// get
|
||||
$scope.getItem = (key) => {
|
||||
return localStorageService.get(key);
|
||||
return localStorageService.get<string>(key);
|
||||
};
|
||||
|
||||
// remove
|
||||
|
||||
+5
-5
@@ -6,7 +6,7 @@
|
||||
/// <reference path='../angularjs/angular.d.ts' />
|
||||
|
||||
declare module angular.local.storage {
|
||||
interface ILocalStorageServiceProvider extends IServiceProvider {
|
||||
interface ILocalStorageServiceProvider extends angular.IServiceProvider {
|
||||
/**
|
||||
* Setter for the prefix
|
||||
* You should set a prefix to avoid overwriting any local storage variables from the rest of your app
|
||||
@@ -75,7 +75,7 @@ declare module angular.local.storage {
|
||||
|
||||
}
|
||||
|
||||
interface ILocalStorageService<T> {
|
||||
interface ILocalStorageService {
|
||||
/**
|
||||
* Checks if the browser support the current storage type(e.g: localStorage, sessionStorage).
|
||||
* Returns: Boolean
|
||||
@@ -92,14 +92,14 @@ declare module angular.local.storage {
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
set(key: string, value: T): boolean;
|
||||
set<T>(key: string, value: T): boolean;
|
||||
/**
|
||||
* Directly get a value from local storage.
|
||||
* If local storage is not supported, use cookies instead.
|
||||
* Returns: value from local storage
|
||||
* @param key
|
||||
*/
|
||||
get(key: string): T;
|
||||
get<T>(key: string): T;
|
||||
/**
|
||||
* Return array of keys for local storage, ignore keys that not owned.
|
||||
* Returns: value from local storage
|
||||
@@ -129,7 +129,7 @@ declare module angular.local.storage {
|
||||
* @param value optional
|
||||
* @param key The corresponding key used in local storage
|
||||
*/
|
||||
bind(scope:ng.IScope, property: string, value?: any, key?: string): Function;
|
||||
bind(scope: angular.IScope, property: string, value?: any, key?: string): Function;
|
||||
/**
|
||||
* Return the derive key
|
||||
* Returns String
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
/// <reference path='../angularjs/angular.d.ts' />
|
||||
/// <reference path='angular-localForage.d.ts' />
|
||||
|
||||
var app = angular.module('angular-localForage-tests', ['LocalForageModule']);
|
||||
app.config(function (localStorageServiceProvider:angular.localForage.ILocalForageProvider) {
|
||||
|
||||
//TODO
|
||||
});
|
||||
|
||||
var $rootScope:angular.IRootScopeService,
|
||||
$localForage:angular.localForage.ILocalForageService,
|
||||
instanceVersion = 0;
|
||||
|
||||
// create a fresh instance
|
||||
$localForage.clear().then(function () {
|
||||
$localForage = $localForage.createInstance({
|
||||
name: ++instanceVersion
|
||||
});
|
||||
});
|
||||
|
||||
$localForage.getItem('this key is unknown').then(function (value) {
|
||||
|
||||
});
|
||||
|
||||
|
||||
$localForage.setItem('myName', 'Olivier Combe').then(function (data) {
|
||||
|
||||
$localForage.getItem('myName').then(function (data) {
|
||||
});
|
||||
});
|
||||
|
||||
var values = ['Olivier Combe', 'AngularJs', 'Open Source'];
|
||||
|
||||
$localForage.setItem(['myName', 'myPassion', 'myHobbie'], values).then(function (data) {
|
||||
|
||||
$localForage.getItem(['myHobbie', 'myName']).then(function (data) {
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$localForage.removeItem('myName').then(function () {
|
||||
|
||||
$localForage.getItem('myName').then(function (data) {
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$localForage.removeItem(['myName', 'myPassion']).then(function () {
|
||||
|
||||
$localForage.getItem(['myName', 'myPassion', 'myHobbie']).then(function (data) {
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$localForage.pull('myName').then(function (data) {
|
||||
|
||||
$localForage.getItem('myName').then(function (data) {
|
||||
});
|
||||
|
||||
});
|
||||
$localForage.pull(['myName', 'myPassion']).then(function (data) {
|
||||
|
||||
$localForage.getItem(['myName', 'myPassion', 'myHobbie']).then(function (data) {
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
$localForage.setItem('myName', 'Olivier Combe').then(function (d) {
|
||||
|
||||
$localForage.getItem('myName').then(function (data) {
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
$localForage.setDriver('localStorageWrapper').then(function () {
|
||||
$localForage.setItem('myName', 'Olivier Combe').then(function (d) {
|
||||
$localForage.getItem('myName').then(function (data) {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$localForage.setItem('myArray', [{
|
||||
$$hashKey: '00A',
|
||||
name: 'Olivier Combe'
|
||||
}]).then(function (d) {
|
||||
|
||||
$localForage.getItem('myArray').then(function (data) {
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$localForage.setDriver('localStorageWrapper').then(function () {
|
||||
$localForage.setItem('myArray', [{
|
||||
$$hashKey: '00A',
|
||||
name: 'Olivier Combe'
|
||||
}]).then(function (d) {
|
||||
|
||||
$localForage.getItem('myArray').then(function (data) {
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
var aFileParts = ["<a id=\"a\"><b id=\"b\">hey!<\/b><\/a>"];
|
||||
var oMyBlob = new Blob(aFileParts, {"type": "text\/xml"}); // the blob
|
||||
|
||||
$localForage.setItem('myBlob', oMyBlob).then(function (data) {
|
||||
});
|
||||
|
||||
// $localForage.setItem(['myName', 'myPassion', 'myHobbie'], 'value');
|
||||
|
||||
// $localForage.setItem();
|
||||
|
||||
|
||||
$localForage.iterate(function (value, key) {
|
||||
}).then(function (data) {
|
||||
});
|
||||
|
||||
$localForage.iterate(function (value, key) {
|
||||
if (key == 'myPassion') {
|
||||
return value;
|
||||
}
|
||||
}).then(function (data) {
|
||||
});
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
// Type definitions for angular-localForage 1.2.2
|
||||
// Project: https://github.com/ocombe/angular-localForage
|
||||
// Definitions by: Stefan Steinhart <https://github.com/reppners>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../localForage/localForage.d.ts" />
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
|
||||
declare module angular.localForage {
|
||||
|
||||
interface LocalForageConfig {
|
||||
driver?:string;
|
||||
name?:string | number;
|
||||
version?:number;
|
||||
storeName?:string;
|
||||
description?:string;
|
||||
}
|
||||
|
||||
interface ILocalForageProvider {
|
||||
config(config:LocalForageConfig):void;
|
||||
setNotify(onItemSet:boolean, onItemRemove:boolean):void;
|
||||
}
|
||||
|
||||
interface ILocalForageService {
|
||||
setDriver(driver:string):angular.IPromise<void>;
|
||||
driver<T>():lf.ILocalForage<T>;
|
||||
|
||||
setItem(key:string, value:any):angular.IPromise<void>;
|
||||
setItem(keys:Array<string>, values:Array<any>):angular.IPromise<void>;
|
||||
|
||||
getItem(key:string):angular.IPromise<any>;
|
||||
getItem(keys:Array<string>):angular.IPromise<Array<any>>;
|
||||
|
||||
removeItem(key:string | Array<string>):angular.IPromise<void>;
|
||||
|
||||
pull(key:string):angular.IPromise<any>;
|
||||
pull(keys:Array<string>):angular.IPromise<Array<any>>;
|
||||
|
||||
clear():angular.IPromise<void>;
|
||||
|
||||
key(n:number):angular.IPromise<string>;
|
||||
|
||||
keys():angular.IPromise<string>;
|
||||
|
||||
length():angular.IPromise<number>;
|
||||
|
||||
iterate<T>(iteratorCallback:(value:string | number, key:string)=>T):angular.IPromise<T>;
|
||||
|
||||
bind($scope:ng.IScope, key:string):void;
|
||||
|
||||
bind($scope:ng.IScope, config:{
|
||||
key:string;
|
||||
defaultValue:any;
|
||||
scopeKey:string;
|
||||
name:string;
|
||||
}):void;
|
||||
|
||||
unbind($scope:ng.IScope, key:string, scopeKey?:string):void;
|
||||
|
||||
createInstance(config:LocalForageConfig):ILocalForageService;
|
||||
instance(name:string):ILocalForageService;
|
||||
}
|
||||
}
|
||||
+195
@@ -0,0 +1,195 @@
|
||||
// Type definitions for Angular Material 0.8.3+ (angular.material module)
|
||||
// Project: https://github.com/angular/material
|
||||
// Definitions by: Matt Traynham <https://github.com/mtraynham>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
declare module angular.material {
|
||||
|
||||
interface MDBottomSheetOptions {
|
||||
templateUrl?: string;
|
||||
template?: string;
|
||||
controller?: any;
|
||||
locals?: {[index: string]: any};
|
||||
targetEvent?: any;
|
||||
resolve?: {[index: string]: angular.IPromise<any>}
|
||||
controllerAs?: string;
|
||||
parent?: Element;
|
||||
disableParentScroll?: boolean;
|
||||
}
|
||||
|
||||
interface MDBottomSheetService {
|
||||
show(options: MDBottomSheetOptions): angular.IPromise<any>;
|
||||
hide(response?: any): void;
|
||||
cancel(response?: any): void;
|
||||
}
|
||||
|
||||
interface MDPresetDialog<T> {
|
||||
title(title: string): T;
|
||||
content(content: string): T;
|
||||
ok(content: string): T;
|
||||
theme(theme: string): T;
|
||||
}
|
||||
|
||||
interface MDAlertDialog extends MDPresetDialog<MDAlertDialog> {
|
||||
}
|
||||
|
||||
interface MDConfirmDialog extends MDPresetDialog<MDConfirmDialog> {
|
||||
cancel(reason?: string): MDConfirmDialog;
|
||||
}
|
||||
|
||||
interface MDDialogOptions {
|
||||
templateUrl?: string;
|
||||
template?: string;
|
||||
domClickEvent?: any;
|
||||
disableParentScroll?: boolean;
|
||||
clickOutsideToClose?: boolean;
|
||||
hasBackdrop?: boolean;
|
||||
escapeToClose?: boolean;
|
||||
controller?: any;
|
||||
locals?: {[index: string]: any};
|
||||
bindToController?: boolean;
|
||||
resolve?: {[index: string]: angular.IPromise<any>}
|
||||
controllerAs?: string;
|
||||
parent?: Element;
|
||||
onComplete?: Function;
|
||||
}
|
||||
|
||||
interface MDDialogService {
|
||||
show(dialog: MDDialogOptions|MDPresetDialog<any>): angular.IPromise<any>;
|
||||
confirm(): MDConfirmDialog;
|
||||
alert(): MDAlertDialog;
|
||||
hide(response?: any): void;
|
||||
cancel(response?: any): void;
|
||||
}
|
||||
|
||||
interface MDIcon {
|
||||
(path: string): angular.IPromise<Element>;
|
||||
}
|
||||
|
||||
interface MDIconProvider {
|
||||
icon(id: string, url: string, iconSize?: string): MDIconProvider;
|
||||
iconSet(id: string, url: string, iconSize?: string): MDIconProvider;
|
||||
defaultIconSet(url: string, iconSize?: string): MDIconProvider;
|
||||
defaultIconSize(iconSize: string): MDIconProvider;
|
||||
}
|
||||
|
||||
interface MDMedia {
|
||||
(media: string): boolean;
|
||||
}
|
||||
|
||||
interface MDSidenavObject {
|
||||
toggle(): void;
|
||||
open(): void;
|
||||
close(): void;
|
||||
isOpen(): boolean;
|
||||
isLockedOpen(): boolean;
|
||||
}
|
||||
|
||||
interface MDSidenavService {
|
||||
(component: string): MDSidenavObject;
|
||||
}
|
||||
|
||||
interface MDToastPreset<T> {
|
||||
content(content: string): T;
|
||||
action(action: string): T;
|
||||
highlightAction(highlightAction: boolean): T;
|
||||
capsule(capsule: boolean): T;
|
||||
theme(theme: string): T;
|
||||
hideDelay(delay: number): T;
|
||||
}
|
||||
|
||||
interface MDSimpleToastPreset extends MDToastPreset<MDSimpleToastPreset> {
|
||||
}
|
||||
|
||||
interface MDToastOptions {
|
||||
templateUrl?: string;
|
||||
template?: string;
|
||||
hideDelay?: number;
|
||||
position?: string;
|
||||
controller?: any;
|
||||
locals?: {[index: string]: any};
|
||||
bindToController?: boolean;
|
||||
resolve?: {[index: string]: angular.IPromise<any>}
|
||||
controllerAs?: string;
|
||||
parent?: Element;
|
||||
}
|
||||
|
||||
interface MDToastService {
|
||||
show(optionsOrPreset: MDToastOptions|MDToastPreset<any>): angular.IPromise<any>;
|
||||
showSimple(): angular.IPromise<any>;
|
||||
simple(): MDSimpleToastPreset;
|
||||
build(): MDToastPreset<any>;
|
||||
updateContent(): void;
|
||||
hide(response?: any): void;
|
||||
cancel(response?: any): void;
|
||||
}
|
||||
|
||||
interface MDPalette {
|
||||
0?: string;
|
||||
50?: string;
|
||||
100?: string;
|
||||
200?: string;
|
||||
300?: string;
|
||||
400?: string;
|
||||
500?: string;
|
||||
600?: string;
|
||||
700?: string;
|
||||
800?: string;
|
||||
900?: string;
|
||||
A100?: string;
|
||||
A200?: string;
|
||||
A400?: string;
|
||||
A700?: string;
|
||||
contrastDefaultColor?: string;
|
||||
contrastDarkColors?: string;
|
||||
contrastStrongLightColors?: string;
|
||||
}
|
||||
|
||||
interface MDThemeHues {
|
||||
default?: string;
|
||||
'hue-1'?: string;
|
||||
'hue-2'?: string;
|
||||
'hue-3'?: string;
|
||||
}
|
||||
|
||||
interface MDThemePalette {
|
||||
name: string;
|
||||
hues: MDThemeHues;
|
||||
}
|
||||
|
||||
interface MDThemeColors {
|
||||
accent: MDThemePalette;
|
||||
background: MDThemePalette;
|
||||
primary: MDThemePalette;
|
||||
warn: MDThemePalette;
|
||||
}
|
||||
|
||||
interface MDThemeGrayScalePalette {
|
||||
1: string;
|
||||
2: string;
|
||||
3: string;
|
||||
4: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
interface MDTheme {
|
||||
name: string;
|
||||
colors: MDThemeColors;
|
||||
foregroundPalette: MDThemeGrayScalePalette;
|
||||
foregroundShadow: string;
|
||||
accentPalette(name: string, hues?: MDThemeHues): MDTheme;
|
||||
primaryPalette(name: string, hues?: MDThemeHues): MDTheme;
|
||||
warnPalette(name: string, hues?: MDThemeHues): MDTheme;
|
||||
backgroundPalette(name: string, hues?: MDThemeHues): MDTheme;
|
||||
dark(isDark?: boolean): MDTheme;
|
||||
}
|
||||
|
||||
interface MDThemingProvider {
|
||||
theme(name: string, inheritFrom?: string): MDTheme;
|
||||
definePalette(name: string, palette: MDPalette): MDThemingProvider;
|
||||
extendPalette(name: string, palette: MDPalette): MDPalette;
|
||||
setDefaultTheme(theme: string): void;
|
||||
alwaysWatchTheme(alwaysWatch: boolean): void;
|
||||
}
|
||||
}
|
||||
+204
@@ -0,0 +1,204 @@
|
||||
// Type definitions for Angular Material 0.9.0-rc1+ (angular.material module)
|
||||
// Project: https://github.com/angular/material
|
||||
// Definitions by: Matt Traynham <https://github.com/mtraynham>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
declare module angular.material {
|
||||
|
||||
interface MDBottomSheetOptions {
|
||||
templateUrl?: string;
|
||||
template?: string;
|
||||
scope?: angular.IScope; // default: new child scope
|
||||
preserveScope?: boolean; // default: false
|
||||
controller?: string|Function;
|
||||
locals?: {[index: string]: any};
|
||||
targetEvent?: MouseEvent;
|
||||
resolve?: {[index: string]: angular.IPromise<any>}
|
||||
controllerAs?: string;
|
||||
parent?: string|Element|JQuery; // default: root node
|
||||
disableParentScroll?: boolean; // default: true
|
||||
}
|
||||
|
||||
interface MDBottomSheetService {
|
||||
show(options: MDBottomSheetOptions): angular.IPromise<any>;
|
||||
hide(response?: any): void;
|
||||
cancel(response?: any): void;
|
||||
}
|
||||
|
||||
interface MDPresetDialog<T> {
|
||||
title(title: string): T;
|
||||
content(content: string): T;
|
||||
ok(ok: string): T;
|
||||
theme(theme: string): T;
|
||||
}
|
||||
|
||||
interface MDAlertDialog extends MDPresetDialog<MDAlertDialog> {
|
||||
}
|
||||
|
||||
interface MDConfirmDialog extends MDPresetDialog<MDConfirmDialog> {
|
||||
cancel(cancel: string): MDConfirmDialog;
|
||||
}
|
||||
|
||||
interface MDDialogOptions {
|
||||
templateUrl?: string;
|
||||
template?: string;
|
||||
targetEvent?: MouseEvent;
|
||||
scope?: angular.IScope; // default: new child scope
|
||||
preserveScope?: boolean; // default: false
|
||||
disableParentScroll?: boolean; // default: true
|
||||
hasBackdrop?: boolean // default: true
|
||||
clickOutsideToClose?: boolean; // default: false
|
||||
escapeToClose?: boolean; // default: true
|
||||
focusOnOpen?: boolean; // default: true
|
||||
controller?: string|Function;
|
||||
locals?: {[index: string]: any};
|
||||
bindToController?: boolean; // default: false
|
||||
resolve?: {[index: string]: angular.IPromise<any>}
|
||||
controllerAs?: string;
|
||||
parent?: string|Element|JQuery; // default: root node
|
||||
onComplete?: Function;
|
||||
}
|
||||
|
||||
interface MDDialogService {
|
||||
show(dialog: MDDialogOptions|MDAlertDialog|MDConfirmDialog): angular.IPromise<any>;
|
||||
confirm(): MDConfirmDialog;
|
||||
alert(): MDAlertDialog;
|
||||
hide(response?: any): void;
|
||||
cancel(response?: any): void;
|
||||
}
|
||||
|
||||
interface MDIcon {
|
||||
(id: string): angular.IPromise<Element>; // id is a unique ID or URL
|
||||
}
|
||||
|
||||
interface MDIconProvider {
|
||||
icon(id: string, url: string, iconSize?: string): MDIconProvider; // iconSize default: '24px'
|
||||
iconSet(id: string, url: string, iconSize?: string): MDIconProvider; // iconSize default: '24px'
|
||||
defaultIconSet(url: string, iconSize?: string): MDIconProvider; // iconSize default: '24px'
|
||||
defaultIconSize(iconSize: string): MDIconProvider; // default: '24px'
|
||||
}
|
||||
|
||||
interface MDMedia {
|
||||
(media: string): boolean;
|
||||
}
|
||||
|
||||
interface MDSidenavObject {
|
||||
toggle(): angular.IPromise<void>;
|
||||
open(): angular.IPromise<void>;
|
||||
close(): angular.IPromise<void>;
|
||||
isOpen(): boolean;
|
||||
isLockedOpen(): boolean;
|
||||
}
|
||||
|
||||
interface MDSidenavService {
|
||||
(component: string): MDSidenavObject;
|
||||
}
|
||||
|
||||
interface MDToastPreset<T> {
|
||||
content(content: string): T;
|
||||
action(action: string): T;
|
||||
highlightAction(highlightAction: boolean): T;
|
||||
capsule(capsule: boolean): T;
|
||||
theme(theme: string): T;
|
||||
hideDelay(delay: number): T;
|
||||
position(position: string): T;
|
||||
}
|
||||
|
||||
interface MDSimpleToastPreset extends MDToastPreset<MDSimpleToastPreset> {
|
||||
}
|
||||
|
||||
interface MDToastOptions {
|
||||
templateUrl?: string;
|
||||
template?: string;
|
||||
scope?: angular.IScope; // default: new child scope
|
||||
preserveScope?: boolean; // default: false
|
||||
hideDelay?: number; // default (ms): 3000
|
||||
position?: string; // any combination of 'bottom'/'left'/'top'/'right'/'fit'; default: 'bottom left'
|
||||
controller?: string|Function;
|
||||
locals?: {[index: string]: any};
|
||||
bindToController?: boolean; // default: false
|
||||
resolve?: {[index: string]: angular.IPromise<any>}
|
||||
controllerAs?: string;
|
||||
parent?: string|Element|JQuery; // default: root node
|
||||
}
|
||||
|
||||
interface MDToastService {
|
||||
show(optionsOrPreset: MDToastOptions|MDToastPreset<any>): angular.IPromise<any>;
|
||||
showSimple(): angular.IPromise<any>;
|
||||
simple(): MDSimpleToastPreset;
|
||||
build(): MDToastPreset<any>;
|
||||
updateContent(): void;
|
||||
hide(response?: any): void;
|
||||
cancel(response?: any): void;
|
||||
}
|
||||
|
||||
interface MDPalette {
|
||||
0?: string;
|
||||
50?: string;
|
||||
100?: string;
|
||||
200?: string;
|
||||
300?: string;
|
||||
400?: string;
|
||||
500?: string;
|
||||
600?: string;
|
||||
700?: string;
|
||||
800?: string;
|
||||
900?: string;
|
||||
A100?: string;
|
||||
A200?: string;
|
||||
A400?: string;
|
||||
A700?: string;
|
||||
contrastDefaultColor?: string;
|
||||
contrastDarkColors?: string;
|
||||
contrastStrongLightColors?: string;
|
||||
}
|
||||
|
||||
interface MDThemeHues {
|
||||
default?: string;
|
||||
'hue-1'?: string;
|
||||
'hue-2'?: string;
|
||||
'hue-3'?: string;
|
||||
}
|
||||
|
||||
interface MDThemePalette {
|
||||
name: string;
|
||||
hues: MDThemeHues;
|
||||
}
|
||||
|
||||
interface MDThemeColors {
|
||||
accent: MDThemePalette;
|
||||
background: MDThemePalette;
|
||||
primary: MDThemePalette;
|
||||
warn: MDThemePalette;
|
||||
}
|
||||
|
||||
interface MDThemeGrayScalePalette {
|
||||
1: string;
|
||||
2: string;
|
||||
3: string;
|
||||
4: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
interface MDTheme {
|
||||
name: string;
|
||||
isDark: boolean;
|
||||
colors: MDThemeColors;
|
||||
foregroundPalette: MDThemeGrayScalePalette;
|
||||
foregroundShadow: string;
|
||||
accentPalette(name: string, hues?: MDThemeHues): MDTheme;
|
||||
primaryPalette(name: string, hues?: MDThemeHues): MDTheme;
|
||||
warnPalette(name: string, hues?: MDThemeHues): MDTheme;
|
||||
backgroundPalette(name: string, hues?: MDThemeHues): MDTheme;
|
||||
dark(isDark?: boolean): MDTheme;
|
||||
}
|
||||
|
||||
interface MDThemingProvider {
|
||||
theme(name: string, inheritFrom?: string): MDTheme;
|
||||
definePalette(name: string, palette: MDPalette): MDThemingProvider;
|
||||
extendPalette(name: string, palette: MDPalette): MDPalette;
|
||||
setDefaultTheme(theme: string): void;
|
||||
alwaysWatchTheme(alwaysWatch: boolean): void;
|
||||
}
|
||||
}
|
||||
@@ -3,11 +3,11 @@
|
||||
var myApp = angular.module('testModule', ['ngMaterial']);
|
||||
|
||||
myApp.config((
|
||||
$mdThemingProvider: ng.material.MDThemingProvider,
|
||||
$mdIconProvider: ng.material.MDIconProvider) => {
|
||||
$mdThemingProvider: ng.material.IThemingProvider,
|
||||
$mdIconProvider: ng.material.IIconProvider) => {
|
||||
|
||||
$mdThemingProvider.alwaysWatchTheme(true);
|
||||
var neonRedMap: ng.material.MDPalette = $mdThemingProvider.extendPalette('red', {
|
||||
var neonRedMap: ng.material.IPalette = $mdThemingProvider.extendPalette('red', {
|
||||
'500': 'ff0000'
|
||||
});
|
||||
// Register the new color palette map with the name <code>neonRed</code>
|
||||
@@ -27,7 +27,7 @@ myApp.config((
|
||||
.icon('work:chair', 'my/app/chair.svg'); // Register icon in a specific set
|
||||
});
|
||||
|
||||
myApp.controller('BottomSheetController', ($scope: ng.IScope, $mdBottomSheet: ng.material.MDBottomSheetService) => {
|
||||
myApp.controller('BottomSheetController', ($scope: ng.IScope, $mdBottomSheet: ng.material.IBottomSheetService) => {
|
||||
$scope['openBottomSheet'] = () => {
|
||||
$mdBottomSheet.show({
|
||||
template: '<md-bottom-sheet>Hello!</md-bottom-sheet>'
|
||||
@@ -37,7 +37,7 @@ myApp.controller('BottomSheetController', ($scope: ng.IScope, $mdBottomSheet: ng
|
||||
$scope['cancelBottomSheet'] = $mdBottomSheet.cancel.bind($mdBottomSheet, 'cancel');
|
||||
});
|
||||
|
||||
myApp.controller('DialogController', ($scope: ng.IScope, $mdDialog: ng.material.MDDialogService) => {
|
||||
myApp.controller('DialogController', ($scope: ng.IScope, $mdDialog: ng.material.IDialogService) => {
|
||||
$scope['openDialog'] = () => {
|
||||
$mdDialog.show({
|
||||
template: '<md-dialog>Hello!</md-dialog>'
|
||||
@@ -55,8 +55,8 @@ myApp.controller('DialogController', ($scope: ng.IScope, $mdDialog: ng.material.
|
||||
|
||||
class IconDirective implements ng.IDirective {
|
||||
|
||||
private $mdIcon: ng.material.MDIcon;
|
||||
constructor($mdIcon: ng.material.MDIcon) {
|
||||
private $mdIcon: ng.material.IIcon;
|
||||
constructor($mdIcon: ng.material.IIcon) {
|
||||
this.$mdIcon = $mdIcon;
|
||||
}
|
||||
|
||||
@@ -69,9 +69,9 @@ class IconDirective implements ng.IDirective {
|
||||
});
|
||||
}
|
||||
}
|
||||
myApp.directive('icon-directive', ($mdIcon: ng.material.MDIcon) => new IconDirective($mdIcon));
|
||||
myApp.directive('icon-directive', ($mdIcon: ng.material.IIcon) => new IconDirective($mdIcon));
|
||||
|
||||
myApp.controller('MediaController', ($scope: ng.IScope, $mdMedia: ng.material.MDMedia) => {
|
||||
myApp.controller('MediaController', ($scope: ng.IScope, $mdMedia: ng.material.IMedia) => {
|
||||
$scope.$watch(() => $mdMedia('lg'), (big: boolean) => {
|
||||
$scope['bigScreen'] = big;
|
||||
});
|
||||
@@ -80,7 +80,7 @@ myApp.controller('MediaController', ($scope: ng.IScope, $mdMedia: ng.material.MD
|
||||
$scope['anotherCustom'] = $mdMedia('max-width: 300px');
|
||||
});
|
||||
|
||||
myApp.controller('SidenavController', ($scope: ng.IScope, $mdSidenav: ng.material.MDSidenavService) => {
|
||||
myApp.controller('SidenavController', ($scope: ng.IScope, $mdSidenav: ng.material.ISidenavService) => {
|
||||
var componentId = 'left';
|
||||
$scope['toggle'] = () => $mdSidenav(componentId).toggle();
|
||||
$scope['open'] = () => $mdSidenav(componentId).open();
|
||||
@@ -89,6 +89,6 @@ myApp.controller('SidenavController', ($scope: ng.IScope, $mdSidenav: ng.materia
|
||||
$scope['isLockedOpen'] = $mdSidenav(componentId).isLockedOpen();
|
||||
});
|
||||
|
||||
myApp.controller('ToastController', ($scope: ng.IScope, $mdToast: ng.material.MDToastService) => {
|
||||
myApp.controller('ToastController', ($scope: ng.IScope, $mdToast: ng.material.IToastService) => {
|
||||
$scope['openToast'] = () => $mdToast.show($mdToast.simple().content('Hello!'));
|
||||
});
|
||||
+104
-76
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Angular Material 0.8.3+ (angular.material module)
|
||||
// Type definitions for Angular Material 0.10.1-rc1+ (angular.material module)
|
||||
// Project: https://github.com/angular/material
|
||||
// Definitions by: Matt Traynham <https://github.com/mtraynham>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
@@ -6,126 +6,153 @@
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
declare module angular.material {
|
||||
|
||||
interface MDBottomSheetOptions {
|
||||
interface IBottomSheetOptions {
|
||||
templateUrl?: string;
|
||||
template?: string;
|
||||
controller?: any;
|
||||
scope?: angular.IScope; // default: new child scope
|
||||
preserveScope?: boolean; // default: false
|
||||
controller?: string|Function;
|
||||
locals?: {[index: string]: any};
|
||||
targetEvent?: any;
|
||||
targetEvent?: MouseEvent;
|
||||
resolve?: {[index: string]: angular.IPromise<any>}
|
||||
controllerAs?: string;
|
||||
parent?: Element;
|
||||
disableParentScroll?: boolean;
|
||||
parent?: string|Element|JQuery; // default: root node
|
||||
disableParentScroll?: boolean; // default: true
|
||||
}
|
||||
|
||||
interface MDBottomSheetService {
|
||||
show(options: MDBottomSheetOptions): angular.IPromise<any>;
|
||||
interface IBottomSheetService {
|
||||
show(options: IBottomSheetOptions): angular.IPromise<any>;
|
||||
hide(response?: any): void;
|
||||
cancel(response?: any): void;
|
||||
}
|
||||
|
||||
interface MDPresetDialog<T> {
|
||||
interface IPresetDialog<T> {
|
||||
title(title: string): T;
|
||||
content(content: string): T;
|
||||
ok(content: string): T;
|
||||
ok(ok: string): T;
|
||||
theme(theme: string): T;
|
||||
templateUrl(templateUrl?: string): T;
|
||||
template(template?: string): T;
|
||||
targetEvent(targetEvent?: MouseEvent): T;
|
||||
scope(scope?: angular.IScope): T; // default: new child scope
|
||||
preserveScope(preserveScope?: boolean): T; // default: false
|
||||
disableParentScroll(disableParentScroll?: boolean): T; // default: true
|
||||
hasBackdrop(hasBackdrop?: boolean): T; // default: true
|
||||
clickOutsideToClose(clickOutsideToClose?: boolean): T; // default: false
|
||||
escapeToClose(escapeToClose?: boolean): T; // default: true
|
||||
focusOnOpen(focusOnOpen?: boolean): T; // default: true
|
||||
controller(controller?: string|Function): T;
|
||||
locals(locals?: {[index: string]: any}): T;
|
||||
bindToController(bindToController?: boolean): T; // default: false
|
||||
resolve(resolve?: {[index: string]: angular.IPromise<any>}): T;
|
||||
controllerAs(controllerAs?: string): T;
|
||||
parent(parent?: string|Element|JQuery): T; // default: root node
|
||||
onComplete(onComplete?: Function): T;
|
||||
ariaLabel(ariaLabel: string): T;
|
||||
}
|
||||
|
||||
interface MDAlertDialog extends MDPresetDialog<MDAlertDialog> {
|
||||
interface IAlertDialog extends IPresetDialog<IAlertDialog> {
|
||||
}
|
||||
|
||||
interface MDConfirmDialog extends MDPresetDialog<MDConfirmDialog> {
|
||||
cancel(reason?: string): MDConfirmDialog;
|
||||
interface IConfirmDialog extends IPresetDialog<IConfirmDialog> {
|
||||
cancel(cancel: string): IConfirmDialog;
|
||||
}
|
||||
|
||||
interface MDDialogOptions {
|
||||
interface IDialogOptions {
|
||||
templateUrl?: string;
|
||||
template?: string;
|
||||
domClickEvent?: any;
|
||||
disableParentScroll?: boolean;
|
||||
clickOutsideToClose?: boolean;
|
||||
hasBackdrop?: boolean;
|
||||
escapeToClose?: boolean;
|
||||
controller?: any;
|
||||
targetEvent?: MouseEvent;
|
||||
scope?: angular.IScope; // default: new child scope
|
||||
preserveScope?: boolean; // default: false
|
||||
disableParentScroll?: boolean; // default: true
|
||||
hasBackdrop?: boolean // default: true
|
||||
clickOutsideToClose?: boolean; // default: false
|
||||
escapeToClose?: boolean; // default: true
|
||||
focusOnOpen?: boolean; // default: true
|
||||
controller?: string|Function;
|
||||
locals?: {[index: string]: any};
|
||||
bindToController?: boolean;
|
||||
bindToController?: boolean; // default: false
|
||||
resolve?: {[index: string]: angular.IPromise<any>}
|
||||
controllerAs?: string;
|
||||
parent?: Element;
|
||||
parent?: string|Element|JQuery; // default: root node
|
||||
onComplete?: Function;
|
||||
}
|
||||
|
||||
interface MDDialogService {
|
||||
show(dialog: MDDialogOptions|MDPresetDialog<any>): angular.IPromise<any>;
|
||||
confirm(): MDConfirmDialog;
|
||||
alert(): MDAlertDialog;
|
||||
interface IDialogService {
|
||||
show(dialog: IDialogOptions|IAlertDialog|IConfirmDialog): angular.IPromise<any>;
|
||||
confirm(): IConfirmDialog;
|
||||
alert(): IAlertDialog;
|
||||
hide(response?: any): void;
|
||||
cancel(response?: any): void;
|
||||
}
|
||||
|
||||
interface MDIcon {
|
||||
(path: string): angular.IPromise<Element>;
|
||||
interface IIcon {
|
||||
(id: string): angular.IPromise<Element>; // id is a unique ID or URL
|
||||
}
|
||||
|
||||
interface MDIconProvider {
|
||||
icon(id: string, url: string, iconSize?: string): MDIconProvider;
|
||||
iconSet(id: string, url: string, iconSize?: string): MDIconProvider;
|
||||
defaultIconSet(url: string, iconSize?: string): MDIconProvider;
|
||||
defaultIconSize(iconSize: string): MDIconProvider;
|
||||
interface IIconProvider {
|
||||
icon(id: string, url: string, viewBoxSize?: number): IIconProvider; // viewBoxSize default: 24
|
||||
iconSet(id: string, url: string, viewBoxSize?: number): IIconProvider; // viewBoxSize default: 24
|
||||
defaultIconSet(url: string, viewBoxSize?: number): IIconProvider; // viewBoxSize default: 24
|
||||
defaultViewBoxSize(viewBoxSize: number): IIconProvider; // default: 24
|
||||
defaultFontSet(name: string): IIconProvider;
|
||||
}
|
||||
|
||||
interface MDMedia {
|
||||
interface IMedia {
|
||||
(media: string): boolean;
|
||||
}
|
||||
|
||||
interface MDSidenavObject {
|
||||
toggle(): void;
|
||||
open(): void;
|
||||
close(): void;
|
||||
interface ISidenavObject {
|
||||
toggle(): angular.IPromise<void>;
|
||||
open(): angular.IPromise<void>;
|
||||
close(): angular.IPromise<void>;
|
||||
isOpen(): boolean;
|
||||
isLockedOpen(): boolean;
|
||||
}
|
||||
|
||||
interface MDSidenavService {
|
||||
(component: string): MDSidenavObject;
|
||||
interface ISidenavService {
|
||||
(component: string): ISidenavObject;
|
||||
}
|
||||
|
||||
interface MDToastPreset<T> {
|
||||
interface IToastPreset<T> {
|
||||
content(content: string): T;
|
||||
action(action: string): T;
|
||||
highlightAction(highlightAction: boolean): T;
|
||||
capsule(capsule: boolean): T;
|
||||
theme(theme: string): T;
|
||||
hideDelay(delay: number): T;
|
||||
position(position: string): T;
|
||||
}
|
||||
|
||||
interface MDSimpleToastPreset extends MDToastPreset<MDSimpleToastPreset> {
|
||||
interface ISimpleToastPreset extends IToastPreset<ISimpleToastPreset> {
|
||||
}
|
||||
|
||||
interface MDToastOptions {
|
||||
interface IToastOptions {
|
||||
templateUrl?: string;
|
||||
template?: string;
|
||||
hideDelay?: number;
|
||||
position?: string;
|
||||
controller?: any;
|
||||
scope?: angular.IScope; // default: new child scope
|
||||
preserveScope?: boolean; // default: false
|
||||
hideDelay?: number; // default (ms): 3000
|
||||
position?: string; // any combination of 'bottom'/'left'/'top'/'right'/'fit'; default: 'bottom left'
|
||||
controller?: string|Function;
|
||||
locals?: {[index: string]: any};
|
||||
bindToController?: boolean;
|
||||
bindToController?: boolean; // default: false
|
||||
resolve?: {[index: string]: angular.IPromise<any>}
|
||||
controllerAs?: string;
|
||||
parent?: Element;
|
||||
parent?: string|Element|JQuery; // default: root node
|
||||
}
|
||||
|
||||
interface MDToastService {
|
||||
show(optionsOrPreset: MDToastOptions|MDToastPreset<any>): angular.IPromise<any>;
|
||||
interface IToastService {
|
||||
show(optionsOrPreset: IToastOptions|IToastPreset<any>): angular.IPromise<any>;
|
||||
showSimple(): angular.IPromise<any>;
|
||||
simple(): MDSimpleToastPreset;
|
||||
build(): MDToastPreset<any>;
|
||||
simple(): ISimpleToastPreset;
|
||||
build(): IToastPreset<any>;
|
||||
updateContent(): void;
|
||||
hide(response?: any): void;
|
||||
cancel(response?: any): void;
|
||||
}
|
||||
|
||||
interface MDPalette {
|
||||
interface IPalette {
|
||||
0?: string;
|
||||
50?: string;
|
||||
100?: string;
|
||||
@@ -142,30 +169,30 @@ declare module angular.material {
|
||||
A400?: string;
|
||||
A700?: string;
|
||||
contrastDefaultColor?: string;
|
||||
contrastDarkColors?: string;
|
||||
contrastStrongLightColors?: string;
|
||||
contrastDarkColors?: string|string[];
|
||||
contrastLightColors?: string|string[];
|
||||
}
|
||||
|
||||
interface MDThemeHues {
|
||||
interface IThemeHues {
|
||||
default?: string;
|
||||
'hue-1'?: string;
|
||||
'hue-2'?: string;
|
||||
'hue-3'?: string;
|
||||
}
|
||||
|
||||
interface MDThemePalette {
|
||||
interface IThemePalette {
|
||||
name: string;
|
||||
hues: MDThemeHues;
|
||||
hues: IThemeHues;
|
||||
}
|
||||
|
||||
interface MDThemeColors {
|
||||
accent: MDThemePalette;
|
||||
background: MDThemePalette;
|
||||
primary: MDThemePalette;
|
||||
warn: MDThemePalette;
|
||||
interface IThemeColors {
|
||||
accent: IThemePalette;
|
||||
background: IThemePalette;
|
||||
primary: IThemePalette;
|
||||
warn: IThemePalette;
|
||||
}
|
||||
|
||||
interface MDThemeGrayScalePalette {
|
||||
interface IThemeGrayScalePalette {
|
||||
1: string;
|
||||
2: string;
|
||||
3: string;
|
||||
@@ -173,22 +200,23 @@ declare module angular.material {
|
||||
name: string;
|
||||
}
|
||||
|
||||
interface MDTheme {
|
||||
interface ITheme {
|
||||
name: string;
|
||||
colors: MDThemeColors;
|
||||
foregroundPalette: MDThemeGrayScalePalette;
|
||||
isDark: boolean;
|
||||
colors: IThemeColors;
|
||||
foregroundPalette: IThemeGrayScalePalette;
|
||||
foregroundShadow: string;
|
||||
accentPalette(name: string, hues?: MDThemeHues): MDTheme;
|
||||
primaryPalette(name: string, hues?: MDThemeHues): MDTheme;
|
||||
warnPalette(name: string, hues?: MDThemeHues): MDTheme;
|
||||
backgroundPalette(name: string, hues?: MDThemeHues): MDTheme;
|
||||
dark(isDark?: boolean): MDTheme;
|
||||
accentPalette(name: string, hues?: IThemeHues): ITheme;
|
||||
primaryPalette(name: string, hues?: IThemeHues): ITheme;
|
||||
warnPalette(name: string, hues?: IThemeHues): ITheme;
|
||||
backgroundPalette(name: string, hues?: IThemeHues): ITheme;
|
||||
dark(isDark?: boolean): ITheme;
|
||||
}
|
||||
|
||||
interface MDThemingProvider {
|
||||
theme(name: string, inheritFrom?: string): MDTheme;
|
||||
definePalette(name: string, palette: MDPalette): MDThemingProvider;
|
||||
extendPalette(name: string, palette: MDPalette): MDPalette;
|
||||
interface IThemingProvider {
|
||||
theme(name: string, inheritFrom?: string): ITheme;
|
||||
definePalette(name: string, palette: IPalette): IThemingProvider;
|
||||
extendPalette(name: string, palette: IPalette): IPalette;
|
||||
setDefaultTheme(theme: string): void;
|
||||
alwaysWatchTheme(alwaysWatch: boolean): void;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,255 @@
|
||||
/// <reference path="angular-meteor.d.ts" />
|
||||
|
||||
interface ITodo {
|
||||
_id?: string;
|
||||
name: string;
|
||||
public?: boolean;
|
||||
sticky?: boolean;
|
||||
}
|
||||
|
||||
interface TodoAngularMeteorObject extends ITodo, angular.meteor.AngularMeteorObject<ITodo> {}
|
||||
|
||||
interface CustomScope extends angular.meteor.IScope {
|
||||
sticky: boolean;
|
||||
|
||||
todos: angular.meteor.AngularMeteorCollection<ITodo>;
|
||||
stickyTodos: angular.meteor.AngularMeteorCollection<ITodo>;
|
||||
notAutoTodos: angular.meteor.AngularMeteorCollection<ITodo>;
|
||||
|
||||
todo: ITodo;
|
||||
todoNotAuto: TodoAngularMeteorObject;
|
||||
todoSubscribed: TodoAngularMeteorObject;
|
||||
|
||||
save: (todo: ITodo) => void;
|
||||
saveAll: () =>void;
|
||||
autoSave: (todo: ITodo) => void;
|
||||
remove: (todoId: string) => void;
|
||||
removeAll: () => void;
|
||||
removeAuto: (todo: ITodo) => void;
|
||||
toSticky: (todo: ITodo) => void;
|
||||
}
|
||||
|
||||
var Todos = new Mongo.Collection<ITodo>('todos');
|
||||
|
||||
var app = angular.module('angularMeteorTestApp');
|
||||
|
||||
app.controller("mainCtrl", ['$scope', '$meteor', ($scope: CustomScope, $meteor: angular.meteor.IMeteorService) => {
|
||||
// Bind all the todos to $scope.todos
|
||||
$scope.todos = $meteor.collection(Todos);
|
||||
|
||||
$scope.sticky = true;
|
||||
// Bind all sticky todos to $scope.stickyTodos
|
||||
// Binds the query to $scope.sticky so that if it changes, Meteor will re-run the query and bind it
|
||||
// to $scope.stickyTodos
|
||||
$scope.stickyTodos = $meteor.collection<ITodo>(function(){
|
||||
return Todos.find({sticky: $scope.getReactively('sticky')});
|
||||
});
|
||||
|
||||
// Bind without auto-save all todos to $scope.notAutoTodos
|
||||
$scope.notAutoTodos = $meteor.collection(Todos, false).subscribe("publicTodos");
|
||||
|
||||
$scope.todoNotAuto = <TodoAngularMeteorObject>$meteor.object(Todos, 'TodoID', false);
|
||||
$scope.todoSubscribed = <TodoAngularMeteorObject>$meteor.object(Todos, 'TodoID').subscribe('todos');
|
||||
$scope.todo = $scope.todoNotAuto.getRawObject();
|
||||
$scope.todoNotAuto.reset();
|
||||
$scope.todoNotAuto.save($scope.todo).then((data) => { return data == 1; });;
|
||||
|
||||
// todo might be an object like this {text: "Learn Angular", sticky: false}
|
||||
// or an array like this:
|
||||
// [{text: "Learn Angular", sticky: false}, {text: "Hello World", sticky: true}]
|
||||
|
||||
$scope.save = function(todo) {
|
||||
$scope.notAutoTodos.save(todo);
|
||||
};
|
||||
|
||||
$scope.saveAll = function() {
|
||||
$scope.notAutoTodos.save();
|
||||
};
|
||||
|
||||
$scope.autoSave = function(todo) {
|
||||
$scope.todos.push(todo);
|
||||
};
|
||||
|
||||
// todoId might be an string like this "WhrnEez5yBRgo4yEm"
|
||||
// or an array like this ["WhrnEez5yBRgo4yEm","gH6Fa4DXA3XxQjXNS"]
|
||||
$scope.remove = function(todoId) {
|
||||
$scope.notAutoTodos.remove(todoId);
|
||||
};
|
||||
|
||||
$scope.removeAll = function() {
|
||||
$scope.notAutoTodos.remove();
|
||||
};
|
||||
|
||||
$scope.removeAuto = function(todo) {
|
||||
$scope.todos.splice( $scope.todos.indexOf(todo), 1 );
|
||||
}
|
||||
|
||||
$scope.toSticky = function(todo) {
|
||||
if (angular.isArray(todo)){
|
||||
angular.forEach(todo, function(object) {
|
||||
object.sticky = true;
|
||||
});
|
||||
} else {
|
||||
todo.sticky = true;
|
||||
}
|
||||
|
||||
$scope.stickyTodos.save(todo);
|
||||
};
|
||||
|
||||
var todoObject = {name:'first todo'};
|
||||
var todosArray = [{name:'second todo'}, {name:'third todo'}];
|
||||
var todoSecondObject = {name:'forth todo'};
|
||||
|
||||
$scope.todos.save(todoObject); // todos equals [{name:'first todo'}]
|
||||
|
||||
$scope.todos.save(todosArray); // todos equals [{name:'first todo'}, {name:'second todo'}, {name:'third todo'}]
|
||||
|
||||
$scope.todos.push(todoSecondObject); // The scope variable equals to [{name:'first todo'}, {name:'second todo'}, {name:'third todo'}, {name:'forth todo'}]
|
||||
// but the collection still equals to [{name:'first todo'}, {name:'second todo'}, {name:'third todo'}]
|
||||
|
||||
$scope.todos.save(); // Now the collection also equals to [{name:'first todo'}, {name:'second todo'}, {name:'third todo'}, {name:'forth todo'}]
|
||||
|
||||
$scope.todos.remove('firstTodoId'); // scope and collection equals to [{name:'second todo'}, {name:'third todo'}, {name:'forth todo'}]
|
||||
|
||||
var todoIdsArray = ['secondTodoId', 'thirdTodoId'];
|
||||
$scope.todos.remove(todoIdsArray); // removes everything matches the array of IDs both in scope and in collection
|
||||
|
||||
$scope.todos.pop(); // removes only in scope
|
||||
|
||||
$scope.todos.remove(); // syncs also in Meteor collection
|
||||
|
||||
// Subscribe ->
|
||||
|
||||
$meteor.subscribe('todos').then((subscriptionHandle) => {
|
||||
// Bind all the todos to $scope.todos
|
||||
$scope.todos = $meteor.collection(Todos);
|
||||
|
||||
console.log($scope.todos + ' is ready');
|
||||
|
||||
// You can use the subscription handle to stop the subscription if you want
|
||||
subscriptionHandle.stop();
|
||||
});
|
||||
|
||||
$scope.subscribe('todos').then((subscriptionHandle) => {
|
||||
// Bind all the todos to $scope.books
|
||||
$scope.todos = $meteor.collection(Todos);
|
||||
|
||||
console.log($scope.todos + ' is ready');
|
||||
|
||||
// No need to stop the subscription, it will automatically close on scope destroy
|
||||
});
|
||||
|
||||
$meteor.call<ITodo>('subscribe', $scope.todo._id, $scope.currentUser._id).then((data) => {
|
||||
// Handle success
|
||||
console.log('success subscribing', data.name);
|
||||
}, (err) => {
|
||||
// Handle error
|
||||
console.log('failed', err);
|
||||
});
|
||||
|
||||
if (!$scope.loggingIn) {
|
||||
$meteor.waitForUser();
|
||||
|
||||
$meteor.requireUser();
|
||||
|
||||
$meteor.requireValidUser(user => {
|
||||
return user.username == 'admin';
|
||||
});
|
||||
|
||||
$meteor.loginWithPassword('user', 'password').then(() => {
|
||||
console.log('Login success');
|
||||
}, err => {
|
||||
console.log('Login error - ', err);
|
||||
});
|
||||
|
||||
$meteor.createUser({
|
||||
username:'moma',
|
||||
email:'example@gmail.com',
|
||||
password: 'Bksd@asdf',
|
||||
profile: {expertize: 'Developer'}
|
||||
}).then(() => {
|
||||
console.log('Login success');
|
||||
}, err => {
|
||||
console.log('Login error - ', err);
|
||||
});
|
||||
|
||||
$meteor.changePassword('old', 'new232f3').then(() => {
|
||||
console.log('Change password success');
|
||||
}, err => {
|
||||
console.log('Error changing password - ', err);
|
||||
});
|
||||
|
||||
$meteor.forgotPassword({email: 'sample@gmail.com'}).then(() => {
|
||||
console.log('Success sending forgot password email');
|
||||
}, err => {
|
||||
console.log('Error sending forgot password email - ', err);
|
||||
});
|
||||
|
||||
$meteor.resetPassword('tokenID', 'new232f3').then(() => {
|
||||
console.log('Reset password success');
|
||||
}, err => {
|
||||
console.log('Error resetting password - ', err);
|
||||
});
|
||||
|
||||
$meteor.verifyEmail('tokenID').then(() => {
|
||||
console.log('Success verifying password ');
|
||||
}, err => {
|
||||
console.log('Error verifying password - ', err);
|
||||
});
|
||||
|
||||
$meteor.logout().then(() => {
|
||||
console.log('Logout success');
|
||||
}, err => {
|
||||
console.log('logout error - ', err);
|
||||
});
|
||||
|
||||
$meteor.logoutOtherClients().then(() => {
|
||||
console.log('Logout success');
|
||||
}, err => {
|
||||
console.log('logout error - ', err);
|
||||
});
|
||||
|
||||
var loginWithOptions = {requestPermissions: ['email']};
|
||||
|
||||
$meteor.loginWithFacebook({requestPermissions: ['email']}).then(() => {
|
||||
console.log('Login success');
|
||||
}, err => {
|
||||
console.log('Login error - ', err);
|
||||
});
|
||||
$meteor.loginWithGithub({requestPermissions: ['email']}).then(() => {
|
||||
console.log('Login success');
|
||||
}, err => {
|
||||
console.log('Login error - ', err);
|
||||
});
|
||||
$meteor.loginWithGoogle({requestPermissions: ['email']}).then(() => {
|
||||
console.log('Login success');
|
||||
}, err => {
|
||||
console.log('Login error - ', err);
|
||||
});
|
||||
$meteor.loginWithMeetup({requestPermissions: ['email']}).then(() => {
|
||||
console.log('Login success');
|
||||
}, err => {
|
||||
console.log('Login error - ', err);
|
||||
});
|
||||
$meteor.loginWithTwitter({requestPermissions: ['email']}).then(() => {
|
||||
console.log('Login success');
|
||||
}, err => {
|
||||
console.log('Login error - ', err);
|
||||
});
|
||||
$meteor.loginWithWeibo({requestPermissions: ['email']}).then(() => {
|
||||
console.log('Login success');
|
||||
}, err => {
|
||||
console.log('Login error - ', err);
|
||||
});
|
||||
}
|
||||
|
||||
$meteor.autorun($scope, () => { console.log("Aurorun triggered."); });
|
||||
$meteor.getCollectionByName('collectionName');
|
||||
|
||||
// requires meteor add mdg:camera
|
||||
$meteor.getPicture().then(function(data){
|
||||
$scope['picture'] = data;
|
||||
});
|
||||
|
||||
$meteor.session('counter').bind($scope, 'counter');
|
||||
}]);
|
||||
Vendored
+330
@@ -0,0 +1,330 @@
|
||||
// Type definitions for Angular JS Meteor v0.8.8 (angular.meteor module)
|
||||
// Project: https://github.com/Urigo/angular-meteor
|
||||
// Definitions by: Peter Grman <https://github.com/pgrm>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../meteor/meteor.d.ts" />
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
|
||||
declare module angular.meteor {
|
||||
interface IRootScopeService extends angular.IRootScopeService {
|
||||
/**
|
||||
* The current logged in user and it's data. it is null if the user is not logged in. A reactive data source.
|
||||
*/
|
||||
currentUser: Meteor.User;
|
||||
|
||||
/**
|
||||
* True if a login method (such as Meteor.loginWithPassword, Meteor.loginWithFacebook, or Accounts.createUser) is currently in progress.
|
||||
* A reactive data source. Can be use to display animation while user is logging in.
|
||||
*/
|
||||
loggingIn: boolean;
|
||||
}
|
||||
|
||||
interface IScope extends angular.IScope, IRootScopeService {
|
||||
/**
|
||||
* A method to get a $scope variable and watch it reactivly
|
||||
*
|
||||
* @param scopeVariableName - The name of the scope's variable to bind to
|
||||
* @param [objectEquality=false] - Watch the object equality using angular.equals instead of comparing for reference equality, deeper watch but also slower
|
||||
*/
|
||||
getReactively(scopeVariableName: string, objectEquality?: boolean): ReactiveResult;
|
||||
|
||||
/**
|
||||
* A service which is a wrapper for Meteor.subscribe. It subscribes to a Meteor.publish method in the client and returns a AngularJS promise when ready.
|
||||
* Calling $scope.subscribe will automatically stop the subscription when the scope is destroyed.
|
||||
*
|
||||
* @param name - Name of the subscription. Matches the name of the server's publish() call.
|
||||
* @param publisherArguments - Optional arguments passed to publisher function on server.
|
||||
*
|
||||
* @return The promise solved successfully when subscription is ready. The success promise holds the subscription handle.
|
||||
*/
|
||||
subscribe(name: string, ...publisherArguments: any[]): angular.IPromise<Meteor.SubscriptionHandle>;
|
||||
}
|
||||
|
||||
/**
|
||||
* $meteor in angularjs
|
||||
*/
|
||||
interface IMeteorService {
|
||||
/**
|
||||
* A service that wraps the Meteor collections to enable reactivity within AngularJS.
|
||||
*
|
||||
* @param collection - A Meteor Collection or a reactive function to bind to.
|
||||
* - Reactive function can be used with $scope.getReactively to add $scope variable as reactive variable to the cursor.
|
||||
* @param [autoClientSave=true] - By default, changes in the Angular collection will automatically update the Meteor collection.
|
||||
* - However if set to false, changes in the client won't be automatically propagated back to the Meteor collection.
|
||||
*/
|
||||
collection<T>(collection: Mongo.Collection<T>|ReactiveResult|Function|(()=>T), autoClientSave?: boolean): AngularMeteorCollection<T>;
|
||||
|
||||
/**
|
||||
* A service that wraps the Meteor collections to enable reactivity within AngularJS.
|
||||
*
|
||||
* @param collection - A Meteor Collection or a reactive function to bind to.
|
||||
* - Reactive function can be used with $scope.getReactively to add $scope variable as reactive variable to the cursor.
|
||||
* @param [autoClientSave=true] - By default, changes in the Angular collection will automatically update the Meteor collection.
|
||||
* - However if set to false, changes in the client won't be automatically propagated back to the Meteor collection.
|
||||
* @param [updateCollection] - A collection object which will be used for updates (insert, update, delete).
|
||||
*/
|
||||
collection<T, U>(collection: Mongo.Collection<T>|ReactiveResult|Function|(()=>T), autoClientSave: boolean, updateCollection: Mongo.Collection<U>): AngularMeteorCollection2<T, U>;
|
||||
|
||||
/**
|
||||
* A service that wraps a Meteor object to enable reactivity within AngularJS.
|
||||
* Finds the first document that matches the selector, as ordered by sort and skip options. Wraps collection.findOne
|
||||
*
|
||||
* @param collection - A Meteor Collection to bind to.
|
||||
* @param selector - A query describing the documents to find or just the ID of the document.
|
||||
* - $meteor.object will find the first document that matches the selector,
|
||||
* - as ordered by sort and skip options, exactly like Meteor's collection.findOne
|
||||
* @param [autoClientSave=true] - By default, changes in the Angular object will automatically update the Meteor object.
|
||||
* - However if set to false, changes in the client won't be automatically propagated back to the Meteor object.
|
||||
*/
|
||||
object<T>(collection: Mongo.Collection<T>, selector: Mongo.Selector|Mongo.ObjectID|string, autoClientSave?: boolean): AngularMeteorObject<T>;
|
||||
|
||||
/**
|
||||
* A service which is a wrapper for Meteor.subscribe. It subscribes to a Meteor.publish method in the client and returns a AngularJS promise when ready.
|
||||
*
|
||||
* @param name - Name of the subscription. Matches the name of the server's publish() call.
|
||||
* @param publisherArguments - Optional arguments passed to publisher function on server.
|
||||
*
|
||||
* @return The promise solved successfully when subscription is ready. The success promise holds the subscription handle.
|
||||
*/
|
||||
subscribe(name: string, ...publisherArguments: any[]): angular.IPromise<Meteor.SubscriptionHandle>;
|
||||
|
||||
/**
|
||||
* A service service which wraps up Meteor.methods with AngularJS promises.
|
||||
*
|
||||
* @param name - Name of method to invoke
|
||||
* @param methodArguments - Optional method arguments
|
||||
*
|
||||
* @return The promise solves successfully with the return value of the method or return reject with the error from the method.
|
||||
*/
|
||||
call<T>(name: string, ...methodArguments: any[]): angular.IPromise<T>;
|
||||
|
||||
// User Authentication BEGIN ->
|
||||
|
||||
/**
|
||||
* Returns a promise fulfilled with the currentUser when the user subscription is ready.
|
||||
* This is useful when you want to grab the current user before the route is rendered.
|
||||
* If there is no logged in user, it will return null.
|
||||
* See the “Authentication with Routers” section of our tutorial for more information and a full example.
|
||||
*/
|
||||
waitForUser(): angular.IPromise<Meteor.User>;
|
||||
|
||||
/**
|
||||
* Resolves the promise successfully if a user is authenticated and rejects otherwise.
|
||||
* This is useful in cases where you want to require a route to have an authenticated user.
|
||||
* You can catch the rejected promise and redirect the unauthenticated user to a different page, such as the login page.
|
||||
* See the “Authentication with Routers” section of our tutorial for more information and a full example.
|
||||
*/
|
||||
requireUser(): angular.IPromise<Meteor.User>;
|
||||
|
||||
/**
|
||||
* Resolves the promise successfully if a user is authenticated and the validatorFn returns true; rejects otherwise.
|
||||
* This is useful in cases where you want to require a route to have an authenticated user and do extra validation like the user's role or group.
|
||||
* You can catch the rejected promise and redirect the unauthenticated user to a different page, such as the login page.
|
||||
* See the “Authentication with Routers” section of our tutorial for more information and a full example.
|
||||
*
|
||||
* The mandatory validator function will be called with the authenticated user as the single param and it's expected to return true in order to resolve.
|
||||
* If it returns a string, the promise will be rejected using said string as the reason.
|
||||
* Any other return (false, null, undefined) will be rejected with the default "FORBIDDEN" reason.
|
||||
*/
|
||||
requireValidUser(validatorFn: (user: Meteor.User) => boolean|string): angular.IPromise<Meteor.User>;
|
||||
|
||||
/**
|
||||
* Log the user in with a password.
|
||||
*
|
||||
* @param user - Either a string interpreted as a username or an email; or an object with a single key: email, username or id.
|
||||
* @param password - The user's password.
|
||||
*/
|
||||
loginWithPassword(user: string|{email: string}|{username: string}|{id: string}, password: string): angular.IPromise<void>;
|
||||
|
||||
/**
|
||||
* Create a new user. More information: http://docs.meteor.com/#/full/accounts_createuser
|
||||
*
|
||||
* @param options.username - A unique name for this user. Either this, or email is required.
|
||||
* @param options.email - The user's email address. Either this, or username is required.
|
||||
* @param options.password - The user's password. This is not sent in plain text over the wire.
|
||||
* @param options.profile - The user's profile, typically including the name field.
|
||||
*/
|
||||
createUser(options: {username?: string; email?: string; password: string; profile?: Object}): angular.IPromise<void>;
|
||||
|
||||
/**
|
||||
* Change the current user's password. Must be logged in.
|
||||
*
|
||||
* @param oldPassword - The user's current password. This is not sent in plain text over the wire.
|
||||
* @param newPassword - A new password for the user. This is not sent in plain text over the wire.
|
||||
*/
|
||||
changePassword(oldPassword: string, newPassword: string): angular.IPromise<void>;
|
||||
|
||||
/**
|
||||
* Request a forgot password email.
|
||||
*
|
||||
* @param options.email - The email address to send a password reset link.
|
||||
*/
|
||||
forgotPassword(options: {email: string}): angular.IPromise<void>;
|
||||
|
||||
/**
|
||||
* Reset the password for a user using a token received in email. Logs the user in afterwards.
|
||||
*
|
||||
* @param token - The token retrieved from the reset password URL.
|
||||
* @param newPassword - A new password for the user. This is not sent in plain text over the wire.
|
||||
*/
|
||||
resetPassword(token: string, newPassword: string): angular.IPromise<void>;
|
||||
|
||||
/**
|
||||
* Marks the user's email address as verified. Logs the user in afterwards.
|
||||
*
|
||||
* @param token - The token retrieved from the reset password URL.
|
||||
*/
|
||||
verifyEmail(token: string): angular.IPromise<void>;
|
||||
|
||||
loginWithFacebook: ILoginWithExternalService;
|
||||
loginWithTwitter: ILoginWithExternalService;
|
||||
loginWithGoogle: ILoginWithExternalService;
|
||||
loginWithGithub: ILoginWithExternalService;
|
||||
loginWithMeetup: ILoginWithExternalService;
|
||||
loginWithWeibo: ILoginWithExternalService;
|
||||
|
||||
/**
|
||||
* Log the user out.
|
||||
*
|
||||
* @return Resolves with no arguments on success, or reject with a Error argument on failure.
|
||||
*/
|
||||
logout(): angular.IPromise<void>;
|
||||
|
||||
/**
|
||||
* Log out other clients logged in as the current user, but does not log out the client that calls this function.
|
||||
* For example, when called in a user's browser, connections in that browser remain logged in,
|
||||
* but any other browsers or DDP clients logged in as that user will be logged out.
|
||||
*
|
||||
* @return Resolves with no arguments on success, or reject with a Error argument on failure.
|
||||
*/
|
||||
logoutOtherClients(): angular.IPromise<void>;
|
||||
|
||||
// <- User Authentication END
|
||||
// $meteorUtils BEGIN ->
|
||||
|
||||
/**
|
||||
* @param scope - The AngularJS scope you use the autorun on.
|
||||
* @param fn - The function that will re-run every time a reactive variable changes inside it.
|
||||
*/
|
||||
autorun(scope: angular.IScope, fn: Function): void;
|
||||
|
||||
/**
|
||||
* @param collectionName - The name of the collection you want to get back
|
||||
*/
|
||||
getCollectionByName<T>(collectionName: string): Mongo.Collection<T>;
|
||||
|
||||
// <- $meteorUtils END
|
||||
// $meteorCamera BEGIN ->
|
||||
|
||||
/**
|
||||
* A helper service for taking pictures across platforms.
|
||||
* Must add mdg:camera package to use! (meteor add mdg:camera)
|
||||
*
|
||||
* @param [options] - options is an optional argument that is an Object with the following possible keys:
|
||||
* @param options.width - An integer that specifies the minimum width of the returned photo.
|
||||
* @param options.height - An integer that specifies the minimum height of the returned photo.
|
||||
* @param options.quality - A number from 0 to 100 specifying the desired quality of JPEG encoding.
|
||||
*
|
||||
* @return The promise solved successfully when the picture is taken with the data as a parameter or rejected with an error as a parameter in case of error.
|
||||
*/
|
||||
getPicture(options?: {width?: number; height?: number; quality?: number}): angular.IPromise<any>;
|
||||
|
||||
// <- $meteorCamera END
|
||||
|
||||
/**
|
||||
* A service that binds a scope variable to a Meteor Session variable.
|
||||
*
|
||||
* @param sessionKey - The name of the session variable
|
||||
* @return An object with a single function bind - to bind to that variable.
|
||||
*/
|
||||
session(sessionKey: string): {
|
||||
/**
|
||||
* @param scope - The scope the document will be bound to.
|
||||
* @param model - The name of the scope's model variable that the document will be bound to.
|
||||
*/
|
||||
bind: (scope: IScope, model: string) => void;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* An object that connects a Meteor Object to an AngularJS scope variable.
|
||||
*
|
||||
* The object contains also all the properties from the generic type T,
|
||||
* unfortunately TypeScript doesn't at the moment allow to extend a generic type (see https://github.com/Microsoft/TypeScript/issues/2225 for details and updates).
|
||||
* For a workaround, you'll need to implement an interface which will merge AngularMeteorObject<T> together with T and cast it, like this:
|
||||
*
|
||||
* interface TodoAngularMeteorObject extends ITodo, AngularMeteorObject<ITodo> { }
|
||||
* var todo = <TodoAngularMeteorObject>$meteor.object(TodoCollection, 'TodoID');
|
||||
*/
|
||||
interface AngularMeteorObject<T> {
|
||||
/**
|
||||
* @param [doc] - The doc to save to the Meteor Object. If nothing is passed, the method saves everything in the AngularMeteorObject as is.
|
||||
* - Unchanged properties will be overridden with their existing values, which may trigger hooks.
|
||||
* - If doc is passed, the method only updates the Meteor Object with the properties passed, and no other changes will be saved.
|
||||
*
|
||||
* @return Returns a promise with an error in case for an error or a number of successful docs changed in case of success.
|
||||
*/
|
||||
save(doc?: T): angular.IPromise<number>;
|
||||
|
||||
/**
|
||||
* Reset the current value of the object to the one in the server.
|
||||
*/
|
||||
reset(): void;
|
||||
|
||||
/**
|
||||
* Returns a copy of the AngularMeteorObject with all the AngularMeteor-specific internal properties removed.
|
||||
* The returned object is then safe to use as a parameter for method calls, or anywhere else where the data needs to be converted to JSON.
|
||||
*/
|
||||
getRawObject(): T;
|
||||
|
||||
/**
|
||||
* A shorten (Syntactic sugar) function for the $meteor.subscribe function.
|
||||
* Takes only one parameter and not returns a promise like $meteor.subscribe does.
|
||||
*
|
||||
* @param subscriptionName - The subscription name to subscribe to. Exactly like the first parameter in $meteor.subscribe service.
|
||||
*/
|
||||
subscribe(subscriptionName:string): AngularMeteorObject<T>;
|
||||
}
|
||||
|
||||
/**
|
||||
* An object that connects a Meteor Collection to an AngularJS scope variable
|
||||
*/
|
||||
interface AngularMeteorCollection<T> extends AngularMeteorCollection2<T, T> { }
|
||||
|
||||
/**
|
||||
* An object that connects a Meteor Collection to an AngularJS scope variable,
|
||||
* but can use a differen type for updates.
|
||||
*/
|
||||
interface AngularMeteorCollection2<T, U> extends Array<T> {
|
||||
/**
|
||||
* @param [docs] - The docs to save to the Meteor Collection.
|
||||
* - If the docs parameter is empty, the method saves everything in the AngularMeteorCollection as is.
|
||||
* - If an object is passed, the method pushes that object into the AngularMeteorCollection.
|
||||
* - If an array is passed, the method pushes all objects in the array into the AngularMeteorCollection.
|
||||
*/
|
||||
save(docs?: U|U[]): void;
|
||||
|
||||
/**
|
||||
* @param [keys] - The keys of the object to remove from the Meteor Collection.
|
||||
* - If nothing is passed, the method removes all the documents from the AngularMeteorCollection.
|
||||
* - If an object is passed, the method removes the object with that key from the AngularMeteorCollection.
|
||||
* - If an array is passed, the method removes all objects that matches the keys in the array from the AngularMeteorCollection.
|
||||
*/
|
||||
remove(keys?: U|string|number|string[]|number[]): void;
|
||||
|
||||
/**
|
||||
* A shorten (Syntactic sugar) function for the $meteor.subscribe function.
|
||||
* Takes only one parameter and not returns a promise like $meteor.subscribe does.
|
||||
*
|
||||
* @param subscriptionName - The subscription name to subscribe to. Exactly like the first parameter in $meteor.subscribe service.
|
||||
*/
|
||||
subscribe(subscriptionName:string): AngularMeteorCollection2<T, U>;
|
||||
}
|
||||
|
||||
interface ILoginWithExternalService {
|
||||
(options: Meteor.LoginWithExternalServiceOptions): angular.IPromise<void>;
|
||||
}
|
||||
|
||||
interface ReactiveResult { }
|
||||
}
|
||||
@@ -0,0 +1,188 @@
|
||||
/// <reference path="angular-odata-resources.d.ts" />
|
||||
|
||||
interface IMyResource extends OData.IResource<IMyResource> { };
|
||||
interface IMyResourceClass extends OData.IResourceClass<IMyResource> { };
|
||||
|
||||
///////////////////////////////////////
|
||||
// IActionDescriptor
|
||||
///////////////////////////////////////
|
||||
var actionDescriptor: OData.IActionDescriptor;
|
||||
|
||||
actionDescriptor.url = '/api/test-url/'
|
||||
actionDescriptor.headers = { header: 'value' };
|
||||
actionDescriptor.isArray = true;
|
||||
actionDescriptor.method = 'method action';
|
||||
actionDescriptor.params = { key: 'value' };
|
||||
|
||||
///////////////////////////////////////
|
||||
// IResourceClass
|
||||
///////////////////////////////////////
|
||||
var resourceClass: IMyResourceClass;
|
||||
var resource: IMyResource;
|
||||
var resourceArray: OData.IResourceArray<IMyResource>;
|
||||
|
||||
resource = resourceClass.delete();
|
||||
resource = resourceClass.delete({ key: 'value' });
|
||||
resource = resourceClass.delete({ key: 'value' }, function() { });
|
||||
resource = resourceClass.delete(function() { });
|
||||
resource = resourceClass.delete(function() { }, function() { });
|
||||
resource = resourceClass.delete({ key: 'value' }, { key: 'value' });
|
||||
resource = resourceClass.delete({ key: 'value' }, { key: 'value' }, function() { });
|
||||
resource = resourceClass.delete({ key: 'value' }, { key: 'value' }, function() { }, function() { });
|
||||
resource.$promise.then(function(data: IMyResource) { });
|
||||
|
||||
resource = resourceClass.get();
|
||||
resource = resourceClass.get({ key: 'value' });
|
||||
resource = resourceClass.get({ key: 'value' }, function() { });
|
||||
resource = resourceClass.get(function() { });
|
||||
resource = resourceClass.get(function() { }, function() { });
|
||||
resource = resourceClass.get({ key: 'value' }, { key: 'value' });
|
||||
resource = resourceClass.get({ key: 'value' }, { key: 'value' }, function() { });
|
||||
resource = resourceClass.get({ key: 'value' }, { key: 'value' }, function() { }, function() { });
|
||||
|
||||
resourceArray = resourceClass.query();
|
||||
resourceArray = resourceClass.query({ key: 'value' });
|
||||
resourceArray = resourceClass.query({ key: 'value' }, function() { });
|
||||
resourceArray = resourceClass.query(function() { });
|
||||
resourceArray = resourceClass.query(function() { }, function() { });
|
||||
resourceArray = resourceClass.query({ key: 'value' }, { key: 'value' });
|
||||
resourceArray = resourceClass.query({ key: 'value' }, { key: 'value' }, function() { });
|
||||
resourceArray = resourceClass.query({ key: 'value' }, { key: 'value' }, function() { }, function() { });
|
||||
resourceArray.push(resource);
|
||||
resourceArray.$promise.then(function(data: OData.IResourceArray<IMyResource>) { });
|
||||
|
||||
resource = resourceClass.remove();
|
||||
resource = resourceClass.remove({ key: 'value' });
|
||||
resource = resourceClass.remove({ key: 'value' }, function() { });
|
||||
resource = resourceClass.remove(function() { });
|
||||
resource = resourceClass.remove(function() { }, function() { });
|
||||
resource = resourceClass.remove({ key: 'value' }, { key: 'value' });
|
||||
resource = resourceClass.remove({ key: 'value' }, { key: 'value' }, function() { });
|
||||
resource = resourceClass.remove({ key: 'value' }, { key: 'value' }, function() { }, function() { });
|
||||
|
||||
resource = resourceClass.save();
|
||||
resource = resourceClass.save({ key: 'value' });
|
||||
resource = resourceClass.save({ key: 'value' }, function() { });
|
||||
resource = resourceClass.save(function() { });
|
||||
resource = resourceClass.save(function() { }, function() { });
|
||||
resource = resourceClass.save({ key: 'value' }, { key: 'value' });
|
||||
resource = resourceClass.save({ key: 'value' }, { key: 'value' }, function() { });
|
||||
resource = resourceClass.save({ key: 'value' }, { key: 'value' }, function() { }, function() { });
|
||||
|
||||
///////////////////////////////////////
|
||||
// IResource
|
||||
///////////////////////////////////////
|
||||
|
||||
var promise: angular.IPromise<IMyResource>;
|
||||
var arrayPromise: angular.IPromise<IMyResource[]>;
|
||||
|
||||
promise = resource.$delete();
|
||||
promise = resource.$delete({ key: 'value' });
|
||||
promise = resource.$delete({ key: 'value' }, function() { });
|
||||
promise = resource.$delete(function() { });
|
||||
promise = resource.$delete(function() { }, function() { });
|
||||
promise = resource.$delete({ key: 'value' }, function() { }, function() { });
|
||||
promise.then(function(data: IMyResource) { });
|
||||
|
||||
promise = resource.$get();
|
||||
promise = resource.$get({ key: 'value' });
|
||||
promise = resource.$get({ key: 'value' }, function() { });
|
||||
promise = resource.$get(function() { });
|
||||
promise = resource.$get(function() { }, function() { });
|
||||
promise = resource.$get({ key: 'value' }, function() { }, function() { });
|
||||
|
||||
arrayPromise = resourceArray[0].$query();
|
||||
arrayPromise = resourceArray[0].$query({ key: 'value' });
|
||||
arrayPromise = resourceArray[0].$query({ key: 'value' }, function() { });
|
||||
arrayPromise = resourceArray[0].$query(function() { });
|
||||
arrayPromise = resourceArray[0].$query(function() { }, function() { });
|
||||
arrayPromise = resourceArray[0].$query({ key: 'value' }, function() { }, function() { });
|
||||
arrayPromise.then(function(data: OData.IResourceArray<IMyResource>) { });
|
||||
|
||||
promise = resource.$remove();
|
||||
promise = resource.$remove({ key: 'value' });
|
||||
promise = resource.$remove({ key: 'value' }, function() { });
|
||||
promise = resource.$remove(function() { });
|
||||
promise = resource.$remove(function() { }, function() { });
|
||||
promise = resource.$remove({ key: 'value' }, function() { }, function() { });
|
||||
|
||||
promise = resource.$save();
|
||||
promise = resource.$save({ key: 'value' });
|
||||
promise = resource.$save({ key: 'value' }, function() { });
|
||||
promise = resource.$save(function() { });
|
||||
promise = resource.$save(function() { }, function() { });
|
||||
promise = resource.$save({ key: 'value' }, function() { }, function() { });
|
||||
|
||||
///////////////////////////////////////
|
||||
// IResourceService
|
||||
///////////////////////////////////////
|
||||
var resourceService: OData.IResourceService;
|
||||
resourceClass = resourceService<IMyResource, IMyResourceClass>('test');
|
||||
resourceClass = resourceService<IMyResource>('test');
|
||||
resourceClass = resourceService('test');
|
||||
|
||||
///////////////////////////////////////
|
||||
// IModule
|
||||
///////////////////////////////////////
|
||||
var mod: ng.IModule;
|
||||
var resourceServiceFactoryFunction: OData.IResourceServiceFactoryFunction<IMyResource>;
|
||||
var resourceService: OData.IResourceService;
|
||||
|
||||
resourceClass = resourceServiceFactoryFunction<IMyResourceClass>(resourceService);
|
||||
|
||||
resourceServiceFactoryFunction = function(resourceService: OData.IResourceService) { return <any>resourceClass; };
|
||||
mod = mod.factory('factory name', resourceServiceFactoryFunction);
|
||||
|
||||
///////////////////////////////////////
|
||||
// IResource
|
||||
///////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////
|
||||
// IResourceServiceProvider
|
||||
///////////////////////////////////////
|
||||
var resourceServiceProvider: OData.IResourceServiceProvider;
|
||||
resourceServiceProvider.defaults.stripTrailingSlashes = false;
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////
|
||||
// OData
|
||||
///////////////////////////////////////
|
||||
|
||||
interface User extends OData.IResource<User> {
|
||||
name: string;
|
||||
}
|
||||
|
||||
var resourceService: OData.IResourceService;
|
||||
var odataResourceClass = resourceService<User>("my/url", {}, {}, { odata: { method: 'POST' } });
|
||||
|
||||
var Value: OData.ValueFactory;
|
||||
var Property: OData.PropertyFactory;
|
||||
var Predicate: OData.PredicateFactory;
|
||||
|
||||
var users = odataResourceClass.odata().query();
|
||||
|
||||
users[0].name;
|
||||
users[0].$save;
|
||||
|
||||
var user = odataResourceClass.odata()
|
||||
.filter(new Value("1", OData.ValueTypes.Int32), new Property("abc"))
|
||||
.filter("Name", "John")
|
||||
.filter("Age", ">", 20)
|
||||
.skip(10)
|
||||
.take(20)
|
||||
.orderBy("Name", "desc")
|
||||
.single();
|
||||
user.$save();
|
||||
|
||||
var predicate1 = new Predicate("a", "b");
|
||||
var predicate2 = new Predicate("c", "d");
|
||||
var predicate3 = new Predicate("Age", '>', 10);
|
||||
|
||||
var combination1 = Predicate.or([predicate1, predicate2]);
|
||||
var combination2 = Predicate.and([combination1, predicate2]);
|
||||
|
||||
var predicate = new Predicate("FirstName", "John")
|
||||
.or(new Predicate("LastName", '!=', "Doe"))
|
||||
.and(new Predicate("Age", '>', 10));
|
||||
@@ -0,0 +1,304 @@
|
||||
// Type definitions for OData Angular Resources
|
||||
// Project: https://github.com/devnixs/ODataAngularResources
|
||||
// Definitions by: Raphael ATALLAH <http://raphael.atallah.me>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
|
||||
declare module OData {
|
||||
|
||||
/**
|
||||
* Currently supported options for the $resource factory options argument.
|
||||
*/
|
||||
interface IResourceOptions {
|
||||
/**
|
||||
* If true then the trailing slashes from any calculated URL will be stripped (defaults to true)
|
||||
*/
|
||||
stripTrailingSlashes?: boolean;
|
||||
odata?: {
|
||||
url?: string;
|
||||
method?: string;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ResourceService
|
||||
// see http://docs.angularjs.org/api/ngResource.$resource
|
||||
// Most part of the following definitions were achieved by analyzing the
|
||||
// actual implementation, since the documentation doesn't seem to cover
|
||||
// that deeply.
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IResourceService {
|
||||
(url: string, paramDefaults?: any,
|
||||
/** example: {update: { method: 'PUT' }, delete: deleteDescriptor }
|
||||
where deleteDescriptor : IActionDescriptor */
|
||||
actions?: any, options?: IResourceOptions): IResourceClass<IResource<any>>;
|
||||
<T, U>(url: string, paramDefaults?: any,
|
||||
/** example: {update: { method: 'PUT' }, delete: deleteDescriptor }
|
||||
where deleteDescriptor : IActionDescriptor */
|
||||
actions?: any, options?: IResourceOptions): U;
|
||||
<T>(url: string, paramDefaults?: any,
|
||||
/** example: {update: { method: 'PUT' }, delete: deleteDescriptor }
|
||||
where deleteDescriptor : IActionDescriptor */
|
||||
actions?: any, options?: IResourceOptions): IResourceClass<T>;
|
||||
}
|
||||
|
||||
// Just a reference to facilitate describing new actions
|
||||
interface IActionDescriptor {
|
||||
url?: string;
|
||||
method: string;
|
||||
isArray?: boolean;
|
||||
params?: any;
|
||||
headers?: any;
|
||||
}
|
||||
|
||||
// Baseclass for everyresource with default actions.
|
||||
// If you define your new actions for the resource, you will need
|
||||
// to extend this interface and typecast the ResourceClass to it.
|
||||
//
|
||||
// In case of passing the first argument as anything but a function,
|
||||
// it's gonna be considered data if the action method is POST, PUT or
|
||||
// PATCH (in other words, methods with body). Otherwise, it's going
|
||||
// to be considered as parameters to the request.
|
||||
// https://github.com/angular/angular.js/blob/v1.2.0/src/ngResource/resource.js#L461-L465
|
||||
//
|
||||
// Only those methods with an HTTP body do have 'data' as first parameter:
|
||||
// https://github.com/angular/angular.js/blob/v1.2.0/src/ngResource/resource.js#L463
|
||||
// More specifically, those methods are POST, PUT and PATCH:
|
||||
// https://github.com/angular/angular.js/blob/v1.2.0/src/ngResource/resource.js#L432
|
||||
//
|
||||
// Also, static calls always return the IResource (or IResourceArray) retrieved
|
||||
// https://github.com/angular/angular.js/blob/v1.2.0/src/ngResource/resource.js#L538-L549
|
||||
interface IResourceClass<T> {
|
||||
new(dataOrParams? : any) : IResource<T>;
|
||||
get(): IResource<T>;
|
||||
get(params: Object): IResource<T>;
|
||||
get(success: Function, error?: Function): IResource<T>;
|
||||
get(params: Object, success: Function, error?: Function): IResource<T>;
|
||||
get(params: Object, data: Object, success?: Function, error?: Function): IResource<T>;
|
||||
|
||||
query(): IResourceArray<T>;
|
||||
query(params: Object): IResourceArray<T>;
|
||||
query(success: Function, error?: Function): IResourceArray<T>;
|
||||
query(params: Object, success: Function, error?: Function): IResourceArray<T>;
|
||||
query(params: Object, data: Object, success?: Function, error?: Function): IResourceArray<T>;
|
||||
|
||||
save(): IResource<T>;
|
||||
save(data: Object): IResource<T>;
|
||||
save(success: Function, error?: Function): IResource<T>;
|
||||
save(data: Object, success: Function, error?: Function): IResource<T>;
|
||||
save(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>;
|
||||
remove(params: Object, success: Function, error?: Function): IResource<T>;
|
||||
remove(params: Object, data: Object, success?: Function, error?: Function): IResource<T>;
|
||||
|
||||
delete(): IResource<T>;
|
||||
delete(params: Object): IResource<T>;
|
||||
delete(success: Function, error?: Function): IResource<T>;
|
||||
delete(params: Object, success: Function, error?: Function): IResource<T>;
|
||||
delete(params: Object, data: Object, success?: Function, error?: Function): IResource<T>;
|
||||
|
||||
odata(): OData.Provider<T>;
|
||||
}
|
||||
|
||||
// Instance calls always return the the promise of the request which retrieved the object
|
||||
// https://github.com/angular/angular.js/blob/v1.2.0/src/ngResource/resource.js#L538-L546
|
||||
interface IResource<T> {
|
||||
$get(): angular.IPromise<T>;
|
||||
$get(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
|
||||
$get(success: Function, error?: Function): angular.IPromise<T>;
|
||||
|
||||
$query(): angular.IPromise<IResourceArray<T>>;
|
||||
$query(params?: Object, success?: Function, error?: Function): angular.IPromise<IResourceArray<T>>;
|
||||
$query(success: Function, error?: Function): angular.IPromise<IResourceArray<T>>;
|
||||
|
||||
$save(): angular.IPromise<T>;
|
||||
$save(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
|
||||
$save(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>;
|
||||
|
||||
$delete(): angular.IPromise<T>;
|
||||
$delete(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
|
||||
$delete(success: Function, error?: Function): angular.IPromise<T>;
|
||||
|
||||
/** the promise of the original server interaction that created this instance. **/
|
||||
$promise: angular.IPromise<T>;
|
||||
$resolved: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Really just a regular Array object with $promise and $resolve attached to it
|
||||
*/
|
||||
interface IResourceArray<T> extends Array<T> {
|
||||
/** the promise of the original server interaction that created this collection. **/
|
||||
$promise: angular.IPromise<IResourceArray<T>>;
|
||||
$resolved: boolean;
|
||||
}
|
||||
|
||||
/** when creating a resource factory via IModule.factory */
|
||||
interface IResourceServiceFactoryFunction<T> {
|
||||
($resource: OData.IResourceService): IResourceClass<T>;
|
||||
<U extends IResourceClass<T>>($resource: OData.IResourceService): U;
|
||||
}
|
||||
|
||||
// IResourceServiceProvider used to configure global settings
|
||||
interface IResourceServiceProvider extends angular.IServiceProvider {
|
||||
|
||||
defaults: IResourceOptions;
|
||||
}
|
||||
|
||||
|
||||
interface IExecutable {
|
||||
execute(noParenthesis?: any): string;
|
||||
}
|
||||
class Global {
|
||||
static $inject: string[];
|
||||
constructor(ODataBinaryOperation: any, ODataProvider: any, ODataValue: any, ODataProperty: any, ODataMethodCall: any, ODataPredicate: any, ODataOrderByStatement: any);
|
||||
Provider: Provider<any>;
|
||||
BinaryOperation: typeof BinaryOperation;
|
||||
Value: typeof Value;
|
||||
Property: typeof Property;
|
||||
Func: typeof MethodCall;
|
||||
Predicate: typeof Predicate;
|
||||
OrderBy: typeof OrderByStatement;
|
||||
}
|
||||
|
||||
interface BinaryOperationFactory {
|
||||
new (propertyOrPredicate: any, valueOrOperator?: any, value?: any): BinaryOperation;
|
||||
}
|
||||
class BinaryOperation implements IExecutable {
|
||||
private operandA;
|
||||
private operandB;
|
||||
private filterOperator;
|
||||
constructor(propertyOrPredicate: any, valueOrOperator?: any, value?: any);
|
||||
execute(noParenthesis?: any): string;
|
||||
or(propertyOrPredicate: any, operatorOrValue?: any, value?: any): BinaryOperation;
|
||||
and(propertyOrPredicate: any, operatorOrValue?: any, value?: any): BinaryOperation;
|
||||
}
|
||||
|
||||
interface MethodCallFactory {
|
||||
new (methodName: string, ...args: any[]): MethodCall;
|
||||
}
|
||||
class MethodCall implements IExecutable {
|
||||
private methodName;
|
||||
private params;
|
||||
execute(): string;
|
||||
constructor(methodName: string, ...args: any[]);
|
||||
}
|
||||
|
||||
class Operators {
|
||||
operators: {
|
||||
'eq': string[];
|
||||
'ne': string[];
|
||||
'gt': string[];
|
||||
'ge': string[];
|
||||
'lt': string[];
|
||||
'le': string[];
|
||||
'and': string[];
|
||||
'or': string[];
|
||||
'not': string[];
|
||||
'add': string[];
|
||||
'sub': string[];
|
||||
'mul': string[];
|
||||
'div': string[];
|
||||
'mod': string[];
|
||||
};
|
||||
private rtrim;
|
||||
private trim(value);
|
||||
convert(from: string): any;
|
||||
}
|
||||
|
||||
interface OrderByStatementFactory {
|
||||
new (propertyName: string, sortOrder?: string): OrderByStatement;
|
||||
}
|
||||
class OrderByStatement implements IExecutable {
|
||||
private propertyName;
|
||||
private direction;
|
||||
execute(): string;
|
||||
constructor(propertyName: string, sortOrder?: string);
|
||||
}
|
||||
|
||||
interface PredicateFactory {
|
||||
new (propertyOrValueOrPredicate: any, valueOrOperator?: any, value?: any): Predicate;
|
||||
or(orStatements: any[]): IExecutable;
|
||||
create(propertyOrPredicate: any, operatorOrValue?: any, value?: any): IExecutable;
|
||||
and(andStatements: any): IExecutable;
|
||||
}
|
||||
class Predicate extends BinaryOperation {
|
||||
constructor(propertyOrValueOrPredicate: any, valueOrOperator?: any, value?: any);
|
||||
static or(orStatements: any[]): IExecutable;
|
||||
static create(propertyOrPredicate: any, operatorOrValue?: any, value?: any): IExecutable;
|
||||
static and(andStatements: any): IExecutable;
|
||||
}
|
||||
|
||||
interface PropertyFactory {
|
||||
new (value: string): Property;
|
||||
}
|
||||
class Property implements IExecutable {
|
||||
private value;
|
||||
constructor(value: string);
|
||||
execute(): string;
|
||||
}
|
||||
|
||||
interface ProviderFactory {
|
||||
new <T>(callback: ProviderCallback<T>): Provider<T>;
|
||||
}
|
||||
interface ProviderCallback<T> {
|
||||
(queryString: string, success: () => any, error: () => any): T[];
|
||||
(queryString: string, success: () => any, error: () => any, isSingleElement?: boolean, forceSingleElement?: boolean): T;
|
||||
}
|
||||
class Provider<T> {
|
||||
private callback;
|
||||
private filters;
|
||||
private sortOrders;
|
||||
private takeAmount;
|
||||
private skipAmount;
|
||||
private expandables;
|
||||
constructor(callback: ProviderCallback<T>);
|
||||
filter(operand1: any, operand2?: any, operand3?: any): Provider<T>;
|
||||
orderBy(arg1: any, arg2?: any): Provider<T>;
|
||||
take(amount: number): Provider<T>;
|
||||
skip(amount: number): Provider<T>;
|
||||
private execute();
|
||||
query(success?: any, error?: any): T[];
|
||||
single(success?: any, error?: any): T;
|
||||
get(data: any, success?: any, error?: any): T;
|
||||
expand(params: any, otherParam1?: any, otherParam2?: any, otherParam3?: any, otherParam4?: any, otherParam5?: any, otherParam6?: any, otherParam7?: any): Provider<T>;
|
||||
}
|
||||
|
||||
interface ValueFactory {
|
||||
new (value: any, type?: string): Value;
|
||||
}
|
||||
class ValueTypes {
|
||||
static Boolean: string;
|
||||
static Byte: string;
|
||||
static DateTime: string;
|
||||
static Decimal: string;
|
||||
static Double: string;
|
||||
static Single: string;
|
||||
static Guid: string;
|
||||
static Int32: string;
|
||||
static String: string;
|
||||
}
|
||||
class Value {
|
||||
private value;
|
||||
private type;
|
||||
private illegalChars;
|
||||
private escapeIllegalChars(haystack);
|
||||
private generateDate(date);
|
||||
executeWithUndefinedType(): any;
|
||||
executeWithType(): any;
|
||||
execute(): string;
|
||||
constructor(value: any, type?: string);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
+13
-12
@@ -564,7 +564,7 @@ declare module protractor {
|
||||
*/
|
||||
element(subLocator: webdriver.Locator): ElementFinder;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Calls to element may be chained to find an array of elements within a parent.
|
||||
*
|
||||
* @alias element(locator).all(locator)
|
||||
@@ -652,7 +652,7 @@ declare module protractor {
|
||||
/**
|
||||
* Override for WebElement.prototype.isElementPresent so that protractor waits
|
||||
* for Angular to settle before making the check.
|
||||
*
|
||||
*
|
||||
* @see ElementFinder.isPresent
|
||||
*
|
||||
* @param {webdriver.Locator} subLocator Locator for element to look for.
|
||||
@@ -879,7 +879,7 @@ declare module protractor {
|
||||
* filteredElements[0].click();
|
||||
* });
|
||||
*
|
||||
* @param {function(ElementFinder, number): webdriver.WebElement.Promise} filterFn
|
||||
* @param {function(ElementFinder, number): webdriver.WebElement.Promise} filterFn
|
||||
* Filter function that will test if an element should be returned.
|
||||
* filterFn can either return a boolean or a promise that resolves to a boolean.
|
||||
* @return {!ElementArrayFinder} A ElementArrayFinder that represents an array
|
||||
@@ -888,11 +888,11 @@ declare module protractor {
|
||||
filter(filterFn: (element: ElementFinder, index: number) => any): ElementArrayFinder;
|
||||
|
||||
/**
|
||||
* Apply a reduce function against an accumulator and every element found
|
||||
* Apply a reduce function against an accumulator and every element found
|
||||
* using the locator (from left-to-right). The reduce function has to reduce
|
||||
* every element into a single value (the accumulator). Returns promise of
|
||||
* the accumulator. The reduce function receives the accumulator, current
|
||||
* ElementFinder, the index, and the entire array of ElementFinders,
|
||||
* every element into a single value (the accumulator). Returns promise of
|
||||
* the accumulator. The reduce function receives the accumulator, current
|
||||
* ElementFinder, the index, and the entire array of ElementFinders,
|
||||
* respectively.
|
||||
*
|
||||
* @alias element.all(locator).reduce(reduceFn)
|
||||
@@ -912,11 +912,11 @@ declare module protractor {
|
||||
*
|
||||
* expect(value).toEqual('First Second Third ');
|
||||
*
|
||||
* @param {function(number, ElementFinder, number, Array.<ElementFinder>)}
|
||||
* @param {function(number, ElementFinder, number, Array.<ElementFinder>)}
|
||||
* reduceFn Reduce function that reduces every element into a single value.
|
||||
* @param {*} initialValue Initial value of the accumulator.
|
||||
* @param {*} initialValue Initial value of the accumulator.
|
||||
* @return {!webdriver.promise.Promise} A promise that resolves to the final
|
||||
* value of the accumulator.
|
||||
* value of the accumulator.
|
||||
*/
|
||||
reduce<T>(reduceFn: (acc: T, element: ElementFinder, index: number, arr: ElementFinder[]) => webdriver.promise.Promise<T>, initialValue: T): webdriver.promise.Promise<T>;
|
||||
reduce<T>(reduceFn: (acc: T, element: ElementFinder, index: number, arr: ElementFinder[]) => T, initialValue: T): webdriver.promise.Promise<T>;
|
||||
@@ -924,7 +924,7 @@ declare module protractor {
|
||||
/**
|
||||
* Represents the ElementArrayFinder as an array of ElementFinders.
|
||||
*
|
||||
* @return {Array.<ElementFinder>} Return a promise, which resolves to a list
|
||||
* @return {Array.<ElementFinder>} Return a promise, which resolves to a list
|
||||
* of ElementFinders specified by the locator.
|
||||
*/
|
||||
asElementFinders_(): ElementFinder[];
|
||||
@@ -1221,6 +1221,7 @@ declare module protractor {
|
||||
|
||||
interface LocatorWithColumn extends webdriver.Locator {
|
||||
column(index: number): webdriver.Locator;
|
||||
column(name: string): webdriver.Locator;
|
||||
}
|
||||
|
||||
interface RepeaterLocator extends LocatorWithColumn {
|
||||
@@ -1299,7 +1300,7 @@ declare module protractor {
|
||||
* expect(element(by.exactBinding('person_phone')).isPresent()).toBe(true);
|
||||
* expect(element(by.exactBinding('person_phone|uppercase')).isPresent()).toBe(true);
|
||||
* expect(element(by.exactBinding('phone')).isPresent()).toBe(false);
|
||||
*
|
||||
*
|
||||
* @param {string} bindingDescriptor
|
||||
* @return {{findElementsOverride: findElementsOverride, toString: Function|string}}
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/// <reference path='../angularjs/angular.d.ts' />
|
||||
/// <reference path='angular-storage.d.ts' />
|
||||
|
||||
// Samples taken from the a0-angular-storage Readme.md
|
||||
|
||||
var app = angular.module('angular-storage-tests', ['angular-storage']);
|
||||
|
||||
angular.module('angular-storage-tests')
|
||||
.controller('StoreController', function(store: angular.a0.storage.IStoreService) {
|
||||
var myObj = {
|
||||
name: 'mgonto'
|
||||
};
|
||||
|
||||
store.set('obj', myObj);
|
||||
|
||||
var myNewObject = store.get('obj');
|
||||
|
||||
console.log('Should be true: ', angular.equals(myNewObject, myObj));
|
||||
|
||||
store.remove('obj');
|
||||
|
||||
store.set('number', 2);
|
||||
|
||||
console.log('Should be true: ', typeof(store.get('number')) === 'number');
|
||||
})
|
||||
.factory('Auth0Store', function(store: angular.a0.storage.IStoreService) {
|
||||
return store.getNamespacedStore('auth0');
|
||||
})
|
||||
.controller('NamespacedStoreController', function(Auth0Store: angular.a0.storage.INamespacedStoreService) {
|
||||
|
||||
var myObj = {
|
||||
name: 'mgonto'
|
||||
};
|
||||
|
||||
// This will be saved in localStorage as auth0.obj
|
||||
Auth0Store.set('obj', myObj);
|
||||
|
||||
// This will look for auth0.obj
|
||||
var myNewObject = Auth0Store.get('obj');
|
||||
|
||||
console.log('Should be true: ', angular.equals(myNewObject, myObj));
|
||||
});;
|
||||
|
||||
Vendored
+53
@@ -0,0 +1,53 @@
|
||||
// Type definitions for angular-storage v0.0.11
|
||||
// Project: https://github.com/auth0/angular-storage
|
||||
// Definitions by: Matthew DeKrey <https://github.com/mdekrey>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module angular.a0.storage {
|
||||
interface IStoreService extends INamespacedStoreService {
|
||||
/**
|
||||
* Returns a namespaced store
|
||||
*
|
||||
* @param {String} namespace - The namespace
|
||||
* @param {String} storage - The name of the storage service. Defaults to local storage.
|
||||
* @param {String} delimiter - The delimiter to use to separate the namespace and the keys.
|
||||
* @returns {INamespacedStoreService}
|
||||
*/
|
||||
getNamespacedStore(namespace: string, storage?: string, delimiter?: string): INamespacedStoreService;
|
||||
}
|
||||
|
||||
interface INamespacedStoreService {
|
||||
/**
|
||||
* Sets a new value to the storage with the key name. It can be any object.
|
||||
*
|
||||
* @param {String} name - The key name for the location of the value
|
||||
* @param value - The value to store
|
||||
*/
|
||||
set(name: string, value: any): void;
|
||||
|
||||
/**
|
||||
* Returns the saved value with they key name.
|
||||
*
|
||||
* @param {String} name - The key name for the location of the value
|
||||
* @returns The saved value; if you saved an object, you get an object
|
||||
*/
|
||||
get(name: string): any;
|
||||
|
||||
/**
|
||||
* Deletes the saved value with the key name
|
||||
*
|
||||
* @param {String} name - The key name for the location of the value to remove
|
||||
*/
|
||||
remove(name: string): void;
|
||||
}
|
||||
|
||||
interface IStoreProvider {
|
||||
|
||||
/**
|
||||
* Sets the storage.
|
||||
*
|
||||
* @param {String} storage - The storage name
|
||||
*/
|
||||
setStore(storage: string): void;
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
var app = angular.module('at', ['pascalprecht.translate']);
|
||||
|
||||
app.config(($translateProvider: ng.translate.ITranslateProvider) => {
|
||||
app.config(($translateProvider: angular.translate.ITranslateProvider) => {
|
||||
$translateProvider.translations('en', {
|
||||
TITLE: 'Hello',
|
||||
FOO: 'This is a paragraph.',
|
||||
@@ -22,7 +22,7 @@ interface Scope extends ng.IScope {
|
||||
changeLanguage(key: any): void;
|
||||
}
|
||||
|
||||
app.controller('Ctrl', ($scope: Scope, $translate: ng.translate.ITranslateService) => {
|
||||
app.controller('Ctrl', ($scope: Scope, $translate: angular.translate.ITranslateService) => {
|
||||
$scope['changeLanguage'] = function (key: any) {
|
||||
$translate.use(key);
|
||||
};
|
||||
|
||||
+28
-14
@@ -5,14 +5,13 @@
|
||||
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
|
||||
declare module "angular-translate" {
|
||||
var _: string;
|
||||
export = _;
|
||||
}
|
||||
|
||||
declare module angular.translate {
|
||||
|
||||
interface ITranslatePartialLoaderService {
|
||||
addPart(name: string): ITranslatePartialLoaderService;
|
||||
deletePart(name: string, removeData?: boolean): ITranslatePartialLoaderService;
|
||||
isPartAvailable(name: string): boolean;
|
||||
}
|
||||
|
||||
|
||||
interface ITranslationTable {
|
||||
[key: string]: string;
|
||||
}
|
||||
@@ -26,15 +25,30 @@ declare module angular.translate {
|
||||
set(name: string, value: string): void;
|
||||
}
|
||||
|
||||
interface ISTaticFilesLoaderOptions {
|
||||
interface IStaticFilesLoaderOptions {
|
||||
prefix: string;
|
||||
suffix: string;
|
||||
key?: string;
|
||||
}
|
||||
|
||||
interface IPartialLoader<T> {
|
||||
addPart(name : string, priority? : number) : T;
|
||||
deletePart(name : string) : T;
|
||||
isPartAvailable(name : string) : boolean;
|
||||
}
|
||||
|
||||
interface ITranslatePartialLoaderService extends IPartialLoader<ITranslatePartialLoaderService> {
|
||||
getRegisteredParts() : Array<string>;
|
||||
isPartLoaded(name : string, lang : string) : boolean;
|
||||
}
|
||||
|
||||
interface ITranslatePartialLoaderProvider extends angular.IServiceProvider, IPartialLoader<ITranslatePartialLoaderProvider> {
|
||||
setPart(lang : string, part : string, table : ITranslationTable) : ITranslatePartialLoaderProvider;
|
||||
}
|
||||
|
||||
interface ITranslateService {
|
||||
(translationId: string, interpolateParams?: any, interpolationId?: string): ng.IPromise<string>;
|
||||
(translationId: string[], interpolateParams?: any, interpolationId?: string): ng.IPromise<{ [key: string]: string }>;
|
||||
(translationId: string, interpolateParams?: any, interpolationId?: string): angular.IPromise<string>;
|
||||
(translationId: string[], interpolateParams?: any, interpolationId?: string): angular.IPromise<{ [key: string]: string }>;
|
||||
cloakClassName(): string;
|
||||
cloakClassName(name: string): ITranslateProvider;
|
||||
fallbackLanguage(langKey?: string): string;
|
||||
@@ -44,17 +58,17 @@ declare module angular.translate {
|
||||
isPostCompilingEnabled(): boolean;
|
||||
preferredLanguage(langKey?: string): string;
|
||||
proposedLanguage(): string;
|
||||
refresh(langKey?: string): ng.IPromise<void>;
|
||||
refresh(langKey?: string): angular.IPromise<void>;
|
||||
storage(): IStorage;
|
||||
storageKey(): string;
|
||||
use(): string;
|
||||
use(key: string): ng.IPromise<string>;
|
||||
use(key: string): angular.IPromise<string>;
|
||||
useFallbackLanguage(langKey?: string): void;
|
||||
versionInfo(): string;
|
||||
loaderCache(): any;
|
||||
}
|
||||
|
||||
interface ITranslateProvider extends ng.IServiceProvider {
|
||||
interface ITranslateProvider extends angular.IServiceProvider {
|
||||
translations(): ITranslationTable;
|
||||
translations(key: string, translationTable: ITranslationTable): ITranslateProvider;
|
||||
cloakClassName(): string;
|
||||
@@ -78,7 +92,7 @@ declare module angular.translate {
|
||||
storageKey(): string;
|
||||
storageKey(key: string): void; // JeroMiya - the library should probably return ITranslateProvider but it doesn't here
|
||||
useUrlLoader(url: string): ITranslateProvider;
|
||||
useStaticFilesLoader(options: ISTaticFilesLoaderOptions): ITranslateProvider;
|
||||
useStaticFilesLoader(options: IStaticFilesLoaderOptions): ITranslateProvider;
|
||||
useLoader(loaderFactory: string, options: any): ITranslateProvider;
|
||||
useLocalStorage(): ITranslateProvider;
|
||||
useCookieStorage(): ITranslateProvider;
|
||||
|
||||
@@ -131,6 +131,7 @@ testApp.controller('TestCtrl', (
|
||||
var modalInstance = $modal.open({
|
||||
backdrop: 'static',
|
||||
controller: 'ModalTestCtrl',
|
||||
controllerAs: 'vm',
|
||||
keyboard: true,
|
||||
resolve: {
|
||||
items: ()=> {
|
||||
@@ -140,6 +141,7 @@ testApp.controller('TestCtrl', (
|
||||
scope: $scope,
|
||||
template: "<div>i'm a template!</div>",
|
||||
templateUrl: '/templates/modal.html',
|
||||
backdropClass: 'modal-backdrop-test',
|
||||
windowClass: 'modal-test'
|
||||
});
|
||||
|
||||
@@ -226,4 +228,4 @@ interface IModalTestCtrlScope {
|
||||
|
||||
close(): void;
|
||||
dismiss(): void;
|
||||
}
|
||||
}
|
||||
|
||||
+20
-2
@@ -229,7 +229,7 @@ declare module angular.ui.bootstrap {
|
||||
* a scope instance to be used for the modal's content (actually the $modal service is going to create a child scope of a provided scope).
|
||||
* Defaults to `$rootScope`.
|
||||
*/
|
||||
scope?: IModalScope;
|
||||
scope?: angular.IScope|IModalScope;
|
||||
|
||||
/**
|
||||
* a controller for a modal instance - it can initialize scope used by modal.
|
||||
@@ -237,6 +237,12 @@ declare module angular.ui.bootstrap {
|
||||
*/
|
||||
controller?: any;
|
||||
|
||||
/**
|
||||
* an alternative to the controller-as syntax, matching the API of directive definitions.
|
||||
* Requires the controller option to be provided as well
|
||||
*/
|
||||
controllerAs?: string;
|
||||
|
||||
/**
|
||||
* members that will be resolved and passed to the controller as locals; it is equivalent of the `resolve` property for AngularJS routes
|
||||
*/
|
||||
@@ -258,6 +264,11 @@ declare module angular.ui.bootstrap {
|
||||
*/
|
||||
keyboard?: boolean;
|
||||
|
||||
/**
|
||||
* additional CSS class(es) to be added to a modal backdrop template
|
||||
*/
|
||||
backdropClass?: string;
|
||||
|
||||
/**
|
||||
* additional CSS class(es) to be added to a modal window template
|
||||
*/
|
||||
@@ -584,7 +595,14 @@ declare module angular.ui.bootstrap {
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
appendtoBody?: boolean;
|
||||
appendToBody?: boolean;
|
||||
|
||||
/**
|
||||
* Determines the default open triggers for tooltips and popovers
|
||||
*
|
||||
* @default 'mouseenter' for tooltip, 'click' for popover
|
||||
*/
|
||||
trigger?: string;
|
||||
}
|
||||
|
||||
interface ITooltipProvider {
|
||||
|
||||
@@ -64,7 +64,16 @@ myApp.config((
|
||||
controller: function ($scope: MyAppScope) {
|
||||
$scope.things = ["A", "Set", "Of", "Things"];
|
||||
}
|
||||
}).state('index', {
|
||||
})
|
||||
.state('list', {
|
||||
parent: 'state3',
|
||||
url: "/list",
|
||||
templateUrl: "partials/state3.list.html",
|
||||
controller: function ($scope: MyAppScope) {
|
||||
$scope.things = ["A", "Set", "Of", "Things"];
|
||||
}
|
||||
})
|
||||
.state('index', {
|
||||
url: "",
|
||||
views: {
|
||||
"viewA": { template: "index.viewA" },
|
||||
|
||||
+17
-8
@@ -20,7 +20,7 @@ declare module angular.ui {
|
||||
/**
|
||||
* Function, returns HTML content string
|
||||
*/
|
||||
templateProvider?: Function;
|
||||
templateProvider?: Function | Array<any>;
|
||||
/**
|
||||
* A controller paired to the state. Function OR name as String
|
||||
*/
|
||||
@@ -30,11 +30,18 @@ declare module angular.ui {
|
||||
* Function (injectable), returns the actual controller function or string.
|
||||
*/
|
||||
controllerProvider?: Function;
|
||||
|
||||
/**
|
||||
* Specifies the parent state of this state
|
||||
*/
|
||||
parent?: string | IState
|
||||
|
||||
|
||||
resolve?: {};
|
||||
/**
|
||||
* A url with optional parameters. When a state is navigated or transitioned to, the $stateParams service will be populated with any parameters that were passed.
|
||||
*/
|
||||
url?: string;
|
||||
url?: string | IUrlMatcher;
|
||||
/**
|
||||
* A map which optionally configures parameters declared in the url, or defines additional non-url parameters. Only use this within a state if you are not using url. Otherwise you can specify your parameters within the url. When a state is navigated or transitioned to, the $stateParams service will be populated with any parameters that were passed.
|
||||
*/
|
||||
@@ -45,13 +52,15 @@ declare module angular.ui {
|
||||
views?: {};
|
||||
abstract?: boolean;
|
||||
/**
|
||||
* Callback functions for when a state is entered and exited. Good way to trigger an action or dispatch an event, such as opening a dialog.
|
||||
* Callback function for when a state is entered. Good way to trigger an action or dispatch an event, such as opening a dialog.
|
||||
* If minifying your scripts, make sure to explictly annotate this function, because it won't be automatically annotated by your build tools.
|
||||
*/
|
||||
onEnter?: Function;
|
||||
onEnter?: Function|(string|Function)[];
|
||||
/**
|
||||
* Callback functions for when a state is entered and exited. Good way to trigger an action or dispatch an event, such as opening a dialog.
|
||||
* If minifying your scripts, make sure to explictly annotate this function, because it won't be automatically annotated by your build tools.
|
||||
*/
|
||||
onExit?: Function;
|
||||
onExit?: Function|(string|Function)[];
|
||||
/**
|
||||
* Arbitrary data object, useful for custom configuration.
|
||||
*/
|
||||
@@ -62,7 +71,7 @@ declare module angular.ui {
|
||||
reloadOnSearch?: boolean;
|
||||
}
|
||||
|
||||
interface IStateProvider extends ng.IServiceProvider {
|
||||
interface IStateProvider extends angular.IServiceProvider {
|
||||
state(name:string, config:IState): IStateProvider;
|
||||
state(config:IState): IStateProvider;
|
||||
decorator(name?: string, decorator?: (state: IState, parent: Function) => any): any;
|
||||
@@ -81,7 +90,7 @@ declare module angular.ui {
|
||||
type(name: string, definition: any, definitionFn?: any): any;
|
||||
}
|
||||
|
||||
interface IUrlRouterProvider extends ng.IServiceProvider {
|
||||
interface IUrlRouterProvider extends angular.IServiceProvider {
|
||||
when(whenPath: RegExp, handler: Function): IUrlRouterProvider;
|
||||
when(whenPath: RegExp, handler: any[]): IUrlRouterProvider;
|
||||
when(whenPath: RegExp, toPath: string): IUrlRouterProvider;
|
||||
@@ -143,7 +152,7 @@ declare module angular.ui {
|
||||
*
|
||||
* @param options Options object.
|
||||
*/
|
||||
go(to: string, params?: {}, options?: IStateOptions): ng.IPromise<any>;
|
||||
go(to: string, params?: {}, options?: IStateOptions): angular.IPromise<any>;
|
||||
transitionTo(state: string, params?: {}, updateLocation?: boolean): void;
|
||||
transitionTo(state: string, params?: {}, options?: IStateOptions): void;
|
||||
includes(state: string, params?: {}): boolean;
|
||||
|
||||
@@ -0,0 +1,218 @@
|
||||
/// <reference path="../jasmine/jasmine.d.ts" />
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
|
||||
/// <reference path="angular-wizard.d.ts" />
|
||||
|
||||
// test file taken from https://github.com/mgonto/angular-wizard
|
||||
|
||||
|
||||
interface WizardScope extends ng.IScope {
|
||||
referenceCurrentStep:string;
|
||||
stepValidation:()=>void;
|
||||
finishedWizard:()=>void;
|
||||
enterValidation:()=>void;
|
||||
}
|
||||
|
||||
describe('AngularWizard', function () {
|
||||
var $compile:ng.ICompileService,
|
||||
$rootScope:ng.IRootScopeService, WizardHandler:angular.mgoAngularWizard.WizardHandler, scope:WizardScope;
|
||||
|
||||
/**
|
||||
* Create the view with wizard to test
|
||||
* @param {Scope} scope A scope to bind to
|
||||
* @return {[DOM element]} A DOM element compiled
|
||||
*/
|
||||
function createView(scope:WizardScope) {
|
||||
scope.referenceCurrentStep = null;
|
||||
var element = angular.element('<wizard on-finish="finishedWizard()" current-step="referenceCurrentStep" ng-init="msg = 14" >'
|
||||
+ ' <wz-step title="Starting" canenter="enterValidation">'
|
||||
+ ' <h1>This is the first step</h1>'
|
||||
+ ' <p>Here you can use whatever you want. You can use other directives, binding, etc.</p>'
|
||||
+ ' <input type="submit" wz-next value="Continue" />'
|
||||
+ ' </wz-step>'
|
||||
+ ' <wz-step title="Continuing" canexit="stepValidation">'
|
||||
+ ' <h1>Continuing</h1>'
|
||||
+ ' <p>You have continued here!</p>'
|
||||
+ ' <input type="submit" wz-next value="Go on" />'
|
||||
+ ' </wz-step>'
|
||||
+ ' <wz-step title="More steps" canenter="enterValidation">'
|
||||
+ ' <p>Even more steps!!</p>'
|
||||
+ ' <input type="submit" wz-next value="Finish now" />'
|
||||
+ ' </wz-step>'
|
||||
+ '</wizard>');
|
||||
var elementCompiled = $compile(element)(scope);
|
||||
$rootScope.$digest();
|
||||
return elementCompiled;
|
||||
}
|
||||
|
||||
it("should correctly create the wizard", function () {
|
||||
var view = createView(scope);
|
||||
expect(WizardHandler).toBeTruthy();
|
||||
expect(view.find('section').length).toEqual(3);
|
||||
// expect the correct step to be desirable one
|
||||
expect(scope.referenceCurrentStep).toEqual('Starting');
|
||||
});
|
||||
|
||||
it("should go to the next step", function () {
|
||||
var view = createView(scope);
|
||||
expect(scope.referenceCurrentStep).toEqual('Starting');
|
||||
WizardHandler.wizard().next();
|
||||
$rootScope.$digest();
|
||||
expect(scope.referenceCurrentStep).toEqual('Continuing');
|
||||
});
|
||||
it("should return to a previous step", function () {
|
||||
|
||||
var view = createView(scope);
|
||||
expect(scope.referenceCurrentStep).toEqual('Starting');
|
||||
WizardHandler.wizard().next();
|
||||
$rootScope.$digest();
|
||||
expect(scope.referenceCurrentStep).toEqual('Continuing');
|
||||
WizardHandler.wizard().previous();
|
||||
$rootScope.$digest();
|
||||
expect(scope.referenceCurrentStep).toEqual('Starting');
|
||||
});
|
||||
it("should go to a step specified by name", function () {
|
||||
|
||||
var view = createView(scope);
|
||||
expect(scope.referenceCurrentStep).toEqual('Starting');
|
||||
WizardHandler.wizard().goTo('More steps');
|
||||
$rootScope.$digest();
|
||||
expect(scope.referenceCurrentStep).toEqual('More steps');
|
||||
});
|
||||
it("should go to a step specified by index", function () {
|
||||
|
||||
var view = createView(scope);
|
||||
expect(scope.referenceCurrentStep).toEqual('Starting');
|
||||
WizardHandler.wizard().goTo(2);
|
||||
$rootScope.$digest();
|
||||
expect(scope.referenceCurrentStep).toEqual('More steps');
|
||||
});
|
||||
it("should go to next step becasue callback is truthy", function () {
|
||||
|
||||
var view = createView(scope);
|
||||
expect(scope.referenceCurrentStep).toEqual('Starting');
|
||||
WizardHandler.wizard().next(function () {
|
||||
return true
|
||||
});
|
||||
$rootScope.$digest();
|
||||
expect(scope.referenceCurrentStep).toEqual('Continuing');
|
||||
});
|
||||
it("should NOT go to next step because callback is falsey", function () {
|
||||
|
||||
var view = createView(scope);
|
||||
expect(scope.referenceCurrentStep).toEqual('Starting');
|
||||
WizardHandler.wizard().next(function () {
|
||||
return false
|
||||
});
|
||||
$rootScope.$digest();
|
||||
expect(scope.referenceCurrentStep).toEqual('Starting');
|
||||
});
|
||||
it("should go to next step because CANEXIT is UNDEFINED", function () {
|
||||
|
||||
var view = createView(scope);
|
||||
expect(scope.referenceCurrentStep).toEqual('Starting');
|
||||
WizardHandler.wizard().next();
|
||||
$rootScope.$digest();
|
||||
expect(scope.referenceCurrentStep).toEqual('Continuing');
|
||||
});
|
||||
it("should go to next step because CANEXIT is TRUE", function () {
|
||||
|
||||
var view = createView(scope);
|
||||
scope.stepValidation = function () {
|
||||
return true;
|
||||
};
|
||||
expect(scope.referenceCurrentStep).toEqual('Starting');
|
||||
WizardHandler.wizard().next();
|
||||
$rootScope.$digest();
|
||||
expect(scope.referenceCurrentStep).toEqual('Continuing');
|
||||
WizardHandler.wizard().next();
|
||||
$rootScope.$digest();
|
||||
expect(scope.referenceCurrentStep).toEqual('More steps');
|
||||
});
|
||||
it("should NOT go to next step because CANEXIT is FALSE", function () {
|
||||
|
||||
var view = createView(scope);
|
||||
scope.stepValidation = function () {
|
||||
return false;
|
||||
};
|
||||
expect(scope.referenceCurrentStep).toEqual('Starting');
|
||||
WizardHandler.wizard().next();
|
||||
$rootScope.$digest();
|
||||
expect(scope.referenceCurrentStep).toEqual('Continuing');
|
||||
WizardHandler.wizard().next();
|
||||
$rootScope.$digest();
|
||||
expect(scope.referenceCurrentStep).toEqual('Continuing');
|
||||
});
|
||||
it("should go to next step because CANENTER is TRUE", function () {
|
||||
|
||||
var view = createView(scope);
|
||||
scope.enterValidation = function () {
|
||||
return true;
|
||||
};
|
||||
expect(scope.referenceCurrentStep).toEqual('Starting');
|
||||
WizardHandler.wizard().next();
|
||||
$rootScope.$digest();
|
||||
expect(scope.referenceCurrentStep).toEqual('Continuing');
|
||||
WizardHandler.wizard().next();
|
||||
$rootScope.$digest();
|
||||
expect(scope.referenceCurrentStep).toEqual('More steps');
|
||||
});
|
||||
it("should NOT go to next step because CANENTER is FALSE", function () {
|
||||
|
||||
var view = createView(scope);
|
||||
scope.enterValidation = function () {
|
||||
return false;
|
||||
};
|
||||
expect(scope.referenceCurrentStep).toEqual('Starting');
|
||||
WizardHandler.wizard().next();
|
||||
$rootScope.$digest();
|
||||
expect(scope.referenceCurrentStep).toEqual('Continuing');
|
||||
WizardHandler.wizard().next();
|
||||
$rootScope.$digest();
|
||||
expect(scope.referenceCurrentStep).toEqual('Continuing');
|
||||
});
|
||||
it("should NOT return to a previous step. Although CANEXIT is false and we are heading to a previous state, the can enter validation is false", function () {
|
||||
|
||||
var view = createView(scope);
|
||||
scope.stepValidation = function () {
|
||||
return false;
|
||||
};
|
||||
scope.enterValidation = function () {
|
||||
return false;
|
||||
};
|
||||
expect(scope.referenceCurrentStep).toEqual('Starting');
|
||||
WizardHandler.wizard().next();
|
||||
$rootScope.$digest();
|
||||
expect(scope.referenceCurrentStep).toEqual('Continuing');
|
||||
WizardHandler.wizard().previous();
|
||||
$rootScope.$digest();
|
||||
expect(scope.referenceCurrentStep).toEqual('Continuing');
|
||||
});
|
||||
it("should return to a previous step even though CANEXIT is false", function () {
|
||||
|
||||
var view = createView(scope);
|
||||
scope.stepValidation = function () {
|
||||
return false;
|
||||
};
|
||||
expect(scope.referenceCurrentStep).toEqual('Starting');
|
||||
WizardHandler.wizard().next();
|
||||
$rootScope.$digest();
|
||||
expect(scope.referenceCurrentStep).toEqual('Continuing');
|
||||
WizardHandler.wizard().previous();
|
||||
$rootScope.$digest();
|
||||
expect(scope.referenceCurrentStep).toEqual('Starting');
|
||||
});
|
||||
it("should finish", function () {
|
||||
|
||||
var flag = false;
|
||||
scope.finishedWizard = function () {
|
||||
flag = true;
|
||||
};
|
||||
var view = createView(scope);
|
||||
expect(scope.referenceCurrentStep).toEqual('Starting');
|
||||
WizardHandler.wizard().finish();
|
||||
expect(flag).toBeTruthy();
|
||||
$rootScope.$digest();
|
||||
});
|
||||
});
|
||||
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
// Type definitions for Angular Wizard 0.4.2
|
||||
// Project: https://github.com/mgonto/angular-wizard
|
||||
// Definitions by: Marko Jurisic <https://github.com/mjurisic>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module angular.mgoAngularWizard {
|
||||
interface WizardHandler {
|
||||
wizard(name?:string): Wizard;
|
||||
addWizard(name:string, wizard:Wizard):void;
|
||||
removeWizard(name:string):void;
|
||||
}
|
||||
|
||||
interface Wizard {
|
||||
next(nextHandler?:Function):void;
|
||||
previous():void;
|
||||
goTo(step:number):void;
|
||||
goTo(step:string):void;
|
||||
finish():void;
|
||||
currentStepNumber():number;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/// <reference path="angular.throttle.d.ts" />
|
||||
/// <reference path='../angularjs/angular.d.ts' />
|
||||
|
||||
var throttledFn = angular.throttle(function (someArg:any) {
|
||||
return someArg;
|
||||
}, 100);
|
||||
|
||||
var result = throttledFn(10);
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// Type definitions for angular.throttle
|
||||
// Project: https://github.com/BaggersIO/angular.throttle
|
||||
// Definitions by: Stefan Steinhart <https://github.com/reppners>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path='../angularjs/angular.d.ts' />
|
||||
|
||||
declare module angular {
|
||||
interface IAngularStatic {
|
||||
throttle:( fn:Function, throttle:number, options?:{leading?:boolean; trailing?:boolean;} ) => Function;
|
||||
}
|
||||
}
|
||||
+4624
File diff suppressed because it is too large
Load Diff
+6162
File diff suppressed because it is too large
Load Diff
+6875
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,38 @@
|
||||
/// <reference path="angular2.d.ts"/>
|
||||
/// <reference path="router.d.ts"/>
|
||||
|
||||
// Use Typescript 1.4 style imports
|
||||
import ng = require("angular2/angular2");
|
||||
|
||||
class Service {
|
||||
|
||||
}
|
||||
class Service2 {
|
||||
|
||||
}
|
||||
|
||||
class Cmp {
|
||||
static annotations: any[];
|
||||
}
|
||||
Cmp.annotations = [
|
||||
ng.Component({
|
||||
selector: 'cmp',
|
||||
injectables: [Service, ng.bind(Service2).toValue(null)]
|
||||
}),
|
||||
ng.View({
|
||||
template: '{{greeting}} world!',
|
||||
directives: [ng.NgFor, ng.NgIf]
|
||||
}),
|
||||
ng.Directive({
|
||||
selector: '[tooltip]',
|
||||
properties: [
|
||||
'text: tooltip'
|
||||
],
|
||||
hostListeners: {
|
||||
'onmouseenter': 'onMouseEnter()',
|
||||
'onmouseleave': 'onMouseLeave()'
|
||||
}
|
||||
})
|
||||
];
|
||||
|
||||
ng.bootstrap(Cmp);
|
||||
Vendored
+6875
File diff suppressed because it is too large
Load Diff
Vendored
+352
@@ -0,0 +1,352 @@
|
||||
// Type definitions for Angular v2.0.0-alpha.30
|
||||
// Project: http://angular.io/
|
||||
// Definitions by: angular team <https://github.com/angular/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// ***********************************************************
|
||||
// This file is generated by the Angular build process.
|
||||
// Please do not create manual edits or send pull requests
|
||||
// modifying this file.
|
||||
// ***********************************************************
|
||||
///<reference path="./angular2-2.0.0-alpha.30.d.ts"/>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @module
|
||||
* @public
|
||||
* @description
|
||||
* Maps application URLs into application states, to support deep-linking and navigation.
|
||||
*/
|
||||
declare module ng {
|
||||
|
||||
/**
|
||||
* # Router
|
||||
* The router is responsible for mapping URLs to components.
|
||||
*
|
||||
* You can see the state of the router by inspecting the read-only field `router.navigating`.
|
||||
* This may be useful for showing a spinner, for instance.
|
||||
*
|
||||
* ## Concepts
|
||||
* Routers and component instances have a 1:1 correspondence.
|
||||
*
|
||||
* The router holds reference to a number of "outlets." An outlet is a placeholder that the
|
||||
* router dynamically fills in depending on the current URL.
|
||||
*
|
||||
* When the router navigates from a URL, it must first recognizes it and serialize it into an
|
||||
* `Instruction`.
|
||||
* The router uses the `RouteRegistry` to get an `Instruction`.
|
||||
*
|
||||
* @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 },
|
||||
* { '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>;
|
||||
|
||||
|
||||
/**
|
||||
* 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>;
|
||||
|
||||
|
||||
/**
|
||||
* Removes the contents of this router's outlet and all descendant outlets
|
||||
*/
|
||||
deactivate(): 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 {
|
||||
|
||||
|
||||
/**
|
||||
* Given an instruction, update the contents of this outlet.
|
||||
*/
|
||||
activate(instruction: Instruction): Promise<any>;
|
||||
|
||||
deactivate(): Promise<any>;
|
||||
|
||||
canDeactivate(instruction: Instruction): Promise<boolean>;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* 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 ;
|
||||
|
||||
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>;
|
||||
}
|
||||
|
||||
var routerDirectives : List<any> ;
|
||||
|
||||
var routerInjectables : List<any> ;
|
||||
|
||||
var RouteConfig:any;
|
||||
|
||||
}
|
||||
|
||||
declare module "angular2/router" {
|
||||
export = ng;
|
||||
}
|
||||
Vendored
+352
@@ -0,0 +1,352 @@
|
||||
// Type definitions for Angular v2.0.0-alpha.30
|
||||
// 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
|
||||
* @public
|
||||
* @description
|
||||
* Maps application URLs into application states, to support deep-linking and navigation.
|
||||
*/
|
||||
declare module ng {
|
||||
|
||||
/**
|
||||
* # Router
|
||||
* The router is responsible for mapping URLs to components.
|
||||
*
|
||||
* You can see the state of the router by inspecting the read-only field `router.navigating`.
|
||||
* This may be useful for showing a spinner, for instance.
|
||||
*
|
||||
* ## Concepts
|
||||
* Routers and component instances have a 1:1 correspondence.
|
||||
*
|
||||
* The router holds reference to a number of "outlets." An outlet is a placeholder that the
|
||||
* router dynamically fills in depending on the current URL.
|
||||
*
|
||||
* When the router navigates from a URL, it must first recognizes it and serialize it into an
|
||||
* `Instruction`.
|
||||
* The router uses the `RouteRegistry` to get an `Instruction`.
|
||||
*
|
||||
* @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 },
|
||||
* { '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>;
|
||||
|
||||
|
||||
/**
|
||||
* 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>;
|
||||
|
||||
|
||||
/**
|
||||
* Removes the contents of this router's outlet and all descendant outlets
|
||||
*/
|
||||
deactivate(): 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 {
|
||||
|
||||
|
||||
/**
|
||||
* Given an instruction, update the contents of this outlet.
|
||||
*/
|
||||
activate(instruction: Instruction): Promise<any>;
|
||||
|
||||
deactivate(): Promise<any>;
|
||||
|
||||
canDeactivate(instruction: Instruction): Promise<boolean>;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* 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 ;
|
||||
|
||||
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>;
|
||||
}
|
||||
|
||||
var routerDirectives : List<any> ;
|
||||
|
||||
var routerInjectables : List<any> ;
|
||||
|
||||
var RouteConfig:any;
|
||||
|
||||
}
|
||||
|
||||
declare module "angular2/router" {
|
||||
export = ng;
|
||||
}
|
||||
@@ -46,7 +46,7 @@ myapp.controller("MyController", ["$scope", "$firebase", '$FirebaseObject', '$Fi
|
||||
|
||||
// AngularFireObject
|
||||
{
|
||||
var obj = sync.$asObject();
|
||||
var obj = $FirebaseObject(ref);
|
||||
|
||||
// $id
|
||||
if (obj.$id !== ref.name()) throw "error";
|
||||
@@ -62,8 +62,8 @@ myapp.controller("MyController", ["$scope", "$firebase", '$FirebaseObject', '$Fi
|
||||
obj.$save();
|
||||
});
|
||||
|
||||
// $inst()
|
||||
if (obj.$inst() !== sync) throw "error";
|
||||
// $ref()
|
||||
if (obj.$ref() !== ref) throw "error";
|
||||
|
||||
// $bindTo()
|
||||
obj.$bindTo($scope, "data").then(function () {
|
||||
@@ -81,8 +81,8 @@ myapp.controller("MyController", ["$scope", "$firebase", '$FirebaseObject', '$Fi
|
||||
// $destroy()
|
||||
obj.$destroy();
|
||||
|
||||
// $extendFactory()
|
||||
var NewFactory = $FirebaseObject.$extendFactory({
|
||||
// $extend()
|
||||
var NewFactory = $FirebaseObject.$extend({
|
||||
getMyFavoriteColor: function () {
|
||||
return this.favoriteColor + ", no green!"; // obscure Monty Python reference
|
||||
}
|
||||
@@ -92,10 +92,10 @@ myapp.controller("MyController", ["$scope", "$firebase", '$FirebaseObject', '$Fi
|
||||
|
||||
// AngularFireArray
|
||||
{
|
||||
var list = sync.$asArray();
|
||||
var list = $FirebaseArray(ref);
|
||||
|
||||
// $inst()
|
||||
if (list.$inst() !== sync) throw "error";
|
||||
// $ref()
|
||||
if (list.$ref() !== ref) throw "error";
|
||||
|
||||
// $add()
|
||||
list.$add({ foo: "foo value" });
|
||||
@@ -145,8 +145,8 @@ myapp.controller("MyController", ["$scope", "$firebase", '$FirebaseObject', '$Fi
|
||||
// $destroy()
|
||||
list.$destroy();
|
||||
|
||||
// $extendFactory()
|
||||
var ArrayWithSum = $FirebaseArray.$extendFactory({
|
||||
// $extend()
|
||||
var ArrayWithSum = $FirebaseArray.$extend({
|
||||
sum: function () {
|
||||
var total = 0;
|
||||
angular.forEach(this.$list, function (rec) {
|
||||
@@ -167,30 +167,43 @@ interface AngularFireAuthScope extends ng.IScope {
|
||||
loginObj: AngularFireAuth;
|
||||
}
|
||||
|
||||
myapp.controller("MyAuthController", ["$scope", "$firebaseSimpleLogin",
|
||||
function($scope: AngularFireAuthScope, $firebaseSimpleLogin: AngularFireAuthService) {
|
||||
myapp.controller("MyAuthController", ["$scope", "$firebaseAuth",
|
||||
function($scope: AngularFireAuthScope, $firebaseAuth: AngularFireAuthService) {
|
||||
var dataRef = new Firebase(url);
|
||||
$scope.loginObj = $firebaseSimpleLogin(dataRef);
|
||||
$scope.loginObj.$getCurrentUser().then(_ => {
|
||||
});
|
||||
var email = 'my@email.com';
|
||||
var password = 'mypassword';
|
||||
$scope.loginObj.$login('password', {
|
||||
email: email,
|
||||
password: password
|
||||
}).then(function(user) {
|
||||
console.log('Logged in as: ', user.uid);
|
||||
}, function(error) {
|
||||
console.error('Login failed: ', error);
|
||||
});
|
||||
$scope.loginObj.$logout();
|
||||
$scope.loginObj.$createUser(email, password).then(_ => {
|
||||
});
|
||||
$scope.loginObj.$changePassword(email, password, password).then(_ => {
|
||||
});
|
||||
$scope.loginObj.$removeUser(email, password).then(_ => {
|
||||
});
|
||||
$scope.loginObj.$sendPasswordResetEmail(email).then(_ => {
|
||||
});
|
||||
$scope.loginObj = $firebaseAuth(dataRef);
|
||||
$scope.loginObj.$getAuth();
|
||||
var credentials = {
|
||||
email: 'my@email.com',
|
||||
password: 'mypassword'
|
||||
};
|
||||
var resetPasswordCredentials = {
|
||||
email: 'my@email.com'
|
||||
};
|
||||
var changePasswordCredentials = {
|
||||
email: 'my@email.com',
|
||||
oldPassword: 'mypassword',
|
||||
newPassword: 'mypassword'
|
||||
};
|
||||
var changeUserCredentials = {
|
||||
oldEmail: 'my@email.com',
|
||||
newEmail: 'my@email.com',
|
||||
password: 'mypassword'
|
||||
};
|
||||
$scope.loginObj.$authWithCustomToken("token").then(_ => {});
|
||||
$scope.loginObj.$authAnonymously().then(_ => {});
|
||||
$scope.loginObj.$authWithPassword(credentials).then(_ => {});
|
||||
$scope.loginObj.$authWithOAuthPopup("github").then(_ => {});
|
||||
$scope.loginObj.$authWithOAuthRedirect("google").then(_ => {});
|
||||
$scope.loginObj.$authWithOAuthToken("twitter", "token").then(_ => {});
|
||||
$scope.loginObj.$getAuth();
|
||||
$scope.loginObj.$onAuth(() => {});
|
||||
$scope.loginObj.$unauth();
|
||||
$scope.loginObj.$waitForAuth();
|
||||
$scope.loginObj.$requireAuth();
|
||||
$scope.loginObj.$createUser(credentials).then(_ => {});
|
||||
$scope.loginObj.$removeUser(credentials).then(_ => {});
|
||||
$scope.loginObj.$changeEmail(changeUserCredentials).then(_ => {});
|
||||
$scope.loginObj.$changePassword(changePasswordCredentials).then(_ => {});
|
||||
$scope.loginObj.$resetPassword(resetPasswordCredentials).then(_ => {});
|
||||
}
|
||||
]);
|
||||
]);
|
||||
|
||||
Vendored
+408
-11
@@ -10,6 +10,9 @@ interface AngularFireService {
|
||||
(firebase: Firebase, config?: any): AngularFire;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated. Not possible with AngularFire 1.0+
|
||||
*/
|
||||
interface AngularFire {
|
||||
$asArray(): AngularFireArray;
|
||||
$asObject(): AngularFireObject;
|
||||
@@ -24,39 +27,284 @@ interface AngularFire {
|
||||
$transaction(key:string, updateFn: (currentData: any) => any, applyLocally?: boolean): ng.IPromise<FirebaseDataSnapshot>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates and maintains a synchronized object, with 2-way bindings between Angular and Firebase.
|
||||
*/
|
||||
interface AngularFireObject extends AngularFireSimpleObject {
|
||||
$id: string;
|
||||
$priority: number;
|
||||
$value: any;
|
||||
|
||||
/**
|
||||
* Removes all keys from the FirebaseObject and also removes
|
||||
* the remote data from the server.
|
||||
*
|
||||
* @returns a promise which will resolve after the op completes
|
||||
*/
|
||||
|
||||
$remove(): ng.IPromise<Firebase>;
|
||||
/**
|
||||
* Saves all data on the FirebaseObject back to Firebase.
|
||||
* @returns a promise which will resolve after the save is completed.
|
||||
*/
|
||||
$save(): ng.IPromise<Firebase>;
|
||||
|
||||
/**
|
||||
* The loaded method is invoked after the initial batch of data arrives from the server.
|
||||
* When this resolves, all data which existed prior to calling $asObject() is now cached
|
||||
* locally in the object.
|
||||
*
|
||||
* As a shortcut is also possible to pass resolve/reject methods directly into this
|
||||
* method just as they would be passed to .then()
|
||||
*
|
||||
* @param {Function} resolve
|
||||
* @param {Function} reject
|
||||
* @returns a promise which resolves after initial data is downloaded from Firebase
|
||||
*/
|
||||
$loaded(resolve?: (x: AngularFireObject) => ng.IHttpPromise<{}>, reject?: (err: any) => any): ng.IPromise<AngularFireObject>;
|
||||
|
||||
/**
|
||||
* The loaded method is invoked after the initial batch of data arrives from the server.
|
||||
* When this resolves, all data which existed prior to calling $asObject() is now cached
|
||||
* locally in the object.
|
||||
*
|
||||
* As a shortcut is also possible to pass resolve/reject methods directly into this
|
||||
* method just as they would be passed to .then()
|
||||
*
|
||||
* @param {Function} resolve
|
||||
* @param {Function} reject
|
||||
* @returns a promise which resolves after initial data is downloaded from Firebase
|
||||
*/
|
||||
$loaded(resolve?: (x: AngularFireObject) => ng.IPromise<{}>, reject?: (err: any) => any): ng.IPromise<AngularFireObject>;
|
||||
|
||||
/**
|
||||
* The loaded method is invoked after the initial batch of data arrives from the server.
|
||||
* When this resolves, all data which existed prior to calling $asObject() is now cached
|
||||
* locally in the object.
|
||||
*
|
||||
* As a shortcut is also possible to pass resolve/reject methods directly into this
|
||||
* method just as they would be passed to .then()
|
||||
*
|
||||
* @param {Function} resolve
|
||||
* @param {Function} reject
|
||||
* @returns a promise which resolves after initial data is downloaded from Firebase
|
||||
*/
|
||||
$loaded(resolve?: (x: AngularFireObject) => void, reject?: (err: any) => any): ng.IPromise<AngularFireObject>;
|
||||
$inst(): AngularFire;
|
||||
|
||||
/**
|
||||
* @returns {Firebase} the original Firebase instance used to create this object.
|
||||
*/
|
||||
$ref(): Firebase;
|
||||
|
||||
/**
|
||||
* Creates a 3-way data sync between this object, the Firebase server, and a
|
||||
* scope variable. This means that any changes made to the scope variable are
|
||||
* pushed to Firebase, and vice versa.
|
||||
*
|
||||
* If scope emits a $destroy event, the binding is automatically severed. Otherwise,
|
||||
* it is possible to unbind the scope variable by using the `unbind` function
|
||||
* passed into the resolve method.
|
||||
*
|
||||
* Can only be bound to one scope variable at a time. If a second is attempted,
|
||||
* the promise will be rejected with an error.
|
||||
*
|
||||
* @param {object} scope
|
||||
* @param {string} varName
|
||||
* @returns a promise which resolves to an unbind method after data is set in scope
|
||||
*/
|
||||
$bindTo(scope: ng.IScope, varName: string): ng.IPromise<any>;
|
||||
|
||||
/**
|
||||
* Listeners passed into this method are notified whenever a new change is received
|
||||
* from the server. Each invocation is sent an object containing
|
||||
* <code>{ type: 'value', key: 'my_firebase_id' }</code>
|
||||
*
|
||||
* This method returns an unbind function that can be used to detach the listener.
|
||||
*
|
||||
* @param {Function} cb
|
||||
* @param {Object} [context]
|
||||
* @returns {Function} invoke to stop observing events
|
||||
*/
|
||||
$watch(callback: Function, context?: any): Function;
|
||||
|
||||
/**
|
||||
* Informs $firebase to stop sending events and clears memory being used
|
||||
* by this object (delete's its local content).
|
||||
*/
|
||||
$destroy(): void;
|
||||
}
|
||||
interface AngularFireObjectService {
|
||||
$extendFactory(ChildClass: Object, methods?: Object): Object;
|
||||
/**
|
||||
* Creates a synchronized object with 2-way bindings between Angular and Firebase.
|
||||
*
|
||||
* @param {Firebase} ref
|
||||
* @returns {FirebaseObject}
|
||||
*/
|
||||
(firebase: Firebase): AngularFireObject;
|
||||
$extend(ChildClass: Object, methods?: Object): Object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates and maintains a synchronized list of data. This is a pseudo-read-only array. One should
|
||||
* not call splice(), push(), pop(), et al directly on this array, but should instead use the
|
||||
* $remove and $add methods.
|
||||
*
|
||||
* It is acceptable to .sort() this array, but it is important to use this in conjunction with
|
||||
* $watch(), so that it will be re-sorted any time the server data changes. Examples of this are
|
||||
* included in the $watch documentation.
|
||||
*/
|
||||
interface AngularFireArray extends Array<AngularFireSimpleObject> {
|
||||
/**
|
||||
* Create a new record with a unique ID and add it to the end of the array.
|
||||
* This should be used instead of Array.prototype.push, since those changes will not be
|
||||
* synchronized with the server.
|
||||
*
|
||||
* Any value, including a primitive, can be added in this way. Note that when the record
|
||||
* is created, the primitive value would be stored in $value (records are always objects
|
||||
* by default).
|
||||
*
|
||||
* Returns a future which is resolved when the data has successfully saved to the server.
|
||||
* The resolve callback will be passed a Firebase ref representing the new data element.
|
||||
*
|
||||
* @param data
|
||||
* @returns a promise resolved after data is added
|
||||
*/
|
||||
$add(newData: any): ng.IPromise<Firebase>;
|
||||
|
||||
/**
|
||||
* Pass either an item in the array or the index of an item and it will be saved back
|
||||
* to Firebase. While the array is read-only and its structure should not be changed,
|
||||
* it is okay to modify properties on the objects it contains and then save those back
|
||||
* individually.
|
||||
*
|
||||
* Returns a future which is resolved when the data has successfully saved to the server.
|
||||
* The resolve callback will be passed a Firebase ref representing the saved element.
|
||||
* If passed an invalid index or an object which is not a record in this array,
|
||||
* the promise will be rejected.
|
||||
*
|
||||
* @param {int|object} indexOrItem
|
||||
* @returns a promise resolved after data is saved
|
||||
*/
|
||||
$save(recordOrIndex: any): ng.IPromise<Firebase>;
|
||||
|
||||
/**
|
||||
* Pass either an existing item in this array or the index of that item and it will
|
||||
* be removed both locally and in Firebase. This should be used in place of
|
||||
* Array.prototype.splice for removing items out of the array, as calling splice
|
||||
* will not update the value on the server.
|
||||
*
|
||||
* Returns a future which is resolved when the data has successfully removed from the
|
||||
* server. The resolve callback will be passed a Firebase ref representing the deleted
|
||||
* element. If passed an invalid index or an object which is not a record in this array,
|
||||
* the promise will be rejected.
|
||||
*
|
||||
* @param {int|object} indexOrItem
|
||||
* @returns a promise which resolves after data is removed
|
||||
*/
|
||||
$remove(recordOrIndex: any): ng.IPromise<Firebase>;
|
||||
|
||||
/**
|
||||
* Returns the record for a given Firebase key (record.$id). If the record is not found
|
||||
* then returns null.
|
||||
*
|
||||
* @param {string} key
|
||||
* @returns {Object|null} a record in this array
|
||||
*/
|
||||
$getRecord(key: string): AngularFireSimpleObject;
|
||||
|
||||
/**
|
||||
* Given an item in this array or the index of an item in the array, this returns the
|
||||
* Firebase key (record.$id) for that record. If passed an invalid key or an item which
|
||||
* does not exist in this array, it will return null.
|
||||
*
|
||||
* @param {int|object} indexOrItem
|
||||
* @returns {null|string}
|
||||
*/
|
||||
$keyAt(recordOrIndex: any): string;
|
||||
|
||||
/**
|
||||
* The inverse of $keyAt, this method takes a Firebase key (record.$id) and returns the
|
||||
* index in the array where that record is stored. If the record is not in the array,
|
||||
* this method returns -1.
|
||||
*
|
||||
* @param {String} key
|
||||
* @returns {int} -1 if not found
|
||||
*/
|
||||
$indexFor(key: string): number;
|
||||
|
||||
/**
|
||||
* The loaded method is invoked after the initial batch of data arrives from the server.
|
||||
* When this resolves, all data which existed prior to calling $asArray() is now cached
|
||||
* locally in the array.
|
||||
*
|
||||
* As a shortcut is also possible to pass resolve/reject methods directly into this
|
||||
* method just as they would be passed to .then()
|
||||
*
|
||||
* @param {Function} [resolve]
|
||||
* @param {Function} [reject]
|
||||
* @returns a promise
|
||||
*/
|
||||
$loaded(resolve?: (x: AngularFireArray) => ng.IHttpPromise<{}>, reject?: (err: any) => any): ng.IPromise<AngularFireArray>;
|
||||
|
||||
/**
|
||||
* The loaded method is invoked after the initial batch of data arrives from the server.
|
||||
* When this resolves, all data which existed prior to calling $asArray() is now cached
|
||||
* locally in the array.
|
||||
*
|
||||
* As a shortcut is also possible to pass resolve/reject methods directly into this
|
||||
* method just as they would be passed to .then()
|
||||
*
|
||||
* @param {Function} [resolve]
|
||||
* @param {Function} [reject]
|
||||
* @returns a promise
|
||||
*/
|
||||
$loaded(resolve?: (x: AngularFireArray) => ng.IPromise<{}>, reject?: (err: any) => any): ng.IPromise<AngularFireArray>;
|
||||
|
||||
/**
|
||||
* The loaded method is invoked after the initial batch of data arrives from the server.
|
||||
* When this resolves, all data which existed prior to calling $asArray() is now cached
|
||||
* locally in the array.
|
||||
*
|
||||
* As a shortcut is also possible to pass resolve/reject methods directly into this
|
||||
* method just as they would be passed to .then()
|
||||
*
|
||||
* @param {Function} [resolve]
|
||||
* @param {Function} [reject]
|
||||
* @returns a promise
|
||||
*/
|
||||
$loaded(resolve?: (x: AngularFireArray) => void, reject?: (err: any) => any): ng.IPromise<AngularFireArray>;
|
||||
$inst(): AngularFire;
|
||||
|
||||
/**
|
||||
* @returns {Firebase} the original Firebase ref used to create this object.
|
||||
*/
|
||||
$ref(): Firebase;
|
||||
|
||||
/**
|
||||
* Listeners passed into this method are notified whenever a new change (add, updated,
|
||||
* move, remove) is received from the server. Each invocation is sent an object
|
||||
* containing <code>{ type: 'child_added|child_updated|child_moved|child_removed',
|
||||
* key: 'key_of_item_affected'}</code>
|
||||
*
|
||||
* Additionally, added and moved events receive a prevChild parameter, containing the
|
||||
* key of the item before this one in the array.
|
||||
*
|
||||
* This method returns a function which can be invoked to stop observing events.
|
||||
*
|
||||
* @param {Function} cb
|
||||
* @param {Object} [context]
|
||||
* @returns {Function} used to stop observing
|
||||
*/
|
||||
$watch(cb: (event: string, key: string, prevChild: string) => void, context?: any): Function;
|
||||
|
||||
/**
|
||||
* Informs $firebase to stop sending events and clears memory being used
|
||||
* by this array (delete's its local content).
|
||||
*/
|
||||
$destroy(): void;
|
||||
}
|
||||
interface AngularFireArrayService {
|
||||
$extendFactory(ChildClass: Object, methods?: Object): Object;
|
||||
(firebase: Firebase): AngularFireArray;
|
||||
$extend(ChildClass: Object, methods?: Object): Object;
|
||||
}
|
||||
|
||||
interface AngularFireSimpleObject {
|
||||
@@ -72,11 +320,160 @@ interface AngularFireAuthService {
|
||||
}
|
||||
|
||||
interface AngularFireAuth {
|
||||
$getCurrentUser(): ng.IPromise<any>;
|
||||
$login(provider: string, options?: Object): ng.IPromise<any>;
|
||||
$logout(): void;
|
||||
$createUser(email: string, password: string): ng.IPromise<any>;
|
||||
$changePassword(email: string, oldPassword: string, newPassword: string): ng.IPromise<any>;
|
||||
$removeUser(email: string, password: string): ng.IPromise<any>;
|
||||
$sendPasswordResetEmail(email: string): ng.IPromise<any>;
|
||||
/**
|
||||
* Authenticates the Firebase reference with a custom authentication token.
|
||||
*
|
||||
* @param {string} authToken An authentication token or a Firebase Secret. A Firebase Secret
|
||||
* should only be used for authenticating a server process and provides full read / write
|
||||
* access to the entire Firebase.
|
||||
* @param {Object} [options] An object containing optional client arguments, such as configuring
|
||||
* session persistence.
|
||||
* @return {Promise<Object>} A promise fulfilled with an object containing authentication data.
|
||||
*/
|
||||
$authWithCustomToken(authToken: string, options?: Object): ng.IPromise<any>;
|
||||
|
||||
/**
|
||||
* Authenticates the Firebase reference anonymously.
|
||||
*
|
||||
* @param {Object} [options] An object containing optional client arguments, such as configuring
|
||||
* session persistence.
|
||||
* @return {Promise<Object>} A promise fulfilled with an object containing authentication data.
|
||||
*/
|
||||
$authAnonymously(options?: Object): ng.IPromise<any>;
|
||||
|
||||
/**
|
||||
* Authenticates the Firebase reference with an email/password user.
|
||||
*
|
||||
* @param {Object} credentials An object containing email and password attributes corresponding
|
||||
* to the user account.
|
||||
* @param {Object} [options] An object containing optional client arguments, such as configuring
|
||||
* session persistence.
|
||||
* @return {Promise<Object>} A promise fulfilled with an object containing authentication data.
|
||||
*/
|
||||
$authWithPassword(credentials: FirebaseCredentials, options?: Object): ng.IPromise<any>;
|
||||
|
||||
/**
|
||||
* Authenticates the Firebase reference with the OAuth popup flow.
|
||||
*
|
||||
* @param {string} provider The unique string identifying the OAuth provider to authenticate
|
||||
* with, e.g. google.
|
||||
* @param {Object} [options] An object containing optional client arguments, such as configuring
|
||||
* session persistence.
|
||||
* @return {Promise<Object>} A promise fulfilled with an object containing authentication data.
|
||||
*/
|
||||
$authWithOAuthPopup(provider: string, options?: Object): ng.IPromise<any>;
|
||||
|
||||
/**
|
||||
* Authenticates the Firebase reference with the OAuth redirect flow.
|
||||
*
|
||||
* @param {string} provider The unique string identifying the OAuth provider to authenticate
|
||||
* with, e.g. google.
|
||||
* @param {Object} [options] An object containing optional client arguments, such as configuring
|
||||
* session persistence.
|
||||
* @return {Promise<Object>} A promise fulfilled with an object containing authentication data.
|
||||
*/
|
||||
$authWithOAuthRedirect(provider: string, options?: Object): ng.IPromise<any>;
|
||||
|
||||
/**
|
||||
* Authenticates the Firebase reference with an OAuth token.
|
||||
*
|
||||
* @param {string} provider The unique string identifying the OAuth provider to authenticate
|
||||
* with, e.g. google.
|
||||
* @param {string|Object} credentials Either a string, such as an OAuth 2.0 access token, or an
|
||||
* Object of key / value pairs, such as a set of OAuth 1.0a credentials.
|
||||
* @param {Object} [options] An object containing optional client arguments, such as configuring
|
||||
* session persistence.
|
||||
* @return {Promise<Object>} A promise fulfilled with an object containing authentication data.
|
||||
*/
|
||||
$authWithOAuthToken(provider: string, credentials: Object|string, options?: Object): ng.IPromise<any>;
|
||||
|
||||
/**
|
||||
* Synchronously retrieves the current authentication data.
|
||||
*
|
||||
* @return {Object} The client's authentication data.
|
||||
*/
|
||||
$getAuth(): FirebaseAuthData;
|
||||
|
||||
/**
|
||||
* Asynchronously fires the provided callback with the current authentication data every time
|
||||
* the authentication data changes. It also fires as soon as the authentication data is
|
||||
* retrieved from the server.
|
||||
*
|
||||
* @param {function} callback A callback that fires when the client's authenticate state
|
||||
* changes. If authenticated, the callback will be passed an object containing authentication
|
||||
* data according to the provider used to authenticate. Otherwise, it will be passed null.
|
||||
* @param {string} [context] If provided, this object will be used as this when calling your
|
||||
* callback.
|
||||
* @return {function} A function which can be used to deregister the provided callback.
|
||||
*/
|
||||
$onAuth(callback: Function, context?: any): Function;
|
||||
|
||||
/**
|
||||
* Unauthenticates the Firebase reference.
|
||||
*/
|
||||
$unauth(): void;
|
||||
|
||||
/**
|
||||
* Utility method which can be used in a route's resolve() method to grab the current
|
||||
* authentication data.
|
||||
*
|
||||
* @returns {Promise<Object|null>} A promise fulfilled with the client's current authentication
|
||||
* state, which will be null if the client is not authenticated.
|
||||
*/
|
||||
$waitForAuth(): ng.IPromise<any>;
|
||||
|
||||
/**
|
||||
* Utility method which can be used in a route's resolve() method to require that a route has
|
||||
* a logged in client.
|
||||
*
|
||||
* @returns {Promise<Object>} A promise fulfilled with the client's current authentication
|
||||
* state or rejected if the client is not authenticated.
|
||||
*/
|
||||
$requireAuth(): ng.IPromise<any>;
|
||||
|
||||
/**
|
||||
* Creates a new email/password user. Note that this function only creates the user, if you
|
||||
* wish to log in as the newly created user, call $authWithPassword() after the promise for
|
||||
* this method has been resolved.
|
||||
*
|
||||
* @param {Object} credentials An object containing the email and password of the user to create.
|
||||
* @return {Promise<Object>} A promise fulfilled with the user object, which contains the
|
||||
* uid of the created user.
|
||||
*/
|
||||
$createUser(credentials: FirebaseCredentials): ng.IPromise<any>;
|
||||
|
||||
/**
|
||||
* Removes an email/password user.
|
||||
*
|
||||
* @param {Object} credentials An object containing the email and password of the user to remove.
|
||||
* @return {Promise<>} An empty promise fulfilled once the user is removed.
|
||||
*/
|
||||
$removeUser(credentials: FirebaseCredentials): ng.IPromise<any>;
|
||||
|
||||
/**
|
||||
* Changes the email for an email/password user.
|
||||
*
|
||||
* @param {Object} credentials An object containing the old email, new email, and password of
|
||||
* the user whose email is to change.
|
||||
* @return {Promise<>} An empty promise fulfilled once the email change is complete.
|
||||
*/
|
||||
$changeEmail(credentials: FirebaseChangeEmailCredentials): ng.IPromise<any>;
|
||||
|
||||
/**
|
||||
* Changes the password for an email/password user.
|
||||
*
|
||||
* @param {Object} credentials An object containing the email, old password, and new password of
|
||||
* the user whose password is to change.
|
||||
* @return {Promise<>} An empty promise fulfilled once the password change is complete.
|
||||
*/
|
||||
$changePassword(credentials: FirebaseChangePasswordCredentials): ng.IPromise<any>;
|
||||
|
||||
/**
|
||||
* Sends a password reset email to an email/password user.
|
||||
*
|
||||
* @param {Object} credentials An object containing the email of the user to send a reset
|
||||
* password email to.
|
||||
* @return {Promise<>} An empty promise fulfilled once the reset password email is sent.
|
||||
*/
|
||||
$resetPassword(credentials: FirebaseResetPasswordCredentials): ng.IPromise<any>;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/// <reference path="angularjs-toaster.d.ts" />
|
||||
class NgToasterTestController {
|
||||
constructor(public $scope: ng.IScope, public $window: ng.IWindowService, public toaster: ngtoaster.IToasterService) {
|
||||
this.bar = 'Hi';
|
||||
}
|
||||
bar: string;
|
||||
|
||||
pop(): void {
|
||||
this.toaster.success({ title: "title", body: "text1" });
|
||||
this.toaster.error("title", "text2");
|
||||
this.toaster.pop({ type: 'wait', title: "title", body: "text" });
|
||||
this.toaster.pop('success', "title", '<ul><li>Render html</li></ul>', 5000, 'trustedHtml');
|
||||
this.toaster.pop('error', "title", '<ul><li>Render html</li></ul>', null, 'trustedHtml');
|
||||
this.toaster.pop('wait', "title", null, null, 'template');
|
||||
this.toaster.pop('warning', "title", "myTemplate.html", null, 'template');
|
||||
this.toaster.pop('note', "title", "text");
|
||||
this.toaster.pop('success', "title", 'Its address is https://google.com.', 5000, 'trustedHtml', (toaster: ngtoaster.IToast): boolean => {
|
||||
var match = toaster.body.match(/http[s]?:\/\/[^\s]+/);
|
||||
if (match) {
|
||||
this.$window.open(match[0]);
|
||||
}
|
||||
return true;
|
||||
});
|
||||
this.toaster.pop('warning', "Hi ", "{template: 'myTemplateWithData.html', data: 'MyData'}", 15000, 'templateWithData');
|
||||
}
|
||||
|
||||
goToLink(toaster: ngtoaster.IToast): boolean {
|
||||
var match = toaster.body.match(/http[s]?:\/\/[^\s]+/);
|
||||
if (match) {
|
||||
this.$window.open(match[0]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
clear(): void {
|
||||
this.toaster.clear();
|
||||
}
|
||||
}
|
||||
|
||||
angular
|
||||
.module('main', ['ngAnimate', 'toaster'])
|
||||
.controller('myController', NgToasterTestController);
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
// Type definitions for angularjs-toaster v0.4.13
|
||||
// Project: https://github.com/jirikavi/AngularJS-Toaster
|
||||
// Definitions by: Ben Tesser <https://github.com/btesser>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
|
||||
declare module ngtoaster {
|
||||
interface IToasterService {
|
||||
pop(params:IPopParams): void
|
||||
/**
|
||||
* @param {string} type Type of toaster -- 'error', 'info', 'wait', 'success', and 'warning'
|
||||
*/
|
||||
pop(type?:string, title?:string, body?:string, timeout?:number, bodyOutputType?:string, clickHandler?:EventListener,
|
||||
toasterId?:number, showCloseButton?:boolean): void
|
||||
error(params: IPopParams): void
|
||||
error(title?:string, body?:string, timeout?:number, bodyOutputType?:string, clickHandler?:EventListener,
|
||||
toasterId?:number): void
|
||||
into(params: IPopParams): void
|
||||
info(title?:string, body?:string, timeout?:number, bodyOutputType?:string, clickHandler?:EventListener,
|
||||
toasterId?:number): void
|
||||
wait(params: IPopParams): void
|
||||
wait(title?:string, body?:string, timeout?:number, bodyOutputType?:string, clickHandler?:EventListener,
|
||||
toasterId?:number): void
|
||||
success(params: IPopParams): void
|
||||
success(title?:string, body?:string, timeout?:number, bodyOutputType?:string, clickHandler?:EventListener,
|
||||
toasterId?:number): void
|
||||
warning(params: IPopParams): void
|
||||
warning(title?:string, body?:string, timeout?:number, bodyOutputType?:string, clickHandler?:EventListener,
|
||||
toasterId?:number): void
|
||||
clear(): void
|
||||
toast:IToast;
|
||||
}
|
||||
|
||||
interface IToasterEventRegistry {
|
||||
setup(): void
|
||||
subscribeToNewToastEvent(onNewToast:IToastEventListener): void
|
||||
subscribeToClearToastsEvent(onClearToasts:IToastEventListener): void
|
||||
unsubscribeToNewToastEvent(onNewToast:IToastEventListener): void
|
||||
unsubscribeToClearToastsEvent(onClearToasts:IToastEventListener): void
|
||||
}
|
||||
|
||||
interface IPopParams extends IToast{
|
||||
toasterId?: number;
|
||||
}
|
||||
|
||||
interface IToastEventListener {
|
||||
(event:Event, toasterId: number): void;
|
||||
}
|
||||
|
||||
interface IToast {
|
||||
/**
|
||||
* Acceptable types are:
|
||||
* 'error', 'info', 'wait', 'success', and 'warning'
|
||||
*/
|
||||
type?: string;
|
||||
title?: string;
|
||||
body?: string;
|
||||
timeout?: number;
|
||||
bodyOutputType?: string;
|
||||
clickHandler?: EventListener;
|
||||
showCloseButton?: boolean;
|
||||
}
|
||||
|
||||
interface IToasterConfig {
|
||||
/**
|
||||
* limits max number of toasts
|
||||
*/
|
||||
limit?: number;
|
||||
'tap-to-dismiss'?: boolean;
|
||||
'close-button'?: boolean;
|
||||
'newest-on-top'?: boolean;
|
||||
'time-out'?: number;
|
||||
'icon-classes'?: IIconClasses;
|
||||
/**
|
||||
* Options include:
|
||||
* '', 'trustedHtml', 'template', 'templateWithData'
|
||||
*/
|
||||
'body-output-type'?: string;
|
||||
'body-template'?: string;
|
||||
'icon-class'?: string;
|
||||
/**
|
||||
* Options include:
|
||||
* 'toast-top-full-width', 'toast-bottom-full-width', 'toast-center',
|
||||
* 'toast-top-left', 'toast-top-center', 'toast-top-rigt',
|
||||
* 'toast-bottom-left', 'toast-bottom-center', 'toast-bottom-rigt',
|
||||
*/
|
||||
'position-class'?: string;
|
||||
'title-class'?: string;
|
||||
'message-class'?: string;
|
||||
'prevent-duplicates'?: boolean;
|
||||
/**
|
||||
* stop timeout on mouseover and restart timer on mouseout
|
||||
*/
|
||||
'mouseover-timer-stop'?: boolean;
|
||||
}
|
||||
|
||||
interface IIconClasses {
|
||||
error: string;
|
||||
info: string;
|
||||
wait: string;
|
||||
success: string;
|
||||
warning: string;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "ngtoaster" {
|
||||
export = ngtoaster
|
||||
}
|
||||
Vendored
+145
-30
@@ -1,6 +1,6 @@
|
||||
// Type definitions for Angular JS 1.3 (ngAnimate module)
|
||||
// Project: http://angularjs.org
|
||||
// Definitions by: Michel Salib <https://github.com/michelsalib>, Adi Dahiya <https://github.com/adidahiya>, Raphael Schweizer <https://github.com/rasch>
|
||||
// Definitions 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>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="angular.d.ts" />
|
||||
@@ -10,16 +10,23 @@ declare module "angular-animate" {
|
||||
export = _;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ngAnimate module (angular-animate.js)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* ngAnimate module (angular-animate.js)
|
||||
*/
|
||||
declare module angular.animate {
|
||||
interface IAnimateFactory extends Function {
|
||||
enter?: (element: ng.IAugmentedJQuery, doneFn: Function) => IAnimateCssRunner|void;
|
||||
leave?: (element: ng.IAugmentedJQuery, doneFn: Function) => IAnimateCssRunner|void;
|
||||
addClass?: (element: ng.IAugmentedJQuery, className: string, doneFn: Function) => IAnimateCssRunner|void;
|
||||
removeClass?: (element: ng.IAugmentedJQuery, className: string, doneFn: Function) => IAnimateCssRunner|void;
|
||||
setClass?: (element: ng.IAugmentedJQuery, className: string, doneFn: Function) => IAnimateCssRunner|void;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// AnimateService
|
||||
// see http://docs.angularjs.org/api/ngAnimate/service/$animate
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IAnimateService extends ng.IAnimateService {
|
||||
/**
|
||||
* AnimateService
|
||||
* see http://docs.angularjs.org/api/ngAnimate/service/$animate
|
||||
*/
|
||||
interface IAnimateService extends angular.IAnimateService {
|
||||
/**
|
||||
* Globally enables / disables animations.
|
||||
*
|
||||
@@ -39,7 +46,7 @@ declare module angular.animate {
|
||||
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
|
||||
* @returns the animation callback promise
|
||||
*/
|
||||
animate(element: JQuery, from: any, to: any, className?: string, options?: IAnimationOptions): ng.IPromise<void>;
|
||||
animate(element: JQuery, from: any, to: any, className?: string, options?: IAnimationOptions): IPromise<void>;
|
||||
|
||||
/**
|
||||
* Appends the element to the parentElement element that resides in the document and then runs the enter animation.
|
||||
@@ -50,7 +57,7 @@ declare module angular.animate {
|
||||
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
|
||||
* @returns the animation callback promise
|
||||
*/
|
||||
enter(element: JQuery, parentElement: JQuery, afterElement?: JQuery, options?: IAnimationOptions): ng.IPromise<void>;
|
||||
enter(element: JQuery, parentElement: JQuery, afterElement?: JQuery, options?: IAnimationOptions): IPromise<void>;
|
||||
|
||||
/**
|
||||
* Runs the leave animation operation and, upon completion, removes the element from the DOM.
|
||||
@@ -59,7 +66,7 @@ declare module angular.animate {
|
||||
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
|
||||
* @returns the animation callback promise
|
||||
*/
|
||||
leave(element: JQuery, options?: IAnimationOptions): ng.IPromise<void>;
|
||||
leave(element: JQuery, options?: IAnimationOptions): IPromise<void>;
|
||||
|
||||
/**
|
||||
* Fires the move DOM operation. Just before the animation starts, the animate service will either append
|
||||
@@ -71,7 +78,7 @@ declare module angular.animate {
|
||||
* @param afterElement the sibling element (which is the previous element) of the element that will be the focus of the move animation
|
||||
* @returns the animation callback promise
|
||||
*/
|
||||
move(element: JQuery, parentElement: JQuery, afterElement?: JQuery): ng.IPromise<void>;
|
||||
move(element: JQuery, parentElement: JQuery, afterElement?: JQuery): IPromise<void>;
|
||||
|
||||
/**
|
||||
* Triggers a custom animation event based off the className variable and then attaches the className
|
||||
@@ -82,7 +89,7 @@ declare module angular.animate {
|
||||
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
|
||||
* @returns the animation callback promise
|
||||
*/
|
||||
addClass(element: JQuery, className: string, options?: IAnimationOptions): ng.IPromise<void>;
|
||||
addClass(element: JQuery, className: string, options?: IAnimationOptions): IPromise<void>;
|
||||
|
||||
/**
|
||||
* Triggers a custom animation event based off the className variable and then removes the CSS class
|
||||
@@ -93,7 +100,7 @@ declare module angular.animate {
|
||||
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
|
||||
* @returns the animation callback promise
|
||||
*/
|
||||
removeClass(element: JQuery, className: string, options?: IAnimationOptions): ng.IPromise<void>;
|
||||
removeClass(element: JQuery, className: string, options?: IAnimationOptions): IPromise<void>;
|
||||
|
||||
/**
|
||||
* Adds and/or removes the given CSS classes to and from the element. Once complete, the done() callback
|
||||
@@ -105,18 +112,18 @@ declare module angular.animate {
|
||||
* @param options an optional collection of styles that will be picked up by the CSS transition/animation
|
||||
* @returns the animation callback promise
|
||||
*/
|
||||
setClass(element: JQuery, add: string, remove: string, options?: IAnimationOptions): ng.IPromise<void>;
|
||||
setClass(element: JQuery, add: string, remove: string, options?: IAnimationOptions): IPromise<void>;
|
||||
|
||||
/**
|
||||
* Cancels the provided animation.
|
||||
*/
|
||||
cancel(animationPromise: ng.IPromise<void>): void;
|
||||
cancel(animationPromise: IPromise<void>): void;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// AngularProvider
|
||||
// see http://docs.angularjs.org/api/ngAnimate/provider/$animateProvider
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* AngularProvider
|
||||
* see http://docs.angularjs.org/api/ngAnimate/provider/$animateProvider
|
||||
*/
|
||||
interface IAnimateProvider {
|
||||
/**
|
||||
* Registers a new injectable animation factory function.
|
||||
@@ -124,7 +131,7 @@ declare module angular.animate {
|
||||
* @param name The name of the animation.
|
||||
* @param factory The factory function that will be executed to return the animation object.
|
||||
*/
|
||||
register(name: string, factory: () => ng.IAnimateCallbackObject): void;
|
||||
register(name: string, factory: () => IAnimateCallbackObject): void;
|
||||
|
||||
/**
|
||||
* Gets and/or sets the CSS class expression that is checked when performing an animation.
|
||||
@@ -135,12 +142,120 @@ declare module angular.animate {
|
||||
classNameFilter(expression?: RegExp): RegExp;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Angular Animation Options
|
||||
// see https://docs.angularjs.org/api/ngAnimate/#applying-directive-specific-styles-to-an-animation
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IAnimationOptions {
|
||||
to?: Object;
|
||||
from?: Object;
|
||||
}
|
||||
/**
|
||||
* Angular Animation Options
|
||||
* see https://docs.angularjs.org/api/ngAnimate/#applying-directive-specific-styles-to-an-animation
|
||||
*/
|
||||
interface IAnimationOptions {
|
||||
/**
|
||||
* The ending CSS styles (a key/value object) that will be applied across the animation via a CSS transition.
|
||||
*/
|
||||
to?: Object;
|
||||
|
||||
/**
|
||||
* The starting CSS styles (a key/value object) that will be applied at the start of the animation.
|
||||
*/
|
||||
from?: Object;
|
||||
|
||||
/**
|
||||
* The DOM event (e.g. enter, leave, move). When used, a generated CSS class of ng-EVENT and
|
||||
* ng-EVENT-active will be applied to the element during the animation. Multiple events can be provided when
|
||||
* spaces are used as a separator. (Note that this will not perform any DOM operation.)
|
||||
*/
|
||||
event?: string;
|
||||
|
||||
/**
|
||||
* The CSS easing value that will be applied to the transition or keyframe animation (or both).
|
||||
*/
|
||||
easing?: string;
|
||||
|
||||
/**
|
||||
* The raw CSS transition style that will be used (e.g. 1s linear all).
|
||||
*/
|
||||
transition?: string;
|
||||
|
||||
/**
|
||||
* The raw CSS keyframe animation style that will be used (e.g. 1s my_animation linear).
|
||||
*/
|
||||
keyframe?: string;
|
||||
|
||||
/**
|
||||
* A space separated list of CSS classes that will be added to the element and spread across the animation.
|
||||
*/
|
||||
addClass?: string;
|
||||
|
||||
/**
|
||||
* A space separated list of CSS classes that will be removed from the element and spread across
|
||||
* the animation.
|
||||
*/
|
||||
removeClass?: string;
|
||||
|
||||
/**
|
||||
* A number value representing the total duration of the transition and/or keyframe (note that a value
|
||||
* of 1 is 1000ms). If a value of 0 is provided then the animation will be skipped entirely.
|
||||
*/
|
||||
duration?: number;
|
||||
|
||||
/**
|
||||
* A number value representing the total delay of the transition and/or keyframe (note that a value of
|
||||
* 1 is 1000ms). If a value of true is used then whatever delay value is detected from the CSS classes will be
|
||||
* mirrored on the elements styles (e.g. by setting delay true then the style value of the element will be
|
||||
* transition-delay: DETECTED_VALUE). Using true is useful when you want the CSS classes and inline styles to
|
||||
* all share the same CSS delay value.
|
||||
*/
|
||||
delay?: number;
|
||||
|
||||
/**
|
||||
* A numeric time value representing the delay between successively animated elements (Click here to
|
||||
* learn how CSS-based staggering works in ngAnimate.)
|
||||
*/
|
||||
stagger?: number;
|
||||
|
||||
/**
|
||||
* The numeric index representing the stagger item (e.g. a value of 5 is equal to the sixth item
|
||||
* in the stagger; therefore when a stagger option value of 0.1 is used then there will be a stagger delay of 600ms)
|
||||
* applyClassesEarly - Whether or not the classes being added or removed will be used when detecting the animation.
|
||||
* This is set by $animate when enter/leave/move animations are fired to ensure that the CSS classes are resolved in time.
|
||||
* (Note that this will prevent any transitions from occuring on the classes being added and removed.)
|
||||
*/
|
||||
staggerIndex?: number;
|
||||
}
|
||||
|
||||
interface IAnimateCssRunner {
|
||||
/**
|
||||
* Starts the animation
|
||||
*
|
||||
* @returns The animation runner with a done function for supplying a callback.
|
||||
*/
|
||||
start(): IAnimateCssRunnerStart;
|
||||
|
||||
/**
|
||||
* Ends (aborts) the animation
|
||||
*/
|
||||
end(): void;
|
||||
}
|
||||
|
||||
interface IAnimateCssRunnerStart extends IPromise<void> {
|
||||
/**
|
||||
* Allows you to add done callbacks to the running animation
|
||||
*
|
||||
* @param callbackFn: the callback function to be run
|
||||
*/
|
||||
done(callbackFn: (animationFinished: boolean) => void): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* AnimateCssService
|
||||
* see http://docs.angularjs.org/api/ngAnimate/service/$animateCss
|
||||
*/
|
||||
interface IAnimateCssService {
|
||||
(element: JQuery, animateCssOptions: IAnimationOptions): IAnimateCssRunner;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
declare module angular {
|
||||
interface IModule {
|
||||
animate(cssSelector: string, animateFactory: angular.animate.IAnimateFactory): IModule;
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+39
-13
@@ -1,6 +1,6 @@
|
||||
// Type definitions for Angular JS 1.3 (ngCookies module)
|
||||
// Type definitions for Angular JS 1.4 (ngCookies module)
|
||||
// Project: http://angularjs.org
|
||||
// Definitions by: Diego Vilar <http://github.com/diegovilar>
|
||||
// Definitions by: Diego Vilar <http://github.com/diegovilar>, Anthony Ciccarello <http://github.com/aciccarello>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
@@ -11,26 +11,52 @@ declare module "angular-cookies" {
|
||||
export = _;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ngCookies module (angular-cookies.js)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* ngCookies module (angular-cookies.js)
|
||||
*/
|
||||
declare module angular.cookies {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// CookieService
|
||||
// see http://docs.angularjs.org/api/ngCookies.$cookies
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* CookieService
|
||||
* see http://docs.angularjs.org/api/ngCookies.$cookies
|
||||
*/
|
||||
interface ICookiesService {
|
||||
[index: string]: any;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// CookieStoreService
|
||||
// see http://docs.angularjs.org/api/ngCookies.$cookieStore
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* CookieStoreService
|
||||
* see http://docs.angularjs.org/api/ngCookies.$cookieStore
|
||||
*/
|
||||
interface ICookiesService {
|
||||
get(key: string): string;
|
||||
getObject(key: string): any;
|
||||
getAll(): any;
|
||||
put(key: string, value: string, options?: any): void;
|
||||
putObject(key: string, value: any, options?: any): void;
|
||||
remove(key: string, options?: any): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* CookieStoreService DEPRECATED
|
||||
* see https://code.angularjs.org/1.2.26/docs/api/ngCookies/service/$cookieStore
|
||||
*/
|
||||
interface ICookieStoreService {
|
||||
/**
|
||||
* Returns the value of given cookie key
|
||||
* @param key Id to use for lookup
|
||||
*/
|
||||
get(key: string): any;
|
||||
/**
|
||||
* Sets a value for given cookie key
|
||||
* @param key Id for the value
|
||||
* @param value Value to be stored
|
||||
*/
|
||||
put(key: string, value: any): void;
|
||||
/**
|
||||
* Remove given cookie
|
||||
* @param key Id of the key-value pair to delete
|
||||
*/
|
||||
remove(key: string): void;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+23
-18
@@ -15,12 +15,6 @@ declare module "angular-mocks/ngAnimateMock" {
|
||||
export = _;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// functions attached to global object (window)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
declare var module: (...modules: any[]) => any;
|
||||
declare var inject: (...fns: Function[]) => any;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ngMock module (angular-mocks.js)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -33,27 +27,32 @@ declare module angular {
|
||||
interface IAngularStatic {
|
||||
mock: IMockStatic;
|
||||
}
|
||||
|
||||
// see https://docs.angularjs.org/api/ngMock/function/angular.mock.inject
|
||||
interface IInjectStatic {
|
||||
(...fns: Function[]): any;
|
||||
(...inlineAnnotatedConstructor: any[]): any; // this overload is undocumented, but works
|
||||
strictDi(val?: boolean): void;
|
||||
}
|
||||
|
||||
interface IMockStatic {
|
||||
// see http://docs.angularjs.org/api/angular.mock.dump
|
||||
// see https://docs.angularjs.org/api/ngMock/function/angular.mock.dump
|
||||
dump(obj: any): string;
|
||||
|
||||
// see http://docs.angularjs.org/api/angular.mock.inject
|
||||
inject(...fns: Function[]): any;
|
||||
inject(...inlineAnnotatedConstructor: any[]): any; // this overload is undocumented, but works
|
||||
inject: IInjectStatic
|
||||
|
||||
// see http://docs.angularjs.org/api/angular.mock.module
|
||||
// see https://docs.angularjs.org/api/ngMock/function/angular.mock.module
|
||||
module(...modules: any[]): any;
|
||||
|
||||
// see http://docs.angularjs.org/api/angular.mock.TzDate
|
||||
// see https://docs.angularjs.org/api/ngMock/type/angular.mock.TzDate
|
||||
TzDate(offset: number, timestamp: number): Date;
|
||||
TzDate(offset: number, timestamp: string): Date;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ExceptionHandlerService
|
||||
// see http://docs.angularjs.org/api/ngMock.$exceptionHandler
|
||||
// see http://docs.angularjs.org/api/ngMock.$exceptionHandlerProvider
|
||||
// see https://docs.angularjs.org/api/ngMock/service/$exceptionHandler
|
||||
// see https://docs.angularjs.org/api/ngMock/provider/$exceptionHandlerProvider
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IExceptionHandlerProvider extends IServiceProvider {
|
||||
mode(mode: string): void;
|
||||
@@ -61,7 +60,7 @@ declare module angular {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// TimeoutService
|
||||
// see http://docs.angularjs.org/api/ngMock.$timeout
|
||||
// see https://docs.angularjs.org/api/ngMock/service/$timeout
|
||||
// Augments the original service
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface ITimeoutService {
|
||||
@@ -72,7 +71,7 @@ declare module angular {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// IntervalService
|
||||
// see http://docs.angularjs.org/api/ngMock.$interval
|
||||
// see https://docs.angularjs.org/api/ngMock/service/$interval
|
||||
// Augments the original service
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IIntervalService {
|
||||
@@ -81,7 +80,7 @@ declare module angular {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// LogService
|
||||
// see http://docs.angularjs.org/api/ngMock.$log
|
||||
// see https://docs.angularjs.org/api/ngMock/service/$log
|
||||
// Augments the original service
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface ILogService {
|
||||
@@ -95,7 +94,7 @@ declare module angular {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// HttpBackendService
|
||||
// see http://docs.angularjs.org/api/ngMock.$httpBackend
|
||||
// see https://docs.angularjs.org/api/ngMock/service/$httpBackend
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IHttpBackendService {
|
||||
flush(count?: number): void;
|
||||
@@ -234,3 +233,9 @@ declare module angular {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// functions attached to global object (window)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
declare var module: (...modules: any[]) => any;
|
||||
declare var inject: angular.IInjectStatic;
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
/// <reference path="angular-resource.d.ts" />
|
||||
|
||||
interface IMyResource extends ng.resource.IResource<IMyResource> { };
|
||||
interface IMyResourceClass extends ng.resource.IResourceClass<IMyResource> { };
|
||||
interface IMyResource extends angular.resource.IResource<IMyResource> { };
|
||||
interface IMyResourceClass extends angular.resource.IResourceClass<IMyResource> { };
|
||||
|
||||
///////////////////////////////////////
|
||||
// IActionDescriptor
|
||||
///////////////////////////////////////
|
||||
var actionDescriptor: ng.resource.IActionDescriptor;
|
||||
var actionDescriptor: angular.resource.IActionDescriptor;
|
||||
|
||||
actionDescriptor.url = '/api/test-url/'
|
||||
actionDescriptor.headers = { header: 'value' };
|
||||
actionDescriptor.isArray = true;
|
||||
actionDescriptor.method = 'method action';
|
||||
@@ -19,7 +20,7 @@ actionDescriptor.params = { key: 'value' };
|
||||
///////////////////////////////////////
|
||||
var resourceClass: IMyResourceClass;
|
||||
var resource: IMyResource;
|
||||
var resourceArray: ng.resource.IResourceArray<IMyResource>;
|
||||
var resourceArray: angular.resource.IResourceArray<IMyResource>;
|
||||
|
||||
resource = resourceClass.delete();
|
||||
resource = resourceClass.delete({ key: 'value' });
|
||||
@@ -49,7 +50,7 @@ resourceArray = resourceClass.query({ key: 'value' }, { key: 'value' });
|
||||
resourceArray = resourceClass.query({ key: 'value' }, { key: 'value' }, function () { });
|
||||
resourceArray = resourceClass.query({ key: 'value' }, { key: 'value' }, function () { }, function () { });
|
||||
resourceArray.push(resource);
|
||||
resourceArray.$promise.then(function(data: ng.resource.IResourceArray<IMyResource>) {});
|
||||
resourceArray.$promise.then(function(data: angular.resource.IResourceArray<IMyResource>) {});
|
||||
|
||||
resource = resourceClass.remove();
|
||||
resource = resourceClass.remove({ key: 'value' });
|
||||
@@ -73,8 +74,8 @@ resource = resourceClass.save({ key: 'value' }, { key: 'value' }, function () {
|
||||
// IResource
|
||||
///////////////////////////////////////
|
||||
|
||||
var promise : ng.IPromise<IMyResource>;
|
||||
var arrayPromise : ng.IPromise<IMyResource[]>;
|
||||
var promise : angular.IPromise<IMyResource>;
|
||||
var arrayPromise : angular.IPromise<IMyResource[]>;
|
||||
|
||||
promise = resource.$delete();
|
||||
promise = resource.$delete({ key: 'value' });
|
||||
@@ -97,7 +98,7 @@ arrayPromise = resourceArray[0].$query({ key: 'value' }, function () { });
|
||||
arrayPromise = resourceArray[0].$query(function () { });
|
||||
arrayPromise = resourceArray[0].$query(function () { }, function () { });
|
||||
arrayPromise = resourceArray[0].$query({ key: 'value' }, function () { }, function () { });
|
||||
arrayPromise.then(function(data: ng.resource.IResourceArray<IMyResource>) {});
|
||||
arrayPromise.then(function(data: angular.resource.IResourceArray<IMyResource>) {});
|
||||
|
||||
promise = resource.$remove();
|
||||
promise = resource.$remove({ key: 'value' });
|
||||
@@ -116,7 +117,7 @@ promise = resource.$save({ key: 'value' }, function () { }, function () { });
|
||||
///////////////////////////////////////
|
||||
// IResourceService
|
||||
///////////////////////////////////////
|
||||
var resourceService: ng.resource.IResourceService;
|
||||
var resourceService: angular.resource.IResourceService;
|
||||
resourceClass = resourceService<IMyResource, IMyResourceClass>('test');
|
||||
resourceClass = resourceService<IMyResource>('test');
|
||||
resourceClass = resourceService('test');
|
||||
@@ -125,14 +126,21 @@ resourceClass = resourceService('test');
|
||||
// IModule
|
||||
///////////////////////////////////////
|
||||
var mod: ng.IModule;
|
||||
var resourceServiceFactoryFunction: ng.resource.IResourceServiceFactoryFunction<IMyResource>;
|
||||
var resourceService: ng.resource.IResourceService;
|
||||
var resourceServiceFactoryFunction: angular.resource.IResourceServiceFactoryFunction<IMyResource>;
|
||||
var resourceService: angular.resource.IResourceService;
|
||||
|
||||
resourceClass = resourceServiceFactoryFunction<IMyResourceClass>(resourceService);
|
||||
|
||||
resourceServiceFactoryFunction = function (resourceService: ng.resource.IResourceService) { return <any>resourceClass; };
|
||||
resourceServiceFactoryFunction = function (resourceService: angular.resource.IResourceService) { return <any>resourceClass; };
|
||||
mod = mod.factory('factory name', resourceServiceFactoryFunction);
|
||||
|
||||
///////////////////////////////////////
|
||||
// IResource
|
||||
///////////////////////////////////////
|
||||
///////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////
|
||||
// IResourceServiceProvider
|
||||
///////////////////////////////////////
|
||||
var resourceServiceProvider: angular.resource.IResourceServiceProvider;
|
||||
resourceServiceProvider.defaults.stripTrailingSlashes = false;
|
||||
|
||||
Vendored
+30
-21
@@ -21,6 +21,7 @@ declare module angular.resource {
|
||||
stripTrailingSlashes?: boolean;
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ResourceService
|
||||
// see http://docs.angularjs.org/api/ngResource.$resource
|
||||
@@ -45,6 +46,7 @@ declare module angular.resource {
|
||||
|
||||
// Just a reference to facilitate describing new actions
|
||||
interface IActionDescriptor {
|
||||
url?: string;
|
||||
method: string;
|
||||
isArray?: boolean;
|
||||
params?: any;
|
||||
@@ -104,28 +106,28 @@ declare module angular.resource {
|
||||
// Instance calls always return the the promise of the request which retrieved the object
|
||||
// https://github.com/angular/angular.js/blob/v1.2.0/src/ngResource/resource.js#L538-L546
|
||||
interface IResource<T> {
|
||||
$get(): ng.IPromise<T>;
|
||||
$get(params?: Object, success?: Function, error?: Function): ng.IPromise<T>;
|
||||
$get(success: Function, error?: Function): ng.IPromise<T>;
|
||||
$get(): angular.IPromise<T>;
|
||||
$get(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
|
||||
$get(success: Function, error?: Function): angular.IPromise<T>;
|
||||
|
||||
$query(): ng.IPromise<IResourceArray<T>>;
|
||||
$query(params?: Object, success?: Function, error?: Function): ng.IPromise<IResourceArray<T>>;
|
||||
$query(success: Function, error?: Function): ng.IPromise<IResourceArray<T>>;
|
||||
$query(): angular.IPromise<IResourceArray<T>>;
|
||||
$query(params?: Object, success?: Function, error?: Function): angular.IPromise<IResourceArray<T>>;
|
||||
$query(success: Function, error?: Function): angular.IPromise<IResourceArray<T>>;
|
||||
|
||||
$save(): ng.IPromise<T>;
|
||||
$save(params?: Object, success?: Function, error?: Function): ng.IPromise<T>;
|
||||
$save(success: Function, error?: Function): ng.IPromise<T>;
|
||||
$save(): angular.IPromise<T>;
|
||||
$save(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
|
||||
$save(success: Function, error?: Function): angular.IPromise<T>;
|
||||
|
||||
$remove(): ng.IPromise<T>;
|
||||
$remove(params?: Object, success?: Function, error?: Function): ng.IPromise<T>;
|
||||
$remove(success: Function, error?: Function): ng.IPromise<T>;
|
||||
$remove(): angular.IPromise<T>;
|
||||
$remove(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
|
||||
$remove(success: Function, error?: Function): angular.IPromise<T>;
|
||||
|
||||
$delete(): ng.IPromise<T>;
|
||||
$delete(params?: Object, success?: Function, error?: Function): ng.IPromise<T>;
|
||||
$delete(success: Function, error?: Function): ng.IPromise<T>;
|
||||
$delete(): angular.IPromise<T>;
|
||||
$delete(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
|
||||
$delete(success: Function, error?: Function): angular.IPromise<T>;
|
||||
|
||||
/** the promise of the original server interaction that created this instance. **/
|
||||
$promise : ng.IPromise<T>;
|
||||
$promise : angular.IPromise<T>;
|
||||
$resolved : boolean;
|
||||
}
|
||||
|
||||
@@ -134,15 +136,22 @@ declare module angular.resource {
|
||||
*/
|
||||
interface IResourceArray<T> extends Array<T> {
|
||||
/** the promise of the original server interaction that created this collection. **/
|
||||
$promise : ng.IPromise<IResourceArray<T>>;
|
||||
$promise : angular.IPromise<IResourceArray<T>>;
|
||||
$resolved : boolean;
|
||||
}
|
||||
|
||||
/** when creating a resource factory via IModule.factory */
|
||||
interface IResourceServiceFactoryFunction<T> {
|
||||
($resource: ng.resource.IResourceService): IResourceClass<T>;
|
||||
<U extends IResourceClass<T>>($resource: ng.resource.IResourceService): U;
|
||||
($resource: angular.resource.IResourceService): IResourceClass<T>;
|
||||
<U extends IResourceClass<T>>($resource: angular.resource.IResourceService): U;
|
||||
}
|
||||
|
||||
// IResourceServiceProvider used to configure global settings
|
||||
interface IResourceServiceProvider extends angular.IServiceProvider {
|
||||
|
||||
defaults: IResourceOptions;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** extensions to base ng based on using angular-resource */
|
||||
@@ -150,13 +159,13 @@ declare module angular {
|
||||
|
||||
interface IModule {
|
||||
/** creating a resource service factory */
|
||||
factory(name: string, resourceServiceFactoryFunction: ng.resource.IResourceServiceFactoryFunction<any>): IModule;
|
||||
factory(name: string, resourceServiceFactoryFunction: angular.resource.IResourceServiceFactoryFunction<any>): IModule;
|
||||
}
|
||||
}
|
||||
|
||||
interface Array<T>
|
||||
{
|
||||
/** the promise of the original server interaction that created this collection. **/
|
||||
$promise : ng.IPromise<Array<T>>;
|
||||
$promise : angular.IPromise<Array<T>>;
|
||||
$resolved : boolean;
|
||||
}
|
||||
|
||||
@@ -34,3 +34,7 @@ $routeProvider
|
||||
})
|
||||
.otherwise({ redirectTo: '/' })
|
||||
.otherwise({ redirectTo: ($routeParams?: ng.route.IRouteParamsService, $locationPath?: string, $locationSearch?: any) => "" });
|
||||
|
||||
|
||||
var current: ng.route.ICurrentRoute;
|
||||
current.locals['test-key'] = 'test-value';
|
||||
|
||||
Vendored
+4
-3
@@ -63,7 +63,7 @@ declare module angular.route {
|
||||
*
|
||||
* {Array.<Object>} - route parameters extracted from the current $location.path() by applying the current route
|
||||
*/
|
||||
template?: string|{($routeParams?: ng.route.IRouteParamsService) : string;}
|
||||
template?: string|{($routeParams?: angular.route.IRouteParamsService) : string;}
|
||||
/**
|
||||
* {string=|function()=}
|
||||
* Path or function that returns a path to an html template that should be used by ngView.
|
||||
@@ -72,7 +72,7 @@ declare module angular.route {
|
||||
*
|
||||
* {Array.<Object>} - route parameters extracted from the current $location.path() by applying the current route
|
||||
*/
|
||||
templateUrl?: string|{ ($routeParams?: ng.route.IRouteParamsService): string; }
|
||||
templateUrl?: string|{ ($routeParams?: angular.route.IRouteParamsService): string; }
|
||||
/**
|
||||
* {Object.<string, function>=} - An optional map of dependencies which should be injected into the controller. If any of these dependencies are promises, the router will wait for them all to be resolved or one to be rejected before the controller is instantiated. If all the promises are resolved successfully, the values of the resolved promises are injected and $routeChangeSuccess event is fired. If any of the promises are rejected the $routeChangeError event is fired. The map object is:
|
||||
*
|
||||
@@ -91,7 +91,7 @@ declare module angular.route {
|
||||
* - {Object} - current $location.search()
|
||||
* - The custom redirectTo function is expected to return a string which will be used to update $location.path() and $location.search().
|
||||
*/
|
||||
redirectTo?: string|{($routeParams?: ng.route.IRouteParamsService, $locationPath?: string, $locationSearch?: any) : string};
|
||||
redirectTo?: string|{($routeParams?: angular.route.IRouteParamsService, $locationPath?: string, $locationSearch?: any) : string};
|
||||
/**
|
||||
* Reload route when only $location.search() or $location.hash() changes.
|
||||
*
|
||||
@@ -109,6 +109,7 @@ declare module angular.route {
|
||||
// see http://docs.angularjs.org/api/ng.$route#current
|
||||
interface ICurrentRoute extends IRoute {
|
||||
locals: {
|
||||
[index: string]: any;
|
||||
$scope: IScope;
|
||||
$template: string;
|
||||
};
|
||||
|
||||
Regular → Executable
+31
-1
@@ -201,6 +201,9 @@ mod.constant(My.Namespace);
|
||||
mod.value('name', 23);
|
||||
mod.value('name', "23");
|
||||
mod.value(My.Namespace);
|
||||
mod.decorator('name', function($scope:ng.IScope){ });
|
||||
mod.decorator('name', ['$scope', <any>function($scope: ng.IScope){ }]);
|
||||
|
||||
|
||||
class TestProvider implements ng.IServiceProvider {
|
||||
constructor(private $scope: ng.IScope) {
|
||||
@@ -278,6 +281,7 @@ function test_IAttributes(attributes: ng.IAttributes){
|
||||
}
|
||||
|
||||
test_IAttributes({
|
||||
$normalize: function (classVal){},
|
||||
$addClass: function (classVal){},
|
||||
$removeClass: function(classVal){},
|
||||
$set: function(key, value){},
|
||||
@@ -699,4 +703,30 @@ module locationTests {
|
||||
$location.path() == '/foo/bar'
|
||||
$location.url() == '/foo/bar?x=y'
|
||||
$location.absUrl() == 'http://example.com/#!/foo/bar?x=y'
|
||||
}
|
||||
}
|
||||
|
||||
// NgModelController
|
||||
function NgModelControllerTyping() {
|
||||
var ngModel: angular.INgModelController;
|
||||
var $http: angular.IHttpService;
|
||||
var $q: angular.IQService;
|
||||
|
||||
// See https://docs.angularjs.org/api/ng/type/ngModel.NgModelController#$validators
|
||||
ngModel.$validators['validCharacters'] = function(modelValue, viewValue) {
|
||||
var value = modelValue || viewValue;
|
||||
return /[0-9]+/.test(value) &&
|
||||
/[a-z]+/.test(value) &&
|
||||
/[A-Z]+/.test(value) &&
|
||||
/\W+/.test(value);
|
||||
};
|
||||
|
||||
ngModel.$asyncValidators['uniqueUsername'] = function(modelValue, viewValue) {
|
||||
var value = modelValue || viewValue;
|
||||
return $http.get('/api/users/' + value).
|
||||
then(function resolved() {
|
||||
return $q.reject('exists');
|
||||
}, function rejected() {
|
||||
return true;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Vendored
+165
-26
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Angular JS 1.3+
|
||||
// Type definitions for Angular JS 1.4+
|
||||
// Project: http://angularjs.org
|
||||
// Definitions by: Diego Vilar <http://github.com/diegovilar>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
@@ -250,6 +250,16 @@ declare module angular {
|
||||
isUndefined(value: any): boolean;
|
||||
lowercase(str: string): string;
|
||||
|
||||
/**
|
||||
* Deeply extends the destination object dst by copying own enumerable properties from the src object(s) to dst. You can specify multiple src objects. If you want to preserve original objects, you can do so by passing an empty object as the target: var object = angular.merge({}, object1, object2).
|
||||
*
|
||||
* Unlike extend(), merge() recursively descends into object properties of source objects, performing a deep copy.
|
||||
*
|
||||
* @param dst Destination object.
|
||||
* @param src Source object(s).
|
||||
*/
|
||||
merge(dst: any, ...src: any[]): any;
|
||||
|
||||
/**
|
||||
* The angular.module is a global place for creating, registering and retrieving Angular modules. All modules (angular core or 3rd party) that should be available to an application must be registered using this mechanism.
|
||||
*
|
||||
@@ -384,6 +394,14 @@ declare module angular {
|
||||
value(name: string, value: any): IModule;
|
||||
value(object: Object): IModule;
|
||||
|
||||
/**
|
||||
* Register a service decorator with the $injector. A service decorator intercepts the creation of a service, allowing it to override or modify the behaviour of the service. The object returned by the decorator may be the original service, or a new service object which replaces or wraps and delegates to the original service.
|
||||
* @param name The name of the service to decorate
|
||||
* @param decorator This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments: $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.
|
||||
*/
|
||||
decorator(name:string, decoratorConstructor: Function): IModule;
|
||||
decorator(name:string, inlineAnnotatedConstructor: any[]): IModule;
|
||||
|
||||
// Properties
|
||||
name: string;
|
||||
requires: string[];
|
||||
@@ -401,6 +419,15 @@ declare module angular {
|
||||
*/
|
||||
[name: string]: any;
|
||||
|
||||
/**
|
||||
* Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with x- or data-) to its normalized, camelCase form.
|
||||
*
|
||||
* Also there is special case for Moz prefix starting with upper case letter.
|
||||
*
|
||||
* For further information check out the guide on @see https://docs.angularjs.org/guide/directive#matching-directives
|
||||
*/
|
||||
$normalize(name: string): void;
|
||||
|
||||
/**
|
||||
* Adds the CSS class value specified by the classVal parameter to the
|
||||
* element. If animations are enabled then an animation will be triggered
|
||||
@@ -474,6 +501,7 @@ declare module angular {
|
||||
// types do work and it's common to use them.
|
||||
$setViewValue(value: any, trigger?: string): void;
|
||||
$setPristine(): void;
|
||||
$setDirty(): void;
|
||||
$validate(): void;
|
||||
$setTouched(): void;
|
||||
$setUntouched(): void;
|
||||
@@ -505,11 +533,14 @@ declare module angular {
|
||||
}
|
||||
|
||||
interface IModelValidators {
|
||||
[index: string]: (...args: any[]) => boolean;
|
||||
/**
|
||||
* viewValue is any because it can be an object that is called in the view like $viewValue.name:$viewValue.subName
|
||||
*/
|
||||
[index: string]: (modelValue: any, viewValue: any) => boolean;
|
||||
}
|
||||
|
||||
interface IAsyncModelValidators {
|
||||
[index: string]: (...args: any[]) => IPromise<boolean>;
|
||||
[index: string]: (modelValue: any, viewValue: any) => IPromise<any>;
|
||||
}
|
||||
|
||||
interface IModelParser {
|
||||
@@ -539,9 +570,29 @@ declare module angular {
|
||||
$applyAsync(exp: string): any;
|
||||
$applyAsync(exp: (scope: IScope) => any): any;
|
||||
|
||||
/**
|
||||
* Dispatches an event name downwards to all child scopes (and their children) notifying the registered $rootScope.Scope listeners.
|
||||
*
|
||||
* The event life cycle starts at the scope on which $broadcast was called. All listeners listening for name event on this scope get notified. Afterwards, the event propagates to all direct and indirect scopes of the current scope and calls all registered listeners along the way. The event cannot be canceled.
|
||||
*
|
||||
* Any exception emitted from the listeners will be passed onto the $exceptionHandler service.
|
||||
*
|
||||
* @param name Event name to broadcast.
|
||||
* @param args Optional one or more arguments which will be passed onto the event listeners.
|
||||
*/
|
||||
$broadcast(name: string, ...args: any[]): IAngularEvent;
|
||||
$destroy(): void;
|
||||
$digest(): void;
|
||||
/**
|
||||
* Dispatches an event name upwards through the scope hierarchy notifying the registered $rootScope.Scope listeners.
|
||||
*
|
||||
* The event life cycle starts at the scope on which $emit was called. All listeners listening for name event on this scope get notified. Afterwards, the event traverses upwards toward the root scope and calls all registered listeners along the way. The event will stop propagating if one of the listeners cancels it.
|
||||
*
|
||||
* Any exception emitted from the listeners will be passed onto the $exceptionHandler service.
|
||||
*
|
||||
* @param name Event name to emit.
|
||||
* @param args Optional one or more arguments which will be passed onto the event listeners.
|
||||
*/
|
||||
$emit(name: string, ...args: any[]): IAngularEvent;
|
||||
|
||||
$eval(): any;
|
||||
@@ -665,7 +716,7 @@ declare module angular {
|
||||
// TODO undocumented, so we need to get it from the source code
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IBrowserService {
|
||||
defer: ng.ITimeoutService;
|
||||
defer: angular.ITimeoutService;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
@@ -716,17 +767,37 @@ declare module angular {
|
||||
eventFn(element: Node, doneFn: () => void): Function;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// FilterService
|
||||
// see http://docs.angularjs.org/api/ng.$filter
|
||||
// see http://docs.angularjs.org/api/ng.$filterProvider
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* $filter - $filterProvider - service in module ng
|
||||
*
|
||||
* Filters are used for formatting data displayed to the user.
|
||||
*
|
||||
* see https://docs.angularjs.org/api/ng/service/$filter
|
||||
*/
|
||||
interface IFilterService {
|
||||
/**
|
||||
* Usage:
|
||||
* $filter(name);
|
||||
*
|
||||
* @param name Name of the filter function to retrieve
|
||||
*/
|
||||
(name: string): Function;
|
||||
}
|
||||
|
||||
/**
|
||||
* $filterProvider - $filter - provider in module ng
|
||||
*
|
||||
* Filters are just functions which transform input to an output. However filters need to be Dependency Injected. To achieve this a filter definition consists of a factory function which is annotated with dependencies and is responsible for creating a filter function.
|
||||
*
|
||||
* see https://docs.angularjs.org/api/ng/provider/$filterProvider
|
||||
*/
|
||||
interface IFilterProvider extends IServiceProvider {
|
||||
register(name: string, filterFactory: Function): IServiceProvider;
|
||||
/**
|
||||
* register(name);
|
||||
*
|
||||
* @param name Name of the filter function, or an object map of filters where the keys are the filter names and the values are the filter factories. Note: Filter names must be valid angular Expressions identifiers, such as uppercase or orderBy. Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace your filters, then you can use capitalization (myappSubsectionFilterx) or underscores (myapp_subsection_filterx).
|
||||
*/
|
||||
register(name: string | {}): IServiceProvider;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -974,10 +1045,10 @@ declare module angular {
|
||||
interface IPromise<T> {
|
||||
/**
|
||||
* Regardless of when the promise was or will be resolved or rejected, then calls one of the success or error callbacks asynchronously as soon as the result is available. The callbacks are called with a single argument: the result or rejection reason. Additionally, the notify callback may be called zero or more times to provide a progress indication, before the promise is resolved or rejected.
|
||||
*
|
||||
* The successCallBack may return IPromise<void> for when a $q.reject() needs to be returned
|
||||
* This method returns a new promise which is resolved or rejected via the return value of the successCallback, errorCallback. It also notifies via the return value of the notifyCallback method. The promise can not be resolved or rejected from the notifyCallback method.
|
||||
*/
|
||||
then<TResult>(successCallback: (promiseValue: T) => IHttpPromise<TResult>|IPromise<TResult>|TResult, errorCallback?: (reason: any) => any, notifyCallback?: (state: any) => any): IPromise<TResult>;
|
||||
then<TResult>(successCallback: (promiseValue: T) => IHttpPromise<TResult>|IPromise<TResult>|TResult|IPromise<void>, errorCallback?: (reason: any) => any, notifyCallback?: (state: any) => any): IPromise<TResult>;
|
||||
|
||||
/**
|
||||
* Shorthand for promise.then(null, errorCallback)
|
||||
@@ -1005,6 +1076,7 @@ declare module angular {
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IAnchorScrollService {
|
||||
(): void;
|
||||
(hash: string): void;
|
||||
yOffset: any;
|
||||
}
|
||||
|
||||
@@ -1012,34 +1084,95 @@ declare module angular {
|
||||
disableAutoScrolling(): void;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// CacheFactoryService
|
||||
// see http://docs.angularjs.org/api/ng.$cacheFactory
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* $cacheFactory - service in module ng
|
||||
*
|
||||
* Factory that constructs Cache objects and gives access to them.
|
||||
*
|
||||
* see https://docs.angularjs.org/api/ng/service/$cacheFactory
|
||||
*/
|
||||
interface ICacheFactoryService {
|
||||
// Lets not foce the optionsMap to have the capacity member. Even though
|
||||
// it's the ONLY option considered by the implementation today, a consumer
|
||||
// might find it useful to associate some other options to the cache object.
|
||||
//(cacheId: string, optionsMap?: { capacity: number; }): CacheObject;
|
||||
(cacheId: string, optionsMap?: { capacity: number; }): ICacheObject;
|
||||
/**
|
||||
* Factory that constructs Cache objects and gives access to them.
|
||||
*
|
||||
* @param cacheId Name or id of the newly created cache.
|
||||
* @param optionsMap Options object that specifies the cache behavior. Properties:
|
||||
*
|
||||
* capacity — turns the cache into LRU cache.
|
||||
*/
|
||||
(cacheId: string, optionsMap?: { capacity?: number; }): ICacheObject;
|
||||
|
||||
// Methods bellow are not documented
|
||||
/**
|
||||
* Get information about all the caches that have been created.
|
||||
* @returns key-value map of cacheId to the result of calling cache#info
|
||||
*/
|
||||
info(): any;
|
||||
|
||||
/**
|
||||
* Get access to a cache object by the cacheId used when it was created.
|
||||
*
|
||||
* @param cacheId Name or id of a cache to access.
|
||||
*/
|
||||
get(cacheId: string): ICacheObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* $cacheFactory.Cache - type in module ng
|
||||
*
|
||||
* A cache object used to store and retrieve data, primarily used by $http and the script directive to cache templates and other data.
|
||||
*
|
||||
* see https://docs.angularjs.org/api/ng/type/$cacheFactory.Cache
|
||||
*/
|
||||
interface ICacheObject {
|
||||
/**
|
||||
* Retrieve information regarding a particular Cache.
|
||||
*/
|
||||
info(): {
|
||||
/**
|
||||
* the id of the cache instance
|
||||
*/
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* the number of entries kept in the cache instance
|
||||
*/
|
||||
size: number;
|
||||
|
||||
// Not garanteed to have, since it's a non-mandatory option
|
||||
//capacity: number;
|
||||
//...: any additional properties from the options object when creating the cache.
|
||||
};
|
||||
|
||||
/**
|
||||
* Inserts a named entry into the Cache object to be retrieved later, and incrementing the size of the cache if the key was not already present in the cache. If behaving like an LRU cache, it will also remove stale entries from the set.
|
||||
*
|
||||
* It will not insert undefined values into the cache.
|
||||
*
|
||||
* @param key the key under which the cached data is stored.
|
||||
* @param value the value to store alongside the key. If it is undefined, the key will not be stored.
|
||||
*/
|
||||
put<T>(key: string, value?: T): T;
|
||||
|
||||
/**
|
||||
* Retrieves named data stored in the Cache object.
|
||||
*
|
||||
* @param key the key of the data to be retrieved
|
||||
*/
|
||||
get(key: string): any;
|
||||
|
||||
/**
|
||||
* Removes an entry from the Cache object.
|
||||
*
|
||||
* @param key the key of the entry to be removed
|
||||
*/
|
||||
remove(key: string): void;
|
||||
|
||||
/**
|
||||
* Clears the cache object of any entries.
|
||||
*/
|
||||
removeAll(): void;
|
||||
|
||||
/**
|
||||
* Destroys the Cache object entirely, removing it from the $cacheFactory set.
|
||||
*/
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
@@ -1278,7 +1411,7 @@ declare module angular {
|
||||
interface IHttpPromiseCallbackArg<T> {
|
||||
data?: T;
|
||||
status?: number;
|
||||
headers?: (headerName: string) => string;
|
||||
headers?: IHttpHeadersGetter;
|
||||
config?: IRequestConfig;
|
||||
statusText?: string;
|
||||
}
|
||||
@@ -1294,6 +1427,12 @@ declare module angular {
|
||||
* https://docs.angularjs.org/api/ng/service/$http#defaults
|
||||
*/
|
||||
interface IHttpProviderDefaults {
|
||||
cache?: boolean;
|
||||
/**
|
||||
* Transform function or an array of such functions. The transform function takes the http request body and
|
||||
* headers and returns its transformed (typically serialized) version.
|
||||
*/
|
||||
transformRequest?: ((data: any, headersGetter?: any) => any)|((data: any, headersGetter?: any) => any)[];
|
||||
xsrfCookieName?: string;
|
||||
xsrfHeaderName?: string;
|
||||
withCredentials?: boolean;
|
||||
@@ -1468,7 +1607,7 @@ declare module angular {
|
||||
compile?: IDirectiveCompileFn;
|
||||
controller?: any;
|
||||
controllerAs?: string;
|
||||
bindToController?: boolean;
|
||||
bindToController?: boolean|Object;
|
||||
link?: IDirectiveLinkFn | IDirectivePrePost;
|
||||
name?: string;
|
||||
priority?: number;
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
/// <reference path="ansi-styles.d.ts" />
|
||||
|
||||
import ansi = require('ansi-styles');
|
||||
|
||||
|
||||
var styles = [
|
||||
ansi.reset,
|
||||
|
||||
ansi.bold,
|
||||
ansi.dim,
|
||||
ansi.italic,
|
||||
ansi.underline,
|
||||
ansi.inverse,
|
||||
ansi.hidden,
|
||||
ansi.strikethrough,
|
||||
|
||||
ansi.black,
|
||||
ansi.red,
|
||||
ansi.green,
|
||||
ansi.yellow,
|
||||
ansi.blue,
|
||||
ansi.magenta,
|
||||
ansi.cyan,
|
||||
ansi.white,
|
||||
ansi.gray,
|
||||
|
||||
ansi.bgBlack,
|
||||
ansi.bgRed,
|
||||
ansi.bgGreen,
|
||||
ansi.bgYellow,
|
||||
ansi.bgBlue,
|
||||
ansi.bgMagenta,
|
||||
ansi.bgCyan,
|
||||
ansi.bgWhite
|
||||
]
|
||||
|
||||
for (var key in styles) {
|
||||
check(key, styles[key])
|
||||
}
|
||||
|
||||
function check(key:string, escapeCodes:ansi.EscapeCodePair): void {
|
||||
if (uninitialized(escapeCodes.open)) {
|
||||
throw new Error('key not found ~> ' + key + '.open')
|
||||
}
|
||||
if (uninitialized(escapeCodes.close)) {
|
||||
throw new Error('key not found ~> ' + key + '.close')
|
||||
}
|
||||
}
|
||||
|
||||
function uninitialized(val:any): boolean {
|
||||
return val === null || val === undefined
|
||||
}
|
||||
|
||||
|
||||
Vendored
+42
@@ -0,0 +1,42 @@
|
||||
// Type definitions for ansi-styles 2.0.1
|
||||
// Project: https://github.com/sindresorhus/ansi-styles
|
||||
// Definitions by: bryn austin bellomy <https://github.com/brynbellomy>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
declare module "ansi-styles"
|
||||
{
|
||||
export interface EscapeCodePair {
|
||||
open: string;
|
||||
close: string;
|
||||
}
|
||||
|
||||
export var reset: EscapeCodePair;
|
||||
|
||||
export var bold: EscapeCodePair;
|
||||
export var dim: EscapeCodePair;
|
||||
export var italic: EscapeCodePair;
|
||||
export var underline: EscapeCodePair;
|
||||
export var inverse: EscapeCodePair;
|
||||
export var hidden: EscapeCodePair;
|
||||
export var strikethrough: EscapeCodePair;
|
||||
|
||||
export var black: EscapeCodePair;
|
||||
export var red: EscapeCodePair;
|
||||
export var green: EscapeCodePair;
|
||||
export var yellow: EscapeCodePair;
|
||||
export var blue: EscapeCodePair;
|
||||
export var magenta: EscapeCodePair;
|
||||
export var cyan: EscapeCodePair;
|
||||
export var white: EscapeCodePair;
|
||||
export var gray: EscapeCodePair;
|
||||
|
||||
export var bgBlack: EscapeCodePair;
|
||||
export var bgRed: EscapeCodePair;
|
||||
export var bgGreen: EscapeCodePair;
|
||||
export var bgYellow: EscapeCodePair;
|
||||
export var bgBlue: EscapeCodePair;
|
||||
export var bgMagenta: EscapeCodePair;
|
||||
export var bgCyan: EscapeCodePair;
|
||||
export var bgWhite: EscapeCodePair;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
/// <reference path="api-error-handler.d.ts" />
|
||||
|
||||
import errorHandler = require('api-error-handler');
|
||||
import express = require('express');
|
||||
|
||||
var api = express.Router();
|
||||
api.get('/users/:userid', function (req, res, next) {
|
||||
|
||||
});
|
||||
|
||||
api.use(errorHandler());
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// Type definitions for api-error-handler v1.0.0
|
||||
// Project: https://github.com/expressjs/api-error-handler
|
||||
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
|
||||
declare module 'api-error-handler' {
|
||||
import express = require('express');
|
||||
|
||||
function apiErrorHandler(options?: any): express.ErrorRequestHandler;
|
||||
|
||||
export = apiErrorHandler;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
///<reference path='applicationinsights.d.ts' />
|
||||
import appInsights = require("applicationinsights");
|
||||
|
||||
// basic use
|
||||
appInsights.setup("<instrumentation_key>").start();
|
||||
|
||||
// basic use with auto-collection configuration
|
||||
appInsights.setup("<instrumentation_key>")
|
||||
.setAutoCollectRequests(false)
|
||||
.setAutoCollectPerformance(false)
|
||||
.setAutoCollectExceptions(false)
|
||||
// no telemetry will be sent until .start() is called
|
||||
// this prevents any of the auto-collectors from initializing
|
||||
.enableVerboseLogging()
|
||||
.start();
|
||||
|
||||
appInsights.client.trackEvent("custom event", {customProperty: "custom property value"});
|
||||
appInsights.client.trackException(new Error("handled exceptions can be logged with this method"));
|
||||
appInsights.client.trackMetric("custom metric", 3);
|
||||
appInsights.client.trackTrace("trace message");
|
||||
|
||||
// assign common properties to all telemetry
|
||||
appInsights.client.commonProperties = {
|
||||
environment: "dev"
|
||||
};
|
||||
+429
@@ -0,0 +1,429 @@
|
||||
// Type definitions for Application Insights v0.15.1
|
||||
// Project: https://github.com/Microsoft/ApplicationInsights-node.js
|
||||
// Definitions by: Scott Southwood <https://github.com/scsouthw/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
interface AutoCollectConsole {
|
||||
enable(isEnabled: boolean): void;
|
||||
isInitialized(): boolean;
|
||||
}
|
||||
|
||||
interface AutoCollectExceptions {
|
||||
isInitialized(): boolean;
|
||||
enable(isEnabled:boolean): void;
|
||||
}
|
||||
|
||||
interface AutoCollectPerformance {
|
||||
enable(isEnabled: boolean): void;
|
||||
isInitialized(): boolean;
|
||||
}
|
||||
|
||||
interface AutoCollectRequests {
|
||||
enable(isEnabled: boolean): void;
|
||||
isInitialized(): boolean;
|
||||
}
|
||||
|
||||
|
||||
declare module ContractsModule {
|
||||
enum DataPointType {
|
||||
Measurement = 0,
|
||||
Aggregation = 1,
|
||||
}
|
||||
enum DependencyKind {
|
||||
SQL = 0,
|
||||
Http = 1,
|
||||
Other = 2,
|
||||
}
|
||||
enum DependencySourceType {
|
||||
Undefined = 0,
|
||||
Aic = 1,
|
||||
Apmc = 2,
|
||||
}
|
||||
enum SessionState {
|
||||
Start = 0,
|
||||
End = 1,
|
||||
}
|
||||
enum SeverityLevel {
|
||||
Verbose = 0,
|
||||
Information = 1,
|
||||
Warning = 2,
|
||||
Error = 3,
|
||||
Critical = 4,
|
||||
}
|
||||
interface ContextTagKeys {
|
||||
applicationVersion: string;
|
||||
applicationBuild: string;
|
||||
deviceId: string;
|
||||
deviceIp: string;
|
||||
deviceLanguage: string;
|
||||
deviceLocale: string;
|
||||
deviceModel: string;
|
||||
deviceNetwork: string;
|
||||
deviceOEMName: string;
|
||||
deviceOS: string;
|
||||
deviceOSVersion: string;
|
||||
deviceRoleInstance: string;
|
||||
deviceRoleName: string;
|
||||
deviceScreenResolution: string;
|
||||
deviceType: string;
|
||||
deviceMachineName: string;
|
||||
locationIp: string;
|
||||
operationId: string;
|
||||
operationName: string;
|
||||
operationParentId: string;
|
||||
operationRootId: string;
|
||||
operationSyntheticSource: string;
|
||||
operationIsSynthetic: string;
|
||||
sessionId: string;
|
||||
sessionIsFirst: string;
|
||||
sessionIsNew: string;
|
||||
userAccountAcquisitionDate: string;
|
||||
userAccountId: string;
|
||||
userAgent: string;
|
||||
userId: string;
|
||||
userStoreRegion: string;
|
||||
sampleRate: string;
|
||||
internalSdkVersion: string;
|
||||
internalAgentVersion: string;
|
||||
}
|
||||
interface Domain {
|
||||
ver: number;
|
||||
properties: any;
|
||||
}
|
||||
interface Data<TDomain extends ContractsModule.Domain> {
|
||||
baseType: string;
|
||||
baseData: TDomain;
|
||||
}
|
||||
interface Envelope {
|
||||
ver: number;
|
||||
name: string;
|
||||
time: string;
|
||||
sampleRate: number;
|
||||
seq: string;
|
||||
iKey: string;
|
||||
flags: number;
|
||||
deviceId: string;
|
||||
os: string;
|
||||
osVer: string;
|
||||
appId: string;
|
||||
appVer: string;
|
||||
userId: string;
|
||||
tags: {
|
||||
[key: string]: string;
|
||||
};
|
||||
data: Data<Domain>;
|
||||
}
|
||||
interface EventData extends ContractsModule.Domain {
|
||||
ver: number;
|
||||
name: string;
|
||||
properties: any;
|
||||
measurements: any;
|
||||
}
|
||||
interface MessageData extends ContractsModule.Domain {
|
||||
ver: number;
|
||||
message: string;
|
||||
severityLevel: ContractsModule.SeverityLevel;
|
||||
properties: any;
|
||||
}
|
||||
interface ExceptionData extends ContractsModule.Domain {
|
||||
ver: number;
|
||||
handledAt: string;
|
||||
exceptions: ExceptionDetails[];
|
||||
severityLevel: ContractsModule.SeverityLevel;
|
||||
problemId: string;
|
||||
crashThreadId: number;
|
||||
properties: any;
|
||||
measurements: any;
|
||||
}
|
||||
interface StackFrame {
|
||||
level: number;
|
||||
method: string;
|
||||
assembly: string;
|
||||
fileName: string;
|
||||
line: number;
|
||||
}
|
||||
interface ExceptionDetails {
|
||||
id: number;
|
||||
outerId: number;
|
||||
typeName: string;
|
||||
message: string;
|
||||
hasFullStack: boolean;
|
||||
stack: string;
|
||||
parsedStack: StackFrame[];
|
||||
}
|
||||
interface DataPoint {
|
||||
name: string;
|
||||
kind: ContractsModule.DataPointType;
|
||||
value: number;
|
||||
count: number;
|
||||
min: number;
|
||||
max: number;
|
||||
stdDev: number;
|
||||
}
|
||||
interface MetricData extends ContractsModule.Domain {
|
||||
ver: number;
|
||||
metrics: DataPoint[];
|
||||
properties: any;
|
||||
}
|
||||
interface PageViewData extends ContractsModule.EventData {
|
||||
ver: number;
|
||||
url: string;
|
||||
name: string;
|
||||
duration: string;
|
||||
properties: any;
|
||||
measurements: any;
|
||||
}
|
||||
interface PageViewPerfData extends ContractsModule.PageViewData {
|
||||
ver: number;
|
||||
url: string;
|
||||
perfTotal: string;
|
||||
name: string;
|
||||
duration: string;
|
||||
networkConnect: string;
|
||||
sentRequest: string;
|
||||
receivedResponse: string;
|
||||
domProcessing: string;
|
||||
properties: any;
|
||||
measurements: any;
|
||||
}
|
||||
interface RemoteDependencyData extends ContractsModule.Domain {
|
||||
ver: number;
|
||||
name: string;
|
||||
kind: ContractsModule.DataPointType;
|
||||
value: number;
|
||||
count: number;
|
||||
min: number;
|
||||
max: number;
|
||||
stdDev: number;
|
||||
dependencyKind: ContractsModule.DependencyKind;
|
||||
success: boolean;
|
||||
async: boolean;
|
||||
dependencySource: ContractsModule.DependencySourceType;
|
||||
commandName: string;
|
||||
dependencyTypeName: string;
|
||||
properties: any;
|
||||
}
|
||||
interface AjaxCallData extends ContractsModule.PageViewData {
|
||||
ver: number;
|
||||
url: string;
|
||||
ajaxUrl: string;
|
||||
name: string;
|
||||
duration: string;
|
||||
requestSize: number;
|
||||
responseSize: number;
|
||||
timeToFirstByte: string;
|
||||
timeToLastByte: string;
|
||||
callbackDuration: string;
|
||||
responseCode: string;
|
||||
success: boolean;
|
||||
properties: any;
|
||||
measurements: any;
|
||||
}
|
||||
interface RequestData extends ContractsModule.Domain {
|
||||
ver: number;
|
||||
id: string;
|
||||
name: string;
|
||||
startTime: string;
|
||||
duration: string;
|
||||
responseCode: string;
|
||||
success: boolean;
|
||||
httpMethod: string;
|
||||
url: string;
|
||||
properties: any;
|
||||
measurements: any;
|
||||
}
|
||||
interface SessionStateData extends ContractsModule.Domain {
|
||||
ver: number;
|
||||
state: ContractsModule.SessionState;
|
||||
}
|
||||
interface PerformanceCounterData extends ContractsModule.Domain {
|
||||
ver: number;
|
||||
categoryName: string;
|
||||
counterName: string;
|
||||
instanceName: string;
|
||||
kind: DataPointType;
|
||||
count: number;
|
||||
min: number;
|
||||
max: number;
|
||||
stdDev: number;
|
||||
value: number;
|
||||
properties: any;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
interface Channel {
|
||||
constructor(isDisabled: () => boolean, getBatchSize: () => number, getBatchIntervalMs: () => number, sender: Sender): Channel;
|
||||
/**
|
||||
* Add a telemetry item to the send buffer
|
||||
*/
|
||||
send(envelope: ContractsModule.Envelope): void;
|
||||
handleCrash(envelope: ContractsModule.Envelope): void;
|
||||
/**
|
||||
* Immediately send buffered data
|
||||
*/
|
||||
triggerSend(isNodeCrashing?: boolean): void;
|
||||
}
|
||||
|
||||
interface Client {
|
||||
config: Config;
|
||||
context: Context;
|
||||
commonProperties: {
|
||||
[key: string]: string;
|
||||
};
|
||||
channel: Channel;
|
||||
/**
|
||||
* Constructs a new client of the client
|
||||
* @param iKey the instrumentation key to use (read from environment variable if not specified)
|
||||
*/
|
||||
constructor(iKey?: string): Client;
|
||||
/**
|
||||
* Log a user action or other occurrence.
|
||||
* @param name A string to identify this event in the portal.
|
||||
* @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.
|
||||
* @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.
|
||||
*/
|
||||
trackEvent(name: string, properties?: {
|
||||
[key: string]: string;
|
||||
}, measurements?: {
|
||||
[key: string]: number;
|
||||
}): void;
|
||||
/**
|
||||
* Log a trace message
|
||||
* @param message A string to identify this event in the portal.
|
||||
* @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.
|
||||
*/
|
||||
trackTrace(message: string, severityLevel?: ContractsModule.SeverityLevel, properties?: {
|
||||
[key: string]: string;
|
||||
}): void;
|
||||
/**
|
||||
* Log an exception you have caught.
|
||||
* @param exception An Error from a catch clause, or the string error message.
|
||||
* @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.
|
||||
* @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.
|
||||
*/
|
||||
trackException(exception: Error, properties?: {
|
||||
[key: string]: string;
|
||||
}): void;
|
||||
/**
|
||||
* Log a numeric value that is not associated with a specific event. Typically used to send regular reports of performance indicators.
|
||||
* To send a single measurement, use just the first two parameters. If you take measurements very frequently, you can reduce the
|
||||
* telemetry bandwidth by aggregating multiple measurements and sending the resulting average at intervals.
|
||||
* @param name A string that identifies the metric.
|
||||
* @param value The value of the metric
|
||||
*/
|
||||
trackMetric(name: string, value: number): void;
|
||||
trackRequest(request: any /* http.ServerRequest */, response: any /* http.ServerResponse */, properties?: {
|
||||
[key: string]: string;
|
||||
}): void;
|
||||
/**
|
||||
* Immediately send all queued telemetry.
|
||||
*/
|
||||
sendPendingData(): void;
|
||||
getEnvelope(data: ContractsModule.Data<ContractsModule.Domain>, tagOverrides?: {
|
||||
[key: string]: string;
|
||||
}): ContractsModule.Envelope;
|
||||
/**
|
||||
* Generic track method for all telemetry types
|
||||
* @param data the telemetry to send
|
||||
* @param tagOverrides the context tags to use for this telemetry which overwrite default context values
|
||||
*/
|
||||
track(data: ContractsModule.Data<ContractsModule.Domain>, tagOverrides?: {
|
||||
[key: string]: string;
|
||||
}): void;
|
||||
}
|
||||
|
||||
interface Config {
|
||||
instrumentationKey: string;
|
||||
sessionRenewalMs: number;
|
||||
sessionExpirationMs: number;
|
||||
endpointUrl: string;
|
||||
maxBatchSize: number;
|
||||
maxBatchIntervalMs: number;
|
||||
disableAppInsights: boolean;
|
||||
constructor(instrumentationKey?: string): Config;
|
||||
}
|
||||
|
||||
interface Context {
|
||||
keys: ContractsModule.ContextTagKeys;
|
||||
tags: {
|
||||
[key: string]: string;
|
||||
};
|
||||
constructor(packageJsonPath?: string): Context;
|
||||
}
|
||||
|
||||
interface Sender {
|
||||
constructor(getUrl: () => string, onSuccess?: (response: string) => void, onError?: (error: Error) => void): Sender;
|
||||
send(payload: any/* Buffer */): void;
|
||||
saveOnCrash(payload: string): void;
|
||||
/**
|
||||
* enable caching events locally on error
|
||||
*/
|
||||
enableCacheOnError(): void;
|
||||
/**
|
||||
* disable caching events locally on error
|
||||
*/
|
||||
disableCacheOnError(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* The singleton meta interface for the default client of the client. This interface is used to setup/start and configure
|
||||
* the auto-collection behavior of the application insights module.
|
||||
*/
|
||||
declare class ApplicationInsights {
|
||||
static client: Client;
|
||||
private static _isConsole;
|
||||
private static _isExceptions;
|
||||
private static _isPerformance;
|
||||
private static _isRequests;
|
||||
private static _console;
|
||||
private static _exceptions;
|
||||
private static _performance;
|
||||
private static _requests;
|
||||
private static _isStarted;
|
||||
/**
|
||||
* Initializes the default client of the client and sets the default configuration
|
||||
* @param instrumentationKey the instrumentation key to use. Optional, if this is not specified, the value will be
|
||||
* read from the environment variable APPINSIGHTS_INSTRUMENTATION_KEY
|
||||
* @returns {ApplicationInsights} this interface
|
||||
*/
|
||||
static setup(instrumentationKey?: string): typeof ApplicationInsights;
|
||||
/**
|
||||
* Starts automatic collection of telemetry. Prior to calling start no telemetry will be collected
|
||||
* @returns {ApplicationInsights} this interface
|
||||
*/
|
||||
static start(): typeof ApplicationInsights;
|
||||
/**
|
||||
* Sets the state of console tracking (enabled by default)
|
||||
* @param value if true console activity will be sent to Application Insights
|
||||
* @returns {ApplicationInsights} this interface
|
||||
*/
|
||||
static setAutoCollectConsole(value: boolean): typeof ApplicationInsights;
|
||||
/**
|
||||
* Sets the state of exception tracking (enabled by default)
|
||||
* @param value if true uncaught exceptions will be sent to Application Insights
|
||||
* @returns {ApplicationInsights} this interface
|
||||
*/
|
||||
static setAutoCollectExceptions(value: boolean): typeof ApplicationInsights;
|
||||
/**
|
||||
* Sets the state of performance tracking (enabled by default)
|
||||
* @param value if true performance counters will be collected every second and sent to Application Insights
|
||||
* @returns {ApplicationInsights} this interface
|
||||
*/
|
||||
static setAutoCollectPerformance(value: boolean): typeof ApplicationInsights;
|
||||
/**
|
||||
* Sets the state of request tracking (enabled by default)
|
||||
* @param value if true requests will be sent to Application Insights
|
||||
* @returns {ApplicationInsights} this interface
|
||||
*/
|
||||
static setAutoCollectRequests(value: boolean): typeof ApplicationInsights;
|
||||
/**
|
||||
* Enables verbose debug logging
|
||||
* @returns {ApplicationInsights} this interface
|
||||
*/
|
||||
static enableVerboseLogging(): typeof ApplicationInsights;
|
||||
}
|
||||
|
||||
declare module "applicationinsights" {
|
||||
export = ApplicationInsights;
|
||||
}
|
||||
@@ -106,6 +106,17 @@ async.series<number>({
|
||||
},
|
||||
function (err, results) { });
|
||||
|
||||
async.times(5, function(n, next) {
|
||||
next(null, n)
|
||||
}, function(err, results) {
|
||||
console.log(results)
|
||||
})
|
||||
|
||||
async.timesSeries(5, function(n, next) {
|
||||
next(null, n)
|
||||
}, function(err, results) {
|
||||
console.log(results)
|
||||
})
|
||||
|
||||
async.parallel([
|
||||
function (callback) {
|
||||
|
||||
Vendored
+15
-6
@@ -1,17 +1,23 @@
|
||||
// Type definitions for Async 0.1.23
|
||||
// Type definitions for Async 0.9.2
|
||||
// Project: https://github.com/caolan/async
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>, Arseniy Maximov <https://github.com/kern0>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
interface Dictionary<T> { [key: string]: T; }
|
||||
|
||||
// Common interface between Arrays and Array-like objects
|
||||
interface List<T> {
|
||||
[index: number]: T;
|
||||
length: number;
|
||||
}
|
||||
|
||||
interface ErrorCallback { (err?: Error): void; }
|
||||
interface AsyncResultCallback<T> { (err: Error, result: T): void; }
|
||||
interface AsyncResultArrayCallback<T> { (err: Error, results: T[]): void; }
|
||||
interface AsyncResultObjectCallback<T> { (err: Error, results: Dictionary<T>): void; }
|
||||
interface AsyncTimesCallback<T> { (n: number, callback: AsyncResultArrayCallback<T>): void; }
|
||||
|
||||
interface AsyncIterator<T> { (item: T, callback: ErrorCallback): void; }
|
||||
interface AsyncForEachOfIterator<T> { (item: T, index: number, callback: ErrorCallback): void; }
|
||||
interface AsyncResultIterator<T, R> { (item: T, callback: AsyncResultCallback<R>): void; }
|
||||
interface AsyncMemoIterator<T, R> { (memo: R, item: T, callback: AsyncResultCallback<R>): void; }
|
||||
|
||||
@@ -62,6 +68,9 @@ interface Async {
|
||||
each<T>(arr: T[], iterator: AsyncIterator<T>, callback: ErrorCallback): void;
|
||||
eachSeries<T>(arr: T[], iterator: AsyncIterator<T>, callback: ErrorCallback): void;
|
||||
eachLimit<T>(arr: T[], limit: number, iterator: AsyncIterator<T>, callback: ErrorCallback): void;
|
||||
forEachOf<T>(obj: List<T>, iterator: AsyncForEachOfIterator<T>, callback: ErrorCallback): void;
|
||||
forEachOfSeries<T>(obj: List<T>, iterator: AsyncForEachOfIterator<T>, callback: ErrorCallback): void;
|
||||
forEachOfLimit<T>(obj: List<T>, limit: number, iterator: AsyncForEachOfIterator<T>, callback: ErrorCallback): void;
|
||||
map<T, R>(arr: T[], iterator: AsyncResultIterator<T, R>, callback: AsyncResultArrayCallback<R>): any;
|
||||
mapSeries<T, R>(arr: T[], iterator: AsyncResultIterator<T, R>, callback: AsyncResultArrayCallback<R>): any;
|
||||
mapLimit<T, R>(arr: T[], limit: number, iterator: AsyncResultIterator<T, R>, callback: AsyncResultArrayCallback<R>): any;
|
||||
@@ -97,7 +106,7 @@ interface Async {
|
||||
doWhilst(fn: AsyncVoidFunction, test: () => boolean, callback: (err: any) => void): void;
|
||||
until(test: () => boolean, fn: AsyncVoidFunction, callback: (err: any) => void): void;
|
||||
doUntil(fn: AsyncVoidFunction, test: () => boolean, callback: (err: any) => void): void;
|
||||
waterfall(tasks: Function[], callback?: AsyncResultArrayCallback<any>): void;
|
||||
waterfall(tasks: Function[], callback?: (err: any, ...arguments: any[]) => void): void;
|
||||
queue<T>(worker: AsyncWorker<T>, concurrency: number): AsyncQueue<T>;
|
||||
priorityQueue<T>(worker: AsyncWorker<T>, concurrency: number): AsyncPriorityQueue<T>;
|
||||
auto(tasks: any, callback?: AsyncResultArrayCallback<any>): void;
|
||||
@@ -105,8 +114,8 @@ interface Async {
|
||||
apply(fn: Function, ...arguments: any[]): AsyncFunction<any>;
|
||||
nextTick(callback: Function): void;
|
||||
|
||||
times<T> (n: number, callback: AsyncTimesCallback<T>): void;
|
||||
timesSeries<T> (n: number, callback: AsyncTimesCallback<T>): void;
|
||||
times<R> (n: number, iterator: AsyncResultIterator<number, R>, callback: AsyncResultArrayCallback<R>): void;
|
||||
timesSeries<R> (n: number, iterator: AsyncResultIterator<number, R>, callback: AsyncResultArrayCallback<R>): void;
|
||||
|
||||
// Utils
|
||||
memoize(fn: Function, hasher?: Function): Function;
|
||||
|
||||
Vendored
+107
@@ -0,0 +1,107 @@
|
||||
// Type definitions for Atom API docs
|
||||
// Project: https://github.com/atom/atom/blob/master/build/tasks/docs-task.coffee
|
||||
// Definitions by: vvakame <https://github.com/vvakame/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/*
|
||||
How to generate.
|
||||
$ git clone git@github.com:atom/atom.git
|
||||
$ cd atom
|
||||
$ npm install
|
||||
$ cd build
|
||||
$ npm install
|
||||
$ grunt build-docs
|
||||
$ cd ../
|
||||
$ ls -la la docs/output/api.json
|
||||
api.json example https://gist.github.com/vvakame/10f8d2f3884affc32476
|
||||
*/
|
||||
|
||||
declare module AtomDocTypes {
|
||||
interface Metadata {
|
||||
classes: { [className: string]: ClassInfo; };
|
||||
}
|
||||
|
||||
interface ClassInfo {
|
||||
name: string;
|
||||
superClass: string;
|
||||
visibility: string;
|
||||
|
||||
filename: string;
|
||||
srcUrl: string;
|
||||
summary: string;
|
||||
description: string;
|
||||
examples: Example[];
|
||||
sections: Section[];
|
||||
|
||||
classMethods: ClassMethod[];
|
||||
classProperties: ClassProperty[];
|
||||
instanceMethods: InstanceMethod[];
|
||||
instanceProperties: InstanceProperty[];
|
||||
}
|
||||
|
||||
interface Example {
|
||||
description: string;
|
||||
lang: string;
|
||||
code: string;
|
||||
raw: string;
|
||||
}
|
||||
|
||||
interface Section {
|
||||
name: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
interface ClassMethod {
|
||||
name: string;
|
||||
sectionName: string;
|
||||
srcUrl: string;
|
||||
visibility: string;
|
||||
summary: string;
|
||||
description: string;
|
||||
arguments: Argument[];
|
||||
returnValues: ReturnValue[];
|
||||
}
|
||||
|
||||
interface ClassProperty {
|
||||
}
|
||||
|
||||
interface InstanceMethod {
|
||||
name: string;
|
||||
sectionName: string;
|
||||
srcUrl: string;
|
||||
visibility: string;
|
||||
summary: string;
|
||||
description: string;
|
||||
arguments: Argument[];
|
||||
returnValues: ReturnValue[];
|
||||
titledArguments: TitledArgument[];
|
||||
}
|
||||
|
||||
interface InstanceProperty {
|
||||
name: string;
|
||||
sectionName: string;
|
||||
srcUrl: string;
|
||||
visibility: string;
|
||||
summary: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
interface Argument {
|
||||
name: string;
|
||||
description: string;
|
||||
type: string;
|
||||
isOptional: boolean;
|
||||
children: Argument[];
|
||||
}
|
||||
|
||||
interface TitledArgument {
|
||||
title: string;
|
||||
description: string;
|
||||
arguments: Argument[];
|
||||
}
|
||||
|
||||
interface ReturnValue {
|
||||
type: string;
|
||||
description: string;
|
||||
}
|
||||
}
|
||||
Vendored
+140
-17
@@ -25,15 +25,36 @@ interface Window {
|
||||
|
||||
declare module AtomCore {
|
||||
|
||||
// https://atom.io/docs/v0.84.0/advanced/view-system
|
||||
// https://atom.io/docs/v0.84.0/advanced/view-system
|
||||
interface IWorkspaceViewStatic {
|
||||
new ():IWorkspaceView;
|
||||
|
||||
version: number;
|
||||
configDefaults:any;
|
||||
content():any;
|
||||
}
|
||||
|
||||
interface Decoration {
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a buffer annotation that remains logically stationary even as the buffer changes. This is used
|
||||
* to represent cursors, folds, snippet targets, misspelled words, any anything else that needs to track a
|
||||
* logical location in the buffer over time.
|
||||
*/
|
||||
interface Marker {
|
||||
/**
|
||||
* Destroys the marker, causing it to emit the 'destroyed' event. Once destroyed, a marker cannot be
|
||||
* restored by undo/redo operations.
|
||||
*/
|
||||
destroy(): void;
|
||||
|
||||
/**
|
||||
* Gets the screen range of the display marker.
|
||||
*/
|
||||
getScreenRange(): Range;
|
||||
}
|
||||
|
||||
interface IWorkspaceView extends View {
|
||||
// Delegator.includeInto(WorkspaceView);
|
||||
|
||||
@@ -143,6 +164,12 @@ declare module AtomCore {
|
||||
highlightLines():boolean;
|
||||
}
|
||||
|
||||
interface ICommandRegistry {
|
||||
add(selector: string, name: string, callback: (event: any) => void): void; // selector:'atom-editor'|'atom-workspace'
|
||||
findCommands(params: Object): Object[];
|
||||
dispatch(selector: any, name:string): void;
|
||||
}
|
||||
|
||||
interface ICommandPanel {
|
||||
// TBD
|
||||
}
|
||||
@@ -344,11 +371,20 @@ declare module AtomCore {
|
||||
foldForMarker(marker:any):any;
|
||||
}
|
||||
|
||||
interface IViewRegistry {
|
||||
getView(selector:any):any;
|
||||
}
|
||||
|
||||
interface ICursorStatic {
|
||||
new (arg:{editor:IEditor; marker:IDisplayBufferMarker; id: number;}):ICursor;
|
||||
}
|
||||
|
||||
interface ScopeDescriptor {
|
||||
scopes: string[];
|
||||
}
|
||||
|
||||
interface ICursor /* extends Theorist.Model */ {
|
||||
getScopeDescriptor(): ScopeDescriptor;
|
||||
screenPosition:any;
|
||||
bufferPosition:any;
|
||||
goalColumn:any;
|
||||
@@ -413,6 +449,7 @@ declare module AtomCore {
|
||||
isAtEndOfLine():boolean;
|
||||
getScopes():string[];
|
||||
hasPrecedingCharactersOnLine():boolean;
|
||||
getMarker(): Marker;
|
||||
}
|
||||
|
||||
interface ILanguageMode {
|
||||
@@ -561,11 +598,16 @@ declare module AtomCore {
|
||||
subscribeToDisplayBuffer():void;
|
||||
getViewClass():any; // return type are EditorView
|
||||
destroyed():void;
|
||||
isDestroyed():boolean;
|
||||
copy():IEditor;
|
||||
getTitle():string;
|
||||
getLongTitle():string;
|
||||
setVisible(visible:boolean):void;
|
||||
setMini(mini:any):void;
|
||||
setScrollTop(scrollTop:any):void;
|
||||
getScrollTop():number;
|
||||
setScrollLeft(scrollLeft:any):void;
|
||||
getScrollLeft():number;
|
||||
setEditorWidthInChars(editorWidthInChars:any):void;
|
||||
getSoftWrapColumn():number;
|
||||
getSoftTabs():boolean;
|
||||
@@ -591,7 +633,7 @@ declare module AtomCore {
|
||||
getTextInRange(range:any):any;
|
||||
getLineCount():number;
|
||||
getBuffer():TextBuffer.ITextBuffer;
|
||||
getUri():string;
|
||||
getURI():string;
|
||||
isBufferRowBlank(bufferRow:any):boolean;
|
||||
isBufferRowCommented(bufferRow:any):void;
|
||||
nextNonBlankBufferRow(bufferRow:any):void;
|
||||
@@ -717,7 +759,7 @@ declare module AtomCore {
|
||||
getSelectedBufferRanges():TextBuffer.IRange[];
|
||||
getSelectedText():string;
|
||||
getTextInBufferRange(range:TextBuffer.IRange):string;
|
||||
setTextInBufferRange(range:TextBuffer.IRange, text:string):any;
|
||||
setTextInBufferRange(range:TextBuffer.IRange | any[], text:string):any;
|
||||
getCurrentParagraphBufferRange():TextBuffer.IRange;
|
||||
getWordUnderCursor(options?:any):string;
|
||||
moveCursorUp(lineCount?:number):void;
|
||||
@@ -760,6 +802,7 @@ declare module AtomCore {
|
||||
selectToPreviousWordBoundary():ISelection[];
|
||||
selectToNextWordBoundary():ISelection[];
|
||||
selectLine():ISelection[];
|
||||
selectLinesContainingCursors():ISelection[];
|
||||
addSelectionBelow():ISelection[];
|
||||
addSelectionAbove():ISelection[];
|
||||
splitSelectionsIntoLines():any[];
|
||||
@@ -841,14 +884,43 @@ declare module AtomCore {
|
||||
getVerticalScrollbarWidth():any;
|
||||
setVerticalScrollbarWidth(width:any):any;
|
||||
// deprecated joinLine():any;
|
||||
|
||||
onDidChange(callback: Function): Disposable;
|
||||
onDidDestroy(callback: Function): Disposable;
|
||||
onDidStopChanging(callback: Function): Disposable;
|
||||
onDidChangeCursorPosition(callback: Function): Disposable;
|
||||
onDidSave(callback: (event: { path: string }) => void): Disposable;
|
||||
|
||||
decorateMarker(marker: Marker, options: any): Decoration;
|
||||
getLastCursor(): ICursor;
|
||||
}
|
||||
|
||||
interface IGrammar {
|
||||
bundledPackage: boolean;
|
||||
emitter: any;
|
||||
fileTypes: [string];
|
||||
firstLineRegex: any;
|
||||
foldingStopMarker: any;
|
||||
includedGrammarScopes: [any];
|
||||
initialRule: any;
|
||||
injectionSelector: any;
|
||||
injections: any;
|
||||
maxTokensPerLine: Number;
|
||||
name: string;
|
||||
packageName: string;
|
||||
path: string;
|
||||
rawPatterns: [any];
|
||||
rawRepository: any;
|
||||
registration: Disposable;
|
||||
registry: any;
|
||||
repository: Object;
|
||||
scopeName: string;
|
||||
// TBD
|
||||
|
||||
}
|
||||
|
||||
interface IPane /* extends Theorist.Model */ {
|
||||
itemForURI: (uri:string)=>IEditor;
|
||||
items:any[];
|
||||
activeItem:any;
|
||||
|
||||
@@ -856,6 +928,7 @@ declare module AtomCore {
|
||||
deserializeParams(params:any):any;
|
||||
getViewClass():any; // return type are PaneView
|
||||
isActive():boolean;
|
||||
isDestroyed():boolean;
|
||||
focus():void;
|
||||
blur():void;
|
||||
activate():void;
|
||||
@@ -886,8 +959,7 @@ declare module AtomCore {
|
||||
saveItem(item:any, nextAction:Function):void;
|
||||
saveItemAs(item:any, nextAction:Function):void;
|
||||
saveItems():any[];
|
||||
itemForUri(uri:any):any;
|
||||
activateItemForUri(uri:any):any;
|
||||
activateItemForURI(uri:any):any;
|
||||
copyActiveItem():void;
|
||||
splitLeft(params:any):IPane;
|
||||
splitRight(params:any):IPane;
|
||||
@@ -898,7 +970,7 @@ declare module AtomCore {
|
||||
findOrCreateRightmostSibling():IPane;
|
||||
}
|
||||
|
||||
// https://atom.io/docs/v0.84.0/advanced/serialization
|
||||
// https://atom.io/docs/v0.84.0/advanced/serialization
|
||||
interface ISerializationStatic<T> {
|
||||
deserialize(data:ISerializationInfo):T;
|
||||
new (data:T): ISerialization;
|
||||
@@ -934,7 +1006,9 @@ declare module AtomCore {
|
||||
// Serializable.includeInto(Project);
|
||||
|
||||
path:string;
|
||||
rootDirectory:PathWatcher.IDirectory;
|
||||
/** deprecated */
|
||||
rootDirectory?:PathWatcher.IDirectory;
|
||||
rootDirectories:PathWatcher.IDirectory[];
|
||||
|
||||
serializeParams():any;
|
||||
deserializeParams(params:any):any;
|
||||
@@ -964,31 +1038,57 @@ declare module AtomCore {
|
||||
replace(regex:any, replacementText:any, filePaths:any, iterator:any):Q.Promise<any>;
|
||||
buildEditorForBuffer(buffer:any, editorOptions:any):IEditor;
|
||||
eachBuffer(...args:any[]):any;
|
||||
|
||||
onDidChangePaths(callback: Function): Disposable;
|
||||
}
|
||||
|
||||
interface IWorkspaceStatic {
|
||||
new():IWorkspace;
|
||||
}
|
||||
|
||||
interface IWorkspacePanelOptions{
|
||||
item:any;
|
||||
visible?:boolean;
|
||||
priority?:number;
|
||||
}
|
||||
|
||||
interface Panel{
|
||||
getItem():any;
|
||||
getPriority():any;
|
||||
isVisible():boolean;
|
||||
show():void;
|
||||
hide():void;
|
||||
}
|
||||
|
||||
interface IWorkspace {
|
||||
addBottomPanel(options:IWorkspacePanelOptions):Panel;
|
||||
addLeftPanel(options:IWorkspacePanelOptions):Panel;
|
||||
addRightPanel(options:IWorkspacePanelOptions):Panel;
|
||||
addTopPanel(options:IWorkspacePanelOptions):Panel;
|
||||
addModalPanel(options:IWorkspacePanelOptions):Panel;
|
||||
addOpener(opener: Function): any;
|
||||
|
||||
deserializeParams(params:any):any;
|
||||
serializeParams():{paneContainer:any;fullScreen:boolean;};
|
||||
eachEditor(callback:Function):void;
|
||||
getEditors():IEditor[];
|
||||
eachEditor(callback: Function): void;
|
||||
getTextEditors():IEditor[];
|
||||
open(uri:string, options:any):Q.Promise<View>;
|
||||
openLicense():void;
|
||||
openSync(uri:string, options:any):any;
|
||||
openUriInPane(uri:string, pane:any, options:any):Q.Promise<View>;
|
||||
openUriInPane(uri: string, pane: any, options: any): Q.Promise<View>;
|
||||
observeTextEditors(callback: Function): Disposable;
|
||||
reopenItemSync():any;
|
||||
registerOpener(opener:(urlToOpen:string)=>any):void;
|
||||
unregisterOpener(opener:Function):void;
|
||||
getOpeners():any;
|
||||
getActivePane(): IPane;
|
||||
getActivePaneItem(): IPane;
|
||||
getActiveTextEditor(): IEditor;
|
||||
getPanes():any;
|
||||
saveAll():void;
|
||||
activateNextPane():any;
|
||||
activatePreviousPane():any;
|
||||
paneForUri: (uri:string) => IPane;
|
||||
paneForURI: (uri:string) => IPane;
|
||||
saveActivePaneItem():any;
|
||||
saveActivePaneItemAs():any;
|
||||
destroyActivePaneItem():any;
|
||||
@@ -1000,6 +1100,8 @@ declare module AtomCore {
|
||||
itemOpened(item:any):void;
|
||||
onPaneItemDestroyed(item:any):void;
|
||||
destroyed():void;
|
||||
|
||||
onDidChangeActivePaneItem(item:any):Disposable;
|
||||
}
|
||||
|
||||
interface IAtomSettings {
|
||||
@@ -1041,7 +1143,7 @@ declare module AtomCore {
|
||||
// TBD
|
||||
}
|
||||
|
||||
interface IPackage {
|
||||
interface IPackage {
|
||||
mainModulePath: string;
|
||||
mainModule: any;
|
||||
enable(): void;
|
||||
@@ -1053,8 +1155,8 @@ declare module AtomCore {
|
||||
reset(): void;
|
||||
activate(): Q.Promise<any[]>;
|
||||
activateNow(): void;
|
||||
// TBD
|
||||
}
|
||||
// TBD
|
||||
}
|
||||
|
||||
interface IPackageManager extends Emissary.IEmitter {
|
||||
packageDirPaths:string[];
|
||||
@@ -1098,6 +1200,13 @@ declare module AtomCore {
|
||||
getAvailablePackageMetadata():any[];
|
||||
}
|
||||
|
||||
interface INotifications {
|
||||
addInfo: Function;
|
||||
addError: Function;
|
||||
addSuccess: Function;
|
||||
addWarning: Function;
|
||||
}
|
||||
|
||||
interface IThemeManager {
|
||||
// TBD
|
||||
}
|
||||
@@ -1111,7 +1220,8 @@ declare module AtomCore {
|
||||
}
|
||||
|
||||
interface IClipboard {
|
||||
// TBD
|
||||
write(text:string, metadata?:any):any;
|
||||
read():string;
|
||||
}
|
||||
|
||||
interface ISyntax {
|
||||
@@ -1145,6 +1255,11 @@ declare module AtomCore {
|
||||
new(state:IAtomState):IAtom;
|
||||
}
|
||||
|
||||
class Disposable {
|
||||
constructor(disposalAction:any)
|
||||
dispose():void
|
||||
}
|
||||
|
||||
// https://atom.io/docs/api/v0.106.0/api/classes/Atom.html
|
||||
/* Global Atom class : instance members */
|
||||
interface IAtom {
|
||||
@@ -1154,14 +1269,17 @@ declare module AtomCore {
|
||||
mode:string;
|
||||
deserializers:IDeserializerManager;
|
||||
config: IConfig;
|
||||
commands: ICommandRegistry;
|
||||
keymaps: IKeymapManager;
|
||||
keymap: IKeymapManager;
|
||||
packages: IPackageManager;
|
||||
themes: IThemeManager;
|
||||
contextManu: IContextMenuManager;
|
||||
menu: IMenuManager;
|
||||
notifications: INotifications; // https://github.com/atom/notifications
|
||||
clipboard:IClipboard;
|
||||
syntax:ISyntax;
|
||||
views: IViewRegistry;
|
||||
windowEventHandler: IWindowEventHandler;
|
||||
|
||||
// really exists? start
|
||||
@@ -1229,6 +1347,8 @@ declare module AtomCore {
|
||||
getUserInitScriptPath:Function;
|
||||
requireUserInitScript:Function;
|
||||
requireWithGlobals:Function;
|
||||
|
||||
services: any; // TODO: New services api
|
||||
}
|
||||
|
||||
interface IBufferedNodeProcessStatic {
|
||||
@@ -1704,6 +1824,7 @@ declare module "atom" {
|
||||
cancelling:boolean;
|
||||
items:any[];
|
||||
list:JQuery;
|
||||
filterEditorView: JQuery;
|
||||
|
||||
previouslyFocusedElement:JQuery;
|
||||
|
||||
@@ -1739,7 +1860,7 @@ declare module "atom" {
|
||||
|
||||
confirmSelection():any;
|
||||
|
||||
viewForItem(item:any):JQuery; // You must override this method!
|
||||
viewForItem(item:any):JQuery|string|HTMLElement|View; // You must override this method!
|
||||
confirmed(item:any):any; // You must override this method!
|
||||
getFilterKey():any;
|
||||
|
||||
@@ -1754,6 +1875,8 @@ declare module "atom" {
|
||||
cancel():any;
|
||||
}
|
||||
|
||||
|
||||
|
||||
var WorkspaceView:AtomCore.IWorkspaceViewStatic;
|
||||
|
||||
var Task:AtomCore.ITaskStatic;
|
||||
|
||||
Vendored
+3
-3
@@ -15,7 +15,7 @@ interface Location {
|
||||
|
||||
/** This is the interface for the main Auth0 client. */
|
||||
interface Auth0Static {
|
||||
|
||||
|
||||
new(options: Auth0ClientOptions): Auth0Static;
|
||||
changePassword(options: any, callback?: Function): void;
|
||||
decodeJwt(jwt: string): any;
|
||||
@@ -40,7 +40,7 @@ interface Auth0ClientOptions {
|
||||
callbackOnLoactionHash?: boolean;
|
||||
domain: string;
|
||||
forceJSONP?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
/** Represents a normalized UserProfile. */
|
||||
interface Auth0UserProfile {
|
||||
@@ -128,6 +128,6 @@ interface Auth0DelegationToken {
|
||||
|
||||
declare var Auth0: Auth0Static;
|
||||
|
||||
declare module "Auth0" {
|
||||
declare module "auth0" {
|
||||
export = Auth0
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/// <reference path="autoprefixer-core.d.ts" />
|
||||
import autoprefixer = require("autoprefixer-core");
|
||||
|
||||
var css: string;
|
||||
|
||||
var prefixed = autoprefixer.process(css).css;
|
||||
|
||||
var processor = autoprefixer({ browsers: ['> 1%', 'IE 7'], cascade: false });
|
||||
console.log(processor.info());
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
// Type definitions for Autoprefixer Core 5.1.11
|
||||
// Project: https://github.com/postcss/autoprefixer-core
|
||||
// Definitions by: Asana <https://asana.com>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "autoprefixer-core" {
|
||||
interface Config {
|
||||
browsers?: string[];
|
||||
cascade?: boolean;
|
||||
remove?: boolean;
|
||||
}
|
||||
|
||||
interface Options {
|
||||
from?: string;
|
||||
to?: string;
|
||||
safe?: boolean;
|
||||
map?: {
|
||||
inline?: boolean;
|
||||
prev?: string | Object;
|
||||
}
|
||||
}
|
||||
|
||||
interface Result {
|
||||
css: string;
|
||||
map: string;
|
||||
opts: Options;
|
||||
}
|
||||
|
||||
interface Processor {
|
||||
postcss: any;
|
||||
info(): string;
|
||||
process(css: string, opts?: Options): Result;
|
||||
}
|
||||
|
||||
interface Exports {
|
||||
(config: Config): Processor;
|
||||
postcss: any;
|
||||
info(): string;
|
||||
process(css: string, opts?: Options): Result;
|
||||
}
|
||||
|
||||
var exports: Exports;
|
||||
export = exports;
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
/// <reference path="../backbone/backbone.d.ts" />
|
||||
/// <reference path="backbone-associations.d.ts" />
|
||||
|
||||
// borrowed from the Backbone.Associations tutorials
|
||||
// separated out into modules to avoid namespace clashes
|
||||
module Backbone.Associations.Tests {
|
||||
module OneToOne {
|
||||
class EmployeeWithManager extends Backbone.AssociatedModel {
|
||||
constructor(options?) {
|
||||
this.relations = [
|
||||
{
|
||||
type: Backbone.One, //nature of the relationship
|
||||
key: 'manager', // attribute of Employee
|
||||
relatedModel: 'Employee' //AssociatedModel for attribute key
|
||||
}
|
||||
];
|
||||
super(options);
|
||||
}
|
||||
|
||||
defaults() {
|
||||
return {
|
||||
age: 0,
|
||||
fname: "",
|
||||
lname: "",
|
||||
manager: null
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module OneToMany {
|
||||
class Location extends Backbone.AssociatedModel {
|
||||
defaults() {
|
||||
return {
|
||||
add1: "",
|
||||
add2: null,
|
||||
zip: "",
|
||||
state: ""
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
class Locations extends Backbone.Collection<Location> {
|
||||
comparator(c: Backbone.Model) {
|
||||
return c.get("Number");
|
||||
}
|
||||
}
|
||||
|
||||
class Project extends Backbone.AssociatedModel {
|
||||
constructor(options?) {
|
||||
this.relations = [
|
||||
{
|
||||
type: Backbone.Many, //nature of the relation
|
||||
key: 'locations', //attribute of Project
|
||||
collectionType: Locations, //Collection to be used.
|
||||
relatedModel: Location //Optional
|
||||
}
|
||||
];
|
||||
super(options);
|
||||
}
|
||||
|
||||
defaults() {
|
||||
return {
|
||||
name: "",
|
||||
number: 0,
|
||||
locations: []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function reverseAssociationTest() {
|
||||
var local = new Location({ state: "Hertfordshire" });
|
||||
var project = new Project({ name: "The Old Pond Project" });
|
||||
local.set("oddRelationTo", project);
|
||||
var parents = project.parents;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -1 +1 @@
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
// Type definitions for Backbone-associations 0.6.4
|
||||
// Project: https://github.com/dhruvaray/backbone-associations/
|
||||
// Definitions by: Craig Brett <https://github.com/craigbrett17/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../backbone/backbone.d.ts" />
|
||||
|
||||
declare module Backbone {
|
||||
export module Associations {
|
||||
/** Defines a 1:Many relationship type */
|
||||
export var Many: string;
|
||||
/** Defines a 1:1 relationship type */
|
||||
export var One: string;
|
||||
/** Defines a special relationship to itself */
|
||||
export var Self: string;
|
||||
|
||||
// these seem to be used internally, but can't see a reason not to include them just in case
|
||||
export var SEPARATOR: string;
|
||||
export function getSeparator(): any;
|
||||
export function setSeparator(value: any): void;
|
||||
export var EVENTS_BUBBLE: boolean;
|
||||
export var EVENTS_WILDCARD: boolean;
|
||||
export var EVENTS_NC: boolean;
|
||||
|
||||
interface IRelation {
|
||||
/** The type of model for this relationship */
|
||||
relatedModel: string|typeof Backbone.Associations.AssociatedModel;
|
||||
/** The key for this relationship on this model */
|
||||
key: string;
|
||||
// meh, no string enums in TS. Just have to trust the user not to be a fool
|
||||
/** The cardinality of this relationship. */
|
||||
type: string;
|
||||
/** Determines the type of collection used. If used, the relatedModel property is ignored */
|
||||
collectionType?: typeof Backbone.Collection|string;
|
||||
/** If set to true, then the attribute will not be serialized in toJSON() calls. Defaults to false */
|
||||
isTransient?: boolean;
|
||||
/** Specify remoteKey to serialize the key to a different key name in toJSON() calls. Useful in ROR nested-attributes like scenarios. */
|
||||
remoteKey?: string;
|
||||
/** the attributes to serialize when calling toJSON */
|
||||
serialize?: string[];
|
||||
/** A transformation function to convert the value before it is assigned to the key on the relatedModel */
|
||||
map?: (...args: any[]) => any;
|
||||
}
|
||||
|
||||
/** A Backbone model with special provision for handling relations to other models */
|
||||
export class AssociatedModel extends Backbone.Model {
|
||||
/** Relations with their associated model */
|
||||
relations: IRelation[];
|
||||
_proxyCalls: any;
|
||||
/** Reverse association lookup for objects that contain this object */
|
||||
parents: any[];
|
||||
/** Cleans up any parent relations on other AssociatedModels */
|
||||
cleanup(): void;
|
||||
}
|
||||
}
|
||||
// copies of properties also put onto the Backbone scope
|
||||
/** Defines a 1:Many relationship type */
|
||||
export var Many: string;
|
||||
/** Defines a 1:1 relationship type */
|
||||
export var One: string;
|
||||
/** Defines a special relationship to itself */
|
||||
export var Self: string;
|
||||
|
||||
// I'm sure this should be doable with imports or type aliases, but doesn't seem to work
|
||||
/** A Backbone model with special provision for handling relations to other models */
|
||||
export class AssociatedModel extends Backbone.Model {
|
||||
/** Relations with their associated model */
|
||||
relations: Associations.IRelation[];
|
||||
_proxyCalls: any;
|
||||
/** Reverse association lookup for objects that contain this object */
|
||||
parents: any[];
|
||||
/** Cleans up any parent relations on other AssociatedModels */
|
||||
cleanup(): void;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1 +1 @@
|
||||
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ declare module Backbone {
|
||||
|
||||
type PageableGetPageOptions = CollectionFetchOptions|Silenceable;
|
||||
|
||||
class PageableCollection<TModel extends Model> extends Collection<Model>{
|
||||
class PageableCollection<TModel extends Model> extends Collection<TModel>{
|
||||
|
||||
fullCollection: Collection<TModel>;
|
||||
mode: string;
|
||||
|
||||
Vendored
+1
-3
@@ -169,9 +169,7 @@ declare module Backbone {
|
||||
**/
|
||||
private static extend(properties: any, classProperties?: any): any;
|
||||
|
||||
// TODO: this really has to be typeof TModel
|
||||
//model: typeof TModel;
|
||||
model: { new(): TModel; }; // workaround
|
||||
model: new (...args:any[]) => TModel;
|
||||
models: TModel[];
|
||||
length: number;
|
||||
|
||||
|
||||
Vendored
+87
-46
@@ -8,12 +8,12 @@
|
||||
declare module Backgrid {
|
||||
|
||||
interface GridOptions {
|
||||
columns: Column[];
|
||||
collection: Backbone.Collection<Backbone.Model>;
|
||||
header: Header;
|
||||
body: Body;
|
||||
row: Row;
|
||||
footer: Footer;
|
||||
columns: Column[];
|
||||
collection: Backbone.Collection<Backbone.Model>;
|
||||
header: Header;
|
||||
body: Body;
|
||||
row: Row;
|
||||
footer: Footer;
|
||||
}
|
||||
|
||||
class Header extends Backbone.View<Backbone.Model> {
|
||||
@@ -21,65 +21,106 @@ declare module Backgrid {
|
||||
|
||||
class Footer extends Backbone.View<Backbone.Model> {
|
||||
}
|
||||
|
||||
|
||||
class Row extends Backbone.View<Backbone.Model> {
|
||||
}
|
||||
|
||||
class Command {
|
||||
cancel();
|
||||
moveDown();
|
||||
moveLeft();
|
||||
moveRight();
|
||||
moveUp();
|
||||
passThru();
|
||||
save();
|
||||
moveUp(): boolean;
|
||||
moveDown(): boolean;
|
||||
moveLeft(): boolean;
|
||||
moveRight(): boolean;
|
||||
save(): boolean;
|
||||
cancel(): boolean;
|
||||
passThru(): boolean;
|
||||
}
|
||||
|
||||
class CellFormatter {
|
||||
fromRaw(rawData: any, model: Backbone.Model);
|
||||
toRaw(formattedData: any, model: Backbone.Model);
|
||||
}
|
||||
|
||||
class NumberFormatter extends CellFormatter {}
|
||||
|
||||
class PercentFormatter extends NumberFormatter {}
|
||||
|
||||
class DateTimeFormatter extends CellFormatter {}
|
||||
|
||||
class StringFormatter extends CellFormatter {}
|
||||
|
||||
class EmailFormatter extends CellFormatter {}
|
||||
|
||||
class SelectFormatter extends CellFormatter {}
|
||||
|
||||
class CellEditor extends Backbone.View<Backbone.Model>{
|
||||
initialize(options?: any);
|
||||
postRender(model: Backbone.Model, column: Backbone.Model);
|
||||
}
|
||||
|
||||
class InputCellEditor extends CellEditor {
|
||||
render();
|
||||
saveOrCancel(event: any);
|
||||
}
|
||||
|
||||
class Cell extends Backbone.View<Backbone.Model>{
|
||||
tagName: string;
|
||||
formatter: CellFormatter;
|
||||
editor: InputCellEditor;
|
||||
enterEditMode();
|
||||
renderError();
|
||||
exitEditMode();
|
||||
remove();
|
||||
}
|
||||
|
||||
class StringCell extends Cell {
|
||||
}
|
||||
|
||||
interface ColumnAttr {
|
||||
name: string;
|
||||
cell: string;
|
||||
headerCell: string;
|
||||
label: string;
|
||||
sortable: boolean;
|
||||
editable: boolean;
|
||||
renderable: boolean;
|
||||
formater: string;
|
||||
name: string;
|
||||
cell: string;
|
||||
headerCell: string;
|
||||
label: string;
|
||||
sortable: boolean;
|
||||
editable: boolean;
|
||||
renderable: boolean;
|
||||
formater: string;
|
||||
}
|
||||
|
||||
class Column extends Backbone.Model {
|
||||
initialize(options?: any);
|
||||
initialize(options?: any);
|
||||
}
|
||||
|
||||
class Body extends Backbone.View<Backbone.Model> {
|
||||
tagName: string;
|
||||
tagName: string;
|
||||
|
||||
initialize(options?: any);
|
||||
insertRow(model: Backbone.Model, collection: Backbone.Collection<Backbone.Model>, options: any);
|
||||
moveToNextCell(model: Backbone.Model, cell: Column, command: Command);
|
||||
refresh(): Body;
|
||||
remove(): Body;
|
||||
removeRow(model: Backbone.Model, collection: Backbone.Collection<Backbone.Model>, options: any);
|
||||
render(): Body;
|
||||
initialize(options?: any);
|
||||
insertRow(model: Backbone.Model, collection: Backbone.Collection<Backbone.Model>, options: any);
|
||||
moveToNextCell(model: Backbone.Model, cell: Column, command: Command);
|
||||
refresh(): Body;
|
||||
remove(): Body;
|
||||
removeRow(model: Backbone.Model, collection: Backbone.Collection<Backbone.Model>, options: any);
|
||||
render(): Body;
|
||||
}
|
||||
|
||||
class Grid extends Backbone.View<Backbone.Model> {
|
||||
body: Backgrid.Body;
|
||||
className: string;
|
||||
footer: any;
|
||||
header: any;
|
||||
tagName: string;
|
||||
body: Backgrid.Body;
|
||||
className: string;
|
||||
footer: any;
|
||||
header: any;
|
||||
tagName: string;
|
||||
|
||||
initialize(options: any);
|
||||
getSelectedModels(): Backbone.Model[];
|
||||
insertColumn(...options: any[]): Grid;
|
||||
insertRow(model: Backbone.Model, collection: Backbone.Collection<Backbone.Model>, options: any);
|
||||
remove():Grid;
|
||||
removeColumn(...options: any[]): Grid;
|
||||
removeRow(model: Backbone.Model, collection: Backbone.Collection<Backbone.Model>, options: any);
|
||||
render():Grid;
|
||||
initialize(options: any);
|
||||
getSelectedModels(): Backbone.Model[];
|
||||
insertColumn(...options: any[]): Grid;
|
||||
insertRow(model: Backbone.Model, collection: Backbone.Collection<Backbone.Model>, options: any);
|
||||
remove(): Grid;
|
||||
removeColumn(...options: any[]): Grid;
|
||||
removeRow(model: Backbone.Model, collection: Backbone.Collection<Backbone.Model>, options: any);
|
||||
render(): Grid;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
declare module "backgrid" {
|
||||
export = Backgrid;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
/// <reference path="./blob-stream.d.ts" />
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
var bl = require('blob-stream');
|
||||
|
||||
var blob = bl.toBlob();
|
||||
var brl = bl.toBlobURL("app/JSON");
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
// Type definitions for blob-stream v0.1.3
|
||||
// Project: https://github.com/devongovett/blob-stream
|
||||
// Definitions by: Eric Hillah <https://github.com/erichillah>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
declare function BlobStream(): BlobStream.IBlobStream;
|
||||
|
||||
declare module BlobStream {
|
||||
|
||||
interface IBlobStream extends NodeJS.WritableStream{
|
||||
toBlob(type?: string): Blob;
|
||||
toBlobURL(type?: string): string;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "blob-stream" {
|
||||
export = BlobStream;
|
||||
}
|
||||
@@ -0,0 +1,322 @@
|
||||
/// <reference path="blocks.d.ts" />
|
||||
|
||||
function test_blocks_methods() {
|
||||
var extended: Object;
|
||||
blocks.extend(extended, new Object());
|
||||
|
||||
blocks.each([3, 1, 4], function(value, index, collection) {
|
||||
// value is the current item (3, 1 and 4)
|
||||
// index is the current index (0, 1 and 2)
|
||||
// collection points to the array passed to the function - [3, 1, 4]
|
||||
});
|
||||
|
||||
blocks.eachRight([3, 1, 4], function(value, index, collection) {
|
||||
// value is the current item (4, 1 and 3)
|
||||
// index is the current index (2, 1 and 0)
|
||||
// collection points to the array passed to the function - [3, 1, 4]
|
||||
});
|
||||
|
||||
blocks.isArray([1, 2, 3]);
|
||||
// -> true
|
||||
|
||||
function calculate() {
|
||||
blocks.isArray(arguments);
|
||||
// -> false
|
||||
}
|
||||
|
||||
function max(collection: any, callback: any) {
|
||||
callback = callback || blocks.noop;
|
||||
}
|
||||
|
||||
blocks.type('a string');
|
||||
// -> string
|
||||
|
||||
blocks.type(314);
|
||||
// -> number
|
||||
|
||||
blocks.type([]);
|
||||
// -> array
|
||||
|
||||
blocks.type({});
|
||||
// -> object
|
||||
|
||||
blocks.type(blocks.noop);
|
||||
// -> function
|
||||
|
||||
blocks.type(new RegExp(''));
|
||||
// -> regexp
|
||||
|
||||
blocks.type(undefined);
|
||||
// -> undefined
|
||||
|
||||
blocks.type(null);
|
||||
// -> null
|
||||
|
||||
blocks.is([], 'array');
|
||||
// -> true
|
||||
|
||||
blocks.is(function() { }, 'object');
|
||||
// -> false
|
||||
|
||||
blocks.has({
|
||||
price: undefined
|
||||
}, 'price');
|
||||
// -> true
|
||||
|
||||
blocks.has({
|
||||
price: 314
|
||||
}, 'ratio');
|
||||
// -> false
|
||||
|
||||
blocks.unwrap(blocks.observable(314));
|
||||
// -> 314
|
||||
|
||||
blocks.unwrap(blocks([3, 1, 4]));
|
||||
// -> [3, 1, 4]
|
||||
|
||||
blocks.unwrap('a string or any other value will not be changed');
|
||||
// -> 'a string or any other value will not be changed'
|
||||
|
||||
blocks.toArray(3);
|
||||
// -> [3]
|
||||
|
||||
blocks.toArray([3, 1, 4]);
|
||||
// -> [3, 1, 4]
|
||||
|
||||
blocks.toUnit(230);
|
||||
// -> 230px
|
||||
|
||||
blocks.toUnit(230, '%');
|
||||
// -> 230%
|
||||
|
||||
blocks.toUnit('60px', '%');
|
||||
// -> 60%
|
||||
|
||||
var array = [3, 1, 4];
|
||||
var cloned = blocks.clone(array);
|
||||
// -> [3, 1, 4]
|
||||
var areEqual = array == cloned;
|
||||
// -> false
|
||||
|
||||
blocks.isElement(document.body);
|
||||
// -> true
|
||||
|
||||
blocks.isElement({});
|
||||
// -> false
|
||||
|
||||
blocks.isBoolean(true);
|
||||
// -> true
|
||||
|
||||
blocks.isBoolean(new Boolean(false));
|
||||
// -> true
|
||||
|
||||
blocks.isBoolean(1);
|
||||
// -> false
|
||||
|
||||
blocks.isPlainObject({ property: true });
|
||||
// -> true
|
||||
|
||||
blocks.isPlainObject(new Object());
|
||||
// -> true
|
||||
|
||||
var car = new Object();
|
||||
|
||||
blocks.isPlainObject(car);
|
||||
// -> false
|
||||
|
||||
var alert = blocks.bind(() => {
|
||||
alert(this);
|
||||
}, 'Hello bind method!');
|
||||
|
||||
alert();
|
||||
// -> alerts 'Hello bind method'
|
||||
|
||||
var alertAll = blocks.bind((firstName: string, lastName: string) => {
|
||||
alert('My name is ' + firstName + ' ' + lastName);
|
||||
}, null, 'John', 'Doe');
|
||||
|
||||
alertAll();
|
||||
// -> alerts 'My name is John Doe'
|
||||
|
||||
blocks.equals([3, 4], [3, 4]);
|
||||
// -> true
|
||||
|
||||
blocks.equals({ value: 7 }, { value: 7, result: 1 });
|
||||
// -> false
|
||||
|
||||
blocks.query({
|
||||
message: 'Hello World!'
|
||||
});
|
||||
|
||||
blocks.query({
|
||||
items: ['John', 'Alf', 'Mega'],
|
||||
alertIndex: (e: any) => {
|
||||
alert('Clicked an item with index:' + blocks.context(e.target).$index);
|
||||
}
|
||||
});
|
||||
|
||||
blocks.query({
|
||||
items: [1, 2, 3],
|
||||
alertValue: (e: any) => {
|
||||
alert('Clicked the value: ' + blocks.dataItem(e.target));
|
||||
}
|
||||
});
|
||||
|
||||
blocks.isObservable(blocks.observable(3));
|
||||
// -> true
|
||||
|
||||
blocks.isObservable(3);
|
||||
// -> false
|
||||
|
||||
blocks.unwrapObservable(blocks.observable(304));
|
||||
// -> 304
|
||||
|
||||
blocks.unwrapObservable(305);
|
||||
// -> 305
|
||||
}
|
||||
|
||||
function test_observable_array() {
|
||||
// creates an observable array with [1, 2, 3] as values
|
||||
var items = blocks.observable([1, 2, 3]);
|
||||
|
||||
// removes the previous values and fills the observable array with [5, 6, 7] values
|
||||
items.reset([5, 6, 7])
|
||||
|
||||
// results in observable array with [1, 2, 3, 4] values
|
||||
items.add(4);
|
||||
|
||||
// results in observable array with [1, 2, 3, 4, 5, 6] values
|
||||
items.addMany([4, 5, 6]);
|
||||
|
||||
var items = blocks.observable([4, 2, 3, 1]);
|
||||
|
||||
// results in observable array with [1, 2, 3, 4] values
|
||||
items.swap(0, 3);
|
||||
|
||||
var items = blocks.observable([1, 4, 2, 3, 5]);
|
||||
|
||||
// results in observable array with [1, 2, 3, 4, 5] values
|
||||
items.move(1, 4);
|
||||
}
|
||||
|
||||
function test_Property() {
|
||||
var App = blocks.Application();
|
||||
|
||||
var User = App.Model({
|
||||
username: App.Property({
|
||||
defaultValue: 'John Doe'
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function test_Model() {
|
||||
var App = blocks.Application();
|
||||
|
||||
var User = App.Model({
|
||||
firstName: App.Property({
|
||||
required: true,
|
||||
validateOnChange: true
|
||||
}),
|
||||
|
||||
lastName: App.Property({
|
||||
required: true,
|
||||
validateOnChange: true
|
||||
}),
|
||||
|
||||
fullName: App.Property({
|
||||
value: function() {
|
||||
return this.firstName() + ' ' + this.lastName();
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
App.View('Profile', {
|
||||
user: User({
|
||||
firstName: 'John',
|
||||
lastName: 'Doe'
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function test_Collection() {
|
||||
var App = blocks.Application();
|
||||
|
||||
var User = App.Model({
|
||||
firstName: App.Property({
|
||||
required: true,
|
||||
validateOnChange: true
|
||||
}),
|
||||
|
||||
lastName: App.Property({
|
||||
required: true,
|
||||
validateOnChange: true
|
||||
}),
|
||||
|
||||
fullName: App.Property({
|
||||
value: function() {
|
||||
return this.firstName() + ' ' + this.lastName();
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
var Users = App.Collection(User, {
|
||||
count: App.Property({
|
||||
value: () => {
|
||||
return this().length;
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
App.View('Profiles', {
|
||||
users: Users([{
|
||||
firstName: 'John',
|
||||
lastName: 'Doe'
|
||||
}, {
|
||||
firstName: 'Johna',
|
||||
lastName: 'Doa'
|
||||
}])
|
||||
});
|
||||
}
|
||||
|
||||
function test_View() {
|
||||
var App = blocks.Application();
|
||||
|
||||
App.View('Clicker', {
|
||||
handleClick: () => {
|
||||
alert('Clicky! Click!');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
App.View('Statistics', {
|
||||
init: () => {
|
||||
this.loadRemoteData();
|
||||
},
|
||||
|
||||
loadRemoteData: () => {
|
||||
// ...stuff...
|
||||
}
|
||||
});
|
||||
|
||||
App.View('ContactUs', {
|
||||
options: {
|
||||
route: 'contactus'
|
||||
},
|
||||
|
||||
routed: () => {
|
||||
alert('Navigated to ContactUs page!')
|
||||
}
|
||||
});
|
||||
|
||||
App.View('ContactUs', {
|
||||
options: {
|
||||
route: 'contactus'
|
||||
}
|
||||
});
|
||||
|
||||
App.View('Navigation', {
|
||||
navigateToContactUs: () => {
|
||||
this.route('contactus')
|
||||
}
|
||||
});
|
||||
}
|
||||
Vendored
+731
@@ -0,0 +1,731 @@
|
||||
// Type definitions for jsblocks v0.3.0
|
||||
// Project: http://jsblocks.com/
|
||||
// Definitions by: Krzysztof Śmigiel <https://github.com/ksmigiel>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/////////////////////////////////////////
|
||||
// blocks methods
|
||||
/////////////////////////////////////////
|
||||
|
||||
interface BlocksStatic {
|
||||
(obj: any): any;
|
||||
|
||||
/**
|
||||
* Performs a query operation on the DOM. Executes all data-query attributes
|
||||
* and renders the html result to the specified HTMLElement if not specified
|
||||
* uses document.body by default.
|
||||
*
|
||||
* @param model The model that will be used to query the DOM.
|
||||
*/
|
||||
query(model: any): void;
|
||||
/**
|
||||
* @param model The model that will be used to query the DOM.
|
||||
* @param element Optional element on which to execute the query.
|
||||
*/
|
||||
query(model: any, element: HTMLElement): void;
|
||||
|
||||
/**
|
||||
* Copies properties from all provided objects into the first object parameter
|
||||
*/
|
||||
extend(obj: Object, ...objects: any[]): void;
|
||||
|
||||
/**
|
||||
* Iterates over the collection
|
||||
*
|
||||
* @param collection The array or object to iterate over
|
||||
* @param callback The callback that will be executed for each element in the collection
|
||||
* @param thisArg Optional this context for the callback
|
||||
*/
|
||||
each(collection: any, callback: (value: any, index: any, collection: any) => void, thisArg?: any): void;
|
||||
|
||||
/**
|
||||
* Iterates over the collection from end to start
|
||||
*
|
||||
* @param collection The array or object to iterate over
|
||||
* @param callback The callback that will be executed for each element in the collection
|
||||
* @param thisArg Optional this context for the callback
|
||||
*/
|
||||
eachRight(collection: any, callback: (value: any, index: any, collection: any) => void, thisArg?: any): void;
|
||||
|
||||
/**
|
||||
* Determines if a value is an array.
|
||||
* Returns false for array like objects (for example arguments object).
|
||||
*
|
||||
* @param value The value to check if it is an array
|
||||
*/
|
||||
isArray(value: any): boolean;
|
||||
|
||||
/**
|
||||
* Represents a dummy empty function
|
||||
*/
|
||||
noop(): Function;
|
||||
|
||||
/**
|
||||
* Determines the true type of an object.
|
||||
* Returns the type of the value as a string.
|
||||
*
|
||||
* @param value The value for which to determine its type
|
||||
*/
|
||||
type(value: any): string;
|
||||
|
||||
/**
|
||||
* Determines if a specific value is the specified type
|
||||
*
|
||||
* @param value The value
|
||||
* @param type The type
|
||||
*/
|
||||
is(value: any, type: string): boolean;
|
||||
|
||||
/**
|
||||
* Checks if a variable has the specified property. Uses hasOwnProperty internally
|
||||
*
|
||||
* @param obj The object to call hasOwnPrototype for
|
||||
* @param key The key to check if exists in the object
|
||||
*/
|
||||
has(obj: any, key: string): boolean;
|
||||
|
||||
/**
|
||||
* Unwraps a jsblocks value to its raw representation.
|
||||
* Unwraps blocks.observable() and blocks() values
|
||||
*
|
||||
* @param value The value that will be unwrapped
|
||||
*/
|
||||
unwrap(value: any): any;
|
||||
|
||||
/**
|
||||
* Converts a value to an array. Arguments object is converted to array and primitive values
|
||||
* are wrapped in an array.
|
||||
* Does nothing when value is already an array
|
||||
*
|
||||
* @param value The value to be converted to an array
|
||||
*/
|
||||
toArray(value: any): any[];
|
||||
|
||||
/**
|
||||
* Converts an integer or string to a unit. If the value could not be parsed to a number it is not converted
|
||||
*
|
||||
* @param value The value to be converted to the specified unit
|
||||
*/
|
||||
toUnit(value: any): any;
|
||||
/**
|
||||
* @param value The value to be converted to the specified unit
|
||||
* @param unit Optionally provide a unit to convert to. Default value is 'px'
|
||||
*/
|
||||
toUnit(value: any, unit: string): any;
|
||||
|
||||
/**
|
||||
* Clones value. If deepClone is set to true the value will be cloned recursively
|
||||
*
|
||||
* @param value Value/object to be cloned
|
||||
*/
|
||||
clone(value: any): any;
|
||||
/**
|
||||
* @param value Value/object to be cloned
|
||||
* @param deepClone By default false
|
||||
*/
|
||||
clone(value: any, deepClone: boolean): any;
|
||||
|
||||
/**
|
||||
* Determines if the specified value is a HTML elements collection.
|
||||
* Returns whether the value is elements collection.
|
||||
*
|
||||
* @param value The value to check if it is elements collection
|
||||
*/
|
||||
isElements(value: any): boolean;
|
||||
|
||||
/**
|
||||
* Determines if the specified value is a HTML element.
|
||||
* Returns whether the value is a HTML element.
|
||||
*
|
||||
* @param value The value to check if it is a HTML element
|
||||
*/
|
||||
isElement(value: any): boolean;
|
||||
|
||||
/**
|
||||
* Determines if a the specified value is a boolean.
|
||||
* Whether the value is a boolean or not.
|
||||
*
|
||||
* @param value The value to be checked if it is a boolean
|
||||
*/
|
||||
isBoolean(value: any): boolean;
|
||||
|
||||
/**
|
||||
* Determines if the specified value is an object.
|
||||
* Returns whether the value is an object.
|
||||
*
|
||||
* @param obj The value to check for if it is an object
|
||||
*/
|
||||
isObject(obj: any): boolean;
|
||||
|
||||
/**
|
||||
* Determines if a value is a object created using {} or new Object.
|
||||
* Whether the value is a plain object or not.
|
||||
*
|
||||
* @param obj The value that will be checked
|
||||
*/
|
||||
isPlainObject(obj: any): boolean;
|
||||
|
||||
/**
|
||||
* Changes the this binding to a function and optionally passes additional parameters to the function.
|
||||
* Returns the newly created function having the new this binding and optional arguments.
|
||||
*
|
||||
* @param func The function for which to change the this binding and optionally add arguments
|
||||
* @param thisArg The new this binding context value
|
||||
* @param args Optional arguments that will be passed to the function
|
||||
*/
|
||||
bind(func: Function, thisArg: any, ...args: any[]): Function;
|
||||
|
||||
/**
|
||||
* Determines if two values are deeply equal. Set deepEqual to false to stop recusively equality checking
|
||||
*
|
||||
* @param a The first object to be campared
|
||||
* @param b The second object to be compared
|
||||
*/
|
||||
equals(a: any, b: any): boolean;
|
||||
/**
|
||||
* @param a The first object to be campared
|
||||
* @param b The second object to be compared
|
||||
* @param deepEqual Determines if the equality check will recursively check all child properties
|
||||
*/
|
||||
equals(a: any, b: any, deepEqual: boolean): boolean;
|
||||
|
||||
/**
|
||||
* Gets the context for a particular element. Searches all parents until it finds the context.
|
||||
*
|
||||
* @param element The element from which to search for a context
|
||||
*
|
||||
*/
|
||||
context(element: any): any;
|
||||
|
||||
/**
|
||||
* Gets the associated dataItem for a particlar element. Searches all parents until it finds the context
|
||||
*
|
||||
* @param element The element from which to search for a dataItem
|
||||
*/
|
||||
dataItem(element: any): any;
|
||||
|
||||
/**
|
||||
* Determines if particular value is an blocks.observable
|
||||
*
|
||||
* @param value The value to check if the value is observable
|
||||
*/
|
||||
isObservable(value: any): boolean;
|
||||
|
||||
/**
|
||||
* Gets the raw value of an observable or returns the value if the specified object is not an observable
|
||||
*
|
||||
* @param value The value that could be any object observable or not
|
||||
*/
|
||||
unwrapObservable(value: any): any;
|
||||
|
||||
route(route: string): BlocksStatic;
|
||||
|
||||
optional(param: string): BlocksStatic;
|
||||
optional(param: string, defaultValue: any): BlocksStatic;
|
||||
|
||||
range(start: number, end: number): BlocksStatic;
|
||||
|
||||
/**
|
||||
* Creates the server which will automatically handle server-side rendering.
|
||||
*/
|
||||
server(): { express(): any };
|
||||
/**
|
||||
* @param options Overrides default jsblocks options
|
||||
*/
|
||||
server(options: Server): { express(): any };
|
||||
|
||||
/**
|
||||
* Make observable property. You can specify initial value in parentheses.
|
||||
*/
|
||||
observable(): BlocksObservable;
|
||||
observable(value: any[]): BlocksArray;
|
||||
observable(value: any): BlocksObservable;
|
||||
|
||||
/**
|
||||
* Use blocks.Application and its MVC(Model-View-Collection) structure to create better architecture and maintainability for your application.
|
||||
*/
|
||||
Application(): App;
|
||||
Application(options: { history: string }): App;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////
|
||||
// blocks observable
|
||||
/////////////////////////////////////////
|
||||
|
||||
interface BlocksObservable extends Extendable<BlocksObservable> {
|
||||
(arg: any): BlocksObservable;
|
||||
|
||||
/**
|
||||
* Updates all elements, expressions and dependencies where the observable is used
|
||||
*/
|
||||
update(): BlocksObservable;
|
||||
|
||||
/**
|
||||
* If event in prototype is not defined use this function instead.
|
||||
*
|
||||
* @param event Name of the event to raise
|
||||
* @param trigger Function to be called when event is fired
|
||||
*/
|
||||
on(event: string, trigger: Function): BlocksObservable;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////
|
||||
// blocks array
|
||||
/////////////////////////////////////////
|
||||
|
||||
interface BlocksArray extends BlocksObservable {
|
||||
|
||||
/**
|
||||
* Updates all elements, expressions and dependencies where the observable is used
|
||||
*/
|
||||
update(): BlocksArray;
|
||||
|
||||
/**
|
||||
* Extends the current observable with particular functionality depending on the parameters specified.
|
||||
* If the method is called without arguments and jsvalue framework is included the observable will be
|
||||
* extended with the methods available in jsvalue for the current type.
|
||||
*
|
||||
* @param options Optional options
|
||||
*/
|
||||
extend(...options: any[]): BlocksArray;
|
||||
/**
|
||||
* @param name Name of the extender
|
||||
* @param options Optional options
|
||||
*/
|
||||
extend(name: string, ...options: any[]): BlocksArray;
|
||||
|
||||
/**
|
||||
* Removes all items from the collection and replaces them with the new value provided.
|
||||
* The value could be Array, observable array or jsvalue.Array
|
||||
*
|
||||
* @param value The new value that will be populated
|
||||
*/
|
||||
reset(value: any[]): BlocksArray;
|
||||
|
||||
/**
|
||||
* Adds values to the end of the observable array
|
||||
*
|
||||
* @param value The values that will be added to the end of the array
|
||||
*/
|
||||
add(value: any): BlocksArray;
|
||||
/**
|
||||
* @param value The values that will be added to the end of the array
|
||||
* @param index Optional index specifying where to insert the value
|
||||
*/
|
||||
add(value: any, index: number): BlocksArray;
|
||||
|
||||
/**
|
||||
* Adds the values from the provided array(s) to the end of the collection
|
||||
*
|
||||
* @param value The array that will be added to the end of the array
|
||||
*/
|
||||
addMany(value: any[]): BlocksArray;
|
||||
/**
|
||||
* @param value The array that will be added to the end of the array
|
||||
* @param index Optional position where the array of values to be inserted
|
||||
*/
|
||||
addMany(value: any[], index: number): BlocksArray;
|
||||
|
||||
/**
|
||||
* Swaps two values in the observable array. Note: Faster than removing the items and adding them at the locations
|
||||
*
|
||||
* @param indexA The first index that points to the index in the array that will be swapped
|
||||
* @param indexB The second index that points to the index in the array that will be swapped
|
||||
*/
|
||||
swap(indexA: number, indexB: number): BlocksArray;
|
||||
|
||||
/**
|
||||
* Moves an item from one location to another in the array. Note: Faster than removing the item and adding it at the location
|
||||
*
|
||||
* @param sourceIndex The index pointing to the item that will be moved
|
||||
* @param targetIndex The index where the item will be moved to
|
||||
*/
|
||||
move(sourceIndex: number, targetIndex: number): BlocksArray;
|
||||
|
||||
/**
|
||||
* Removes an item from the observable array
|
||||
*
|
||||
* @param value The value that will be removed or a callback function which returns true or false to determine if the value should be removed
|
||||
*/
|
||||
remove(value: any): BlocksArray;
|
||||
/**
|
||||
* @param value The value that will be removed or a callback function which returns true or false to determine if the value should be removed
|
||||
* @param thisArg Optional this context for the callback
|
||||
*/
|
||||
remove(value: any, thisArg: Function): BlocksArray;
|
||||
|
||||
/**
|
||||
* Removes an item at the specified index
|
||||
*
|
||||
* @param index The index location of the item that will be removed
|
||||
*/
|
||||
removeAt(index: number): BlocksArray;
|
||||
/**
|
||||
* @param index The index location of the item that will be removed
|
||||
* @param count Optional parameter that if specified will remove the next items starting from the specified index
|
||||
*/
|
||||
removeAt(index: number, count: number): BlocksArray;
|
||||
|
||||
/**
|
||||
* Removes all items from the observable array and optionally filter which items to be removed by providing a callback
|
||||
*/
|
||||
removeAll(): BlocksArray;
|
||||
/**
|
||||
* @param callback Optional callback function which filters which items to be removed. Returning a truthy value will remove the item and vice versa
|
||||
*/
|
||||
removeAll(callback: Function): BlocksArray;
|
||||
/**
|
||||
* @param callback Optional callback function which filters which items to be removed. Returning a truthy value will remove the item and vice versa
|
||||
* @param thisArg Optional this context for the callback function
|
||||
*/
|
||||
removeAll(callback: Function, thisArg: any): BlocksArray;
|
||||
|
||||
/**
|
||||
* The concat() method is used to join two or more arrays
|
||||
*
|
||||
* @param arrays The arrays to be joined
|
||||
*/
|
||||
concat(...arrays: any[]): any[]
|
||||
|
||||
/**
|
||||
* The slice() method returns the selected elements in an array, as a new array object
|
||||
*
|
||||
* @param start An integer that specifies where to start the selection (The first element has an index of 0)
|
||||
*/
|
||||
slice(start: number): any[];
|
||||
/**
|
||||
* @param start An integer that specifies where to start the selection (The first element has an index of 0)
|
||||
* @param end An integer that specifies where to end the selection. If omitted, all elements from the start position and to the end of the array will be selected.
|
||||
* Use negative numbers to select from the end of an array
|
||||
*/
|
||||
slice(start: number, end: number): any[];
|
||||
|
||||
/**
|
||||
* The join() method joins the elements of an array into a string, and returns the string
|
||||
*/
|
||||
join(): string;
|
||||
/**
|
||||
* @param separator The separator to be used. If omitted, the elements are separated with a comma
|
||||
*/
|
||||
join(seperator: string): string;
|
||||
|
||||
/**
|
||||
* The pop() method removes the last element of a observable array, and returns that element
|
||||
*/
|
||||
pop(): any;
|
||||
|
||||
/**
|
||||
* The push() method adds new items to the end of the observable array, and returns the new length
|
||||
*
|
||||
* @param values The item(s) to add to the observable array
|
||||
*/
|
||||
push(...values: any[]): number;
|
||||
|
||||
/**
|
||||
* Reverses the order of the elements in the observable array
|
||||
*/
|
||||
reverse(): any[];
|
||||
|
||||
/**
|
||||
* Removes the first element of a observable array, and returns that element
|
||||
*/
|
||||
shift(): any
|
||||
|
||||
/**
|
||||
* Sorts the elements of an array
|
||||
*/
|
||||
sort(): any[];
|
||||
/**
|
||||
* @param sortfunction A function that defines the sort order
|
||||
*/
|
||||
sort(sortfunction: Function): any[];
|
||||
|
||||
/**
|
||||
* Adds and/or removes elements from the observable array
|
||||
* Returns A new array containing the removed items, if any.
|
||||
*
|
||||
* @param index An integer that specifies at what position to add/remove items. Use negative values to specify the position from the end of the array.
|
||||
* @param howMany The number of items to be removed. If set to 0, no items will be removed.
|
||||
* @param items The new item(s) to be added to the array.
|
||||
*/
|
||||
splice(index: number, howMany: number, ...items: any[]): any[];
|
||||
|
||||
/**
|
||||
* The unshift() method adds new items to the beginning of an array, and returns the new length.
|
||||
*
|
||||
* @param items
|
||||
*/
|
||||
unshift(...items: any[]): number;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////
|
||||
// blocks MVC App
|
||||
/////////////////////////////////////////
|
||||
|
||||
interface App extends Extendable<App> {
|
||||
|
||||
/**
|
||||
* Creates an application property for a Model.
|
||||
*/
|
||||
Property(): any;
|
||||
/**
|
||||
* @param options Configuration options for property
|
||||
*/
|
||||
Property(options: PropertyPrototype): any;
|
||||
|
||||
/**
|
||||
* Defines a view that will be part of the Application.
|
||||
*
|
||||
* @param name The name of the View you are creating
|
||||
* @param prototype The object that will represent the View
|
||||
*/
|
||||
View(name: string, prototype: ViewPrototype): any;
|
||||
/**
|
||||
* Defines a view that will be part of the Application.
|
||||
*
|
||||
* @param parentViewName Provide this parameter only if you are creating nested views. This is the name of the parent View
|
||||
* @param name The name of the View you are creating
|
||||
* @param prototype The object that will represent the View
|
||||
*/
|
||||
View(parentViewName: string, name: string, prototype: ViewPrototype): any;
|
||||
|
||||
/**
|
||||
* Creates a new Model
|
||||
*
|
||||
* @param prototype The Model object properties that will be created
|
||||
*/
|
||||
Model(prototype: ModelPrototype): Model;
|
||||
|
||||
/**
|
||||
* Creates a new Collection
|
||||
*
|
||||
* @param prototype The Collection object properties that will be created.
|
||||
*/
|
||||
Collection(prototype: CollectionPrototype): Collection;
|
||||
Collection(model: Model, prototype: CollectionPrototype): Collection;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////
|
||||
// App.Property
|
||||
/////////////////////////////////////////
|
||||
|
||||
interface PropertyPrototype {
|
||||
defaultValue?: any;
|
||||
isObservable?: boolean;
|
||||
field?: string;
|
||||
value?: any;
|
||||
validateOnChange?: boolean;
|
||||
maxErrors?: number;
|
||||
validateInitially?: boolean
|
||||
|
||||
// Validators
|
||||
required?: Validator;
|
||||
minlength?: Validator;
|
||||
maxlength?: Validator;
|
||||
min?: Validator;
|
||||
max?: Validator;
|
||||
email?: Validator;
|
||||
url?: Validator;
|
||||
date?: Validator;
|
||||
creditcard?: Validator;
|
||||
regexp?: Validator;
|
||||
number?: Validator;
|
||||
digits?: Validator;
|
||||
letters?: Validator;
|
||||
equals?: Validator;
|
||||
}
|
||||
|
||||
interface Validator { }
|
||||
|
||||
/////////////////////////////////////////
|
||||
// App.View
|
||||
/////////////////////////////////////////
|
||||
|
||||
interface ViewPrototype {
|
||||
parentView?: any;
|
||||
|
||||
/**
|
||||
* Routes to a specific URL and actives the appropriate views associated with the URL
|
||||
*
|
||||
* @param name Name of the route
|
||||
*/
|
||||
route?(name: string): ViewPrototype;
|
||||
|
||||
|
||||
/**
|
||||
* Determines if the view is visible
|
||||
*/
|
||||
isActive?(): boolean;
|
||||
|
||||
/**
|
||||
* Override the init method to perform actions when the View is first created and shown on the page
|
||||
*/
|
||||
init?: Function;
|
||||
|
||||
/**
|
||||
* Override the routed method to perform actions when the View have routing and routing mechanism actives it.
|
||||
*/
|
||||
routed?: Function;
|
||||
|
||||
navigateTo?: Function;
|
||||
|
||||
/**
|
||||
* Override the ready method to perform actions when the DOM is ready and
|
||||
* all data-query have been executed.
|
||||
*/
|
||||
ready?: Function;
|
||||
|
||||
options?: {
|
||||
route?: any;
|
||||
url?: string
|
||||
};
|
||||
}
|
||||
|
||||
/////////////////////////////////////////
|
||||
// App.Model
|
||||
/////////////////////////////////////////
|
||||
|
||||
interface Model {
|
||||
(): Model;
|
||||
(props: Object): Model;
|
||||
|
||||
/**
|
||||
* Fires a request to the server to populate the Model based on the read URL specified
|
||||
*/
|
||||
read(): Model;
|
||||
/**
|
||||
* @param params The parameters Object that will be used to populate the Model from the specified options.read URL. If the URL does not contain parameters
|
||||
*/
|
||||
read(params: Object): Model;
|
||||
|
||||
/**
|
||||
* Synchronizes the changes with the server by sending requests to the provided URL's
|
||||
*/
|
||||
sync(): Model;
|
||||
}
|
||||
|
||||
interface ModelPrototype {
|
||||
|
||||
/**
|
||||
* Override the init method to perform actions on creation for each Model instance
|
||||
*/
|
||||
init?: Function;
|
||||
|
||||
/**
|
||||
* Validates all observable properties that have validation and returns true if all values are valid otherwise returns false
|
||||
*/
|
||||
validate?(): boolean;
|
||||
|
||||
/**
|
||||
* Extracts the raw(non observable) dataItem object values from the Model
|
||||
*/
|
||||
dataItem?(): Object;
|
||||
|
||||
/**
|
||||
* Applies new properties to the Model by providing an Object
|
||||
*
|
||||
* @param dataItem The object from which the new values will be applied
|
||||
*/
|
||||
reset?(dataItem: ModelPrototype): ModelPrototype;
|
||||
|
||||
/**
|
||||
* Determines whether the instance is new. If true when syncing the item will send for insertion instead of updating it.
|
||||
* The check is determined by the idAttr value specified in the options. If idAttr is not specified the item will always be considered new.
|
||||
*
|
||||
*/
|
||||
isNew?(): boolean;
|
||||
|
||||
options?: {
|
||||
idAttr?: string;
|
||||
baseUrl?: string;
|
||||
read?: { url?: string };
|
||||
create?: { url?: string };
|
||||
destroy?: { url?: string };
|
||||
update?: { url?: string };
|
||||
};
|
||||
}
|
||||
|
||||
/////////////////////////////////////////
|
||||
// App.Collection
|
||||
/////////////////////////////////////////
|
||||
|
||||
interface Collection extends Extendable<Collection> {
|
||||
(): Collection;
|
||||
(props: Object[]): Collection;
|
||||
|
||||
/**
|
||||
* Fires a request to the server to populate the Model based on the read URL specified
|
||||
*/
|
||||
read(): Collection;
|
||||
/**
|
||||
* @param params The parameters Object that will be used to populate the Collection from the specified options.read URL. If the URL does not contain parameters
|
||||
*/
|
||||
read(params: Object): Collection;
|
||||
|
||||
/**
|
||||
* Clear all changes made to the collection
|
||||
*/
|
||||
clearChanges(): Collection;
|
||||
|
||||
/**
|
||||
* Performs an ajax request for all create, update and delete operations in order to sync them with a database.
|
||||
*/
|
||||
sync(): Collection;
|
||||
|
||||
update(id: number, newValues: Object): Collection;
|
||||
}
|
||||
|
||||
interface CollectionPrototype {
|
||||
options?: {
|
||||
read?: { url?: string };
|
||||
create?: { url?: string };
|
||||
destroy?: { url?: string };
|
||||
update?: { url?: string };
|
||||
};
|
||||
}
|
||||
|
||||
interface Extendable<T> {
|
||||
|
||||
/**
|
||||
* Extends the current observable with particular functionality depending on the parameters specified.
|
||||
* If the method is called without arguments and jsvalue framework is included the observable will be
|
||||
* extended with the methods available in jsvalue for the current type.
|
||||
*
|
||||
* @param name Name of the extender
|
||||
* @param options Optional options
|
||||
*/
|
||||
extend(name?: string, ...options: any[]): T;
|
||||
extend(arg: any): T;
|
||||
}
|
||||
|
||||
interface Server {
|
||||
|
||||
/**
|
||||
* The port at which your application will be run
|
||||
*/
|
||||
port?: number;
|
||||
|
||||
/**
|
||||
* The folder where your application files like .html; .js and .css are going to be.
|
||||
* The value is passed to express.static() middleware.
|
||||
*/
|
||||
static?: string;
|
||||
|
||||
/**
|
||||
* Caches pages result instead of executing them each time.
|
||||
* Disabling cache could impact performance.
|
||||
*/
|
||||
cache?: boolean;
|
||||
|
||||
/**
|
||||
* Provide an express middleware function or an array of middleware functions.
|
||||
* Use: [compression(); bodyParser()]
|
||||
*/
|
||||
use?: any;
|
||||
}
|
||||
|
||||
declare var blocks: BlocksStatic;
|
||||
|
||||
declare module "blocks" {
|
||||
export = blocks;
|
||||
}
|
||||
@@ -219,6 +219,11 @@ barProm = fooProm.then((value: Foo) => {
|
||||
barProm = fooProm.then((value: Foo) => {
|
||||
return bar;
|
||||
});
|
||||
barProm = barProm.then((value: Bar) => {
|
||||
if (value) return value;
|
||||
var b:Bar;
|
||||
return Promise.resolve(b);
|
||||
});
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
|
||||
Vendored
+4
-8
@@ -26,10 +26,8 @@ declare class Promise<R> implements Promise.Thenable<R>, Promise.Inspection<R> {
|
||||
/**
|
||||
* Promises/A+ `.then()` with progress handler. Returns a new promise chained from this promise. The new promise will be rejected or resolved dedefer on the passed `fulfilledHandler`, `rejectedHandler` and the state of this promise.
|
||||
*/
|
||||
then<U>(onFulfill: (value: R) => Promise.Thenable<U>, onReject: (error: any) => Promise.Thenable<U>, onProgress?: (note: any) => any): Promise<U>;
|
||||
then<U>(onFulfill: (value: R) => Promise.Thenable<U>, onReject?: (error: any) => U, onProgress?: (note: any) => any): Promise<U>;
|
||||
then<U>(onFulfill: (value: R) => U, onReject: (error: any) => Promise.Thenable<U>, onProgress?: (note: any) => any): Promise<U>;
|
||||
then<U>(onFulfill?: (value: R) => U, onReject?: (error: any) => U, onProgress?: (note: any) => any): Promise<U>;
|
||||
then<U>(onFulfill: (value: R) => U|Promise.Thenable<U>, onReject: (error: any) => Promise.Thenable<U>, onProgress?: (note: any) => any): Promise<U>;
|
||||
then<U>(onFulfill: (value: R) => U|Promise.Thenable<U>, onReject?: (error: any) => U, onProgress?: (note: any) => any): Promise<U>;
|
||||
|
||||
/**
|
||||
* This is a catch-all exception handler, shortcut for calling `.then(null, handler)` on this promise. Any exception happening in a `.then`-chain will propagate to nearest `.catch` handler.
|
||||
@@ -633,10 +631,8 @@ declare module Promise {
|
||||
export function OperationalError(): OperationalError;
|
||||
|
||||
export interface Thenable<R> {
|
||||
then<U>(onFulfilled: (value: R) => Thenable<U>, onRejected: (error: any) => Thenable<U>): Thenable<U>;
|
||||
then<U>(onFulfilled: (value: R) => Thenable<U>, onRejected?: (error: any) => U): Thenable<U>;
|
||||
then<U>(onFulfilled: (value: R) => U, onRejected: (error: any) => Thenable<U>): Thenable<U>;
|
||||
then<U>(onFulfilled?: (value: R) => U, onRejected?: (error: any) => U): Thenable<U>;
|
||||
then<U>(onFulfilled: (value: R) => U|Thenable<U>, onRejected: (error: any) => Thenable<U>): Thenable<U>;
|
||||
then<U>(onFulfilled: (value: R) => U|Thenable<U>, onRejected?: (error: any) => U): Thenable<U>;
|
||||
}
|
||||
|
||||
export interface Resolver<R> {
|
||||
|
||||
+41
-11
@@ -1,4 +1,4 @@
|
||||
// QUnit Tests for Bootbox 3.0
|
||||
// QUnit Tests for Bootbox 4.4.0
|
||||
/// <reference path="bootbox.d.ts" />
|
||||
|
||||
bootbox.alert("Are we ok?");
|
||||
@@ -6,14 +6,13 @@ bootbox.alert("Are we ok with callback?", function () {
|
||||
console.log("Callback called!");
|
||||
});
|
||||
bootbox.alert({
|
||||
size: "medium",
|
||||
message: "Are we ok with callback and custom button?",
|
||||
callback: function () {
|
||||
console.log("Callback called!");
|
||||
}
|
||||
});
|
||||
|
||||
bootbox.confirm("Click ok to pass test");
|
||||
|
||||
bootbox.confirm("Click cancel to pass test", function (result) {
|
||||
console.log(!result);
|
||||
});
|
||||
@@ -24,28 +23,49 @@ bootbox.confirm({
|
||||
}
|
||||
});
|
||||
|
||||
bootbox.prompt("Are we ok?");
|
||||
bootbox.prompt("Enter 'ok' to pass test", function (result) {
|
||||
console.log(result);
|
||||
});
|
||||
bootbox.prompt({
|
||||
title: "Wassup?",
|
||||
message: "Enter 'ok' to pass test", callback: function (result) {
|
||||
console.log(result);
|
||||
}
|
||||
});
|
||||
bootbox.prompt({
|
||||
size: "large",
|
||||
title: "Wassup?",
|
||||
message: "Enter 'ok' to pass test", callback: function (result) {
|
||||
console.log(result);
|
||||
}
|
||||
});
|
||||
|
||||
bootbox.dialog("Test Dialog");
|
||||
|
||||
|
||||
bootbox.dialog("Test Dialog", function (result) {
|
||||
return result;
|
||||
});
|
||||
|
||||
bootbox.dialog({
|
||||
message: "Test Dialog",
|
||||
callback: function (result) { }
|
||||
});
|
||||
|
||||
// Testing the return object of the call. Using the pointer to disable the animation on success callback.
|
||||
var bBox : JQuery;
|
||||
|
||||
bBox = bootbox.dialog({
|
||||
message: "Test Dialog",
|
||||
buttons: {
|
||||
cancel: {
|
||||
label: "Cancel"
|
||||
},
|
||||
confirm: {
|
||||
label: "Continue",
|
||||
callback: function () {
|
||||
bBox.removeClass("fade");
|
||||
console.log("Outer callback.");
|
||||
}
|
||||
}
|
||||
},
|
||||
animate: true,
|
||||
});
|
||||
|
||||
var bdo: BootboxDialogOptions;
|
||||
var sampleButton: BootboxButton = {
|
||||
label: 'ButtonLabelToUse',
|
||||
@@ -74,4 +94,14 @@ bootbox.setDefaults({
|
||||
show: true
|
||||
})
|
||||
|
||||
bootbox.hideAll();
|
||||
bootbox.hideAll();
|
||||
|
||||
var localeOptions: BootboxLocaleValues = {
|
||||
OK: 'Hus',
|
||||
CANCEL: 'Nai',
|
||||
CONFIRM: 'Pakka'
|
||||
}
|
||||
|
||||
bootbox.addLocale("Nepali", localeOptions);
|
||||
bootbox.setLocale("Nepali");
|
||||
bootbox.removeLocale("Nepali");
|
||||
Vendored
+30
-15
@@ -1,22 +1,25 @@
|
||||
// Type definitions for Bootbox 4.0.0
|
||||
// Type definitions for Bootbox 4.4.0
|
||||
// Project: https://github.com/makeusabrew/bootbox
|
||||
// Definitions by: Vincent Bortone <https://github.com/vbortone/>, Kon Pik <https://github.com/konpikwastaken/>
|
||||
// Definitions by: Vincent Bortone <https://github.com/vbortone/>, Kon Pik <https://github.com/konpikwastaken/>, Anup Kattel <https://github.com/kanup/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
/// <reference path="../jquery/jquery.d.ts" />
|
||||
interface BootboxAlertOptions {
|
||||
size?: string;
|
||||
message: string;
|
||||
callback?: () => any;
|
||||
}
|
||||
|
||||
interface BootboxConfirmOptions {
|
||||
size?: string;
|
||||
message: string;
|
||||
callback?: (result: boolean) => any;
|
||||
callback: (result: boolean) => any;
|
||||
}
|
||||
|
||||
interface BootboxPromptOptions {
|
||||
message: string;
|
||||
callback?: (result: string) => any;
|
||||
size?: string;
|
||||
message?: string;
|
||||
callback: (result: string) => any;
|
||||
}
|
||||
|
||||
interface BootboxButton {
|
||||
@@ -28,13 +31,15 @@ interface BootboxButton {
|
||||
interface BootboxDialogOptions {
|
||||
message: string | Element;
|
||||
title?: string | Element;
|
||||
locale?: string;
|
||||
callback?: (result: boolean) => any;
|
||||
onEscape?: () => any | boolean;
|
||||
show?: boolean;
|
||||
onEscape?: () => any;
|
||||
backdrop?: boolean;
|
||||
closeButton?: boolean;
|
||||
animate?: boolean;
|
||||
className?: string;
|
||||
size?: string;
|
||||
buttons?: Object; // complex object where each key is of type BootboxButton
|
||||
}
|
||||
|
||||
@@ -47,17 +52,27 @@ interface BootboxDefaultOptions {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
interface BootboxLocaleValues {
|
||||
OK: string;
|
||||
CANCEL: string;
|
||||
CONFIRM: string;
|
||||
}
|
||||
|
||||
interface BootboxStatic {
|
||||
alert(message: string, callback?: () => void): void;
|
||||
alert(options: BootboxAlertOptions): void;
|
||||
confirm(message: string, callback?: (result: boolean) => void): void;
|
||||
confirm(options: BootboxConfirmOptions): void;
|
||||
prompt(message: string, callback?: (result: string) => void): void;
|
||||
prompt(options: BootboxPromptOptions): void;
|
||||
dialog(message: string, callback?: (result: string) => void): void;
|
||||
dialog(options: BootboxDialogOptions): void;
|
||||
alert(message: string, callback?: () => void): JQuery;
|
||||
alert(options: BootboxAlertOptions): JQuery;
|
||||
confirm(message: string, callback: (result: boolean) => void): JQuery;
|
||||
confirm(options: BootboxConfirmOptions): JQuery;
|
||||
prompt(message: string, callback: (result: string) => void): JQuery;
|
||||
prompt(options: BootboxPromptOptions): JQuery;
|
||||
dialog(message: string, callback?: (result: string) => void): JQuery;
|
||||
dialog(options: BootboxDialogOptions): JQuery;
|
||||
setDefaults(options: BootboxDefaultOptions): void;
|
||||
hideAll(): void;
|
||||
|
||||
addLocale(name: string, values: BootboxLocaleValues): void;
|
||||
removeLocale(name: string): void;
|
||||
setLocale(name: string): void;
|
||||
}
|
||||
|
||||
declare var bootbox: BootboxStatic;
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
/// <reference path="../jquery/jquery.d.ts" />
|
||||
/// <reference path="bootstrap-slider.d.ts" />
|
||||
|
||||
$(function() {
|
||||
// examples from http://seiyria.github.io/bootstrap-slider/
|
||||
|
||||
$('#ex1').slider({
|
||||
formatter: function(value) {
|
||||
return 'Current value: ' + value;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#ex2").slider({});
|
||||
|
||||
var RGBChange = function() {
|
||||
$('#RGB').css('background', 'rgb('+r.getValue()+','+g.getValue()+','+b.getValue()+')')
|
||||
};
|
||||
|
||||
var r = $('#R').slider()
|
||||
.on('slide', RGBChange)
|
||||
.data('slider');
|
||||
var g = $('#G').slider()
|
||||
.on('slide', RGBChange)
|
||||
.data('slider');
|
||||
var b = $('#B').slider()
|
||||
.on('slide', RGBChange)
|
||||
.data('slider');
|
||||
|
||||
|
||||
|
||||
$("#ex4").slider({
|
||||
reversed : true
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#ex5").slider();
|
||||
|
||||
$("#destroyEx5Slider").click(function() {
|
||||
$("#ex5").slider('destroy');
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#ex6").slider();
|
||||
$("#ex6").on("slide", function(slideEvt) {
|
||||
$("#ex6SliderVal").text(<number>slideEvt.value);
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#ex7").slider();
|
||||
|
||||
$("#ex7-enabled").click(function() {
|
||||
if(this.checked) {
|
||||
// With JQuery
|
||||
$("#ex7").slider("enable");
|
||||
}
|
||||
else {
|
||||
// With JQuery
|
||||
$("#ex7").slider("disable");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#ex8").slider({
|
||||
tooltip: 'always'
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#ex9").slider({
|
||||
precision: 2,
|
||||
value: 8.115 // Slider will instantiate showing 8.12 due to specified precision
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#ex11").slider({step: 20000, min: 0, max: 200000});
|
||||
|
||||
|
||||
|
||||
$("#ex12a").slider({ id: "slider12a", min: 0, max: 10, value: 5 });
|
||||
$("#ex12b").slider({ id: "slider12b", min: 0, max: 10, range: true, value: [3, 7] });
|
||||
$("#ex12c").slider({ id: "slider12c", min: 0, max: 10, range: true, value: [3, 7] });
|
||||
|
||||
|
||||
|
||||
$("#ex13").slider({
|
||||
ticks: [0, 100, 200, 300, 400],
|
||||
ticks_labels: ['$0', '$100', '$200', '$300', '$400'],
|
||||
ticks_snap_bounds: 30
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#ex14").slider({
|
||||
ticks: [0, 100, 200, 300, 400],
|
||||
ticks_positions: [0, 30, 60, 70, 90, 100],
|
||||
ticks_labels: ['$0', '$100', '$200', '$300', '$400'],
|
||||
ticks_snap_bounds: 30
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#ex15").slider({
|
||||
min: 1000,
|
||||
max: 10000000,
|
||||
scale: 'logarithmic',
|
||||
step: 10
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#ex16a").slider({ min: 0, max: 10, value: 0, focus: true });
|
||||
$("#ex16b").slider({ min: 0, max: 10, value: [0, 10], focus: true });
|
||||
});
|
||||
+200
@@ -0,0 +1,200 @@
|
||||
// Type definitions for bootstrap-slider.js 4.8.3
|
||||
// Project: https://github.com/seiyria/bootstrap-slider
|
||||
// Definitions by: Daniel Beckwith <https://github.com/dbeckwith>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
///<reference path="../jquery/jquery.d.ts"/>
|
||||
|
||||
interface SliderOptions {
|
||||
/**
|
||||
* Default: ''
|
||||
* set the id of the slider element when it's created
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* Default: 0
|
||||
* minimum possible value
|
||||
*/
|
||||
min?: number;
|
||||
/**
|
||||
* Default: 10
|
||||
* maximum possible value
|
||||
*/
|
||||
max?: number;
|
||||
/**
|
||||
* Default: 1
|
||||
* increment step
|
||||
*/
|
||||
step?: number;
|
||||
/**
|
||||
* Default: number of digits after the decimal of step value
|
||||
* The number of digits shown after the decimal. Defaults to the number of digits after the decimal of step value.
|
||||
*/
|
||||
precision?: number;
|
||||
/**
|
||||
* Default: 'horizontal'
|
||||
* set the orientation. Accepts 'vertical' or 'horizontal'
|
||||
*/
|
||||
orientation?: number;
|
||||
/**
|
||||
* Default: 5
|
||||
* initial value. Use array to have a range slider.
|
||||
*/
|
||||
value?: number|number[];
|
||||
/**
|
||||
* Default: false
|
||||
* make range slider. Optional if initial value is an array. If initial value is scalar, max will be used for second value.
|
||||
*/
|
||||
range?: boolean;
|
||||
/**
|
||||
* Default: 'before'
|
||||
* selection placement. Accepts: 'before', 'after' or 'none'. In case of a range slider, the selection will be placed between the handles
|
||||
*/
|
||||
selection?: string;
|
||||
/**
|
||||
* Default: 'show'
|
||||
* whether to show the tooltip on drag, hide the tooltip, or always show the tooltip. Accepts: 'show', 'hide', or 'always'
|
||||
*/
|
||||
tooltip?: string;
|
||||
/**
|
||||
* Default: false
|
||||
* if false show one tootip if true show two tooltips one for each handler
|
||||
*/
|
||||
tooltip_split?: boolean;
|
||||
/**
|
||||
* Default: 'round'
|
||||
* handle shape. Accepts: 'round', 'square', 'triangle' or 'custom'
|
||||
*/
|
||||
handle?: string;
|
||||
/**
|
||||
* Default: false
|
||||
* whether or not the slider should be reversed
|
||||
*/
|
||||
reversed?: boolean;
|
||||
/**
|
||||
* Default: true
|
||||
* whether or not the slider is initially enabled
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
* Default: returns the plain value
|
||||
* formatter callback. Return the value wanted to be displayed in the tooltip
|
||||
* @param val the current value to display
|
||||
*/
|
||||
formatter?(val:number): string;
|
||||
/**
|
||||
* Default: false
|
||||
* The natural order is used for the arrow keys. Arrow up select the upper slider value for vertical sliders, arrow right the righter slider value for a horizontal slider - no matter if the slider was reversed or not. By default the arrow keys are oriented by arrow up/right to the higher slider value, arrow down/left to the lower slider value.
|
||||
*/
|
||||
natural_arrow_keys?: boolean;
|
||||
/**
|
||||
* Default: [ ]
|
||||
* Used to define the values of ticks. Tick marks are indicators to denote special values in the range. This option overwrites min and max options.
|
||||
*/
|
||||
ticks?: number[];
|
||||
/**
|
||||
* Default: [ ]
|
||||
* Defines the positions of the tick values in percentages. The first value should alwasy be 0, the last value should always be 100 percent.
|
||||
*/
|
||||
ticks_positions?: number[];
|
||||
/**
|
||||
* Default: [ ]
|
||||
* Defines the labels below the tick marks. Accepts HTML input.
|
||||
*/
|
||||
ticks_labels?: string[];
|
||||
/**
|
||||
* Default: 0
|
||||
* Used to define the snap bounds of a tick. Snaps to the tick if value is within these bounds.
|
||||
*/
|
||||
ticks_snap_bounds?: number;
|
||||
/**
|
||||
* Default: 'linear'
|
||||
* Set to 'logarithmic' to use a logarithmic scale.
|
||||
*/
|
||||
scale?: string;
|
||||
/**
|
||||
* Default: false
|
||||
* Focus the appropriate slider handle after a value change.
|
||||
*/
|
||||
focus?: boolean;
|
||||
}
|
||||
|
||||
interface JQuery {
|
||||
/**
|
||||
* Creates a slider from the current element.
|
||||
* @param options
|
||||
*/
|
||||
slider(options?:SliderOptions): JQuery;
|
||||
slider(methodName:string, ...args:any[]): JQuery;
|
||||
}
|
||||
|
||||
interface ChangeValue {
|
||||
oldValue: number;
|
||||
newValue: number;
|
||||
}
|
||||
|
||||
interface JQueryEventObject {
|
||||
value: number|ChangeValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* This class is actually not used when using the jQuery version of bootstrap-slider
|
||||
* The method documentation is still here thouh.
|
||||
* When using jQuery, slider methods like setValue(3, true) have to be called like $slider.slider('setValue', 3, true)
|
||||
*/
|
||||
interface Slider extends JQuery {
|
||||
/**
|
||||
* Get the current value from the slider
|
||||
*/
|
||||
getValue(): number;
|
||||
/**
|
||||
* Set a new value for the slider. If optional triggerSlideEvent parameter is true, 'slide' events will be triggered. If optional triggerChangeEvent parameter is true, 'change' events will be triggered.
|
||||
* @param newValue
|
||||
* @param triggerSlideEvent
|
||||
* @param triggerChangeEvent
|
||||
*/
|
||||
setValue(newValue:number, triggerSlideEvent?:boolean, triggerChangeEvent?:boolean): void;
|
||||
/**
|
||||
* Properly clean up and remove the slider instance
|
||||
*/
|
||||
destroy(): void;
|
||||
/**
|
||||
* Disables the slider and prevents the user from changing the value
|
||||
*/
|
||||
disable(): void;
|
||||
/**
|
||||
* Enables the slider
|
||||
*/
|
||||
enable(): void;
|
||||
/**
|
||||
* Returns true if enabled, false if disabled
|
||||
*/
|
||||
isEnabled(): boolean;
|
||||
/**
|
||||
* Updates the slider's attributes
|
||||
* @param attribute
|
||||
* @param value
|
||||
*/
|
||||
setAttribute(attribute:string, value:any): void;
|
||||
/**
|
||||
* Get the slider's attributes
|
||||
* @param attribute
|
||||
*/
|
||||
getAttribute(attribute:string): any;
|
||||
/**
|
||||
* Refreshes the current slider
|
||||
*/
|
||||
refresh(): void;
|
||||
/**
|
||||
* Renders the tooltip again, after initialization. Useful in situations when the slider and tooltip are initially hidden.
|
||||
*/
|
||||
relayout(): void;
|
||||
on: {
|
||||
(eventType:string, callback:(eventObject:JQueryEventObject, ...args:any[]) => any): Slider;
|
||||
(eventType:string, data:any, callback:(eventObject:JQueryEventObject, ...args:any[]) => any): Slider;
|
||||
(eventType:string, selector:string, callback:(eventObject:JQueryEventObject, ...eventData:any[]) => any): Slider;
|
||||
(eventType:string, selector:string, data:any, callback:(eventObject:JQueryEventObject, ...eventData:any[]) => any): Slider;
|
||||
(eventType:{ [key: string]: any; }, selector?:string, data?:any): Slider;
|
||||
(eventType:{ [key: string]: any; }, data?:any): Slider;
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,13 @@ browserSync({
|
||||
}
|
||||
});
|
||||
|
||||
// multiple base directory
|
||||
browserSync({
|
||||
server: {
|
||||
baseDir: ["app", "dist"]
|
||||
}
|
||||
});
|
||||
|
||||
browserSync({
|
||||
proxy: "yourlocal.dev"
|
||||
});
|
||||
@@ -62,4 +69,19 @@ evt.on("init", function () {
|
||||
console.log("BrowserSync is running!");
|
||||
});
|
||||
|
||||
browserSync(config);
|
||||
browserSync(config);
|
||||
|
||||
var bs = browserSync.create();
|
||||
|
||||
bs.init({
|
||||
server: "./app"
|
||||
});
|
||||
|
||||
bs.reload();
|
||||
|
||||
function browserSyncInit(): browserSync.BrowserSync {
|
||||
var browser = browserSync.create();
|
||||
browser.init();
|
||||
return browser;
|
||||
}
|
||||
var browser = browserSyncInit();
|
||||
|
||||
Vendored
+101
-82
@@ -3,96 +3,115 @@
|
||||
// Definitions by: Asana <https://asana.com>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../chokidar/chokidar.d.ts"/>
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
declare module "browser-sync" {
|
||||
import chokidar = require("chokidar");
|
||||
import fs = require("fs");
|
||||
import http = require("http");
|
||||
|
||||
function BrowserSync(config?: BrowserSync.Options, callback?: (err: Error, bs: Object) => any): void;
|
||||
|
||||
module BrowserSync {
|
||||
export function reload(): void;
|
||||
export function reload(file: string): void;
|
||||
export function reload(files: string[]): void;
|
||||
export function reload(options: {stream: boolean}): NodeJS.ReadWriteStream;
|
||||
|
||||
export function notify(message: string, timeout?: number): void;
|
||||
interface Options {
|
||||
files?: string | string[];
|
||||
watchOptions?: GazeOptions;
|
||||
server?: ServerOptions;
|
||||
proxy?: string | boolean;
|
||||
port?: number;
|
||||
https?: boolean;
|
||||
ghostMode?: GhostOptions | boolean;
|
||||
logLevel?: string;
|
||||
logPrefix?: string;
|
||||
logConnections?: boolean;
|
||||
logFileChanges?: boolean;
|
||||
logSnippet?: boolean;
|
||||
snippetOptions?: SnippetOptions;
|
||||
rewriteRules?: boolean | RewriteRules[];
|
||||
tunnel?: string | boolean;
|
||||
online?: boolean;
|
||||
open?: string | boolean;
|
||||
browser?: string | string[];
|
||||
xip?: boolean;
|
||||
notify?: boolean;
|
||||
scrollProportionally?: boolean;
|
||||
scrollThrottle?: number;
|
||||
reloadDelay?: number;
|
||||
reloadDebounce?: number;
|
||||
plugins?: any[];
|
||||
injectChanges?: boolean;
|
||||
startPath?: string;
|
||||
minify?: boolean;
|
||||
host?: string;
|
||||
codeSync?: boolean;
|
||||
timestamps?: boolean;
|
||||
scriptPath?: (path: string) => string;
|
||||
socket?: SocketOptions;
|
||||
}
|
||||
|
||||
export function exit(): void;
|
||||
interface GazeOptions {
|
||||
interval?: number;
|
||||
debounceDelay?: number;
|
||||
mode?: string;
|
||||
cwd?: string;
|
||||
}
|
||||
|
||||
export var active: boolean;
|
||||
interface ServerOptions {
|
||||
baseDir?: string | string[];
|
||||
directory?: boolean;
|
||||
index?: string;
|
||||
routes?: {[path: string]: string};
|
||||
middleware?: MiddlewareHandler[];
|
||||
}
|
||||
|
||||
export var emitter: NodeJS.EventEmitter;
|
||||
|
||||
interface Options {
|
||||
files?: string | string[];
|
||||
watchOptions?: GazeOptions;
|
||||
server?: ServerOptions;
|
||||
proxy?: string | boolean;
|
||||
port?: number;
|
||||
https?: boolean;
|
||||
ghostMode?: GhostOptions | boolean;
|
||||
logLevel?: string;
|
||||
logPrefix?: string;
|
||||
logConnections?: boolean;
|
||||
logFileChanges?: boolean;
|
||||
logSnippet?: boolean;
|
||||
snippetOptions?: SnippetOptions;
|
||||
tunnel?: string | boolean;
|
||||
online?: boolean;
|
||||
open?: string | boolean;
|
||||
browser?: string | string[];
|
||||
xip?: boolean;
|
||||
notify?: boolean;
|
||||
scrollProportionally?: boolean;
|
||||
scrollThrottle?: number;
|
||||
reloadDelay?: number;
|
||||
injectChanges?: boolean;
|
||||
startPath?: string;
|
||||
minify?: boolean;
|
||||
host?: string;
|
||||
codeSync?: boolean;
|
||||
timestamps?: boolean;
|
||||
scriptPath?: (path: string) => string;
|
||||
socket?: SocketOptions;
|
||||
}
|
||||
|
||||
interface GazeOptions {
|
||||
interval?: number;
|
||||
debounceDelay?: number;
|
||||
mode?: string;
|
||||
cwd?: string;
|
||||
}
|
||||
|
||||
interface ServerOptions {
|
||||
baseDir?: string;
|
||||
directory?: boolean;
|
||||
index?: string;
|
||||
routes?: {[path: string]: string};
|
||||
middleware?: MiddlewareHandler[];
|
||||
}
|
||||
|
||||
interface MiddlewareHandler {
|
||||
(req: http.ServerRequest, res: http.ServerResponse, next: Function): any;
|
||||
}
|
||||
|
||||
interface GhostOptions {
|
||||
clicks?: boolean;
|
||||
scroll?: boolean;
|
||||
forms?: boolean;
|
||||
}
|
||||
|
||||
interface SnippetOptions {
|
||||
ignorePaths?: string;
|
||||
rule?: {match?: RegExp; fn?: (snippet: string, match: string) => any};
|
||||
}
|
||||
|
||||
interface SocketOptions {
|
||||
path?: string;
|
||||
clientPath?: string;
|
||||
namespace?: string;
|
||||
interface MiddlewareHandler {
|
||||
(req: http.ServerRequest, res: http.ServerResponse, next: Function): any;
|
||||
}
|
||||
|
||||
interface GhostOptions {
|
||||
clicks?: boolean;
|
||||
scroll?: boolean;
|
||||
forms?: boolean;
|
||||
}
|
||||
|
||||
interface SnippetOptions {
|
||||
ignorePaths?: string;
|
||||
rule?: {match?: RegExp; fn?: (snippet: string, match: string) => any};
|
||||
}
|
||||
|
||||
interface SocketOptions {
|
||||
path?: string;
|
||||
clientPath?: string;
|
||||
namespace?: string;
|
||||
}
|
||||
|
||||
interface RewriteRules {
|
||||
match: RegExp;
|
||||
fn: (match: string) => string;
|
||||
}
|
||||
|
||||
module browserSync {
|
||||
interface BrowserSync {
|
||||
init(config?: Options, callback?: (err: Error, bs: Object) => any): void;
|
||||
reload(): void;
|
||||
reload(file: string): void;
|
||||
reload(files: string[]): void;
|
||||
reload(options: {stream: boolean}): NodeJS.ReadWriteStream;
|
||||
notify(message: string, timeout?: number): void;
|
||||
exit(): void;
|
||||
watch(patterns: string, opts?: chokidar.WatchOptions, fn?: (event: string, file: fs.Stats) => any): NodeJS.EventEmitter;
|
||||
pause(): void;
|
||||
resume(): void;
|
||||
emitter: NodeJS.EventEmitter;
|
||||
active: boolean;
|
||||
paused: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
export = BrowserSync;
|
||||
}
|
||||
interface Exports extends browserSync.BrowserSync {
|
||||
create(): browserSync.BrowserSync;
|
||||
(config?: Options, callback?: (err: Error, bs: Object) => any): void;
|
||||
}
|
||||
|
||||
var browserSync: Exports;
|
||||
|
||||
export = browserSync;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/// <reference path="buffers.d.ts" />
|
||||
import Buffers = require('buffers');
|
||||
|
||||
var any: any;
|
||||
var num: number;
|
||||
var str: string;
|
||||
var buf = new Buffer([1, 2, 3]);
|
||||
var bufs: Buffers = new Buffers(); // with new, as type
|
||||
|
||||
bufs = Buffers(); // no new
|
||||
|
||||
// with self
|
||||
bufs = Buffers(bufs);
|
||||
bufs = new Buffers(bufs);
|
||||
|
||||
// with array of buffers.
|
||||
bufs = Buffers([buf, buf]);
|
||||
bufs = new Buffers([buf, buf]);
|
||||
|
||||
num = bufs.push(buf);
|
||||
num = bufs.push(buf, buf);
|
||||
|
||||
num = bufs.unshift(buf);
|
||||
num = bufs.unshift(buf, buf);
|
||||
|
||||
buf = bufs.slice();
|
||||
buf = bufs.slice(num);
|
||||
buf = bufs.slice(num, num);
|
||||
|
||||
bufs = bufs.splice(num);
|
||||
bufs = bufs.splice(num, num);
|
||||
bufs = bufs.splice(num, num, buf);
|
||||
bufs = bufs.splice(num, num, buf, buf);
|
||||
|
||||
num = bufs.copy(buf);
|
||||
num = bufs.copy(buf, num, num, num);
|
||||
|
||||
any = bufs.get(num);
|
||||
bufs.set(num, any);
|
||||
|
||||
num = bufs.indexOf(str);
|
||||
num = bufs.indexOf(str, num);
|
||||
num = bufs.indexOf(buf);
|
||||
num = bufs.indexOf(buf, num);
|
||||
|
||||
buf = bufs.toBuffer();
|
||||
|
||||
str = buf.toString();
|
||||
str = buf.toString(any, num, num);
|
||||
Vendored
+36
@@ -0,0 +1,36 @@
|
||||
// Type definitions for buffers 0.1.1
|
||||
// Project: https://github.com/substack/node-buffers
|
||||
// Definitions by: Robert Hencke <https://github.com/rhencke/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts"/>
|
||||
|
||||
declare module "buffers" {
|
||||
|
||||
interface BuffersStatics {
|
||||
new (bufs?: Buffer[]|Buffers): Buffers;
|
||||
(bufs?: Buffer[]| Buffers): Buffers;
|
||||
prototype: Buffers;
|
||||
}
|
||||
|
||||
interface Buffers {
|
||||
buffers: Buffer[];
|
||||
length: number;
|
||||
|
||||
push(...items: Buffer[]): number;
|
||||
unshift(...items: Buffer[]): number;
|
||||
slice(i?: number, j?: number): Buffer;
|
||||
splice(i: number, howMany?: number, ...items: Buffer[]): Buffers;
|
||||
copy(dst: Buffer, dstStart?: number, start?: number, end?: number): number;
|
||||
get(i: number): any;
|
||||
set(i: number, b: any): void;
|
||||
indexOf(needle: string|Buffer, offset?: number): number;
|
||||
toBuffer(): Buffer;
|
||||
toString(encoding?: any, start?: number, end?: number): string;
|
||||
}
|
||||
|
||||
var Buffers: BuffersStatics;
|
||||
|
||||
export = Buffers;
|
||||
|
||||
}
|
||||
+19
-3
@@ -1,6 +1,6 @@
|
||||
// Type definitions for bunyan-prettystream
|
||||
// Type definitions for bunyan-prettystream 0.1.3
|
||||
// Project: https://www.npmjs.com/package/bunyan-prettystream
|
||||
// Definitions by: Jason Swearingen <https://github.com/jasonswearingen/>
|
||||
// Definitions by: Jason Swearingen <https://github.com/jasonswearingen/>, Vadim Macagon <https://github.com/enlight/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
@@ -8,7 +8,23 @@
|
||||
declare module "bunyan-prettystream" {
|
||||
import stream = require("stream");
|
||||
class PrettyStream extends stream.Writable {
|
||||
public pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean; }): T;
|
||||
/**
|
||||
* @param options.mode Output format, can be either `long`, `short`, or `dev`,
|
||||
* defaults to `long`.
|
||||
* @param options.useColor Indicates whether or not output should be colored,
|
||||
* defaults to `true`.
|
||||
*/
|
||||
constructor(options?: { mode?: string; useColor?: boolean });
|
||||
|
||||
/**
|
||||
* Pipes data from this stream to another.
|
||||
*
|
||||
* @param destination Stream to write data to.
|
||||
* @param options.end Indicates whether `end()` should be called on the `destination`
|
||||
* stream when this stream emits `end`, defaults to `true`.
|
||||
* @return The `destination` stream.
|
||||
*/
|
||||
pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean; }): T;
|
||||
}
|
||||
export = PrettyStream;
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
/// <reference path="../chai/chai.d.ts" />
|
||||
/// <reference path="chai-as-promised.d.ts" />
|
||||
|
||||
import chai = require('chai');
|
||||
@@ -6,9 +5,11 @@ import chaiAsPromised = require('chai-as-promised');
|
||||
|
||||
chai.use(chaiAsPromised);
|
||||
|
||||
// ReSharper disable WrongExpressionStatement
|
||||
var promise: any;
|
||||
chai.expect(promise).to.eventually.equal(3);
|
||||
chai.expect(promise).to.become(3);
|
||||
chai.expect(promise).to.be.fulfilled;
|
||||
chai.expect(promise).to.be.rejected;
|
||||
chai.expect(promise).to.be.rejectedWith(Error);
|
||||
chai.expect(promise).to.notify(() => console.log('done'));
|
||||
|
||||
+11
-10
@@ -6,21 +6,22 @@
|
||||
/// <reference path="../chai/chai.d.ts" />
|
||||
|
||||
declare module 'chai-as-promised' {
|
||||
import chai = require('chai');
|
||||
|
||||
function chaiAsPromised(chai: any, utils: any): void;
|
||||
|
||||
export = chaiAsPromised;
|
||||
}
|
||||
|
||||
declare module chai {
|
||||
declare module Chai {
|
||||
|
||||
interface Assertion {
|
||||
become(expected: any): Assertion;
|
||||
fulfilled: Assertion;
|
||||
rejected: Assertion;
|
||||
rejectedWith(expected: any): Assertion;
|
||||
notify(fn: Function): Assertion;
|
||||
}
|
||||
|
||||
interface LanguageChains {
|
||||
become(expected: any): Expect;
|
||||
eventually: Expect;
|
||||
rejected: Expect;
|
||||
rejectedWith(expected: any): Expect;
|
||||
notify(fn: Function): Expect;
|
||||
eventually: Assertion;
|
||||
}
|
||||
|
||||
interface Assert {
|
||||
@@ -32,4 +33,4 @@ declare module chai {
|
||||
isRejected(promise: any, expected: any, message?: string): void;
|
||||
isRejected(promise: any, match: RegExp, message?: string): void;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
/// <reference path="../chai/chai.d.ts" />
|
||||
/// <reference path="chai-datetime.d.ts" />
|
||||
|
||||
import chai = require('chai');
|
||||
import chaiDateTime = require('chai-datetime');
|
||||
|
||||
chai.use(chaiDateTime);
|
||||
var expect = chai.expect;
|
||||
var assert = chai.assert;
|
||||
|
||||
function test_equalTime(){
|
||||
var date: Date = new Date(2014, 1, 1);
|
||||
expect(date).to.be.equalTime(date);
|
||||
date.should.be.equalTime(date);
|
||||
expect(date).to.equalTime(date);
|
||||
date.should.equalTime(date);
|
||||
assert.equalTime(date, date);
|
||||
}
|
||||
|
||||
@@ -34,14 +37,14 @@ function test_equalDate(){
|
||||
|
||||
function test_beforeDate(){
|
||||
var date: Date = new Date(2014, 1, 1);
|
||||
expect(date).to.beforeDate(date);
|
||||
date.should.beforeDate(date);
|
||||
expect(date).to.be.beforeDate(date);
|
||||
date.should.be.beforeDate(date);
|
||||
assert.beforeDate(date, date);
|
||||
}
|
||||
|
||||
function test_afterDate(){
|
||||
var date: Date = new Date(2014, 1, 1);
|
||||
expect(date).to.afterDate(date);
|
||||
date.should.afterDate(date);
|
||||
expect(date).to.be.afterDate(date);
|
||||
date.should.be.afterDate(date);
|
||||
assert.afterDate(date, date);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user