diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..5ebf4a129c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +trim_trailing_whitespace = true +insert_final_newline = true + +[{*.json,*.yml}] +indent_style = space +indent_size = 2 diff --git a/.gitignore b/.gitignore index 71251cf8ad..2a52c95e0c 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ *.map *.swp .DS_Store +npm-debug.log _Resharper.DefinitelyTyped bin @@ -28,13 +29,9 @@ _infrastructure/tests/build .idea *.iml *.js.map - -#rx.js -!rx.js - -#zip.js -!zip.js +!*.js/ node_modules .sublimets +.settings/launch.json diff --git a/.travis.yml b/.travis.yml index 0bad26ece1..48704282ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: node_js node_js: - - "0.10" + - 4 sudo: false diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 0db9eae38e..e9d91ae109 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -5,339 +5,623 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam * [:link:](acc-wizard/acc-wizard.d.ts) [acc-wizard](https://github.com/sathomas/acc-wizard) by [Cyril Schumacher](https://github.com/cyrilschumacher) * [:link:](accounting/accounting.d.ts) [accounting.js](http://josscrowcroft.github.io/accounting.js) by [Sergey Gerasimov](https://github.com/gerich-home) * [:link:](ace/ace.d.ts) [Ace Ajax.org Cloud9 Editor](http://ace.ajax.org) by [Diullei Gomes](https://github.com/Diullei) +* [:link:](acorn/acorn.d.ts) [Acorn](https://github.com/marijnh/acorn) by [RReverser](https://github.com/RReverser) * [:link:](add2home/add2home.d.ts) [add2home](http://cubiq.org/add-to-home-screen) by [James Wilkins](http://www.codeplex.com/site/users/view/jamesnw) * [:link:](adm-zip/adm-zip.d.ts) [adm-zip](https://github.com/cthackers/adm-zip) by [John Vilk](https://github.com/jvilk) +* [:link:](ag-grid/ag-grid.d.ts) [ag-grid](http://www.ag-grid.com) by [Niall Crosby](https://github.com/ceolter) * [:link:](alertify/alertify.d.ts) [alertify](http://fabien-d.github.io/alertify.js) by [John Jeffery](http://github.com/jjeffery) +* [:link:](alt/alt.d.ts) [Alt](https://github.com/goatslacker/alt) by [Michael Shearer](https://github.com/Shearerbeard) +* [:link:](amazon-product-api/amazon-product-api.d.ts) [amazon-product-api](https://github.com/t3chnoboy/amazon-product-api) by [Matti Lehtinen](https://github.com/MattiLehtinen) * [: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:](amplify-deferred/amplify-deferred.d.ts) [AmplifyJs 1.1.0 using JQuery Deferred](http://amplifyjs.com) by [Jonas Eriksson](https://github.com/joeriks), [Laurentiu Stamate](https://github.com/laurentiustamate94) * [: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:](amqplib/amqplib.d.ts) [amqplib 0.3.x](https://github.com/squaremo/amqp.node) by [Michael Nahkies](https://github.com/mnahkies), [Ab Reitsma](https://github.com/abreits) +* [:link:](angular2/angular2.d.ts) [Angular 2](http://angular.io) by [angular team](https://github.com/angular) +* [:link:](angular-dialog-service/angular-dialog-service.d.ts) [Angular Dialog Service](https://github.com/m-e-conroy/angular-dialog-service) by [William Comartin](https://github.com/wcomartin) +* [:link:](ng-file-upload/ng-file-upload.d.ts) [Angular File Upload](https://github.com/danialfarid/ng-file-upload) by [John Reilly](https://github.com/johnnyreilly) +* [:link:](angular-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.5](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-mocks.d.ts) [Angular JS (ngMock, ngMockE2E module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar) +* [:link:](angularjs/angular-animate.d.ts) [Angular JS (ngAnimate module)](http://angularjs.org) by [Michel Salib](https://github.com/michelsalib), [Adi Dahiya](https://github.com/adidahiya), [Raphael Schweizer](https://github.com/rasch), [Cody Schaaf](https://github.com/codyschaaf) +* [: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), [Tony Curtis](http://github.com/daltin) * [:link:](angularjs/angular-resource.d.ts) [Angular JS (ngResource module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar), [Michael Jess](http://github.com/miffels) * [:link:](angularjs/angular-route.d.ts) [Angular JS (ngRoute module)](http://angularjs.org) by [Jonathan Park](https://github.com/park9140) * [:link:](angularjs/angular-sanitize.d.ts) [Angular JS (ngSanitize module)](http://angularjs.org) by [Diego Vilar](http://github.com/diegovilar) -* [:link:](angular-ui/angular-ui-router.d.ts) [Angular JS (ui.router module)](https://github.com/angular-ui/ui-router) by [Michel Salib](https://github.com/michelsalib) -* [:link:](angular-material/angular-material.d.ts) [Angular Material (ng.material module)](https://github.com/angular/material) by [Matt Traynham](https://github.com/mtraynham) +* [: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-ui-scroll/angular-ui-scroll.d.ts) [Angular JS (ui.scroll module)](https://github.com/angular-ui/ui-scroll) by [Mark Nadig](https://github.com/marknadig) +* [: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-toasty/angular-toasty.d.ts) [Angular Toasty](https://github.com/invertase/angular-toasty) by [Dominik Muench](https://github.com/muenchdo) * [:link:](angular-translate/angular-translate.d.ts) [Angular Translate (pascalprecht.translate module)](https://github.com/PascalPrecht/angular-translate) by [Michel Salib](https://github.com/michelsalib) * [:link:](angular-ui-bootstrap/angular-ui-bootstrap.d.ts) [Angular UI Bootstrap](https://github.com/angular-ui/bootstrap) by [Brian Surowiec](https://github.com/xt0rted) +* [:link:](angular-wizard/angular-wizard.d.ts) [Angular Wizard](https://github.com/mgonto/angular-wizard) by [Marko Jurisic](https://github.com/mjurisic) * [:link:](angular-bootstrap-lightbox/angular-bootstrap-lightbox.d.ts) [angular-bootstrap-lightbox](https://github.com/compact/angular-bootstrap-lightbox) by [Roland Zwaga](https://github.com/rolandzwaga) +* [:link:](angular-dynamic-locale/angular-dynamic-locale.d.ts) [angular-dynamic-locale](https://github.com/lgalfaso/angular-dynamic-locale) by [Stephen Lautier](https://github.com/stephenlautier) +* [:link:](angular-formly/angular-formly.d.ts) [angular-formly](https://github.com/formly-js/angular-formly) by [Scott Hatcher](https://github.com/scatcher) +* [:link:](angular-gettext/angular-gettext.d.ts) [angular-gettext](https://angular-gettext.rocketeer.be) by [Ákos Lukács](https://github.com/AkosLukacs) +* [:link:](angular-google-analytics/angular-google-analytics.d.ts) [angular-google-analytics](https://github.com/revolunet/angular-google-analytics) by [Cyril Schumacher](https://github.com/cyrilschumacher) * [: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-httpi/angular-httpi.d.ts) [angular-httpi](https://github.com/bennadel/httpi) by [Andrew Camilleri](https://github.com/Kukks) +* [:link:](angular-jwt/angular-jwt.d.ts) [angular-jwt](https://github.com/auth0/angular-jwt) by [Reto Rezzonico](https://github.com/rerezz) +* [:link:](angular-loading-bar/angular-loading-bar.d.ts) [angular-loading-bar](https://github.com/chieffancypants/angular-loading-bar) by [Stephen Lautier](https://github.com/stephenlautier) * [: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-modal/angular-modal.d.ts) [angular-modal](https://github.com/btford/angular-modal) by [Paul Lessing](https://github.com/paullessing) +* [:link:](angular-notifications/angular-notifications.d.ts) [angular-notifications](https://github.com/DerekRies/angular-notifications) by [Tomasz Ducin](https://github.com/ducin/DefinitelyTyped) * [:link:](angular-notify/angular-notify.d.ts) [angular-notify](https://github.com/cgross/angular-notify) by [Suwato](https://github.com/Suwato/DefinitelyTyped) * [:link:](angular-scroll/angular-scroll.d.ts) [angular-scroll](https://github.com/oblador/angular-scroll) by [Sam Herrmann](https://github.com/samherrmann) +* [:link:](angular-signalr-hub/angular-signalr-hub.d.ts) [angular-signalr-hub](https://github.com/JustMaier/angular-signalr-hub) by [Adam Santaniello](https://github.com/AdamSantaniello) * [:link:](angular-spinner/angular-spinner.d.ts) [angular-spinner.js](https://github.com/urish/angular-spinner) by [Marcin Biegała](https://github.com/Biegal) -* [:link:](angular-ui/angular-ui-sortable.d.ts) [angular.ui.sortable module](https://github.com/angular-ui/ui-sortable) by [Thodoris Greasidis](https://github.com/thgreasi) +* [:link:](angular-storage/angular-storage.d.ts) [angular-storage](https://github.com/auth0/angular-storage) by [Matthew DeKrey](https://github.com/mdekrey) +* [:link:](angular-ui-tree/angular-ui-tree.d.ts) [angular-ui-tree](https://github.com/angular-ui-tree/angular-ui-tree) by [Calvin Fernandez](https://github.com/CalvinFernandez) +* [:link:](angular.throttle/angular.throttle.d.ts) [angular.throttle](https://github.com/BaggersIO/angular.throttle) by [Stefan Steinhart](https://github.com/reppners) +* [:link:](angular-ui-sortable/angular-ui-sortable.d.ts) [angular.ui.sortable module](https://github.com/angular-ui/ui-sortable) by [Thodoris Greasidis](https://github.com/thgreasi) * [:link:](angular-agility/angular-agility.d.ts) [AngularAgility](https://github.com/AngularAgility/AngularAgility) by [Roland Zwaga](https://github.com/rolandzwaga) * [:link:](angularfire/angularfire.d.ts) [AngularFire](http://angularfire.com) by [Dénes Harmath](http://github.com/thSoft) +* [:link:](rx-angular/rx.angular.d.ts) [angularjs extensions to rxjs](http://reactivex.io) by [Mick Delaney](https://github.com/mickdelaney) +* [:link:](angularjs-toaster/angularjs-toaster.d.ts) [angularjs-toaster](https://github.com/jirikavi/AngularJS-Toaster) by [Ben Tesser](https://github.com/btesser) * [:link:](angularLocalStorage/angularLocalStorage.d.ts) [AngularLocalStorage](https://github.com/agrublev/angularLocalStorage) by [Horiuchi_H](https://github.com/horiuchi) +* [:link:](angulartics/angulartics.d.ts) [Angulartics](http://luisfarzati.github.io/angulartics) by [Steven Fan](https://github.com/stevenfan) * [:link:](animation-frame/animation-frame.d.ts) [animation-frame](https://github.com/kof/animation-frame) by [Qinfeng Chen](https://github.com/qinfchen) +* [:link:](ansi-styles/ansi-styles.d.ts) [ansi-styles](https://github.com/sindresorhus/ansi-styles) by [bryn austin bellomy](https://github.com/brynbellomy) * [:link:](ansicolors/ansicolors.d.ts) [ansicolors](https://github.com/thlorenz/ansicolors) by [rogierschouten](https://github.com/rogierschouten) * [:link:](any-db/any-db.d.ts) [any-db](https://github.com/grncdr/node-any-db) by [Rogier Schouten](https://github.com/rogierschouten) * [:link:](any-db-transaction/any-db-transaction.d.ts) [any-db-transaction](https://github.com/grncdr/node-any-db-transaction) by [Rogier Schouten](https://github.com/rogierschouten) +* [:link:](anydb-sql/anydb-sql.d.ts) [anydb-sql](https://github.com/doxout/anydb-sql) by [Gorgi Kosev](https://github.com/spion) +* [:link:](anydb-sql-migrations/anydb-sql-migrations.d.ts) [anydb-sql-migrations](https://github.com/spion/anydb-sql-migrations) by [Gorgi Kosev](https://github.com/spion) * [:link:](cordova/cordova.d.ts) [Apache Cordova](http://cordova.apache.org) by [Microsoft Open Technologies Inc.](http://msopentech.com) -* [:link:](polymer/polymer.app-router.d.ts) [app-router](https://github.com/erikringsmuth/app-router) by [Louis Grignon](https://github.com/lgrignon) +* [: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:](api-error-handler/api-error-handler.d.ts) [api-error-handler](https://github.com/expressjs/api-error-handler) by [Tanguy Krotoff](https://github.com/tkrotoff) * [:link:](appframework/appframework.d.ts) [AppFramework](http://app-framework-software.intel.com) by [kyo_ago](https://github.com/kyo-ago) +* [:link:](appletvjs/appletvjs.d.ts) [AppleTVJS](https://developer.apple.com/library/prerelease/tvos/documentation/TVMLJS/Reference/TVJSFrameworkReference/index.html) by [Adam Valverde](https://github.com/brainded) +* [: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:](archiver/archiver.d.ts) [archiver](https://github.com/archiverjs/node-archiver) by [Esri](https://github.com/archiverjs/node-archiver) * [:link:](archy/archy.d.ts) [archy](https://github.com/substack/node-archy) by [vvakame](https://github.com/vvakame) +* [:link:](argparse/argparse.d.ts) [argparse](https://github.com/nodeca/argparse) by [Andrew Schurman](http://github.com/arcticwaters) * [:link:](asciify/asciify.d.ts) [asciify](https://www.npmjs.org/package/asciify) by [Alan Norbauer](http://alan.norbauer.com) * [: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:](assertsharp/assertsharp.d.ts) [assertsharp](https://www.npmjs.com/package/assertsharp) by [Bruno Leonardo Michels](https://github.com/brunolm) +* [:link:](async/async.d.ts) [Async](https://github.com/caolan/async) by [Boris Yankov](https://github.com/borisyankov), [Arseniy Maximov](https://github.com/kern0), [Joe Herman](https://github.com/Penryn) * [: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:](atom-keymap/atom-keymap.d.ts) [atom-keymap](https://github.com/atom/atom-keymap) by [Vadim Macagon](https://github.com/enlight) * [:link:](atpl/atpl.d.ts) [atpl](https://github.com/soywiz/atpl.js) by [Carlos Ballesteros Velasco](https://github.com/soywiz) * [:link:](auth0/auth0.d.ts) [Auth0.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei) * [:link:](auth0.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:](auto-launch/auto-launch.d.ts) [auto-launch](https://github.com/Teamwork/node-auto-launch) by [rhysd](https://github.com/rhysd) +* [:link:](autobahn/autobahn.d.ts) [AutobahnJS](http://autobahn.ws/js) by [Elad Zelingher](https://github.com/darkl), [Andy Hawkins](https://github.com/a904guy/,http://a904guy.com/,http://www.bmbsqd.com) +* [:link:](autoprefixer-core/autoprefixer-core.d.ts) [Autoprefixer Core](https://github.com/postcss/autoprefixer-core) by [Asana](https://asana.com) * [:link:](aws-sdk/aws-sdk.d.ts) [aws-sdk](https://github.com/aws/aws-sdk-js) by [midknight41](https://github.com/midknight41) +* [:link:](axios/axios.d.ts) [axios](https://github.com/mzabriskie/axios) by [Marcel Buesing](https://github.com/marcelbuesing) * [:link:](node-azure/azure.d.ts) [Azure SDK for Node](https://github.com/WindowsAzure/azure-sdk-for-node) by [Andrew Gaspar](https://github.com/AndrewGaspar), [Anti Veeranna](https://github.com/antiveeranna), [Maxime LUCE](https://github.com/SomaticIT) +* [:link:](backbone/backbone-global.d.ts) [Backbone](http://backbonejs.org) by [Boris Yankov](https://github.com/borisyankov), [Natan Vivo](https://github.com/nvivo) * [:link:](backbone/backbone.d.ts) [Backbone](http://backbonejs.org) by [Boris Yankov](https://github.com/borisyankov), [Natan Vivo](https://github.com/nvivo) +* [:link:](backbone-associations/backbone-associations.d.ts) [Backbone-associations](https://github.com/dhruvaray/backbone-associations) by [Craig Brett](https://github.com/craigbrett17) * [:link:](backbone-relational/backbone-relational.d.ts) [Backbone-relational](http://backbonerelational.org) by [Eirik Hoem](https://github.com/eirikhm) * [:link:](backbone.layoutmanager/backbone.layoutmanager.d.ts) [Backbone.LayoutManager](http://layoutmanager.org) by [He Jiang](https://github.com/hejiang2000) +* [:link:](backbone.paginator/backbone.paginator.d.ts) [backbone.paginator](https://github.com/backbone-paginator/backbone.paginator) by [Nyamazing](https://github.com/Nyamazing) * [:link:](backbone.radio/backbone.radio.d.ts) [Backbone.Radio](https://github.com/marionettejs/backbone.radio) by [Peter Palotas](https://github.com/alphaleonis) * [:link:](backgrid/backgrid.d.ts) [Backgrid](http://backgridjs.com) by [Jeremy Lujan](https://github.com/jlujan) +* [:link:](baconjs/baconjs.d.ts) [Bacon.js](https://baconjs.github.io) by [Alexander Matsievsky](https://github.com/alexander-matsievsky) +* [:link:](barcode/barcode.d.ts) [barcode](https://github.com/samt/barcode) by [Pascal Vomhoff](https://github.com/pvomhoff) +* [:link:](bardjs/bardjs.d.ts) [bardjs](https://github.com/wardbell/bardjs) by [Andrew Archibald](https://github.com/TepigMC) +* [:link:](basic-auth/basic-auth.d.ts) [basic-auth](https://github.com/jshttp/basic-auth) by [Clément Bourgeois](https://github.com/moonpyk) +* [:link:](batch-stream/batch-stream.d.ts) [batch-stream](https://github.com/segmentio/batch-stream) by [Nicholas Penree](http://github.com/drudge) * [:link:](bcrypt/bcrypt.d.ts) [bcrypt](https://www.npmjs.org/package/bcrypt) by [Peter Harris](https://github.com/codeanimal) +* [:link:](benchmark/benchmark.d.ts) [Benchmark](http://benchmarkjs.com) by [Asana](https://asana.com) +* [:link:](better-curry/better-curry.d.ts) [better-curry](https://github.com/pocesar/js-bettercurry) by [Paulo Cesar](https://github.com/pocesar) * [:link:](bgiframe/typescript.bgiframe.d.ts) [bgiframe](https://github.com/sumegizoltan/BgiFrame) by [Zoltan Sumegi](https://github.com/sumegizoltan) * [:link:](big.js/big.js.d.ts) [big.js](https://github.com/MikeMcl/big.js) by [Steve Ognibene](https://github.com/nycdotnet) * [:link:](bigint/bigint.d.ts) [BigInt](https://github.com/Evgenus/BigInt) by [Eugene Chernyshov](https://github.com/Evgenus) * [:link:](big-integer/big-integer.d.ts) [BigInteger.js](https://github.com/peterolson/BigInteger.js) by [Ingo Bürk](https://github.com/Airblader), [Roel van Uden](https://github.com/Deathspike) +* [:link:](bignum/bignum.d.ts) [BigNum](https://github.com/justmoon/node-BigNum) by [Pat Smuk](https://github.com/Patman64) * [:link:](bigscreen/bigscreen.d.ts) [BigScreen](http://brad.is/coding/BigScreen) by [Douglas Eichelberger](https://github.com/dduugg) * [:link:](bitwise-xor/bitwise-xor.d.ts) [bitwise-xor](https://github.com/czzarr/node-bitwise-xor) by [Rogier Schouten](https://github.com/rogierschouten) +* [:link:](blob-stream/blob-stream.d.ts) [blob-stream](https://github.com/devongovett/blob-stream) by [Eric Hillah](https://github.com/erichillah) * [:link:](bluebird/bluebird.d.ts) [bluebird](https://github.com/petkaantonov/bluebird) by [Bart van der Schoor](https://github.com/Bartvds) +* [:link:](bluebird-retry/bluebird-retry.d.ts) [bluebird-retry](https://github.com/jut-io/bluebird-retry) by [Pascal Vomhoff](https://github.com/pvomhoff) * [:link:](blueimp-md5/blueimp-md5.d.ts) [blueimp-md5](https://github.com/blueimp/JavaScript-MD5) by [Ray Martone](https://github.com/rmartone) * [:link:](body-parser/body-parser.d.ts) [body-parser](http://expressjs.com) by [Santi Albo](https://github.com/santialbo), [VILIC VANE](https://vilic.info), [Jonathan Häberle](https://github.com/dreampulse) +* [:link:](bookshelf/bookshelf.d.ts) [bookshelfjs](http://bookshelfjs.org) by [Andrew Schurman](http://github.com/arcticwaters) +* [:link:](boolify-string/boolify-string.d.ts) [boolify-string](https://github.com/sanemat/node-boolify-string) by [Tobias Henöckl](http://www.sisyphus.de) * [:link:](boom/boom.d.ts) [boom](http://github.com/hapijs/boom) by [Igor Rogatty](http://github.com/rogatty) -* [:link:](bootbox/bootbox.d.ts) [Bootbox](https://github.com/makeusabrew/bootbox) by [Vincent Bortone](https://github.com/vbortone), [Kon Pik](https://github.com/konpikwastaken) +* [:link:](bootbox/bootbox.d.ts) [Bootbox](https://github.com/makeusabrew/bootbox) by [Vincent Bortone](https://github.com/vbortone), [Kon Pik](https://github.com/konpikwastaken), [Anup Kattel](https://github.com/kanup), [Dominik Schroeter](https://github.com/icereed) * [:link:](bootstrap/bootstrap.d.ts) [Bootstrap](http://twitter.github.com/bootstrap) by [Boris Yankov](https://github.com/borisyankov) * [:link:](bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker.d.ts) [Bootstrap datetimepicker v3](http://eonasdan.github.io/bootstrap-datetimepicker) by [Jesica N. Fera](https://github.com/bayitajesi) -* [:link:](bootstrap-notify/bootstrap-notify.d.ts) [bootstrap-notify](https://github.com/Nijikokun/bootstrap-notify) by [Blake Niemyjski](https://github.com/niemyjski) +* [:link:](bootstrap-switch/bootstrap-switch.d.ts) [Bootstrap Switch](http://www.bootstrap-switch.org) by [John M. Baughman](https://github.com/johnmbaughman) +* [: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-maxlength/bootstrap-maxlength.d.ts) [bootstrap-maxlength](https://github.com/mimo84/bootstrap-maxlength) by [Dan Manastireanu](https://github.com/danmana) +* [:link:](bootstrap-notify/bootstrap-notify.d.ts) [bootstrap-notify](http://bootstrap-notify.remabledesigns.com) by [Blake Niemyjski](https://github.com/niemyjski), [Robert McIntosh](https://github.com/mouse0270), [Robert Voica](https://github.com/robert-voica) +* [:link:](bootstrap-slider/bootstrap-slider.d.ts) [bootstrap-slider.js](https://github.com/seiyria/bootstrap-slider) by [Daniel Beckwith](https://github.com/dbeckwith) * [:link:](bootstrap.datepicker/bootstrap.datepicker.d.ts) [bootstrap.datepicker](https://github.com/eternicode/bootstrap-datepicker) by [Boris Yankov](https://github.com/borisyankov) * [:link:](bootstrap.paginator/bootstrap.paginator.d.ts) [bootstrap.paginator](https://github.com/lyonlai/bootstrap-paginator) by [derikwhittaker](https://github.com/derikwhittaker) * [:link:](bootstrap.timepicker/bootstrap.timepicker.d.ts) [bootstrap.timepicker](https://github.com/jdewit/bootstrap-timepicker) by [derikwhittaker](https://github.com/derikwhittaker) * [:link:](box2d/box2dweb.d.ts) [bootstrap.timepicker](http://code.google.com/p/box2dweb) by [jbaldwin](https://github.com/jbaldwin) +* [:link:](bounce/bounce.d.ts) [Bounce.js](http://github.com/tictail/bounce.js) by [Cherry](http://github.com/cherrry) +* [:link:](bowser/bowser.d.ts) [Bowser 1.x](https://github.com/ded/bowser) by [Paulo Cesar](https://github.com/pocesar) * [:link:](breeze/breeze.d.ts) [Breeze 1.5.x](http://www.breezejs.com) by [Boris Yankov](https://github.com/borisyankov), [IdeaBlade](https://github.com/IdeaBlade/Breeze) * [:link:](browser-harness/browser-harness.d.ts) [Browser Harness](https://github.com/scriby/browser-harness) by [Chris Scribner](https://github.com/scriby) -* [:link:](browser-sync/browser-sync.d.ts) [browser-sync](http://www.browsersync.io) by [Asana](https://asana.com) +* [:link:](browser-sync/browser-sync.d.ts) [browser-sync](http://www.browsersync.io) by [Asana](https://asana.com), [Joe Skeen](http://github.com/joeskeen) * [:link:](browserify/browserify.d.ts) [Browserify](http://browserify.org) by [Andrew Gaspar](https://github.com/AndrewGaspar) * [: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:](dw-bxslider-4/dw-bxslider-4.d.ts) [bxSlider](https://github.com/stevenwanderski/bxslider-4) by [Piotr Sałkowski](https://github.com/namerci) * [:link:](byline/byline.d.ts) [byline](https://github.com/jahewson/node-byline) by [Stefan Steinhart](https://github.com/reppners) +* [:link:](bytes/bytes.d.ts) [bytes](https://github.com/visionmedia/bytes.js) by [Zhiyuan Wang](https://github.com/danny8002) +* [:link:](c3/c3.d.ts) [C3js](http://c3js.org) by [Marc Climent](https://github.com/mcliment) +* [:link:](calq/calq.d.ts) [calq](https://calq.io/docs/client/javascript/reference) by [Eirik Hoem](https://github.com/eirikhm) +* [:link:](camel-case/camel-case.d.ts) [camel-case](https://github.com/blakeembrey/camel-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) * [:link:](camljs/camljs.d.ts) [camljs](http://camljs.codeplex.com) by [Andrey Markeev](http://markeev.com) * [:link:](canvasjs/canvasjs.d.ts) [CanvasJS](http://canvasjs.com) by [Mark Overholt](https://github.com/mover5) * [:link:](casperjs/casperjs.d.ts) [CasperJS](http://casperjs.org) by [Jed Mao](https://github.com/jedmao) -* [: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-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/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), [Olivier Chevet](https://github.com/olivr70) +* [: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), [Yuki Kokubun](https://github.com/Kuniwak) * [: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:](chartist/chartist.d.ts) [Chartist](https://github.com/gionkunz/chartist-js) by [Matt Gibbs](https://github.com/mtgibbs) * [: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.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-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), [couven92](https://gitbus.com/couven92) * [:link:](chrome/chrome-app.d.ts) [Chrome packaged application development](http://developer.chrome.com/apps) by [Adam Lay](https://github.com/AdamLay), [MIZUNE Pine](https://github.com/pine613), [MIZUSHIMA Junki](https://github.com/mzsm) +* [:link:](chui/chui.d.ts) [chui](https://github.com/chocolatechipui/chocolatechip-ui) by [Robert Biggs](http://chocolatechip-ui.com) +* [:link:](circular-json/circular-json.d.ts) [circular-json](https://github.com/WebReflection/circular-json) by [Jonathan Pevarnek](https://github.com/jpevarnek) * [:link:](ckeditor/ckeditor.d.ts) [CKEditor](http://ckeditor.com) by [Ondrej Sevcik](https://github.com/ondrejsevcik) +* [:link:](classnames/classnames.d.ts) [classnames](https://github.com/JedWatson/classnames) by [Dave Keen](http://www.keendevelopment.ch), [Adi Dahiya](https://github.com/adidahiya), [Jason Killian](https://github.com/JKillian) * [: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:](closure-compiler/closure-compiler.d.ts) [closure-compiler](https://github.com/tim-smart/node-closure) by [Martin Probst](https://github.com/mprobst) +* [:link:](codemirror/codemirror-showhint.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [jacqt](https://github.com/jacqt), [basarat](https://github.com/basarat) +* [:link:](codemirror/codemirror-matchbrackets.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [Sixin Li](https://github.com/sixinli) * [:link:](codemirror/codemirror.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [mihailik](https://github.com/mihailik) +* [:link:](codemirror/searchcursor.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [jacqt](https://github.com/jacqt) +* [:link:](coffeeify/coffeeify.d.ts) [coffeeify](https://github.com/jnordberg/coffeeify) by [Qubo](https://github.com/tkQubo) +* [: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:](compare-version/compare-version.d.ts) [compare-version](https://www.npmjs.com/package/compare-version) by [Jonathan Pevarnek](https://github.com/jpevarnek) * [:link:](compression/compression.d.ts) [compression](https://github.com/expressjs/compression) by [Santi Albo](https://github.com/santialbo) * [:link:](configstore/configstore.d.ts) [configstore](https://github.com/yeoman/configstore) by [Bart van der Schoor](https://github.com/Bartvds) +* [:link:](connect/connect.d.ts) [connect](https://github.com/senchalabs/connect) by [Maxime LUCE](https://github.com/SomaticIT) +* [:link:](connect-flash/connect-flash.d.ts) [connect-flash](https://github.com/jaredhanson/connect-flash) by [Andreas Gassmann](https://github.com/AndreasGassmann) +* [:link:](connect-livereload/connect-livereload.d.ts) [connect-livereload](https://github.com/intesso/connect-livereload) by [Maxime LUCE](https://github.com/SomaticIT) +* [:link:](connect-modrewrite/connect-modrewrite.d.ts) [connect-modrewrite](https://github.com/tinganho/connect-modrewrite) by [Tingan Ho](https://github.com/tinganho) +* [:link:](connect-mongo/connect-mongo.d.ts) [connect-mongo](https://github.com/kcbanner/connect-mongo) by [Mizuki Yamamoto](https://github.com/Syati) +* [:link:](connect-slashes/connect-slashes.d.ts) [connect-slashes](https://github.com/avinoamr/connect-slashes) by [Sam Herrmann](https://github.com/samherrmann) * [:link:](consolidate/consolidate.d.ts) [consolidate](https://github.com/visionmedia/consolidate.js) by [Carlos Ballesteros Velasco](https://github.com/soywiz) +* [:link:](constant-case/constant-case.d.ts) [constant-case](https://github.com/blakeembrey/constant-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) * [:link:](content-type/content-type.d.ts) [content-type](https://github.com/deoxxa/content-type) by [Pine Mizune](https://github.com/pine613) +* [:link:](contextjs/contextjs.d.ts) [contextjs](https://github.com/jakiestfu/Context.js) by [Kern Handa](https://github.com/kernhanda) * [:link:](convert-source-map/convert-source-map.d.ts) [convert-source-map](https://github.com/thlorenz/convert-source-map) by [Andrew Gaspar](https://github.com/AndrewGaspar) * [:link:](cookie/cookie.d.ts) [cookie](https://github.com/jshttp/cookie) by [Pine Mizune](https://github.com/pine613) * [:link:](cookie-parser/cookie-parser.d.ts) [cookie-parser](https://github.com/expressjs/cookie-parser) by [Santi Albo](https://github.com/santialbo) * [:link:](cookiejs/cookiejs.d.ts) [cookie.js](https://github.com/js-coder/cookie.js) by [Boltmade](https://github.com/Boltmade) * [:link:](cordova-ionic/plugins/keyboard.d.ts) [Cordova Keyboard plugin](https://github.com/driftyco/ionic-plugins-keyboard) by [Hendrik Maus](https://github.com/hendrikmaus) +* [:link:](cordova-plugin-app-version/cordova-plugin-app-version.d.ts) [cordova-plugin-app-version](https://github.com/whiteoctober/cordova-plugin-app-version) by [Markus Wagner](https://github.com/Ritzlgrmft) +* [:link:](cordova-plugin-ibeacon/cordova-plugin-ibeacon.d.ts) [cordova-plugin-ibeacon](https://github.com/petermetz/cordova-plugin-ibeacon) by [Markus Wagner](https://github.com/Ritzlgrmft) +* [:link:](cordova-plugin-ouralabs/cordova-plugin-ouralabs.d.ts) [cordova-plugin-ouralabs](https://github.com/Justin-Credible/cordova-plugin-ouralabs) by [Justin Unterreiner](https://github.com/Justin-Credible) * [:link:](cordovarduino/cordovarduino.d.ts) [Cordovarduino plugin](https://github.com/stereolux/cordovarduino) by [Hendrik Maus](https://github.com/hendrikmaus) +* [:link:](core-decorators/core-decorators.d.ts) [core-decorators.js](https://github.com/jayphelps/core-decorators.js) by [Qubo](https://github.com/tkqubo) +* [:link:](core-js/core-js.d.ts) [core-js](https://github.com/zloirock/core-js) by [Ron Buckton](http://github.com/rbuckton) +* [:link:](cors/cors.d.ts) [cors](https://github.com/troygoode/node-cors) by [Mihhail Lapushkin](https://github.com/mihhail-lapushkin) * [:link:](couchbase/couchbase.d.ts) [Couchbase Couchnode](https://github.com/couchbase/couchnode) by [Basarat Ali Syed](https://github.com/basarat) * [:link:](createjs/createjs.d.ts) [CreateJS](http://www.createjs.com) by [Pedro Ferreira](https://bitbucket.org/drk4), [Chris Smith](https://github.com/evilangelist), [Satoru Kimura](https://github.com/gyohk) +* [:link:](credential/credential.d.ts) [credential](https://github.com/ericelliott/credential) by [Phú](https://github.com/phuvo) +* [: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) * [:link:](cryptojs/cryptojs.d.ts) [CryptoJS](https://code.google.com/p/crypto-js) by [Gia Bảo @ Sân Đình](https://github.com/giabao) +* [:link:](cson/cson.d.ts) [CSON](https://github.com/bevry/cson) by [Sam Saint-Pettersen](https://github.com/stpettersens) +* [:link:](css/css.d.ts) [css](https://github.com/reworkcss/css) by [Ilya Verbitskiy](https://github.com/ilich) * [:link:](googlemaps.infobubble/google.maps.infobubble.d.ts) [CSS3 InfoBubble with tabs for Google Maps API V3](http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobubble/src) by [Johan Nilsson](https://github.com/Dashue) * [:link:](csurf/csurf.d.ts) [csurf](https://www.npmjs.org/package/csurf) by [Hiroki Horiuchi](https://github.com/horiuchi) * [:link:](csv-stringify/csv-stringify.d.ts) [csv-stringify](https://github.com/wdavidw/node-csv-stringify) by [Rogier Schouten](https://github.com/rogierschouten) +* [:link:](cuid/cuid.d.ts) [cuid](https://github.com/ericelliott/cuid) by [Dave Keen](http://www.keendevelopment.ch) +* [:link:](custom-error-generator/custom-error-generator.d.ts) [custom-error-generator](https://github.com/jproulx/node-custom-error) by [Thierry Miceli](https://github.com/thmiceli) * [:link:](md5/md5.d.ts) [CybozuLabs.MD5](http://labs.cybozu.co.jp/blog/mitsunari/2007/07/md5js_1.html) by [MIZUNE Pine](https://github.com/pine613) -* [:link:](d3/d3.d.ts) [d3JS](http://d3js.org) by [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:](data-driven/data-driven.d.ts) [data-driven.js](https://github.com/fluentsoftware/data-driven) by [Adam Babcock](https://github.com/mrhen) +* [:link:](DataStream.js/DataStream.js.d.ts) [DataStream.js](https://github.com/kig/DataStream.js) by [Tat](https://github.com/tatchx) * [:link:](date.format.js/date.format.d.ts) [Date Format](http://blog.stevenlevithan.com/archives/date-time-format) by [Rob Stutton](https://github.com/balrob) * [:link:](datejs/datejs.d.ts) [DateJS](http://www.datejs.com) by [David Khristepher Santos](http://github.com/rupertavery) * [: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:](decorum/decorum.d.ts) [Decorum JS](https://github.com/dflor003/decorum) by [Danil Flores](https://github.com/dflor003) * [: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:](denodeify/denodeify.d.ts) [denodeify](https://github.com/matthew-andrews/denodeify) by [joaomoreno](https://github.com/joaomoreno) +* [:link:](depd/depd.d.ts) [depd](https://github.com/dougwilson/nodejs-depd) by [Zhiyuan Wang](https://github.com/danny8002) * [: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:](devextreme/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:](diff-match-patch/diff-match-patch.d.ts) [diff-match-patch](https://www.npmjs.com/package/diff-match-patch) by [Asana](https://asana.com) * [:link:](docCookies/docCookies.d.ts) [docCookies](https://developer.mozilla.org/en-US/docs/Web/API/document.cookie) by [Jon Egerton](https://github.com/jonegerton) * [:link:](dock-spawn/dock-spawn.d.ts) [Dock Spawn](http://dockspawn.com) by [Drew Noakes](https://drewnoakes.com) -* [:link:](documentdb/documentdb.d.ts) [DocumentDB](https://github.com/Azure/azure-documentdb-node) by [Noel Abrahams](https://github.com/NoelAbrahams) +* [:link:](docopt/docopt.d.ts) [Docopt](http://docopt.org) by [Giovanni Bassi](https://github.com/giggio) +* [: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:](documentdb-server/documentdb-server.d.ts) [DocumentDB server side JavaScript SDK](http://dl.windowsazure.com/documentDB/jsserverdocs) by [François Nguyen](https://github.com/lith-light-g) * [: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), [Samira Bazuzi](https://github.com/bazuzi) * [:link:](domo/domo.d.ts) [Domo](http://domo-js.com) by [Steve Fenton](https://github.com/Steve-Fenton) +* [:link:](requirejs-domready/domready.d.ts) [domReady](https://github.com/requirejs/domReady) by [Nobuhiro Nakamura](https://github.com/lefb766) * [:link:](domready/domready.d.ts) [domready](https://github.com/ded/domready) by [Christian Holm Nielsen](https://github.com/dotnetnerd) +* [:link:](donna/donna.d.ts) [donna](https://github.com/atom/donna) by [vvakame](https://github.com/vvakame) * [:link:](dot/dot.d.ts) [doT](https://github.com/olado/doT) by [ZombieHunter](https://github.com/ZombieHunter) +* [:link:](dot-case/dot-case.d.ts) [dot-case](https://github.com/blakeembrey/dot-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) * [:link:](dotdotdot/dotdotdot.d.ts) [dotdotdot](http://dotdotdot.frebsite.nl) by [Milan Jaros](https://github.com/milanjaros) * [:link:](doublearray/doublearray.d.ts) [doublearray](https://github.com/takuyaa/doublearray) by [MIZUSHIMA Junki](https://github.com/mzsm) +* [:link:](dragula/dragula.d.ts) [dragula](http://bevacqua.github.io/dragula) by [Paul Welter](https://github.com/pwelter34) +* [:link:](hystrixjs/hystrixjs.d.ts) [dragula](https://bitbucket.org/igor_sechyn/hystrixjs) by [Igor Sechyn](https://github.com/igorsechyn) * [:link:](drop/drop.d.ts) [Drop](http://github.hubspot.com/drop) by [Adi Dahiya](https://github.com/adidahiya) * [:link:](dropboxjs/dropboxjs.d.ts) [dropbox-js](https://github.com/dropbox/dropbox-js) by [Steve Fenton](https://github.com/Steve-Fenton), [Pedro Casaubon](https://github.com/xperiments) -* [:link:](dropzone/dropzone.d.ts) [Dropzone](http://www.dropzonejs.com) by [Natan Vivo](https://github.com/nvivo) +* [:link:](dropzone/dropzone.d.ts) [Dropzone](http://www.dropzonejs.com) by [Natan Vivo](https://github.com/nvivo), [Andy Hawkins](https://github.com/a904guy/,http://a904guy.com/,http://www.bmbsqd.com), [Vasya Aksyonov](https://github.com/outring) +* [: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-table/easy-table.d.ts) [easy-table](https://github.com/eldargab/easy-table) by [Bart van der Schoor](https://github.com/Bartvds) +* [:link:](easy-api-request/easy-api-request.d.ts) [easy-api-request](https://github.com/DeadAlready/easy-api-request) by [Karl Düüna](https://github.com/DeadAlready) +* [:link:](easy-jsend/easy-jsend.d.ts) [easy-jsend](https://github.com/DeadAlready/easy-jsend) by [Karl Düüna](https://github.com/DeadAlready) +* [:link:](easy-session/easy-session.d.ts) [easy-session](https://github.com/DeadAlready/node-easy-session) by [Karl Düüna](https://github.com/DeadAlready) +* [:link:](easy-table/easy-table.d.ts) [easy-table](https://github.com/eldargab/easy-table) by [Niklas Mollenhauer](https://github.com/nikeee) +* [:link:](easy-xapi-supertest/easy-xapi-supertest.d.ts) [easy-x-headers](https://github.com/DeadAlready/easy-x-headers) by [Karl Düüna](https://github.com/DeadAlready) +* [:link:](easy-x-headers/easy-x-headers.d.ts) [easy-x-headers](https://github.com/DeadAlready/easy-x-headers) by [Karl Düüna](https://github.com/DeadAlready) +* [:link:](easy-xapi/easy-xapi.d.ts) [easy-xapi](https://github.com/DeadAlready/easy-xapi) by [Karl Düüna](https://github.com/DeadAlready) +* [:link:](easy-xapi-utils/easy-xapi-utils.d.ts) [easy-xapi-utils](https://github.com/DeadAlready/easy-xapi-utils) by [Karl Düüna](https://github.com/DeadAlready) * [:link:](easystarjs/easystarjs.d.ts) [EasyStar.js](http://easystarjs.com) by [Magnus Gustafsson](https://github.com/borundin) +* [:link:](egg.js/egg.js.d.ts) [Egg.js](https://github.com/mikeflynn/egg.js) by [Markus Peloso](https://github.com/ToastHawaii) * [:link:](ejs-locals/ejs-locals.d.ts) [ejs-locals](https://github.com/randometc/ejs-locals) by [jt000](https://github.com/jt000) +* [:link:](ejs/ejs.d.ts) [ejs.js](http://ejs.co) by [Ben Liddicott](https://github.com/benliddicott/DefinitelyTyped) * [: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:](electron-builder/electron-builder.d.ts) [electron-builder](https://github.com/loopline-systems/electron-builder) by [Maxime LUCE](https://github.com/SomaticIT) +* [:link:](electron-packager/electron-packager.d.ts) [electron-packager](https://github.com/maxogden/electron-packager) by [Maxime LUCE](https://github.com/SomaticIT) +* [:link:](github-electron/electron-prebuilt.d.ts) [electron-prebuilt](https://github.com/mafintosh/electron-prebuilt) by [rhysd](https://github.com/rhysd) * [:link:](element-resize-event/element-resize-event.d.ts) [element-resize-event](https://github.com/KyleAMathews/element-resize-event) by [Rogier Schouten](https://github.com/rogierschouten) * [:link:](elm/elm.d.ts) [Elm](http://elm-lang.org) by [Dénes Harmath](https://github.com/thSoft) * [:link:](ember/ember.d.ts) [Ember.js](http://emberjs.com) by [Jed Mao](https://github.com/jedmao) * [:link:](emissary/emissary.d.ts) [emissary](https://github.com/atom/emissary) by [vvakame](https://github.com/vvakame) * [:link:](empower/empower.d.ts) [empower](https://github.com/twada/empower) by [vvakame](https://github.com/vvakame) * [:link:](emscripten/emscripten.d.ts) [Emscripten](http://kripken.github.io/emscripten-site/index.html) by [Kensuke Matsuzaki](https://github.com/zakki) +* [:link:](envify/envify.d.ts) [envify](https://github.com/hughsk/envify) by [Qubo](https://github.com/tkQubo) * [:link:](epiceditor/epiceditor.d.ts) [EpicEditor](http://epiceditor.com) by [Boris Yankov](https://github.com/borisyankov) +* [:link:](eq.js/eq.js.d.ts) [eq.js](https://github.com/Snugug/eq.js) by [Stephen Lautier](https://github.com/stephenlautier) * [:link:](errorhandler/errorhandler.d.ts) [errorhandler](https://github.com/expressjs/errorhandler) by [Santi Albo](https://github.com/santialbo) +* [:link:](es6-collections/es6-collections.d.ts) [es6-collections](https://github.com/WebReflection/es6-collections) by [Ron Buckton](http://github.com/rbuckton) * [:link:](es6-promise/es6-promise.d.ts) [es6-promise](https://github.com/jakearchibald/ES6-Promise) by [François de Campredon](https://github.com/fdecampredon), [vvakame](https://github.com/vvakame) +* [:link:](es6-shim/es6-shim.d.ts) [es6-shim](https://github.com/paulmillr/es6-shim) by [Ron Buckton](http://github.com/rbuckton) * [:link:](escape-latex/escape-latex.d.ts) [escape-latex](https://github.com/dangmai/escape-latex) by [Oliver Schneider](https://github.com/olsio) -* [:link:](esprima/esprima.d.ts) [Esprima](http://esprima.org) by [teppeis](https://github.com/teppeis) +* [:link:](esprima/esprima.d.ts) [Esprima](http://esprima.org) by [teppeis](https://github.com/teppeis), [RReverser](https://github.com/RReverser) +* [:link:](estree/flow.d.ts) [ESTree AST extensions for Facebook Flow](https://github.com/estree/estree) by [RReverser](https://github.com/RReverser) +* [:link:](estree/estree.d.ts) [ESTree AST specification](https://github.com/estree/estree) by [RReverser](https://github.com/RReverser) +* [:link:](event-kit/event-kit.d.ts) [event-kit](https://github.com/atom/event-kit) by [Vadim Macagon](https://github.com/enlight) * [:link:](event-loop-lag/event-loop-lag.d.ts) [event-loop-lag](https://github.com/pebble/event-loop-lag) by [Rogier Schouten](https://github.com/rogierschouten) * [:link:](eventemitter2/eventemitter2.d.ts) [EventEmitter2](https://github.com/asyncly/EventEmitter2) by [ryiwamoto](https://github.com/ryiwamoto) * [:link:](eventemitter3/eventemitter3.d.ts) [EventEmitter3](https://github.com/primus/eventemitter3) by [Yuichi Murata](https://github.com/mrk21) +* [:link:](evernote/evernote.d.ts) [evernote v](https://www.npmjs.com/package/evernote) by [Zachary Collins](https://github.com/corps) * [:link:](exit/exit.d.ts) [exit](https://github.com/cowboy/node-exit) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](expect.js/expect.js.d.ts) [expect.js](https://github.com/LearnBoost/expect.js) by [Teppei Sato](https://github.com/teppeis) +* [:link:](expect.js/expect.js.d.ts) [expect.js](https://github.com/Automattic/expect.js) by [Teppei Sato](https://github.com/teppeis) * [:link:](expectations/expectations.d.ts) [expectations.js](https://github.com/spmason/expectations) by [vvakame](https://github.com/vvakame) * [:link:](express/express.d.ts) [Express 4.x](http://expressjs.com) by [Boris Yankov](https://github.com/borisyankov) +* [:link:](express-debug/express-debug.d.ts) [express-debug](https://github.com/devoidfury/express-debug) by [Federico Bond](https://github.com/federicobond) +* [:link:](express-handlebars/express-handlebars.d.ts) [express-handlebars](https://github.com/ericf/express-handlebars) by [Sam Saint-Pettersen](https://github.com/stpettersens) * [: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-less/express-less.d.ts) [express-less](https://www.npmjs.com/package/express-less) by [xyb](https://github.com/xieyubo) * [: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) +* [:link:](express-route-fs/express-route-fs.d.ts) [express-route-fs](https://github.com/kripod/express-route-fs) by [Kristóf Poduszló](https://github.com/kripod) * [:link:](express-session/express-session.d.ts) [express-session](https://www.npmjs.org/package/express-session) by [Hiroki Horiuchi](https://github.com/horiuchi) * [:link:](express-unless/express-unless.d.ts) [express-unless](https://www.npmjs.org/package/express-unless) by [Wonshik Kim](https://github.com/wokim) * [: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), [Michael Randolph](https://github.com/mrand01) * [:link:](fbsdk/fbsdk.d.ts) [Facebook Javascript SDK](https://developers.facebook.com/docs/javascript) by [Joshua Strobl](https://github.com/JoshStrobl) +* [:link:](faker/faker.d.ts) [faker](http://marak.com/faker.js) by [Bas Pennings](https://github.com/basp), [Yuki Kokubun](https://github.com/Kuniwak) +* [:link:](famous/famous.d.ts) [Famous Engine](http://famous.org) by [Boris Vasilenko](https://github.com/borisvasilenko) * [:link:](fancybox/fancybox.d.ts) [fancyBox](https://github.com/fancyapps/fancyBox) by [Boris Yankov](https://github.com/borisyankov) +* [:link:](farbtastic/farbtastic.d.ts) [Farbtastic: jQuery Color Wheel](http://mattfarina.github.io/farbtastic) by [Matt Brooks](https://github.com/EnableSoftware) * [:link:](fast-stats/fast-stats.d.ts) [fast-stats](https://github.com/bluesmoon/node-faststats) by [Rogier Schouten](https://github.com/rogierschouten) * [:link:](fastclick/fastclick.d.ts) [FastClick](https://github.com/ftlabs/fastclick) by [Shinnosuke Watanabe](https://github.com/shinnn) +* [:link:](favico.js/favico.js.d.ts) [favico.js](http://lab.ejci.net/favico.js) by [Yu Matsushita](https://github.com/drowse314-dev-ymat) +* [:link:](featherlight/featherlight.d.ts) [Featherlight](https://noelboss.github.io/featherlight) by [Kaur Kuut](https://github.com/xStrom) +* [:link:](whatwg-fetch/whatwg-fetch.d.ts) [fetch API](https://github.com/github/fetch) by [Ryan Graham](https://github.com/ryan-codingintrigue) +* [:link:](fhir/fhir.d.ts) [FHIR DSTU2](http://www.hl7.org/fhir/2015Sep/index.html) by [Artifact Health](http://www.artifacthealth.com) * [:link:](fibers/fibers.d.ts) [fibers](https://github.com/laverdet/node-fibers) by [Carlos Ballesteros Velasco](https://github.com/soywiz) * [:link:](filewriter/filewriter.d.ts) [File API: Writer](http://www.w3.org/TR/file-writer-api) by [Kon](http://phyzkit.net) * [:link:](filesystem/filesystem.d.ts) [File System API](http://www.w3.org/TR/file-system-api) by [Kon](http://phyzkit.net) +* [:link:](file-url/file-url.d.ts) [file-url](https://github.com/sindresorhus/file-url) by [MEDIA CHECK s.r.o.](http://www.mediacheck.cz) * [:link:](FileSaver/FileSaver.d.ts) [FileSaver.js](https://github.com/eligrey/FileSaver.js) by [Cyril Schumacher](https://github.com/cyrilschumacher) +* [:link:](finalhandler/finalhandler.d.ts) [finalhandler](https://github.com/pillarjs/finalhandler) by [Ilya Mochalov](https://github.com/chrootsu) * [:link:](Finch/Finch.d.ts) [Finch](https://github.com/stoodder/finchjs) by [David Sichau](https://github.com/DavidSichau) -* [:link:](findup-sync/findup-sync.d.ts) [findup-sync](https://github.com/cowboy/node-findup-sync) by [Bart van der Schoor](https://github.com/Bartvds) +* [:link:](findup-sync/findup-sync.d.ts) [findup-sync](https://github.com/cowboy/node-findup-sync) by [Bart van der Schoor](https://github.com/Bartvds), [Nathan Brown](https://github.com/ngbrown) * [:link:](fingerprintjs/fingerprint.d.ts) [fingerprintjs](https://github.com/Valve/fingerprintjs) by [Shunsuke Ohtani](https://github.com/zaneli) * [:link:](state-machine/state-machine.d.ts) [Finite State Machine](https://github.com/jakesgordon/javascript-state-machine) by [Boris Yankov](https://github.com/borisyankov), [Maarten Docter](https://github.com/mdocter), [William Sears](https://github.com/MrBigDog2U) -* [:link:](firebase/firebase.d.ts) [Firebase API](https://www.firebase.com/docs/javascript/firebase) by [Vincent Botone](https://github.com/vbortone), [Shin1 Kashimura](https://github.com/in-async) +* [:link:](firebase/firebase.d.ts) [Firebase API](https://www.firebase.com/docs/javascript/firebase) by [Vincent Botone](https://github.com/vbortone), [Shin1 Kashimura](https://github.com/in-async), [Sebastien Dubois](https://github.com/dsebastien) +* [:link:](firebase-client/firebase-client.d.ts) [Firebase Client](https://www.github.com/jpstevens/firebase-client) by [Andrew Breen](https://github.com/fpsscarecrow) * [:link:](firebase/firebase-simplelogin.d.ts) [Firebase Simple Login](https://www.firebase.com/docs/security/simple-login-overview.html) by [Wilker Lucio](http://github.com/wilkerlucio) +* [:link:](first-mate/first-mate.d.ts) [first-mate](https://github.com/atom/first-mate) by [Vadim Macagon](https://github.com/enlight) +* [:link:](fixed-data-table/fixed-data-table.d.ts) [fixed-data-table](https://github.com/facebook/fixed-data-table) by [Petar Paar](https://github.com/pepaar) +* [:link:](flake-idgen/flake-idgen.d.ts) [flakge-idgen](https://github.com/T-PWK/flake-idgen) by [Yuce Tekol](http://yuce.me) +* [:link:](flat/flat.d.ts) [flat](https://github.com/hughsk/flat) by [Ilya Mochalov](https://github.com/chrootsu) * [:link:](flexSlider/flexSlider.d.ts) [FlexSlider 2 jquery plugin](https://github.com/woothemes/FlexSlider) by [Diullei Gomes](https://github.com/diullei) * [:link:](flight/flight.d.ts) [Flight](http://flightjs.github.com/flight) by [Jonathan Hedrén](https://github.com/jonathanhedren) * [:link:](flipsnap/flipsnap.d.ts) [flipsnap.js](http://pxgrid.github.io/js-flipsnap) by [kubosho](https://github.com/kubosho), [gsino](https://github.com/gsino), [Mayuki Sawatari](https://github.com/mayuki) * [:link:](flot/jquery.flot.d.ts) [Flot](http://www.flotcharts.org) by [Matt Burland](https://github.com/burlandm) +* [:link:](flowjs/flowjs.d.ts) [flowjs](https://github.com/flowjs/flow.js) by [Ryan McNamara](https://github.com/ryan10132) * [:link:](flux/flux.d.ts) [Flux](http://facebook.github.io/flux) by [Steve Baker](https://github.com/stkb) +* [:link:](flux-standard-action/flux-standard-action.d.ts) [flux-standard-action](https://github.com/acdlite/flux-standard-action) by [Qubo](https://github.com/tkqubo) * [:link:](fluxxor/fluxxor.d.ts) [Fluxxor](https://github.com/BinaryMuse/fluxxor) by [Yuichi Murata](https://github.com/mrk21) +* [:link:](fontoxml/fontoxml.d.ts) [FontoXML](http://www.fontoxml.com) by [Roland Zwaga](https://github.com/rolandzwaga) * [: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:](fpsmeter/FPSMeter.d.ts) [FPSmeter](http://darsa.in/fpsmeter) by [Aaron Lampros](http://github.com/alampros) +* [:link:](freedom/freedom-core-env.d.ts) [freedom](https://github.com/freedomjs/freedom) by [Jonathan Pevarnek](https://github.com/jpevarnek) +* [:link:](freedom/freedom-module-env.d.ts) [freedom](https://github.com/freedomjs/freedom) by [Jonathan Pevarnek](https://github.com/jpevarnek) +* [:link:](freedom/freedom.d.ts) [freedom](https://github.com/freedomjs/freedom) by [Jonathan Pevarnek](https://github.com/jpevarnek) * [:link:](from/from.d.ts) [from](https://github.com/dominictarr/from) by [Bart van der Schoor](https://github.com/Bartvds) +* [:link:](fs-ext/fs-ext.d.ts) [fs-ext](https://github.com/baudehlo/node-fs-ext) by [Oguzhan Ergin](https://github.com/OguzhanE) * [:link:](fs-extra/fs-extra.d.ts) [fs-extra](https://github.com/jprichardson/node-fs-extra) by [midknight41](https://github.com/midknight41) +* [:link:](fs-finder/fs-finder.d.ts) [fs-finder](https://github.com/sakren/node-fs-finder) by [Michael Zabka](https://github.com/misak113) +* [:link:](fs-mock/fs-mock.d.ts) [fs-mock](https://github.com/sakren/node-fs-mock) by [Rogier Schouten](https://github.com/rogierschouten) * [:link:](ftdomdelegate/ftdomdelegate.d.ts) [ftdomdelegate](https://github.com/ftlabs/ftdomdelegate) by [Christian Holm Nielsen](https://github.com/dotnetnerd) -* [:link:](fullCalendar/fullCalendar.d.ts) [FullCalendar](http://arshaw.com/fullcalendar) by [Neil Stalker](https://github.com/nestalk) +* [:link:](ftp/ftp.d.ts) [ftp](https://github.com/mscdex/node-ftp) by [Rogier Schouten](https://github.com/rogierschouten) +* [:link:](ftpd/ftpd.d.ts) [ftpd](https://github.com/sstur/nodeftpd) by [Rogier Schouten](https://github.com/rogierschouten) +* [:link:](fullCalendar/fullCalendar.d.ts) [FullCalendar](http://arshaw.com/fullcalendar) by [Neil Stalker](https://github.com/nestalk), [Marcelo Camargo](https://github.com/hasellcamargo) * [:link:](fuse/fuse.d.ts) [Fuse.js](https://github.com/krisk/Fuse) by [Greg Smith](https://github.com/smrq) * [:link:](jquery-galleria/jquery-galleria.d.ts) [galleria.js](https://github.com/aino/galleria) by [Robert Imig](https://github.com/rimig) * [:link:](gamepad/gamepad.d.ts) [Gamepad API](http://www.w3.org/TR/gamepad) by [Kon](http://phyzkit.net) * [:link:](gamequery/gamequery.d.ts) [gameQuery](http://gamequeryjs.com) by [David Laubreiter](https://github.com/Laubi) * [:link:](gently/gently.d.ts) [gently](https://www.npmjs.org/package/gently) by [bonnici](https://github.com/bonnici) +* [:link:](geoip-lite/geoip-lite.d.ts) [GeoIP-lite](https://github.com/bluesmoon/node-geoip) by [Yuce Tekol](http://yuce.me) * [:link:](geojson/geojson.d.ts) [GeoJSON Format Specification](http://geojson.org) by [Jacob Bruun](https://github.com/cobster) +* [:link:](geometry-dom/geometry-dom.d.ts) [Geometry Format Specification](http://www.w3.org/TR/geometry-1) by [Toshiya Nakakura](https://github.com/nakakura) * [:link:](giraffe/giraffe.d.ts) [Giraffe](https://github.com/barc/backbone.giraffe) by [Matt McCray](https://github.com/darthapo) +* [:link:](git-config/git-config.d.ts) [git-config](https://github.com/eugeneware/git-config) by [Sam Saint-Pettersen](https://github.com/stpettersens) +* [:link:](gl-matrix/gl-matrix.d.ts) [gl-matrix](https://github.com/toji/gl-matrix) by [Tat](https://github.com/tatchx) * [:link:](gldatepicker/gldatepicker.d.ts) [glDatePicker](http://glad.github.com/glDatePicker) by [Dániel Tar](https://github.com/qcz) * [:link:](glidejs/glidejs.d.ts) [Glide.js](http://glide.jedrzejchalubek.com) by [Milan Jaros](https://github.com/milanjaros) * [:link:](glob/glob.d.ts) [Glob](https://github.com/isaacs/node-glob) by [vvakame](https://github.com/vvakame) +* [:link:](glob-expand/glob-expand.d.ts) [glob-expand](https://github.com/anodynos/node-glob-expand) by [vvakame](https://github.com/vvakame) * [:link:](glob-stream/glob-stream.d.ts) [glob-stream](http://github.com/wearefractal/glob-stream) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](globalize/globalize.d.ts) [Globalize](https://github.com/jquery/globalize) by [Boris Yankov](https://github.com/borisyankov) +* [:link:](globalize/globalize.d.ts) [Globalize](https://github.com/jquery/globalize) by [Aram Taieb](https://github.com/afromogli) * [:link:](gm/gm.d.ts) [gm](https://github.com/aheckmann/gm) by [Joel Spadin](https://github.com/ChaosinaCan) -* [:link:](goJS/goJS.d.ts) [GoJS](http://gojs.net) by [Barbara Duckworth](https://github.com/barbara42) +* [:link:](goJS/goJS.d.ts) [GoJS](http://gojs.net) by [Northwoods Software](https://github.com/NorthwoodsSoftware) * [:link:](google.analytics/ga.d.ts) [Google Analytics (Classic and Universal)](https://developers.google.com/analytics/devguides/collection/gajs) by [Ronnie Haakon Hegelund](http://ronniehegelund.blogspot.dk), [Pat Kujawa](http://patkujawa.com) * [:link:](gapi/gapi.d.ts) [Google API Client](https://code.google.com/p/google-api-javascript-client) by [Frank M](https://github.com/sgtfrankieboy) +* [:link:](google-apps-script/google-apps-script.html.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.groups.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.gmail.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.script.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.properties.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.maps.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.url-fetch.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.optimization.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.ui.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.forms.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.document.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.content.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.mail.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.drive.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.types.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.spreadsheet.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.lock.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.sites.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.xml-service.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.utilities.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.language.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.jdbc.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.base.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.cache.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.calendar.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.charts.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) +* [:link:](google-apps-script/google-apps-script.contacts.d.ts) [Google Apps Script 2015-11-12](https://developers.google.com/apps-script) by [motemen](https://github.com/motemen) * [:link:](google.feeds/google.feed.api.d.ts) [Google Feed Apis](https://developers.google.com/feed) by [RodneyJT](https://github.com/RodneyJT) -* [:link:](googlemaps/google.maps.d.ts) [Google Geolocation](https://developers.google.com/maps) by [Folia A/S](http://www.folia.dk) * [:link:](google.geolocation/google.geolocation.d.ts) [Google Geolocation](https://code.google.com/p/geo-location-javascript) by [Vincent Bortone](https://github.com/vbortone) +* [:link:](googlemaps/google.maps.d.ts) [Google 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) * [:link:](gae.channel.api/gae.channel.api.d.ts) [GoogleAppEngine's Channel API](https://developers.google.com/appengine/docs/java/channel/javascript) by [vvakame](https://github.com/vvakame) * [:link:](graceful-fs/graceful-fs.d.ts) [graceful-fs](https://github.com/cowboy/graceful-fs) by [Bart van der Schoor](https://github.com/Bartvds) +* [:link:](graham_scan/graham_scan.d.ts) [graham_scan](https://github.com/brian3kb/graham_scan_js) by [Harm Berntsen](https://github.com/hberntsen) +* [:link:](graphviz/graphviz.d.ts) [Graphviz](https://github.com/glejeune/node-graphviz) by [Matt Frantz](https://github.com/mhfrantz) * [:link:](greasemonkey/greasemonkey.d.ts) [Greasemonkey](http://www.greasespot.net) by [Kota Saito](https://github.com/kotas) * [: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:](gridstack/gridstack.d.ts) [Gridstack](http://troolee.github.io/gridstack.js) by [Pascal Senn](https://github.com/PascalSenn) * [: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-cached/gulp-cached.d.ts) [gulp-cached](https://github.com/wearefractal/gulp-cached) by [Thomas Corbière](https://github.com/tomc974) +* [:link:](gulp-changed/gulp-changed.d.ts) [gulp-changed](https://github.com/sindresorhus/gulp-changed) by [Thomas Corbière](https://github.com/tomc974) +* [:link:](gulp-cheerio/gulp-cheerio.d.ts) [gulp-cheerio](https://github.com/KenPowers/gulp-cheerio) by [Qubo](https://github.com/tkQubo) +* [:link:](gulp-coffeeify/gulp-coffeeify.d.ts) [gulp-coffeeify](https://github.com/nariyu/gulp-coffeeify) by [Qubo](https://github.com/tkQubo) +* [:link:](gulp-coffeelint/gulp-coffeelint.d.ts) [gulp-coffeelint](https://github.com/janraasch/gulp-coffeelint) by [Qubo](https://github.com/tkQubo) * [:link:](gulp-concat/gulp-concat.d.ts) [gulp-concat](http://github.com/wearefractal/gulp-concat) by [Keita Kagurazaka](https://github.com/k-kagurazaka) +* [:link:](gulp-csso/gulp-csso.d.ts) [gulp-csso](https://github.com/ben-eb/gulp-csso) by [Tanguy Krotoff](https://github.com/tkrotoff) +* [:link:](gulp-debug/gulp-debug.d.ts) [gulp-debug](https://github.com/sindresorhus/gulp-debug) by [Tanguy Krotoff](https://github.com/tkrotoff) +* [:link:](gulp-dtsm/gulp-dtsm.d.ts) [gulp-dtsm](https://github.com/9joneg/gulp-dtsm) by [Aya Morisawa](https://github.com/AyaMorisawa) +* [:link:](gulp-espower/gulp-espower.d.ts) [gulp-espower](https://github.com/power-assert-js/gulp-espower) by [Qubo](https://github.com/tkQubo) * [:link:](gulp-flatten/gulp-flatten.d.ts) [gulp-flatten](https://github.com/armed/gulp-flatten) by [Keita Kagurazaka](https://github.com/k-kagurazaka) * [:link:](gulp-gh-pages/gulp-gh-pages.d.ts) [gulp-gh-pages](https://github.com/rowoot/gulp-gh-pages) by [Asana](https://asana.com) -* [:link:](gulp-if/gulp-if.d.ts) [gulp-if](https://github.com/robrich/gulp-if) by [Asana](https://asana.com) +* [:link:](gulp-gzip/gulp-gzip.d.ts) [gulp-gzip](https://github.com/jstuckey/gulp-gzip) by [Qubo](https://github.com/tkQubo) +* [:link:](gulp-help/gulp-help.d.ts) [gulp-help](https://github.com/chmontgomery/gulp-help) by [Qubo](https://github.com/tkQubo) +* [:link:](gulp-if/gulp-if.d.ts) [gulp-if](https://github.com/robrich/gulp-if) by [Asana](https://asana.com), [Joe Skeen](http://github.com/joeskeen) * [:link:](gulp-inject/gulp-inject.d.ts) [gulp-inject](https://github.com/klei/gulp-inject) by [Keita Kagurazaka](https://github.com/k-kagurazaka) * [:link:](gulp-istanbul/gulp-istanbul.d.ts) [gulp-istanbul](https://github.com/SBoudrias/gulp-istanbul) by [Asana](https://asana.com) +* [:link:](gulp-jasmine-browser/gulp-jasmine-browser.d.ts) [gulp-jasmine-browser](https://github.com/jasmine/gulp-jasmine-browser) by [Tanguy Krotoff](https://github.com/tkrotoff) * [:link:](gulp-less/gulp-less.d.ts) [gulp-less](https://github.com/plus3network/gulp-less) by [Keita Kagurazaka](https://github.com/k-kagurazaka) +* [:link:](gulp-load-plugins/gulp-load-plugins.d.ts) [gulp-load-plugins](https://github.com/jackfranklin/gulp-load-plugins) by [Joe Skeen](http://github.com/joeskeen) * [:link:](gulp-minify-css/gulp-minify-css.d.ts) [gulp-minify-css](https://github.com/jonathanepollack/gulp-minify-css) by [Keita Kagurazaka](https://github.com/k-kagurazaka) +* [:link:](gulp-minify-html/gulp-minify-html.d.ts) [gulp-minify-html](https://github.com/murphydanger/gulp-minify-html) by [Tanguy Krotoff](https://github.com/tkrotoff) * [:link:](gulp-mocha/gulp-mocha.d.ts) [gulp-mocha](https://github.com/sindresorhus/gulp-mocha) by [Asana](https://asana.com) +* [:link:](gulp-newer/gulp-newer.d.ts) [gulp-newer](https://github.com/tschaub/gulp-newer) by [Thomas Corbière](https://github.com/tomc974) +* [:link:](gulp-ng-annotate/gulp-ng-annotate.d.ts) [gulp-ng-annotate](https://github.com/Kagami/gulp-ng-annotate) by [Qubo](https://github.com/tkQubo) +* [:link:](gulp-nodemon/gulp-nodemon.d.ts) [gulp-nodemon](https://github.com/JacksonGariety/gulp-nodemon) by [Qubo](https://github.com/tkQubo) +* [:link:](gulp-plumber/gulp-plumber.d.ts) [gulp-plumber](https://github.com/floatdrop/gulp-plumber) by [Joe Skeen](http://github.com/joeskeen) +* [:link:](gulp-protractor/gulp-protractor.d.ts) [gulp-protractor](https://github.com/mllrsohn/gulp-protractor) by [Tanguy Krotoff](https://github.com/tkrotoff) +* [:link:](gulp-remember/gulp-remember.d.ts) [gulp-remember](https://github.com/ahaurw01/gulp-remember) by [Thomas Corbière](https://github.com/tomc974) * [:link:](gulp-rename/gulp-rename.d.ts) [gulp-rename](https://github.com/hparra/gulp-rename) by [Asana](https://asana.com) * [:link:](gulp-replace/gulp-replace.d.ts) [gulp-replace](https://github.com/lazd/gulp-replace) by [Asana](https://asana.com) +* [:link:](gulp-rev/gulp-rev.d.ts) [gulp-rev](https://github.com/sindresorhus/gulp-rev) by [Tanguy Krotoff](https://github.com/tkrotoff) +* [:link:](gulp-rev-replace/gulp-rev-replace.d.ts) [gulp-rev-replace](https://github.com/jamesknelson/gulp-rev-replace) by [Tanguy Krotoff](https://github.com/tkrotoff) +* [:link:](gulp-ruby-sass/gulp-ruby-sass.d.ts) [gulp-ruby-sass](https://github.com/sindresorhus/gulp-ruby-sass) by [Agnislav Onufrijchuk](https://github.com/agnislav) * [:link:](gulp-sass/gulp-sass.d.ts) [gulp-sass](https://github.com/dlmanning/gulp-sass) by [Asana](https://asana.com) +* [:link:](gulp-shell/gulp-shell.d.ts) [gulp-shell](https://github.com/sun-zheng-an/gulp-shell) by [Qubo](https://github.com/tkqubo) +* [:link:](gulp-size/gulp-size.d.ts) [gulp-size](https://github.com/sindresorhus/gulp-size) by [Tanguy Krotoff](https://github.com/tkrotoff) +* [:link:](gulp-sort/gulp-sort.d.ts) [gulp-sort](https://github.com/pgilad/gulp-sort) by [Joe Skeen](http://github.com/joeskeen) * [:link:](gulp-sourcemaps/gulp-sourcemaps.d.ts) [gulp-sourcemaps](https://github.com/floridoo/gulp-sourcemaps) by [Asana](https://asana.com) +* [:link:](gulp-svg-sprite/gulp-svg-sprite.d.ts) [gulp-svg-sprite](https://github.com/jkphl/gulp-svg-sprite) by [Qubo](https://github.com/tkqubo) +* [:link:](gulp-task-listing/gulp-task-listing.d.ts) [gulp-task-listing](https://github.com/OverZealous/gulp-task-listing) by [Joe Skeen](http://github.com/joeskeen) * [:link:](gulp-tsd/gulp-tsd.d.ts) [gulp-tsd](https://github.com/moznion/gulp-tsd) by [Keita Kagurazaka](https://github.com/k-kagurazaka) * [:link:](gulp-tslint/gulp-tslint.d.ts) [gulp-tslint](https://github.com/panuhorsmalahti/gulp-tslint) by [Asana](https://asana.com) * [:link:](gulp-typedoc/gulp-typedoc.d.ts) [gulp-typedoc](https://github.com/rogierschouten/gulp-typedoc) by [Asana](https://asana.com) -* [:link:](gulp-typescript/gulp-typescript.d.ts) [gulp-typescript](https://github.com/ivogabe/gulp-typescript) by [Asana](https://asana.com) +* [:link:](gulp-typescript/gulp-typescript.d.ts) [gulp-typescript](https://github.com/ivogabe/gulp-typescript) by [Asana](https://asana.com), [Thomas Corbière](https://github.com/tomc974) +* [:link:](gulp-uglify/gulp-uglify.d.ts) [gulp-uglify](https://github.com/terinjokes/gulp-uglify) by [Christopher Haws](https://github.com/ChristopherHaws) +* [:link:](gulp-useref/gulp-useref.d.ts) [gulp-useref](https://github.com/jonkemp/gulp-useref) by [Tanguy Krotoff](https://github.com/tkrotoff) * [:link:](gulp-util/gulp-util.d.ts) [gulp-util v3.0.x](https://github.com/gulpjs/gulp-util) by [jedmao](https://github.com/jedmao) +* [:link:](gulp-watch/gulp-watch.d.ts) [gulp-watch](https://github.com/floatdrop/gulp-watch) by [Tanguy Krotoff](https://github.com/tkrotoff) * [:link:](hammerjs/hammerjs.d.ts) [Hammer.js](http://hammerjs.github.io) by [Philip Bulley](https://github.com/milkisevil), [Han Lin Yap](https://github.com/codler) * [:link:](handlebars/handlebars.d.ts) [Handlebars](http://handlebarsjs.com) by [Boris Yankov](https://github.com/borisyankov) * [:link:](hapi/hapi.d.ts) [hapi](http://github.com/spumko/hapi) by [Jason Swearingen](http://github.com/jasonswearingen) -* [:link:](hashmap/hashmap.d.ts) [HashMap](https://github.com/flesler/hashmap) by [Rafał Wrzeszcz](http://wrzasq.pl) +* [: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), [Vasya Aksyonov](https://github.com/outring) +* [:link:](he/he.d.ts) [he](https://github.com/mathiasbynens/he) by [Simon Edwards](https://github.com/sedwards2009) * [:link:](Headroom/headroom.d.ts) [headroom.js](http://wicky.nillia.ms/headroom.js) by [Jakub Olek](https://github.com/hakubo) +* [:link:](heap/heap.d.ts) [heap](https://github.com/qiao/heap.js) by [Ryan McNamara](https://github.com/ryan10132) * [: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:](helmet/helmet.d.ts) [helmet](https://github.com/helmetjs/helmet) by [Cyril Schumacher](https://github.com/cyrilschumacher) +* [:link:](highcharts/highcharts.d.ts) [Highcharts](http://www.highcharts.com) by [Damiano Gambarotto](http://github.com/damianog), [Dan Lewi Harkestad](http://github.com/baltie) +* [:link:](highcharts-ng/highcharts-ng.d.ts) [highcharts-ng](https://github.com/pablojim/highcharts-ng) by [Scott Hatcher](https://github.com/scatcher) * [: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) +* [:link:](html-to-text/html-to-text.d.ts) [html-to-text](https://github.com/werk85/node-html-to-text) by [Eryk Warren](https://github.com/erykwarren) * [:link:](html2canvas/html2canvas.d.ts) [html2canvas.js](https://github.com/niklasvh/html2canvas) by [Richard Hepburn](https://github.com/rwhepburn) * [:link:](htmlparser2/htmlparser2.d.ts) [htmlparser2 v3.7.x](https://github.com/fb55/htmlparser2) by [James Roland Cabresos](https://github.com/staticfunction) +* [:link:](htmltojsx/htmltojsx.d.ts) [htmltojsx](https://www.npmjs.com/package/htmltojsx) by [Basarat Ali Syed](https://github.com/basarat) +* [:link:](http-errors/http-errors.d.ts) [http-errors](https://github.com/jshttp/http-errors) by [Tanguy Krotoff](https://github.com/tkrotoff) +* [:link:](http-status/http-status.d.ts) [http-status](https://github.com/wdavidw/node-http-status) by [Michael Zabka](https://github.com/misak113) * [:link:](http-string-parser/http-string-parser.d.ts) [http-string-parser](https://github.com/apiaryio/http-string-parser) by [MIZUNE Pine](https://github.com/pine613) +* [:link:](httperr/httperr.d.ts) [httperr](https://github.com/pluma/httperr) by [Troy Gerwien](https://github.com/yortus) * [: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:](ng-i18next/ng-i18next.d.ts) [i18next](https://github.com/i18next/ng-i18next) by [Cyril Schumacher](https://github.com/cyrilschumacher) * [:link:](i18next/i18next.d.ts) [i18next](http://i18next.com) by [Maarten Docter](https://github.com/mdocter) * [:link:](iban/iban.d.ts) [iban.js](https://github.com/arhs/iban.js) by [Cyril Schumacher](https://github.com/cyrilschumacher) * [:link:](icheck/icheck.d.ts) [iCheck](http://damirfoy.com/iCheck) by [Dániel Tar](https://github.com/qcz) * [:link:](imagemagick/imagemagick.d.ts) [imagemagick](http://github.com/rsms/node-imagemagick) by [Carlos Ballesteros Velasco](https://github.com/soywiz) +* [:link:](imagemagick-native/imagemagick-native.d.ts) [imagemagick-native](https://www.npmjs.org/package/imagemagick-native) by [Hiroki Horiuchi](https://github.com/horiuchi) +* [:link:](imagesloaded/imagesloaded.d.ts) [imagesLoaded](https://github.com/desandro/imagesloaded) by [Chris Charabaruk](http://github.com/coldacid) * [:link:](imap/imap.d.ts) [imap](https://www.npmjs.com/package/imap) by [Peter Snider](https://github.com/psnider) +* [:link:](imgur-rest-api/imgur-rest-api.d.ts) [Imgur REST API v3](https://api.imgur.com) by [Luke William Westby](http://github.com/lukewestby) * [:link:](impress/impress.d.ts) [Impress.js](https://github.com/bartaz/impress.js) by [Boris Yankov](https://github.com/borisyankov) +* [:link:](incremental-dom/incremental-dom.d.ts) [Incremetal DOM](https://github.com/google/incremental-dom) by [Basarat Ali Syed](https://github.com/basarat) * [:link:](inflection/inflection.d.ts) [inflection](https://github.com/dreamerslab/node.inflection) by [Shogo Iwano](https://github.com/shiwano) * [:link:](ini/ini.d.ts) [ini](https://github.com/isaacs/ini) by [Marcin Porębski](https://github.com/marcinporebski) +* [:link:](iniparser/iniparser.d.ts) [iniparser](https://github.com/shockie/node-iniparser) by [Ilya Mochalov](https://github.com/chrootsu) +* [:link:](inline-css/inline-css.d.ts) [inline-css](https://github.com/jonkemp/inline-css) by [Philip Spain](https://github.com/philipisapain) +* [:link:](inquirer/inquirer.d.ts) [Inquirer.js](https://github.com/SBoudrias/Inquirer.js) by [Qubo](https://github.com/tkQubo) * [: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:](intro.js/intro.js.d.ts) [intro.js](https://github.com/usablica/intro.js) by [Maxime Fabre](https://github.com/anahkiasen) +* [:link:](inversify/inversify.d.ts) [inversify](https://github.com/inversify/InversifyJS) by [inversify](https://github.com/inversify) +* [:link:](ionic/ionic.d.ts) [Ionic](http://ionicframework.com) by [Spencer Williams](https://github.com/spencerwi) * [:link:](cordova-ionic/cordova-ionic.d.ts) [Ionic Cordova plugins](https://github.com/driftyco) by [Hendrik Maus](https://github.com/hendrikmaus) +* [:link:](irc/irc.d.ts) [irc](https://github.com/martynsmith/node-irc) by [phillips1012](https://github.com/phillips1012) +* [:link:](is-lower-case/is-lower-case.d.ts) [is-lower-case](https://github.com/blakeembrey/is-lower-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) +* [:link:](is-upper-case/is-upper-case.d.ts) [is-upper-case](https://github.com/blakeembrey/is-upper-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) * [:link:](is_js/is_js.d.ts) [is.js](http://arasatasaygin.github.io/is.js) by [Rodrigo Cabral](https://github.com/cabralRodrigo) * [:link:](iscroll/iscroll.d.ts) [iScroll](http://cubiq.org/iscroll-4) by [Boris Yankov](https://github.com/borisyankov), [Christiaan Rakowski](https://github.com/csrakowski) * [:link:](iscroll/iscroll-5.d.ts) [iScroll 5](http://cubiq.org/iscroll-5-ready-for-beta-test) by [Christiaan Rakowski](https://github.com/csrakowski) * [:link:](iscroll/iscroll-lite.d.ts) [iScroll Lite](http://cubiq.org/iscroll-4) by [Boris Yankov](https://github.com/borisyankov), [Christiaan Rakowski](https://github.com/csrakowski) * [:link:](iscroll/iscroll-5-lite.d.ts) [iScroll Lite 5](http://cubiq.org/iscroll-5-ready-for-beta-test) by [Christiaan Rakowski](https://github.com/csrakowski) +* [:link:](iso8601-localizer/iso8601-localizer.d.ts) [ISO8601-Localizer](https://github.com/avielfedida/ISO8601-Localizer) by [Aviel Fedida](https://github.com/avielfedida) * [:link:](ix.js/ix.d.ts) [IxJS 1.0.6 / ix.js](https://github.com/Reactive-Extensions/IxJS) by [Igor Oleinikov](https://github.com/Igorbek) * [:link:](ix.js/l2o.d.ts) [IxJS 1.0.6 / l2o.js](https://github.com/Reactive-Extensions/IxJS) by [Igor Oleinikov](https://github.com/Igorbek) +* [:link:](jade/jade.d.ts) [jade](https://github.com/jadejs/jade) by [Panu Horsmalahti](https://github.com/panuhorsmalahti) * [: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-es6-promise-matchers/jasmine-es6-promise-matchers.d.ts) [jasmine-es6-promise-matchers](https://github.com/bvaughn/jasmine-es6-promise-matchers) by [Stephen Lautier](https://github.com/stephenlautier) * [:link:](jasmine-fixture/jasmine-fixture.d.ts) [Jasmine-fixture](https://github.com/searls/jasmine-fixture) by [Craig Brett](https://github.com/craigbrett17) * [:link:](jasmine-jquery/jasmine-jquery.d.ts) [Jasmine-JQuery](https://github.com/velesin/jasmine-jquery) by [Gregor Stamac](https://github.com/gstamac) * [:link:](jasmine-matchers/jasmine-matchers.d.ts) [jasmine-matchers](https://github.com/uxebu/jasmine-matchers) by [Bart van der Schoor](https://github.com/Bartvds) +* [:link:](jasmine-promise-matchers/jasmine-promise-matchers.d.ts) [jasmine-promise-matchers](https://github.com/bvaughn/jasmine-promise-matchers) by [Matthew Hill](https://github.com/matthewjh) +* [:link:](java/java.d.ts) [java](https://github.com/joeferner/java) by [Jim Lloyd](https://github.com/jimlloyd) * [: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:](joi/joi.d.ts) [joi](https://github.com/spumko/joi) by [Bart van der Schoor](https://github.com/Bartvds) +* [: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), [Laurence Dougal Myers](https://github.com/laurence-myers), [Christopher Glantschnig](https://github.com/cglantschnig) * [:link:](jointjs/jointjs.d.ts) [Joint JS](http://www.jointjs.com) by [Aidan Reel](http://github.com/areel), [David Durman](http://github.com/DavidDurman), [Ewout Van Gossum](https://github.com/DenEwout) * [:link:](jqrangeslider/jqrangeslider.d.ts) [jQRangeSlider](http://ghusse.github.com/jQRangeSlider) by [Dániel Tar](https://github.com/qcz) * [:link:](jquery/jquery.d.ts) [jQuery 1.10.x / 2.0.x](http://jquery.com) by [Boris Yankov](https://github.com/borisyankov), [Christian Hoffmeister](https://github.com/choffmeister), [Steve Fenton](https://github.com/Steve-Fenton), [Diullei Gomes](https://github.com/Diullei), [Tass Iliopoulos](https://github.com/tasoili), [Jason Swearingen](https://github.com/jasons-novaleaf), [Sean Hill](https://github.com/seanski), [Guus Goossens](https://github.com/Guuz), [Kelly Summerlin](https://github.com/ksummerlin), [Basarat Ali Syed](https://github.com/basarat), [Nicholas Wolverson](https://github.com/nwolverson), [Derek Cicerone](https://github.com/derekcicerone), [Andrew Gaspar](https://github.com/AndrewGaspar), [James Harrison Fisher](https://github.com/jameshfisher), [Seikichi Kondo](https://github.com/seikichi), [Benjamin Jackman](https://github.com/benjaminjackman), [Poul Sorensen](https://github.com/s093294), [Josh Strobl](https://github.com/JoshStrobl), [John Reilly](https://github.com/johnnyreilly), [Dick van den Brink](https://github.com/DickvdBrink) @@ -345,12 +629,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam * [:link:](jquery.cleditor/jquery.cleditor.d.ts) [jQuery CLEditor Plugin](http://premiumsoftware.net/CLEditor) by [Jeffery Grajkowski](https://github.com/pushplay) * [:link:](jquery.colorpicker/jquery.colorpicker.d.ts) [jQuery Colorpicker Plugin](https://github.com/vanderlee/colorpicker) by [Jeffery Grajkowski](https://github.com/pushplay) * [:link:](jquery.contextMenu/jquery.contextMenu.d.ts) [jQuery contextMenu](http://medialize.github.com/jQuery-contextMenu) by [Natan Vivo](https://github.com/nvivo) -* [:link:](jquery.cookie/jquery.cookie.d.ts) [jQuery Cookie Plugin](https://github.com/carhartl/jquery-cookie) by [Roy Goode](https://github.com/RoyGoode) +* [:link:](jquery.cookie/jquery.cookie.d.ts) [jQuery Cookie Plugin](https://github.com/carhartl/jquery-cookie) by [Roy Goode](https://github.com/RoyGoode), [Ben Lorantfy](https://github.com/BenLorantfy) +* [:link:](jquery-cropbox/jquery-cropbox.d.ts) [jQuery cropbox](https://github.com/acornejo/jquery-cropbox) by [Per Kastman](https://github.com/PerKastman) * [:link:](jquery.cycle2/jquery.cycle2.d.ts) [jQuery Cycle2 version (build 20140216)](http://jquery.malsup.com/cycle2) by [Donny Nadolny](https://github.com/dnadolny) -* [:link:](jquery.dataTables/jquery.dataTables.d.ts) [JQuery DataTables](http://www.datatables.net) by [Armin Sander](https://github.com/pragmatrix) +* [:link:](jquery.dataTables/jquery.dataTables.d.ts) [JQuery DataTables](http://www.datatables.net) by [Kiarash Ghiaseddin](https://github.com/Silver-Connection/DefinitelyTyped), [Omid Rad](https://github.com/omidkrad), [Armin Sander](https://github.com/pragmatrix) * [:link:](jquery.fileupload/jquery.fileupload.d.ts) [jQuery File Upload Plugin](https://github.com/blueimp/jQuery-File-Upload) by [Rob Alarcon](https://github.com/rob-alarcon) * [:link:](jquery.joyride/jquery.joyride.d.ts) [jQuery JoyRide Plugin](https://github.com/zurb/joyride) by [Vincent Bortone](https://github.com/vbortone) * [:link:](jqgrid/jqgrid.d.ts) [jQuery jqgrid Plugin](https://github.com/tonytomov/jqGrid) by [Lokesh Peta](https://github.com/lokeshpeta) +* [:link:](jquery-knob/jquery-knob.d.ts) [jQuery Knob](http://anthonyterrien.com/knob) by [Iain Buchanan](https://github.com/iain8) * [:link:](jquerymobile/jquerymobile.d.ts) [jQuery Mobile](http://jquerymobile.com) by [Boris Yankov](https://github.com/borisyankov) * [:link:](jquery.notifyBar/jquery.notifyBar.d.ts) [jQuery Notify Bar](http://www.whoop.ee/posts/2013-04-05-the-resurrection-of-jquery-notify-bar) by [Shunsuke Ohtani](https://github.com/zaneli) * [:link:](jquery.base64/jquery.base64.d.ts) [jQuery Plugin - base64 codec](https://github.com/yatt/jquery.base64) by [Shinya Mochizuki](https://github.com/enrapt-mochizuki) @@ -359,6 +645,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) @@ -366,12 +654,17 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam * [:link:](jquery.ui.datetimepicker/jquery.ui.datetimepicker.d.ts) [jQuery UI DateTimePicker](http://trentrichardson.com/examples/timepicker) by [dougajmcdonald](https://github.com/dougajmcdonald) * [:link:](jquery.ui.layout/jquery.ui.layout.d.ts) [jQuery UI Layout Plug-in](http://layout.jquery-dev.net) by [Steve Fenton](https://github.com/Steve-Fenton) * [:link:](jquery.timepicker/jquery.timepicker.d.ts) [jQuery UI Timepicker](http://fgelinas.com/code/timepicker) by [Anwar Javed](https://github.com/anwarjaved) +* [:link:](jquery-ajax-chain/jquery-ajax-chain.d.ts) [jquery-ajax-chain v](https://github.com/humana-fragilitas/jQuery-Ajax-Chain) by [Andrea Blasio](https://github.com/humana-fragilitas) +* [:link:](jquery-fullscreen/jquery-fullscreen.d.ts) [jquery-fullscreen](https://github.com/kayahr/jquery-fullscreen-plugin) by [Bruno Grieder](https://github.com/bgrieder) * [:link:](jquery-handsontable/jquery-handsontable.d.ts) [jquery-handsontable](http://handsontable.com) by [Ted John](https://github.com/intelorca) * [:link:](jquery.menuaim/jquery.menuaim.d.ts) [jQuery-menu-aim](https://github.com/kamens/jQuery-menu-aim) by [Robert Fonseca-Ensor](http://www.robfe.com) * [:link:](jquery.pjax/jquery.pjax.d.ts) [jquery-pjax](https://github.com/defunkt/jquery-pjax) by [Junle Li](https://github.com/lijunle) +* [:link:](jquery-timeentry/jquery-timeentry.d.ts) [jQuery-timeentry.js](https://github.com/kbwood/timeentry) by [Mark Nadig](https://github.com/marknadig) +* [:link:](jquery-urlparam/jquery-urlparam.d.ts) [jquery-urlparam](https://gist.github.com/stpettersens/e1f4478f299b6f4905c1) by [Sam Saint-Pettersen](https://github.com/stpettersens) * [:link:](jquery.address/jquery.address.d.ts) [jQuery.Address](https://github.com/asual/jquery-address) by [Martin Duparc](https://github.com/martinduparc), [Tim Klingeleers](https://github.com/mardaneus86) +* [:link:](jquery.ajaxfile/jquery.ajaxFile.d.ts) [jquery.ajaxfile](https://github.com/fpellet/jquery.ajaxFile) by [Florent PELLET](https://github.com/fpellet) * [:link:](jquery.are-you-sure/jquery.are-you-sure.d.ts) [jquery.are-you-sure.js](https://github.com/codedance/jquery.AreYouSure) by [Jon Egerton](https://github.com/jonegerton) -* [:link:](jquery.autosize/jquery.autosize.d.ts) [jquery.autosize (un-versioned)](http://www.jacklmoore.com/autosize) by [Aaron T. King](https://github.com/kingdango) +* [:link:](jquery.autosize/jquery.autosize.d.ts) [jquery.autosize](http://www.jacklmoore.com/autosize) by [Aaron T. King](https://github.com/kingdango) * [:link:](jquery.bbq/jquery.bbq.d.ts) [jquery.bbq](http://benalman.com/projects/jquery-bbq-plugin) by [Adam R. Smith](https://github.com/sunetos) * [:link:](jquery.clientSideLogging/jquery.clientSideLogging.d.ts) [jquery.clientSideLogging](https://github.com/remybach/jQuery.clientSideLogging) by [Diullei Gomes](https://github.com/diullei) * [:link:](jquery.color/jquery.color.d.ts) [jquery.color.js](https://github.com/jquery/jquery-color) by [Derek Cicerone](https://github.com/derekcicerone) @@ -383,17 +676,23 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam * [:link:](jquery.fancytree/jquery.fancytree.d.ts) [jquery.fancytree](https://github.com/mar10/fancytree) by [Peter Palotas](https://github.com/alphaleonis) * [:link:](jquery.finger/jquery.finger.d.ts) [jquery.finger.js](http://ngryman.sh/jquery.finger) by [Max Ackley](https://github.com/maxackley) * [:link:](jquery.form/jquery.form.d.ts) [jQuery.form.js 3.26.0](http://malsup.com/jquery/form) by [François Guillot](http://fguillot.developpez.com) +* [:link:](jquery.fullscreen/jquery.fullscreen.d.ts) [jquery.fullscreen](https://github.com/private-face/jquery.fullscreen) by [Piraveen Kamalathas](https://github.com/piraveen) * [:link:](jquery.gridster/gridster.d.ts) [jQuery.gridster](https://github.com/jbaldwin/gridster) by [Josh Baldwin](https://github.com/jbaldwin) +* [:link:](jquery.highlight-bartaz/jquery.highlight-bartaz.d.ts) [jquery.highlight.js](https://github.com/bartaz/sandbox.js/blob/master/jquery.highlight.js) by [Stefan Profanter](https://github.com/Pro) * [: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.payment/jquery.payment.d.ts) [jQuery.payment](https://github.com/stripe/jquery.payment) by [Eric J. Smith](https://github.com/ejsmith), [John Rutherford](https://github.com/johnrutherford) * [:link:](jquery.pjax.falsandtru/jquery.pjax.d.ts) [jquery.pjax.ts by falsandtru](https://github.com/falsandtru/jquery.pjax.js) by [新ゝ月 NewNotMoon](http://new.not-moon.net) -* [:link:](jquery.placeholder/jquery.placeholder.d.ts) [jquery.placeholder.js](https://github.com/mathiasbynens/jquery-placeholder) by [Peter Gill](https://github.com/majorsilence) +* [: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.qrcode/jquery.qrcode.d.ts) [jQuery.qrcode](https://github.com/lrsjng/jquery-qrcode) by [Dan Manastireanu](https://github.com/danmana) * [:link:](jquery.scrollTo/jquery.scrollTo.d.ts) [jQuery.scrollTo.js](https://github.com/flesler/jquery.scrollTo) by [Neil Stalker](https://github.com/nestalk) +* [:link:](form-serializer/form-serializer.d.ts) [jquery.serialize-object](https://github.com/macek/jquery-serialize-object) by [Florian Wagner](https://github.com/flqw) * [:link:](jquery.simulate/jquery.simulate.d.ts) [jquery.simulate.js](https://github.com/jquery/jquery-simulate) by [Derek Cicerone](https://github.com/derekcicerone) * [:link:](jquery.slimScroll/jquery.slimScroll.d.ts) [jQuery.slimScroll](https://github.com/rochal/jQuery-slimScroll) by [Chintan Shah](https://github.com/Promact) +* [:link:](jquery.soap/jquery.soap.d.ts) [jQuery.SOAP](https://github.com/doedje/jquery.soap) by [Roland Greim](https://github.com/tigerxy) * [:link:](jquery.sortElements/jquery.sortElement.d.ts) [jQuery.sortElements](http://james.padolsey.com/javascript/sorting-elements-with-jquery) by [Tim Bureck](https://github.com/tbureck) * [:link:](jquery.superLink/jquery.superLink.d.ts) [jquery.superLink](http://james.padolsey.com/demos/plugins/jQuery/superLink/superlink.jquery.js) by [Blake Niemyjski](https://github.com/niemyjski) * [:link:](jquery.tile/jquery.tile.d.ts) [jquery.tile.js](https://github.com/urin/jquery.tile.js) by [Shunsuke Ohtani](https://github.com/zaneli) @@ -404,10 +703,15 @@ 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-beautify/js-beautify.d.ts) [js_beautify](https://github.com/beautify-web/js-beautify) by [Josh Goldberg](https://github.com/JoshuaKGoldberg) +* [:link:](js-cookie/js-cookie.d.ts) [js-cookie](https://github.com/js-cookie/js-cookie) by [Theodore Brown](https://github.com/theodorejb) +* [:link:](ua-parser-js/ua-parser-js.d.ts) [js-cookie](https://github.com/faisalman/ua-parser-js) by [Viktor Miroshnikov](https://github.com/superduper) * [:link:](js-fixtures/fixtures.d.ts) [js-fixtures](https://github.com/badunk/js-fixtures) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid) * [:link:](js-git/js-git.d.ts) [js-git](https://github.com/creationix/js-git) by [Bart van der Schoor](https://github.com/Bartvds) +* [:link:](js-md5/md5.d.ts) [js-md5](https://github.com/emn178/js-md5) by [Roland Greim](https://github.com/tigerxy) * [: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:](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) @@ -420,9 +724,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam * [:link:](jshamcrest/jshamcrest.d.ts) [JsHamcrest](https://github.com/danielfm/jshamcrest) by [David Harkness](https://github.com/dharkness) * [: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:](jsnlog/jsnlog.d.ts) [JSNLog](https://github.com/mperdeck/jsnlog.js) by [Mattijs Perdeck](https://github.com/mperdeck) * [: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:](json-stable-stringify/json-stable-stringify.d.ts) [json-stable-stringify](https://github.com/substack/json-stable-stringify) by [Matt Frantz](https://github.com/mhfrantz) +* [: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) @@ -430,15 +739,24 @@ 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:](jsts/jsts.d.ts) [jsts](https://github.com/bjornharrtell/jsts) by [Stephane Alie](https://github.com/StephaneAlie) +* [:link:](jsuri/jsuri.d.ts) [jsUri](https://github.com/derek-watson/jsUri) by [Chris Charabaruk](http://github.com/coldacid), [Florian Wagner](http://github.com/flqw) * [:link:](jszip/jszip.d.ts) [JSZip](http://stuk.github.com/jszip) by [mzeiher](https://github.com/mzeiher) +* [:link:](jug/jug.d.ts) [jug](https://github.com/kaiquewdev/Graph) by [yevt](https://github.com/yevt) * [:link:](jwplayer/jwplayer.d.ts) [JW Player](http://developer.longtailvideo.com/trac) by [Martin Duparc](https://github.com/martinduparc) * [:link:](jwt-simple/jwt-simple.d.ts) [jwt-simple](https://github.com/hokaccha/node-jwt-simple) by [Ken Fukuyama](https://github.com/kenfdev) * [:link:](kafka-node/kafka-node.d.ts) [kafka-node](https://github.com/SOHU-Co/kafka-node) by [Daniel Imrie-Situnayake](https://github.com/dansitu) +* [:link:](karma/karma.d.ts) [karma](https://github.com/karma-runner/karma) by [Tanguy Krotoff](https://github.com/tkrotoff) * [:link:](karma-jasmine/karma-jasmine.d.ts) [karma-jasmine plugin](https://github.com/karma-runner/karma-jasmine) by [Michel Salib](https://github.com/michelsalib) +* [:link:](katex/katex.d.ts) [KaTeX v.0.5.0](http://khan.github.io/KaTeX) by [Michael Randolph](https://github.com/mrand01) +* [:link:](kefir/kefir.d.ts) [Kefir](http://rpominov.github.io/kefir) by [Aya Morisawa](https://github.com/AyaMorisawa) +* [: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) +* [:link:](kii-cloud-sdk/kii-cloud-sdk.d.ts) [Kii Cloud SDK](http://en.kii.com) by [Kii Consortium](http://jp.kii.com/consortium) * [:link:](kineticjs/kineticjs.d.ts) [KineticJS](http://kineticjs.com) by [Basarat Ali Syed](http://www.github.com/basarat), [Ralph de Ruijter](http://www.superdopey.nl/techblog) +* [:link:](knex/knex.d.ts) [Knex.js](https://github.com/tgriesser/knex) by [Qubo](https://github.com/tkQubo) * [:link:](knockback/knockback.d.ts) [Knockback.js](http://kmalakoff.github.io/knockback) by [Boris Yankov](https://github.com/borisyankov) * [:link:](knockout/knockout.d.ts) [Knockout](http://knockoutjs.com) by [Boris Yankov](https://github.com/borisyankov), [Igor Oleinikov](https://github.com/Igorbek), [Clément Bourgeois](https://github.com/moonpyk) * [:link:](knockout.deferred.updates/knockout.deferred.updates.d.ts) [Knockout Deferred Updates](https://github.com/mbest/knockout-deferred-updates) by [Sebastián Galiano](https://github.com/sgaliano) @@ -447,59 +765,103 @@ 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) * [:link:](ko.plus/ko.plus.d.ts) [ko.plus](https://github.com/stevegreatrex/ko.plus) by [Howard Richards](https://github.com/conficient) * [:link:](kolite/kolite.d.ts) [KoLite](https://github.com/CodeSeven/kolite) by [Boris Yankov](https://github.com/borisyankov) +* [:link:](kue/kue.d.ts) [kue 0.9.x](https://github.com/Automattic/kue) by [Nicholas Penree](http://github.com/drudge) * [:link:](kuromoji/kuromoji.d.ts) [kuromoji.js](https://github.com/takuyaa/kuromoji.js) by [MIZUSHIMA Junki](https://github.com/mzsm) * [:link:](ladda/ladda.d.ts) [Ladda](https://github.com/hakimel/Ladda) by [Danil Flores](https://github.com/dflor003), [Michael Lee](https://github.com/leemicw) * [:link:](later/later.d.ts) [LaterJS](http://bunkat.github.io/later) by [Jason D Dryhurst-Smith](http://jasonds.co.uk) * [:link:](lazy.js/lazy.js.d.ts) [Lazy.js](https://github.com/dtao/lazy.js) by [Bart van der Schoor](https://github.com/Bartvds) +* [:link:](lazypipe/lazypipe.d.ts) [lazypipe](https://github.com/OverZealous/lazypipe) by [Thomas Corbière](https://github.com/tomc974) +* [:link:](leaflet-editable/leaflet-editable.d.ts) [Leaflet.Editable](https://github.com/yohanboniface/Leaflet.Editable) by [Dominic Alie](https://github.com/dalie) * [:link:](leaflet/leaflet.d.ts) [Leaflet.js](https://github.com/Leaflet/Leaflet) by [Vladimir Zotov](https://github.com/rgripper) * [:link:](leaflet-label/leaflet-label.d.ts) [Leaflet.label](https://github.com/Leaflet/Leaflet.label) by [Wim Looman](https://github.com/Nemo157) * [:link:](jquery.leanModal/jquery.leanModal.d.ts) [leanModal.js](http://leanmodal.finelysliced.com.au) by [FinelySliced](https://github.com/FinelySliced) * [: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:](level-sublevel/level-sublevel.d.ts) [level-sublevel](https://github.com/dominictarr/level-sublevel) by [Bas Pennings](https://github.com/basp) * [: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:](line-reader/line-reader.d.ts) [line-reader](https://github.com/nickewing/line-reader) by [Sam Saint-Pettersen](https://github.com/stpettersens) * [:link:](dustjs-linkedin/dustjs-linkedin.d.ts) [linkedin dustjs](https://github.com/linkedin/dustjs) by [Marcelo Dezem](http://github.com/mdezem) * [:link:](linq/linq.jquery.d.ts) [linq.jquery (from linq.js)](http://linqjs.codeplex.com) by [neuecc](http://www.codeplex.com/site/users/view/neuecc) * [:link:](linq/linq.d.ts) [linq.js](http://linqjs.codeplex.com) by [Marcin Najder](https://github.com/marcinnajder), [Sebastiaan Dammann](https://github.com/Sebazzz) +* [:link:](linqsharp/linqsharp.d.ts) [linqsharp](https://www.npmjs.com/package/linqsharp) by [Bruno Leonardo Michels](https://github.com/brunolm) * [:link:](jquery.livestampjs/jquery.livestampjs.d.ts) [Livestamp.js](http://mattbradley.github.com/livestampjs) by [Vincent Bortone](https://github.com/vbortone) -* [:link:](lodash/lodash.d.ts) [Lo-Dash](http://lodash.com) by [Brian Zengel](https://github.com/bczengel) +* [:link:](lodash/lodash.d.ts) [Lo-Dash](http://lodash.com) by [Brian Zengel](https://github.com/bczengel), [Ilya Mochalov](https://github.com/chrootsu) * [:link:](lockfile/lockfile.d.ts) [lockfile](https://github.com/isaacs/lockfile) by [Bart van der Schoor](https://github.com/Bartvds) +* [:link:](lodash-decorators/lodash-decorators.d.ts) [lodash-decorators](https://github.com/steelsojka/lodash-decorators) by [Qubo](https://github.com/tkqubo) * [:link:](log4javascript/log4javascript.d.ts) [log4javascript](http://log4javascript.org) by [Markus Wagner](https://github.com/Ritzlgrmft) * [:link:](log4js/log4js.d.ts) [log4js](https://github.com/nomiddlename/log4js-node) by [Kentaro Okuno](http://github.com/armorik83) * [:link:](logg/logg.d.ts) [logg](https://github.com/dpup/node-logg) by [Bret Little](https://github.com/blittle) +* [:link:](loggly/loggly.d.ts) [loggly](https://github.com/nodejitsu/node-loggly) by [Ray Martone](https://github.com/rmartone) +* [:link:](loglevel/loglevel.d.ts) [loglevel](https://github.com/pimterry/loglevel) by [Stefan Profanter](https://github.com/Pro), [Florian Wagner](https://github.com/flqw) * [:link:](logrotate-stream/logrotate-stream.d.ts) [logrotate-stream](https://github.com/dstokes/logrotate-stream) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](long/long.d.ts) [Long.js](https://github.com/dcodeIO/Long.js) by [Toshihide Hara](https://github.com/kerug) +* [: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 [Peter Kooijmans](https://github.com/peterkooijmans) +* [:link:](lory.js/lory.js.d.ts) [lory](https://github.com/meandmax/lory) by [kubosho](https://github.com/kubosho) +* [:link:](lovefield/lovefield.d.ts) [Lovefield](http://google.github.io/lovefield) by [freshp86](https://github.com/freshp86) +* [:link:](lower-case/lower-case.d.ts) [lower-case](https://github.com/blakeembrey/lower-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) +* [:link:](lower-case-first/lower-case-first.d.ts) [lower-case-first](https://github.com/blakeembrey/lower-case-first) by [Sam Saint-Pettersen](https://github.com/stpettersens) * [:link:](lru-cache/lru-cache.d.ts) [lru-cache](https://github.com/isaacs/node-lru-cache) by [Bart van der Schoor](https://github.com/Bartvds) * [:link:](lscache/lscache.d.ts) [lscache](https://github.com/pamelafox/lscache) by [Chris Martinez](https://github.com/Chris-Martinezz) +* [:link:](luaparse/luaparse.d.ts) [luaparse](https://github.com/oxyc/luaparse) by [Sam Saint-Pettersen](https://github.com/stpettersens) * [:link:](lunr/lunr.d.ts) [lunr.js](https://github.com/olivernn/lunr.js) by [Sebastian Lenz](https://github.com/sebastian-lenz) * [:link:](lz-string/lz-string.d.ts) [lz-string](https://github.com/pieroxy/lz-string) by [Roman Nikitin](https://github.com/M0ns1gn0r) +* [:link:](magic-number/magic-number.d.ts) [magic-number](https://github.com/stpettersens/node-magic-number) by [Sam Saint-Pettersen](https://github.com/stpettersens) +* [:link:](magicsuggest/magicsuggest.d.ts) [MagicSuggest](http://nicolasbize.com/magicsuggest) by [Leonardo Chaia](http://github.com/leonardochaia) +* [:link:](mailcheck/mailcheck.d.ts) [Mailcheck](https://github.com/mailcheck/mailcheck) by [Paulo Cesar](http://github.com/pocesar) +* [:link:](maildev/maildev.d.ts) [maildev](https://github.com/djfarrelly/maildev) by [Cyril Schumacher](https://github.com/cyrilschumacher) +* [:link:](mailparser/mailparser.d.ts) [mailparser](https://www.npmjs.com/package/mailparser) by [Peter Snider](https://github.com/psnider) * [:link:](main-bower-files/main-bower-files.d.ts) [main-bower-files](https://github.com/ck86/main-bower-files) by [Keita Kagurazaka](https://github.com/k-kagurazaka) +* [:link:](maker.js/makerjs.d.ts) [Maker.js](https://github.com/Microsoft/maker.js) by [Dan Marshall](https://github.com/danmarshall) +* [:link:](mandrill-api/mandrill-api.d.ts) [Mandrill API 1.x](http://mandrill.com) by [Paulo Cesar](https://github.com/pocesar) * [:link:](mapbox/mapbox.d.ts) [Mapbox](https://www.mapbox.com/mapbox.js) by [Maxime Fabre](https://github.com/anahkiasen) * [:link:](mapsjs/mapsjs.d.ts) [Mapsjs](https://github.com/mapsjs) by [Matthew James Davis](https://github.com/davismj) +* [:link:](maquette/maquette.d.ts) [maquette](http://maquettejs.org) by [Johan Gorter](https://github.com/johan-gorter) +* [:link:](mariasql/mariasql.d.ts) [mariasql](https://github.com/mscdex/node-mariasql) by [MichaelBennett](https://github.com/bennett000) * [:link:](marionette/marionette.d.ts) [Marionette](https://github.com/marionettejs) by [Zeeshan Hamid](https://github.com/zhamid), [Natan Vivo](https://github.com/nvivo), [Sven Tschui](https://github.com/sventschui) * [:link:](marked/marked.d.ts) [Marked](https://github.com/chjj/marked) by [William Orr](https://github.com/worr) +* [:link:](markerclustererplus/markerclustererplus.d.ts) [MarkerClustererPlus for Google Maps V3](http://github.com/mahnunchik/markerclustererplus) by [Mathias Rodriguez](http://github.com/enanox) +* [:link:](markitup/markitup.d.ts) [markitup 1.x](https://github.com/markitup/1.x) by [drillbits](https://github.com/drillbits) * [: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:](material-ui/material-ui.d.ts) [material-ui](https://github.com/callemall/material-ui) by [Nathan Brown](https://github.com/ngbrown), [Oliver Herrmann](https://github.com/herrmanno) * [:link:](mathjax/mathjax.d.ts) [MathJax](https://github.com/mathjax/MathJax) by [Roland Zwaga](https://github.com/rolandzwaga) +* [:link:](mathjs/mathjs.d.ts) [mathjs](http://mathjs.org) by [Ilya Shestakov](https://github.com/siavol) +* [: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:](mendixmodelsdk/mendixmodelsdk.d.ts) [mendixmodelsdk](http://www.mendix.com) by [Mendix](https://github.com/mendix) +* [:link:](merge-descriptors/merge-descriptors.d.ts) [merge-descriptors](https://github.com/component/merge-descriptors) by [Zhiyuan Wang](https://github.com/danny8002) * [:link:](merge-stream/merge-stream.d.ts) [merge-stream](https://github.com/grncdr/merge-stream) by [Keita Kagurazaka](https://github.com/k-kagurazaka) +* [:link:](merge2/merge2.d.ts) [merge2](https://github.com/teambition/merge2) by [Tanguy Krotoff](https://github.com/tkrotoff) +* [:link:](meshblu/meshblu.d.ts) [meshblu.js](https://github.com/octoblu/meshblu-npm) by [Felipe Nipo](https://github.com/fnipo) * [:link:](mess/mess.d.ts) [mess](https://github.com/bobrik/node-mess) by [Wim Looman](https://github.com/Nemo157) * [:link:](messenger/messenger.d.ts) [Messenger.js](https://github.com/HubSpot/messenger) by [Derek Cicerone](https://github.com/derekcicerone) * [:link:](meteor/meteor.d.ts) [Meteor](http://www.meteor.com) by [Dave Allen](https://github.com/fullflavedave) +* [:link:](node-mysql-wrapper/my-meteor.d.ts) [meteorjs for node-mysql-wrapper which helps in development](https://github.com/nodets/node-mysql-wrapper) by [Makis Maropoulos](https://github.com/kataras) * [:link:](method-override/method-override.d.ts) [method-override](https://github.com/expressjs/method-override) by [Santi Albo](https://github.com/santialbo) +* [:link:](metismenu/metismenu.d.ts) [metisMenu](http://github.com/onokumus/metisMenu) by [onokums](https://github.com/onokumus) * [:link:](microsoft-ajax/microsoft.ajax.d.ts) [Microsoft ASP.NET Ajax client side library](http://msdn.microsoft.com/en-us/library/ee341002(v=vs.100).aspx) by [Patrick Magee](https://github.com/pjmagee) +* [:link:](xrm/xrm.d.ts) [Microsoft Dynamics xRM API](http://www.microsoft.com/en-us/download/details.aspx?id=44567) by [David Berry](https://github.com/6ix4our), [Matt Ngan](https://github.com/mattngan) +* [:link:](xrm/xrm-6.d.ts) [Microsoft Dynamics xRM API v6](http://msdn.microsoft.com/en-us/library/gg328255.aspx) by [David Berry](https://github.com/6ix4our) +* [:link:](jquery-validation-unobtrusive/jquery-validation-unobtrusive.d.ts) [Microsoft jQuery Unobtrusive Validation](http://aspnetwebstack.codeplex.com) by [Matt Brooks](https://github.com/EnableSoftware) * [:link:](microsoft-live-connect/microsoft-live-connect.d.ts) [Microsoft Live Connect](http://msdn.microsoft.com/en-us/library/live/hh243643.aspx) by [John Vilk](https://github.com/jvilk) +* [:link:](xrm/parature.d.ts) [Microsoft Parature extentions to Xrm.Page - available for CRM Online Only](http://msdn.microsoft.com/en-us/library/gg328255.aspx) by [David Berry](https://github.com/6ix4our) * [:link:](azure-mobile-services-client/AzureMobileServicesClient.d.ts) [Microsoft Windows AzureMobile Service](http://www.windowsazure.com/en-us/develop/mobile) by [Morosinotto Daniele](https://github.com/dmorosinotto) * [: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) @@ -509,101 +871,189 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam * [:link:](bingmaps/Microsoft.Maps.Traffic.d.ts) [Microsoft.Maps.Traffic](http://msdn.microsoft.com/en-us/library/hh312840.aspx) by [Eric Todd](https://github.com/ericrtodd) * [:link:](bingmaps/Microsoft.Maps.VenueMaps.d.ts) [Microsoft.Maps.VenueMaps](http://msdn.microsoft.com/en-us/library/hh312797.aspx) by [Eric Todd](https://github.com/ericrtodd) * [:link:](milkcocoa/milkcocoa.d.ts) [Milkcocoa](https://mlkcca.com) by [odangosan](https://github.com/odangosan) +* [:link:](milliseconds/milliseconds.d.ts) [milliseconds](http://npmjs.com/milliseconds) by [Elmar Burke](github.com/elmarburke) * [:link:](mime/mime.d.ts) [mime](https://github.com/broofa/node-mime) by [Jeff Goddard](https://github.com/jedigo) * [:link:](minilog/minilog.d.ts) [minilog v2](https://github.com/mixu/minilog) by [Guido](http://guido.io) * [:link:](minimatch/minimatch.d.ts) [Minimatch](https://github.com/isaacs/minimatch) by [vvakame](https://github.com/vvakame) -* [:link:](minimist/minimist.d.ts) [minimist](https://github.com/substack/minimist) by [Bart van der Schoor](https://github.com/Bartvds) +* [:link:](minimist/minimist.d.ts) [minimist](https://github.com/substack/minimist) by [Bart van der Schoor](https://github.com/Bartvds), [Necroskillz](https://github.com/Necroskillz) * [:link:](mithril/mithril.d.ts) [Mithril](http://lhorie.github.io/mithril) by [Leo Horie](https://github.com/lhorie), [Chris Bowdon](https://github.com/cbowdon) * [:link:](mixpanel/mixpanel.d.ts) [Mixpanel](https://mixpanel.com) by [Knut Eirik Leira Hjelle](https://github.com/hjellek) * [: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:](mobservable-react/mobservable-react.d.ts) [mobservable](https://github.com/mweststrate/mobservable-react) by [Michel Weststrate](https://github.com/mweststrate) +* [:link:](mobservable/mobservable.d.ts) [mobservable](https://mweststrate.github.io/mobservable) by [Michel Weststrate](https://github.com/mweststrate) +* [:link:](mocha/mocha.d.ts) [mocha](http://mochajs.org) by [Kazi Manzur Rashid](https://github.com/kazimanzurrashid), [otiai10](https://github.com/otiai10), [jt000](https://github.com/jt000), [Vadim Macagon](https://github.com/enlight) +* [:link:](mocha/mocha-node.d.ts) [mocha](http://mochajs.org) by [Vadim Macagon](https://github.com/enlight), [vvakame](https://github.com/vvakame) * [:link:](mocha-phantomjs/mocha-phantomjs.d.ts) [mocha-phantomjs](http://metaskills.net/mocha-phantomjs) by [Erik Schierboom](https://github.com/ErikSchierboom) +* [:link:](mock-fs/mock-fs.d.ts) [mock-fs](https://github.com/tschaub/mock-fs) by [Wim Looman](https://github.com/Nemo157) * [:link:](mockery/mockery.d.ts) [mockery](https://github.com/mfncooper/mockery) by [jt000](https://github.com/jt000) * [: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.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), [Matt Brooks](https://github.com/EnableSoftware) +* [:link:](moment/moment-node.d.ts) [Moment.js](https://github.com/timrwood/moment) by [Michael Lakerveld](https://github.com/Lakerfield), [Aaron King](https://github.com/kingdango), [Hiroki Horiuchi](https://github.com/horiuchi), [Dick van den Brink](https://github.com/DickvdBrink), [Adi Dahiya](https://github.com/adidahiya), [Matt Brooks](https://github.com/EnableSoftware) +* [:link:](moment-range/moment-range.d.ts) [Moment.js](https://github.com/gf3/moment-range) by [Bart van den Burg](https://github.com/Burgov), [Wilgert Velinga](https://github.com/wilgert) * [:link:](mongodb/mongodb.d.ts) [MongoDB](https://github.com/mongodb/node-mongodb-native) by [Boris Yankov](https://github.com/borisyankov) * [:link:](mongoose/mongoose.d.ts) [Mongoose](http://mongoosejs.com) by [horiuchi](https://github.com/horiuchi) * [:link:](mongoose-mock/mongoose-mock.d.ts) [mongoose-mock](https://github.com/JohanObrink/mongoose-mock) by [jt000](https://github.com/jt000) * [: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:](ms/ms.d.ts) [ms](https://github.com/guille/ms.js) by [Zhiyuan Wang](https://github.com/danny8002) * [: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:](msportalfx-test/msportalfx-test.d.ts) [msportalfx-test](https://msazure.visualstudio.com/DefaultCollection/AzureUX/_git/portalfx-msportalfx-test) by [Julio Casal](https://github.com/julioct) +* [:link:](mssql/mssql.d.ts) [mssql](https://www.npmjs.com/package/mssql) by [COLSA Corporation](http://www.colsa.com), [Ben Farr](https://github.com/jaminfarr) * [:link:](mu2/mu2.d.ts) [mu2](http://github.com/raycmorgan/mu) by [Jeff Goddard](https://github.com/jedigo) -* [:link:](multer/multer.d.ts) [multer](https://github.com/expressjs/multer) by [jt000](https://github.com/jt000) +* [:link:](multer/multer.d.ts) [multer](https://github.com/expressjs/multer) by [jt000](https://github.com/jt000), [vilicvane](https://vilic.github.io) +* [:link:](multiplexjs/multiplexjs.d.ts) [Multiplex.js](http://github.com/multiplex/multiplex.js) by [Kamyar Nazeri](http://github.com/KamyarNazeri) * [:link:](mustache/mustache.d.ts) [Mustache](https://github.com/janl/mustache.js) by [Mark Ashley Bell](https://github.com/markashleybell) +* [:link:](natural/natural.d.ts) [Natural](https://github.com/NaturalNode/natural) by [Dylan R. E. Moonfire](https://github.com/dmoonfire) +* [:link:](navigation/navigation.d.ts) [Navigation](http://grahammendick.github.io/navigation) by [Graham Mendick](https://github.com/grahammendick) * [:link:](nconf/nconf.d.ts) [nconf](https://github.com/flatiron/nconf) by [Jeff Goddard](https://github.com/jedigo), [Jean-Martin Thibault](https://github.com/jmthibault) * [:link:](ncp/ncp.d.ts) [ncp](https://github.com/AvianFlu/ncp) by [Bart van der Schoor](https://github.com/bartvds) * [:link:](nedb/nedb.d.ts) [NeDB](https://github.com/louischatriot/nedb) by [Stefan Steinhart](https://github.com/reppners) * [:link:](needle/needle.d.ts) [needle](https://github.com/tomas/needle) by [San Chen](https://github.com/bigsan) +* [:link:](netmask/netmask.d.ts) [Netmask](https://github.com/rs/node-netmask) by [Matt Frantz](https://github.com/mhfrantz) * [:link:](nexpect/nexpect.d.ts) [nexpect](https://github.com/nodejitsu/nexpect) by [vvakame](http://github.com/vvakame) +* [:link:](ng-command/ng-command.d.ts) [ng-command](https://github.com/stephenlautier/ng-command) by [Stephen Lautier](https://github.com/stephenlautier) +* [:link:](ng-flow/ng-flow.d.ts) [ng-flow](https://github.com/flowjs/ng-flow) by [Ryan McNamara](https://github.com/ryan10132) * [:link:](ng-grid/ng-grid.d.ts) [ng-grid](http://angular-ui.github.io/ng-grid) by [Ken Smith](https://github.com/smithkl42), [Roland Zwaga](https://github.com/rolandzwaga), [Kent Cooper](https://github.com/kentcooper) * [:link:](angular-idle/angular-idle.d.ts) [ng-idle](http://hackedbychinese.github.io/ng-idle) by [mthamil](https://github.com/mthamil) +* [:link:](ngbootbox/ngbootbox.d.ts) [ngbootbox](https://github.com/eriktufvesson/ngBootbox) by [Sam Saint-Pettersen](https://github.com/stpettersens) +* [:link:](ng-cordova/appAvailability.d.ts) [ngCordova AppAvailability plugin](https://github.com/driftyco/ng-cordova) by [Kapil Sachdeva](https://github.com/ksachdeva) +* [:link:](ng-cordova/datepicker.d.ts) [ngCordova datepicker plugin](https://github.com/VitaliiBlagodir/cordova-plugin-datepicker) by [Jacques Kang](https://www.linkedin.com/in/jacqueskang) +* [:link:](ng-cordova/app-version.d.ts) [ngCordova datepicker plugin](https://github.com/driftyco/ng-cordova) by [Jacques Kang](https://www.linkedin.com/in/jacqueskang) +* [:link:](ng-cordova/deviceMotion.d.ts) [ngCordova device motion plugin](https://github.com/driftyco/ng-cordova) by [Michel Vidailhet](https://github.com/mvidailhet), [Kapil Sachdeva](https://github.com/ksachdeva) +* [:link:](ng-cordova/deviceOrientation.d.ts) [ngCordova device orientation plugin](https://github.com/driftyco/ng-cordova) by [Michel Vidailhet](https://github.com/mvidailhet), [Kapil Sachdeva](https://github.com/ksachdeva) +* [:link:](ng-cordova/device.d.ts) [ngCordova device plugin](https://github.com/driftyco/ng-cordova) by [Kapil Sachdeva](https://github.com/ksachdeva) +* [:link:](ng-cordova/dialogs.d.ts) [ngCordova dialogs plugin](https://github.com/driftyco/ng-cordova) by [Michel Vidailhet](https://github.com/mvidailhet), [Kapil Sachdeva](https://github.com/ksachdeva) +* [:link:](ng-cordova/emailComposer.d.ts) [ngCordova emailComposer plugin](https://github.com/driftyco/ng-cordova) by [Kapil Sachdeva](https://github.com/ksachdeva) +* [:link:](ng-cordova/geolocation.d.ts) [ngCordova geolocation plugin](https://github.com/driftyco/ng-cordova) by [Kapil Sachdeva](https://github.com/ksachdeva) +* [:link:](ng-cordova/network.d.ts) [ngCordova network plugin](https://github.com/driftyco/ng-cordova) by [Kapil Sachdeva](https://github.com/ksachdeva) +* [:link:](ng-cordova/tsd.d.ts) [ngCordova plugins](https://github.com/driftyco/ng-cordova) by [Kapil Sachdeva](https://github.com/ksachdeva) +* [:link:](ng-cordova/toast.d.ts) [ngCordova toast plugin](https://github.com/driftyco/ng-cordova) by [Kapil Sachdeva](https://github.com/ksachdeva) +* [:link:](ng-dialog/ng-dialog.d.ts) [ngDialog](https://github.com/likeastore/ngDialog) by [Stephen Lautier](https://github.com/stephenlautier) +* [:link:](ngkookies/ngkookies.d.ts) [ngKookes](https://github.com/voronianski/ngKookies) by [Martin McWhorter](https://github.com/martinmcwhorter) * [:link:](ngprogress/ngprogress.d.ts) [ngProgress](http://victorbjelkholm.github.io/ngProgress) by [Martin McWhorter](https://github.com/martinmcwhorter) * [:link:](ngprogress-lite/ngprogress-lite.d.ts) [ngprogress-lite](https://github.com/voronianski/ngprogress-lite) by [Luke Forder](https://github.com/LukeForder) * [:link:](nightmare/nightmare.d.ts) [Nightmare](https://github.com/segmentio/nightmare) by [horiuchi](https://github.com/horiuchi) * [: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:](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:](apn/apn.d.ts) [node-apn](https://github.com/argon/node-apn) by [Zenorbi](https://github.com/zenorbi) +* [:link:](node-array-ext/node-array-ext.d.ts) [node-array-ext](https://github.com/Beng89/node-array-ext) by [Ben Goltz](https://github.com/Beng89) * [: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-cache/node-cache.d.ts) [node-cache](https://github.com/tcs-de/nodecache) by [Ilya Mochalov](https://github.com/chrootsu) +* [:link:](node-calendar/node-calendar.d.ts) [node-calendar](https://www.npmjs.com/package/node-calendar) by [Luzian Zagadinow](https://github.com/luzianz) +* [:link:](config/config.d.ts) [node-config](https://github.com/lorenwest/node-config) by [Roman Korneev](https://github.com/RWander) +* [:link:](node-config-manager/node-config-manager.d.ts) [node-config-manager](https://www.npmjs.com/package/node-config-manager) by [TANAKA Koichi](https://gitnub.com/mugeso) * [: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-getopt/node-getopt.d.ts) [node-getopt](https://github.com/jiangmiao/node-getopt) by [Karl.M.Cauchy](https://github.com/kcauchy) * [:link:](node-git/node-git.d.ts) [node-git](https://github.com/christkv/node-git) by [vvakame](https://github.com/vvakame) * [:link:](ip/ip.d.ts) [node-ip](https://github.com/indutny/node-ip) by [Peter Harris](https://github.com/codeanimal) +* [:link:](node-jsfl-runner/node-jsfl-runner.d.ts) [node-jsfl-runner](https://www.npmjs.com/package/node-jsfl-runner) by [Michael Randolph](https://github.com/mrand01) * [:link:](multiparty/multiparty.d.ts) [node-multiparty](https://github.com/andrewrk/node-multiparty) by [Ken Fukuyama](https://github.com/kenfdev) * [:link:](mysql/mysql.d.ts) [node-mysql](https://github.com/felixge/node-mysql) by [William Johnston](https://github.com/wjohnsto) +* [:link:](node-mysql-wrapper/node-mysql-wrapper.d.ts) [node-mysql-wrapper](https://github.com/nodets/node-mysql-wrapper) by [Makis Maropoulos](https://github.com/kataras) +* [:link:](node-notifier/node-notifier.d.ts) [node-notifier](https://github.com/mikaelbr/node-notifier) by [Qubo](https://github.com/tkQubo) * [:link:](node-persist/node-persist.d.ts) [node-persist](https://github.com/simonlast/node-persist) by [Spencer Williams](http://spencerwi.com) * [:link:](node-polyglot/node-polyglot.d.ts) [node-polyglot](https://github.com/airbnb/polyglot.js) by [Tim Jackson-Kiely](https://github.com/timjk) +* [:link:](progress/progress.d.ts) [node-progress](https://github.com/tj/node-progress) by [Sebastian Lenz](https://github.com/sebastian-lenz) * [:link:](promptly/promptly.d.ts) [node-promptly](https://github.com/IndigoUnited/node-promptly) by [Dan Spencer](https://github.com/danrspencer) * [:link:](radius/radius.d.ts) [node-radius](https://github.com/retailnext/node-radius) by [Peter Harris](https://github.com/codeanimal) +* [:link:](node-schedule/node-schedule.d.ts) [node-schedule](https://github.com/tejasmanohar/node-schedule) by [Cyril Schumacher](https://github.com/cyrilschumacher) +* [:link:](node-slack/node-slack.d.ts) [node-slack](https://github.com/xoxco/node-slack) by [Qubo](https://github.com/tkQubo) +* [:link:](srp/srp.d.ts) [node-srp](https://github.com/mozilla/node-srp) by [Pat Smuk](https://github.com/Patman64) +* [: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-base.d.ts) [node-uuid.js](https://github.com/broofa/node-uuid) by [Jeff May](https://github.com/jeffmay) +* [:link:](node-uuid/node-uuid-cjs.d.ts) [node-uuid.js](https://github.com/broofa/node-uuid) by [Jeff May](https://github.com/jeffmay) +* [:link:](node-uuid/node-uuid-global.d.ts) [node-uuid.js](https://github.com/broofa/node-uuid) by [Jeff May](https://github.com/jeffmay) * [: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-validator/node-validator.d.ts) [node-validator](https://www.npmjs.com/package/node-validator) by [Ken Gorab](https://github.com/kengorab) * [:link:](node-webkit/node-webkit.d.ts) [node-webkit](https://github.com/rogerwang/node-webkit) by [Pedro Casaubon](https://github.com/xperiments) * [:link:](xml2js/xml2js.d.ts) [node-xml2js](https://github.com/Leonidas-from-XIV/node-xml2js) by [Michel Salib](https://github.com/michelsalib), [Jason McNeil](https://github.com/jasonrm) -* [:link:](node/node.d.ts) [Node.js](http://nodejs.org) by [Microsoft TypeScript](http://typescriptlang.org), [DefinitelyTyped](https://github.com/borisyankov/DefinitelyTyped) +* [:link:](_debugger/_debugger.d.ts) [Node.js debugger API](http://nodejs.org) by [Basarat Ali Syed](https://github.com/basarat) * [:link:](restify/restify.d.ts) [node.js REST framework](https://github.com/mcavage/node-restify) by [Bret Little](https://github.com/blittle) -* [:link:](acl/acl-mongodbBackend.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo) -* [:link:](acl/acl.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo) -* [:link:](acl/acl-redisBackend.d.ts) [node_acl](https://github.com/optimalbits/node_acl) by [Qubo](https://github.com/tkQubo) -* [:link:](mdns/mdns.d.ts) [node_mdns](https://github.com/agnat/node_mdns) by [Stefan Steinhart](https://github.com/reppners) -* [:link:](node_redis/node_redis.d.ts) [node_redis](https://github.com/mranney/node_redis) by [Boris Yankov](https://github.com/borisyankov) +* [:link:](node/node.d.ts) [Node.js v4.x](http://nodejs.org) by [Microsoft TypeScript](http://typescriptlang.org), [DefinitelyTyped](https://github.com/borisyankov/DefinitelyTyped) * [: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.d.ts) [Nodemailer](https://github.com/andris9/Nodemailer) by [Rogier Schouten](https://github.com/rogierschouten) +* [:link:](nodemailer/nodemailer-types.d.ts) [Nodemailer](https://github.com/andris9/Nodemailer) by [Rogier Schouten](https://github.com/rogierschouten) +* [:link:](nodemailer-direct-transport/nodemailer-direct-transport.d.ts) [nodemailer-direct-transport](https://github.com/andris9/nodemailer-direct-transport) by [Rogier Schouten](https://github.com/rogierschouten) +* [:link:](nodemailer-pickup-transport/nodemailer-pickup-transport.d.ts) [nodemailer-pickup-transport](https://www.npmjs.com/package/nodemailer-pickup-transport) by [Peter Snider](https://github.com/psnider) +* [:link:](nodemailer-smtp-pool/nodemailer-smtp-pool.d.ts) [nodemailer-smtp-pool](https://github.com/andris9/nodemailer-smtp-pool) by [Rogier Schouten](https://github.com/rogierschouten) +* [:link:](nodemailer-smtp-transport/nodemailer-smtp-transport.d.ts) [nodemailer-smtp-transport](https://github.com/andris9/nodemailer-smtp-transport) by [Rogier Schouten](https://github.com/rogierschouten) * [:link:](nodeunit/nodeunit.d.ts) [nodeunit](https://github.com/caolan/nodeunit) by [Jeff Goddard](https://github.com/jedigo) * [:link:](nomnom/nomnom.d.ts) [nomnom](https://github.com/harthur/nomnom) by [Paul Vick](https://github.com/panopticoncentral) * [:link:](nopt/nopt.d.ts) [nopt](https://github.com/npm/nopt) by [jbondc](https://github.com/jbondc) -* [:link:](notify/notify.d.ts) [Notify.js](https://github.com/jpillora/notifyjs) by [Xiaohan Zhang](https://github.com/hellochar) * [:link:](notifyjs/notifyjs.d.ts) [notify.js](https://github.com/alexgibson/notify.js) by [soundTricker](https://github.com/soundTricker) +* [:link:](notify/notify.d.ts) [Notify.js](https://github.com/jpillora/notifyjs) by [Xiaohan Zhang](https://github.com/hellochar) +* [: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 [Patrick Davies](https://github.com/bleuarg) * [:link:](noVNC/noVNC.d.ts) [noVNC](https://github.com/kanaka/noVNC) by [Ken Smith](https://github.com/smithkl42) * [:link:](npm/npm.d.ts) [npm](https://github.com/npm/npm) by [Maxime LUCE](https://github.com/SomaticIT) -* [:link:](nprogress/nprogress.d.ts) [NProgress](https://github.com/rstacruz/nprogress) by [Judah Gabriel Himango](http://debuggerdotbreak.wordpress.com) +* [:link:](nprogress/NProgress.d.ts) [NProgress](https://github.com/rstacruz/nprogress) by [Judah Gabriel Himango](http://debuggerdotbreak.wordpress.com) +* [:link:](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-path/object-path.d.ts) [objectPath](https://github.com/mariocasciaro/object-path) by [Paulo Cesar](https://github.com/pocesar) +* [:link:](obelisk.js/obelisk.js.d.ts) [obelisk.js](https://github.com/nosir/obelisk.js) by [Brian Drupieski](https://github.com/bdrupieski) +* [:link:](object-assign/object-assign.d.ts) [object-assign](https://github.com/sindresorhus/object-assign) by [Christopher Brown](https://github.com/chbrown) +* [: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) +* [:link:](oblo-util/oblo-util.d.ts) [oblo-util](https://github.com/Oblosys/oblo-util) by [Martijn Schrage](https://github.com/Oblosys) * [:link:](oboe/oboe.d.ts) [oboe](https://github.com/jimhigson/oboe.js) by [Jared Klopper](https://github.com/optical) +* [:link:](observe-js/observe-js.d.ts) [observe-js](https://github.com/Polymer/observe-js) by [Oliver Herrmann](https://github.com/herrmanno) * [:link:](oclazyload/oclazyload.d.ts) [oc.LazyLoad](https://github.com/ocombe/ocLazyLoad) by [Roland Zwaga](https://github.com/rolandzwaga) +* [:link:](angular-odata-resources/angular-odata-resources.d.ts) [OData Angular Resources](https://github.com/devnixs/ODataAngularResources) by [Raphael ATALLAH](http://raphael.atallah.me) +* [:link:](office-js/office-js.d.ts) [Office.js](http://dev.office.com) by [OfficeDev](https://github.com/OfficeDev) +* [:link:](offline-js/offline-js.d.ts) [Offline](https://github.com/HubSpot/offline) by [Chris Wrench](https://github.com/cgwrench) +* [:link:](on-finished/on-finished.d.ts) [on-finished](https://github.com/jshttp/on-finished) by [Honza Dvorsky](http://github.com/czechboy0) +* [:link:](onsenui/onsenui.d.ts) [Onsen UI](http://onsen.io) by [Fran Dios](https://github.com/frankdiox) * [:link:](open/open.d.ts) [open](https://github.com/jjrdn/node-open) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](openlayers/openlayers.d.ts) [OpenLayers.js](https://github.com/openlayers/openlayers) by [Ilya Bolkhovsky](https://github.com/bolhovsky) +* [:link:](OpenJsCad/openjscad.d.ts) [OpenJsCad.js](https://github.com/joostn/OpenJsCad) by [Dan Marshall](https://github.com/danmarshall) +* [:link:](openlayers/openlayers.d.ts) [OpenLayers](http://openlayers.org) by [Wouter Goedhart](https://github.com/woutergd) +* [:link:](openpgp/openpgp.d.ts) [openpgpjs](http://openpgpjs.org) by [Guillaume Lacasa](https://blog.lacasa.fr) * [: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:](orchestrator/orchestrator.d.ts) [Orchestrator](https://github.com/orchestrator/orchestrator) by [Qubo](https://github.com/tkQubo) +* [:link:](os-locale/os-locale.d.ts) [os-locale](https://github.com/sindresorhus/os-locale) by [Aya Morisawa](https://github.com/AyaMorisawa) +* [:link:](owlcarousel/owlcarousel.d.ts) [OwlCarousel v.1.3.3](https://github.com/OwlFonk/OwlCarousel) by [Damian Piątkowski](https://github.com/dpiatkowski) +* [:link:](packery/packery.d.ts) [Packery](http://packery.metafizzy.co) by [Piraveen Kamalathas from Kilix](https://github.com/piraveen) * [:link:](page/page.d.ts) [page](http://visionmedia.github.io/page.js) by [Alan Norbauer](http://alan.norbauer.com) +* [:link:](papaparse/papaparse.d.ts) [PapaParse](https://github.com/mholt/PapaParse) by [Pedro Flemming](https://github.com/torpedro) * [:link:](parallel/parallel.d.ts) [parallel.js](http://adambom.github.io/parallel.js) by [Josh Baldwin](https://github.com/jbaldwin) +* [:link:](param-case/param-case.d.ts) [param-case](https://github.com/blakeembrey/param-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) * [:link:](parse/parse.d.ts) [Parse](https://parse.com) by [Ullisen Media Group](http://ullisenmedia.com) * [:link:](parsimmon/parsimmon.d.ts) [Parsimmon](https://github.com/jneen/parsimmon) by [Bart van der Schoor](https://github.com/Bartvds) +* [:link:](pascal-case/pascal-case.d.ts) [pascal-case](https://github.com/blakeembrey/pascal-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) * [:link:](passport/passport.d.ts) [Passport](http://passportjs.org) by [Horiuchi_H](https://github.com/horiuchi) * [:link:](passport-strategy/passport-strategy.d.ts) [Passport Strategy module](https://github.com/jaredhanson/passport-strategy) by [Lior Mualem](https://github.com/liorm) * [:link:](passport-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-twitter/passport-twitter.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction) +* [:link:](passport-facebook-token/passport-facebook-token.d.ts) [passport-facebook-token](https://github.com/drudge/passport-facebook-token) by [Ray Martone](https://github.com/rmartone) * [:link:](passport-local/passport-local.d.ts) [passport-local](https://github.com/jaredhanson/passport-local) by [Maxime LUCE](https://github.com/SomaticIT) +* [:link:](path-case/path-case.d.ts) [path-case](https://github.com/blakeembrey/path-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) +* [:link:](path-exists/path-exists.d.ts) [path-exists](https://github.com/sindresorhus/path-exists) by [Shogo Iwano](https://github.com/shiwano) +* [:link:](path-to-regexp/path-to-regexp.d.ts) [path-to-regexp](https://github.com/pillarjs/path-to-regexp) by [xica](https://github.com/xica) +* [:link:](pathjs/pathjs.d.ts) [Pathjs](https://github.com/mtrpcic/pathjs) by [Lokesh Peta](https://github.com/lokeshpeta) * [:link:](pathwatcher/pathwatcher.d.ts) [pathwatcher](https://github.com/atom/node-pathwatcher) by [vvakame](https://github.com/vvakame) +* [:link:](PayPal-Cordova-Plugin/PayPal-Cordova-Plugin.d.ts) [PayPal-Cordova-Plugin](https://github.com/paypal/PayPal-Cordova-Plugin) by [Justin Unterreiner](https://github.com/Justin-Credible) * [:link:](pdf/pdf.d.ts) [PDF.js](https://github.com/mozilla/pdf.js) by [Josh Baldwin](https://github.com/jbaldwin) +* [:link:](pdfkit/pdfkit.d.ts) [Pdfkit](http://pdfkit.org) by [Eric Hillah](https://github.com/erichillah) * [:link:](peerjs/peerjs.d.ts) [PeerJS](http://peerjs.com) by [Toshiya Nakakura](https://github.com/nakakura) * [:link:](pegjs/pegjs.d.ts) [PEG.js](http://pegjs.majda.cz) by [vvakame](https://github.com/vvakame) * [:link:](persona/persona.d.ts) [Persona](http://www.mozilla.org/en-US/persona) by [James Frasca](https://github.com/Nycto) @@ -612,63 +1062,130 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam * [:link:](phantom/phantom.d.ts) [PhantomJS bridge for NodeJS](https://github.com/sgentle/phantomjs-node) by [horiuchi](https://github.com/horiuchi) * [:link:](phantomjs/phantomjs.d.ts) [PhantomJS v1.9.0 API](https://github.com/ariya/phantomjs/wiki/API-Reference) by [Jed Hunsaker](https://github.com/jedhunsaker), [Mike Keesey](https://github.com/keesey) * [:link:](phonegap/phonegap.d.ts) [PhoneGap](http://phonegap.com) by [Boris Yankov](https://github.com/borisyankov), [Dick van den Brink](https://github.com/DickvdBrink) +* [:link:](phonegap-facebook-plugin/phonegap-facebook-plugin.d.ts) [phonegap-facebook-plugin](https://github.com/Wizcorp/phonegap-facebook-plugin) by [Justin Unterreiner](https://github.com/Justin-Credible) +* [:link:](phonegap-plugin-push/phonegap-plugin-push.d.ts) [phonegap-plugin-push](https://github.com/phonegap/phonegap-plugin-push) by [Frederico Galvão](https://github.com/fredgalvao) +* [:link:](urbanairship-cordova/urbanairship-cordova.d.ts) [phonegap-ua-push](https://github.com/urbanairship/phonegap-ua-push) by [Justin Unterreiner](https://github.com/Justin-Credible) +* [:link:](photonui/photonui.d.ts) [PhotonUI](https://github.com/wanadev/PhotonUI) by [Florent Poujol](https://github.com/florentpoujol) +* [:link:](photoswipe/photoswipe.d.ts) [PhotoSwipe](http://photoswipe.com) by [Xiaohan Zhang](https://github.com/hellochar) * [:link:](physijs/physijs.d.ts) [Physijs](http://chandlerprall.github.io/Physijs) by [Satoru Kimura](https://github.com/gyohk) -* [:link:](pickadate/pickadate.d.ts) [pickadate.js](https://github.com/amsul/pickadate.js) by [Adi Dahiya](https://github.com/adidahiya) -* [:link:](pixi/pixi.d.ts) [PIXI](https://github.com/GoodBoyDigital/pixi.js) by [xperiments](http://github.com/xperiments) +* [: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:](pinkyswear/pinkyswear.d.ts) [PinkySwear](https://github.com/timjansen/PinkySwear.js) by [Chance Snow](https://github.com/chances) +* [:link:](piwik-tracker/piwik-tracker.d.ts) [PiwikTracker](https://www.npmjs.com/package/piwik-tracker) by [Guilherme Bernal](https://github.com/lbguilherme) +* [:link:](pixi-spine/pixi-spine.d.ts) [pixi-spine](https://github.com/pixijs/pixi-spine) by [martijncroezen](https://github.com/pixijs/pixi-typescript) +* [:link:](pixi.js/pixi.js.d.ts) [Pixi.js 3.0.9 dev](https://github.com/GoodBoyDigital/pixi.js) by [clark-stevenson](https://github.com/pixijs/pixi-typescript) * [:link:](platform/platform.d.ts) [Platform](https://github.com/bestiejs/platform.js) by [Jake Hickman](https://github.com/JakeH) * [:link:](playerframework/playerFramework.d.ts) [Player Framework (MMPPF)](https://playerframework.codeplex.com) by [Ricardo Sabino](https://github.com/ricardosabino) * [:link:](pleasejs/please.d.ts) [PleaseJS](http://www.checkman.io/please) by [Toshiya Nakakura](https://github.com/nakakura) +* [:link:](plottable/plottable.d.ts) [Plottable](http://plottablejs.org) by [Plottable Team](https://github.com/palantir/plottable) +* [:link:](pluralize/pluralize.d.ts) [pluralize](https://www.npmjs.com/package/pluralize) by [Syu Kato](https://github.com/ukyo) * [:link:](png-async/png-async.d.ts) [png-async](https://github.com/kanreisa/node-png-async) by [Yuki KAN](https://github.com/kanreisa) +* [:link:](pngjs2/pngjs2.d.ts) [pngjs2](https://www.npmjs.com/package/pngjs2) by [Elisée Maurer](https://sparklinlabs.com) * [:link:](podcast/podcast.d.ts) [podcast](http://github.com/maxnowack/node-podcast) by [Niklas Mollenhauer](https://github.com/nikeee) * [:link:](poly2tri/poly2tri.d.ts) [poly2tri](http://github.com/r3mi/poly2tri.js) by [Elemar Junior](https://github.com/elemarjr) -* [:link:](polymer/polymer.d.ts) [polymer](https://github.com/polymer) by [Louis Grignon](https://github.com/lgrignon) -* [:link:](polymer/polymer.core-drawer-panel.d.ts) [polymer's paper-toast](https://github.com/Polymer/core-drawer-panel) by [Louis Grignon](https://github.com/lgrignon) -* [:link:](polymer/polymer.paper-toast.d.ts) [polymer's paper-toast](https://github.com/Polymer/paper-toast) by [Louis Grignon](https://github.com/lgrignon) +* [:link:](polyline/polyline.d.ts) [Polyline](https://github.com/mapbox/polyline) by [Arseniy Maximov](https://github.com/Kern0) +* [:link:](polymer/polymer.d.ts) [polymer](https://github.com/Polymer/polymer) by [Louis Grignon](https://github.com/lgrignon), [Suguru Inatomi](https://github.com/laco0416) * [:link:](popcorn/popcorn.d.ts) [Popcorn](https://github.com/mozilla/popcorn-js) by [grapswiz](https://github.com/grapswiz) +* [:link:](postal/postal.d.ts) [Postal](https://github.com/postaljs/postal.js) by [Lokesh Peta](https://github.com/lokeshpeta), [Paul Jolly](https://github.com/myitcv) * [:link:](pouchDB/pouch.d.ts) [Pouch](http://pouchdb.com) by [Bill Sears](https://github.com/MrBigDog2U) * [:link:](power-assert/power-assert.d.ts) [power-assert](https://github.com/twada/power-assert) by [vvakame](https://github.com/vvakame) * [:link:](power-assert-formatter/power-assert-formatter.d.ts) [power-assert-formatter](https://github.com/twada/power-assert-formatter) by [vvakame](https://github.com/vvakame) * [:link:](precise/precise.d.ts) [precise](https://www.npmjs.org/package/precise) by [Peter Harris](https://github.com/codeanimal) +* [:link:](precond/precond.d.ts) [precond](https://github.com/MathieuTurcotte/node-precond) by [Oliver Schneider](https://github.com/olsio) * [:link:](preloadjs/preloadjs.d.ts) [PreloadJS](http://www.createjs.com/#!/PreloadJS) by [Pedro Ferreira](https://bitbucket.org/drk4) * [:link:](prelude-ls/prelude-ls.d.ts) [prelude.ls](http://www.preludels.com) by [Aya Morisawa](https://github.com/AyaMorisawa) * [:link:](progressjs/progress.d.ts) [ProgressJs](http://usablica.github.io/progress.js) by [Shunsuke Ohtani](https://github.com/zaneli) +* [:link:](project-oxford/project-oxford.d.ts) [project-oxford](https://github.com/felixrieseberg/project-oxford) by [Scott Southwood](https://github.com/scsouthw) * [:link:](promise-pool/promise-pool.d.ts) [promise-pool](https://github.com/vilic/promise-pool) by [VILIC VANE](https://github.com/vilic) * [: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:](pusher-js/pusher-js.d.ts) [pusher-js](https://github.com/pusher/pusher-js) by [Qubo](https://github.com/tkqubo) * [: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:](qs/qs.d.ts) [qs](https://github.com/hapijs/qs) by [Roman Korneev](https://github.com/RWander) +* [:link:](qtip2/qtip2.d.ts) [qtip2](http://qtip2.com) by [Nathan Pitman](https://github.com/Seltzer) +* [:link:](quixote/quixote.d.ts) [quixote](http://quixote-css.com) by [Aleksandr Filatov](https://github.com/greybax) * [:link:](qunit/qunit.d.ts) [QUnit](http://qunitjs.com) by [Diullei Gomes](https://github.com/diullei) +* [:link:](qwest/qwest.d.ts) [qwest](https://github.com/pyrsmk/qwest) by [Lindsay Evans](https://github.com/lindsayevans) * [:link:](rabbit.js/rabbit.js.d.ts) [rabbit.js](https://github.com/squaremo/rabbit.js) by [Wonshik Kim](https://github.com/wokim) -* [:link:](ractive/ractive.d.ts) [Ractive 0.7.0 edge f22ab8ad0a640591b1c263f57e21d1565cb26bf5](http://ractivejs.org) by [Han Lin Yap](http://yap.nu) +* [:link:](ractive/ractive.d.ts) [Ractive](http://ractivejs.org) by [Han Lin Yap](http://yap.nu) +* [:link:](random-string/random-string.d.ts) [random-string](https://github.com/valiton/node-random-string) by [Sam Saint-Pettersen](https://github.com/stpettersens) +* [:link:](rangy/rangy.d.ts) [Rangy](https://github.com/timdown/rangy) by [Rudolph Gottesheim](http://www.midnight-design.at) * [:link:](raphael/raphael.d.ts) [Raphael](http://raphaeljs.com) by [CheCoxshall](https://github.com/CheCoxshall) * [:link:](rappid/rappid.d.ts) [Rappid](http://jointjs.com/about-rappid) by [Ewout Van Gossum](https://github.com/DenEwout) * [:link:](ravenjs/ravenjs.d.ts) [Raven.js](https://github.com/getsentry/raven-js) by [Santi Albo](https://github.com/santialbo) -* [:link:](react-router/react-router.d.ts) [React Router](https://github.com/rackt/react-router) by [Yuichi Murata](https://github.com/mrk21) -* [:link:](react/react.d.ts) [React v0.13.0 RC2 (external module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com) -* [:link:](react/react-global.d.ts) [React v0.13.0 RC2 (internal module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com) -* [:link:](react/react-addons.d.ts) [ReactWithAddons v0.13.0 RC2 (external module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com) -* [:link:](react/react-addons-global.d.ts) [ReactWithAddons v0.13.0 RC2 (internal module)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com) +* [:link:](raygun4js/raygun4js.d.ts) [raygun4js](https://github.com/MindscapeHQ/raygun4js) by [Brian Surowiec](https://github.com/xt0rted) +* [:link:](react/react.d.ts) [React](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) +* [:link:](react/react-global.d.ts) [React (namespace)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) +* [:link:](react/react-addons-create-fragment.d.ts) [React (react-addons-create-fragment)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) +* [:link:](react/react-addons-shallow-compare.d.ts) [React (react-addons-css-transition-group)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) +* [:link:](react/react-addons-css-transition-group.d.ts) [React (react-addons-css-transition-group)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) +* [:link:](react/react-addons-linked-state-mixin.d.ts) [React (react-addons-linked-state-mixin)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) +* [:link:](react/react-addons-perf.d.ts) [React (react-addons-perf)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) +* [:link:](react/react-addons-pure-render-mixin.d.ts) [React (react-addons-pure-render-mixin)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) +* [:link:](react/react-addons-test-utils.d.ts) [React (react-addons-test-utils)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) +* [:link:](react/react-addons-transition-group.d.ts) [React (react-addons-transition-group)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) +* [:link:](react/react-addons-update.d.ts) [React (react-addons-update)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) +* [:link:](react/react-dom.d.ts) [React (react-dom)](http://facebook.github.io/react) by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com) +* [:link:](react-dnd/react-dnd.d.ts) [React DnD](https://github.com/gaearon/react-dnd) by [Asana](https://asana.com) +* [:link:](react-router/react-router.d.ts) [React Router](https://github.com/rackt/react-router) by [Yuichi Murata](https://github.com/mrk21), [Václav Ostrožlík](https://github.com/vasek17) +* [:link:](react-bootstrap/react-bootstrap.d.ts) [react-bootstrap](https://github.com/react-bootstrap/react-bootstrap) by [Walker Burgin](https://github.com/walkerburgin) +* [:link:](react-day-picker/react-day-picker.d.ts) [react-day-picker](https://github.com/gpbl/react-day-picker) by [Giampaolo Bellavite](https://github.com/gpbl), [Jason Killian](https://github.com/jkillian) +* [:link:](react-dropzone/react-dropzone.d.ts) [react-dropzone](https://github.com/paramaggarwal/react-dropzone) by [Mathieu Larouche Dube](https://github.com/matdube) +* [:link:](react-input-calendar/react-input-calendar.d.ts) [react-input-calendar](https://github.com/Rudeg/react-input-calendar) by [Stepan Mikhaylyuk](https://github.com/stepancar) +* [:link:](react-intl/react-intl.d.ts) [react-intl](http://formatjs.io/react) by [Bruno Grieder](https://github.com/bgrieder), [Christian Droulers](https://github.com/cdroulers) +* [:link:](react-mixin/react-mixin.d.ts) [react-mixin](https://github.com/brigand/react-mixin) by [Qubo](https://github.com/tkqubo) +* [:link:](react-native/react-native.d.ts) [react-native](https://github.com/facebook/react-native) by [Bruno Grieder](https://github.com/bgrieder) +* [:link:](react-props-decorators/react-props-decorators.d.ts) [react-props-decorators](https://github.com/popkirby/react-props-decorators) by [Qubo](https://github.com/tkqubo) +* [:link:](react-redux/react-redux.d.ts) [react-redux](https://github.com/rackt/react-redux) by [Qubo](https://github.com/tkqubo) +* [:link:](react-spinkit/react-spinkit.d.ts) [react-spinkit](https://github.com/KyleAMathews/react-spinkit) by [Qubo](https://github.com/tkqubo) +* [:link:](react-swf/react-swf.d.ts) [react-swf](https://github.com/syranide/react-swf) by [Stepan Mikhaylyuk](https://github.com/stepancar) +* [:link:](read/read.d.ts) [read](https://github.com/isaacs/read) by [Tim JK](https://github.com/timjk) * [:link:](readdir-stream/readdir-stream.d.ts) [readdir-stream](https://github.com/logicalparadox/readdir-stream) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](redis/redis.d.ts) [redis](https://github.com/mranney/node_redis) by [Carlos Ballesteros Velasco](https://github.com/soywiz), [Peter Harris](https://github.com/CodeAnimal) +* [:link:](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), [TANAKA Koichi](https://github.com/MugeSo) +* [:link:](redlock/redlock.d.ts) [Redlock](https://github.com/mike-marcacci/node-redlock) by [Ilya Mochalov](https://github.com/chrootsu) +* [:link:](redux/redux.d.ts) [Redux](https://github.com/rackt/redux) by [William Buchwalter](https://github.com/wbuchwalter), [Vincent Prouillet](https://github.com/Keats) +* [:link:](redux-action-utils/redux-action-utils.d.ts) [redux-action-utils](https://github.com/insin/redux-action-utils) by [Qubo](https://github.com/tkqubo) +* [:link:](redux-actions/redux-actions.d.ts) [redux-actions](https://github.com/acdlite/redux-actions) by [Jack Hsu](https://github.com/jaysoo) +* [:link:](redux-devtools/redux-devtools.d.ts) [redux-devtools](https://github.com/gaearon/redux-devtools) by [Qubo](https://github.com/tkqubo) +* [:link:](redux-logger/redux-logger.d.ts) [redux-logger](https://github.com/fcomb/redux-logger) by [Alexander Rusakov](https://github.com/arusakov) +* [:link:](redux-thunk/redux-thunk.d.ts) [redux-thunk](https://github.com/gaearon/redux-thunk) by [Qubo](https://github.com/tkqubo) * [:link:](ref/ref.d.ts) [ref](https://github.com/TooTallNate/ref) by [Paul Loyd](https://github.com/loyd) * [:link:](ref-array/ref-array.d.ts) [ref-array](https://github.com/TooTallNate/ref-array) by [Paul Loyd](https://github.com/loyd) * [:link:](ref-struct/ref-struct.d.ts) [ref-struct](https://github.com/TooTallNate/ref-struct) by [Paul Loyd](https://github.com/loyd) * [:link:](ref-union/ref-union.d.ts) [ref-union](https://github.com/TooTallNate/ref-union) by [Paul Loyd](https://github.com/loyd) -* [:link:](request/request.d.ts) [request](https://github.com/mikeal/request) by [Carlos Ballesteros Velasco](https://github.com/soywiz), [bonnici](https://github.com/bonnici), [Bart van der Schoor](https://github.com/Bartvds) +* [:link:](reflux/reflux.d.ts) [RefluxJS](https://github.com/reflux/refluxjs) by [Maurice de Beijer](https://github.com/mauricedb) +* [:link:](request/request.d.ts) [request](https://github.com/mikeal/request) by [Carlos Ballesteros Velasco](https://github.com/soywiz), [bonnici](https://github.com/bonnici), [Bart van der Schoor](https://github.com/Bartvds), [Joe Skeen](http://github.com/joeskeen) +* [:link:](request-ip/request-ip.d.ts) [request-ip](https://github.com/pbojinov/request-ip) by [Adam Babcock](https://github.com/mrhen) +* [:link:](request-promise/request-promise.d.ts) [request-promise](https://www.npmjs.com/package/request-promise) by [Christopher Glantschnig](https://github.com/cglantschnig), [Joe Skeen](http://github.com/joeskeen) * [:link:](requirejs/require.d.ts) [RequireJS](http://requirejs.org) by [Josh Baldwin](https://github.com/jbaldwin) +* [:link:](resemblejs/resemblejs.d.ts) [Resemble.js](http://huddle.github.io/Resemble.js) by [Tim Perry](https://github.com/pimterry) +* [:link:](response-time/response-time.d.ts) [response-time](https://github.com/expressjs/response-time) by [Uros Smolnik](https://github.com/urossmolnik) +* [:link:](rest-io/rest-io.d.ts) [rest-io](https://github.com/EnoF/rest-io) by [Andy Tang](https://github.com/EnoF), [Stefan Schacherl](https://github.com/TheBay0r) * [:link:](rest/rest.d.ts) [rest.js](https://github.com/cujojs/rest) by [Wim Looman](https://github.com/Nemo157) * [:link:](restangular/restangular.d.ts) [Restangular](https://github.com/mgonto/restangular) by [Boris Yankov](https://github.com/borisyankov) +* [:link:](restful.js/restful.js.d.ts) [restful.js](https://github.com/marmelab/restful.js) by [Qubo](https://github.com/tkqubo) * [:link:](rethinkdb/rethinkdb.d.ts) [Rethinkdb](http://rethinkdb.com) by [Sean Hess](https://seanhess.github.io) * [:link:](reveal/reveal.d.ts) [Reveal](https://github.com/hakimel/reveal.js) by [grapswiz](https://github.com/grapswiz) * [: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:](riot-games-api/riot-games-api.d.ts) [Riot Games API](https://developer.riotgames.com) by [Xavier Stouder](https://github.com/xstoudi) * [:link:](riotjs/riotjs.d.ts) [riot.js](https://github.com/moot/riotjs) by [vvakame](https://github.com/vvakame) +* [:link:](riotcontrol/riotcontrol.d.ts) [RiotControl](https://github.com/jimsparkman/RiotControl) by [Ilya Mochalov](https://github.com/chrootsu) +* [:link:](rivets/rivets.d.ts) [rivets](http://rivetsjs.com) by [Trevor Baron](https://github.com/TrevorDev) +* [:link:](rosie/rosie.d.ts) [rosie](https://github.com/rosiejs/rosie) by [Abner Oliveira](https://github.com/abner) +* [:link:](roslib/roslib.d.ts) [roslib.js](http://wiki.ros.org/roslibjs) by [Stefan Profanter](https://github.com/Pro) +* [:link:](route-recognizer/route-recognizer.d.ts) [route-recognizer](https://github.com/tildeio/route-recognizer) by [Dave Keen](http://www.keendevelopment.ch) * [:link:](routie/routie.d.ts) [routie](https://github.com/jgallen23/routie) by [Adilson](https://github.com/Adilson) +* [:link:](rsmq/rsmq.d.ts) [rsmq](http://smrchy.github.io/rsmq) by [Qubo](https://github.com/MugeSo) +* [:link:](rsmq-worker/rsmq-worker.d.ts) [rsmq-worker](http://smrchy.github.io/rsmq/rsmq-worker) by [TANAKA Koichi](https://github.com/MugeSo) * [:link:](rtree/rtree.d.ts) [rtree](https://github.com/leaflet-extras/RTree) by [Omede Firouz](https://github.com/oefirouz) * [:link:](run-sequence/run-sequence.d.ts) [run-sequence](https://github.com/OverZealous/run-sequence) by [Keita Kagurazaka](https://github.com/k-kagurazaka) * [:link:](rx/rx.d.ts) [RxJS](http://rx.codeplex.com) by [gsino](http://www.codeplex.com/site/users/view/gsino), [Igor Oleinikov](https://github.com/Igorbek) @@ -685,19 +1202,35 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam * [:link:](rx/rx.testing.d.ts) [RxJS-Testing](https://github.com/Reactive-Extensions/RxJS) by [Igor Oleinikov](https://github.com/Igorbek) * [:link:](rx/rx.time.d.ts) [RxJS-Time](http://rx.codeplex.com) by [Carl de Billy](http://carl.debilly.net), [Igor Oleinikov](https://github.com/Igorbek) * [:link:](rx/rx.virtualtime.d.ts) [RxJS-VirtualTime](http://rx.codeplex.com) by [gsino](http://www.codeplex.com/site/users/view/gsino), [Igor Oleinikov](https://github.com/Igorbek) +* [:link:](s3-uploader/s3-uploader.d.ts) [s3-uploader](https://www.npmjs.com/package/s3-uploader) by [COLSA Corporation](http://www.colsa.com) * [:link:](sammyjs/sammyjs.d.ts) [Sammy.js](http://sammyjs.org) by [Boris Yankov](https://github.com/borisyankov), [Oisin Grehan](https://github.com/oising) * [:link:](sanitize-filename/sanitize-filename.d.ts) [sanitize-filename](https://github.com/parshap/node-sanitize-filename) by [Wim Looman](https://github.com/Nemo157) * [:link:](sanitize-html/sanitize-html.d.ts) [sanitize-html](https://github.com/punkave/sanitize-html) by [Rogier Schouten](https://github.com/rogierschouten) +* [:link:](sanitizer/sanitizer.d.ts) [Sanitizer](https://github.com/theSmaw/Caja-HTML-Sanitizer) by [Dave Taylor](http://davetayls.me) +* [:link:](satnav/satnav.d.ts) [satnav](https://github.com/f5io/satnav-js) by [Christian Holm Diget](https://github.com/DotNetNerd) * [:link:](sax/sax.d.ts) [sax js](https://github.com/isaacs/sax-js) by [Asana](https://asana.com) +* [:link:](scalike/scalike.d.ts) [scalike API](https://github.com/ryoppy/scalike-typescript) by [ryoppy](https://github.com/ryoppy) * [:link:](screenfull/screenfull.d.ts) [screenfull.js](https://github.com/sindresorhus/screenfull.js) by [Ilia Choly](http://github.com/icholy) +* [:link:](scrolltofixed/scrolltofixed.d.ts) [ScrollToFixed](https://github.com/bigspotteddog/ScrollToFixed) by [Ben Dixon](https://github.com/bmdixon) +* [:link:](seedrandom/seedrandom.d.ts) [seedrandom](https://github.com/davidbau/seedrandom) by [Kern Handa](https://github.com/kernhanda) +* [:link:](segment-analytics/segment-analytics.d.ts) [Segment's analytics.js](https://segment.com/docs/libraries/analytics.js) by [Andrew Fong](https://github.com/fongandrew) +* [:link:](analytics-node/analytics-node.d.ts) [Segment's analytics.js for Node.js](https://segment.com/docs/libraries/node) by [Andrew Fong](https://github.com/fongandrew) * [: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:](selenium-webdriver/selenium-webdriver.d.ts) [Selenium WebDriverJS](https://code.google.com/p/selenium) by [Bill Armstrong](https://github.com/BillArmstrong), [Yuki Kokubun](https://github.com/Kuniwak) +* [:link:](semaphore/semaphore.d.ts) [semaphore](https://github.com/abrkn/semaphore.js) by [Matt Frantz](https://github.com/mhfrantz) * [: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:](sentence-case/sentence-case.d.ts) [sentence-case](https://github.com/blakeembrey/sentence-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) +* [:link:](sequelize/sequelize.d.ts) [Sequelize](http://sequelizejs.com) by [samuelneff](https://github.com/samuelneff), [Peter Harris](https://github.com/codeanimal), [Ivan Drinchev](https://github.com/drinchev) +* [:link:](sequelize-fixtures/sequelize-fixtures.d.ts) [Sequelize-Fixtures](https://github.com/domasx2/sequelize-fixtures) by [Christian Schwarz](https://github.com/cschwarz) +* [: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:](sharepoint/SharePoint.d.ts) [SharePoint 2010 and 2013](https://github.com/gandjustas/sptypescript) by [Stanislav Vyshchepan](http://blog.gandjustas.ru), [Andrey Markeev](http://markeev.com) * [:link:](shelljs/shelljs.d.ts) [ShellJS](http://shelljs.org) by [Niklas Mollenhauer](https://github.com/nikeee) +* [:link:](shortid/shortid.d.ts) [shortid](https://github.com/dylang/shortid) by [Sam Saint-Pettersen](https://github.com/stpettersens) * [:link:](should-promised/should-promised.d.ts) [should-promised](https://github.com/shouldjs/promised) by [Yaroslav Admin](https://github.com/devoto13) * [:link:](should/should.d.ts) [should.js](https://github.com/visionmedia/should.js) by [Alex Varju](https://github.com/varju), [Maxime LUCE](https://github.com/SomaticIT) * [:link:](showdown/showdown.d.ts) [Showdown](https://github.com/coreyti/showdown) by [cbowdon](https://github.com/cbowdon) @@ -706,20 +1239,30 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam * [:link:](signalr/signalr.d.ts) [SignalR](http://www.asp.net/signalr) by [Boris Yankov](https://github.com/borisyankov), [T. Michael Keesey](https://github.com/keesey) * [:link:](signature_pad/signature_pad.d.ts) [signature_pad](https://github.com/szimek/signature_pad) by [Abubaker Bashir](https://github.com/AbubakerB) * [: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:](simplebar/simplebar.d.ts) [simplebar.js](https://github.com/Grsmto/simplebar) by [Gregor Woiwode](https://github.com/gregonnet) * [:link:](jquery.simplemodal/jquery.simplemodal.d.ts) [SimpleModal](http://www.ericmmartin.com/projects/simplemodal) by [Friedrich von Never](https://github.com/ForNeVeR) +* [:link:](simplestorage.js/simplestorage.js.d.ts) [simpleStorage](https://github.com/andris9/simpleStorage) by [Áxel Costas Pena](https://github.com/axelcostaspena) * [: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:](sinon-chrome/sinon-chrome.d.ts) [Sinon-Chrome](https://github.com/vitalets/sinon-chrome) by [Tim Perry](https://github.com/pimterry) * [:link:](sipml/sipml.d.ts) [SIPml5](http://sipml5.org) by [A. Groenenboom](https://github.com/chookies) * [:link:](sjcl/sjcl.d.ts) [sjcl](http://crypto.stanford.edu/sjcl) by [Eugene Chernyshov](https://github.com/Evgenus) +* [:link:](ski/ski.d.ts) [ski](https://github.com/jden/ski) by [Aya Morisawa](https://github.com/AyaMorisawa) +* [:link:](skyway/skyway.d.ts) [SkyWay](http://nttcom.github.io/skyway) by [Toshiya Nakakura](https://github.com/nakakura) * [:link:](slickgrid/SlickGrid.d.ts) [SlickGrid](https://github.com/mleibman/SlickGrid) by [Josh Baldwin](https://github.com/jbaldwin) +* [:link:](slickgrid/slick.autotooltips.d.ts) [SlickGrid AutoToolTips Plugin](https://github.com/mleibman/SlickGrid) by [Ryo Iwamoto](https://github.com/ryiwamoto) * [:link:](slickgrid/slick.headerbuttons.d.ts) [SlickGrid HeaderButtons Plugin](https://github.com/mleibman/SlickGrid) by [Derek Cicerone](https://github.com/derekcicerone) * [:link:](slickgrid/slick.rowselectionmodel.d.ts) [SlickGrid RowSelectionModel Plugin](https://github.com/mleibman/SlickGrid) by [Derek Cicerone](https://github.com/derekcicerone) * [:link:](smoothie/smoothie.d.ts) [Smoothie Charts](https://github.com/joewalnes/smoothie) by [Drew Noakes](https://drewnoakes.com), [Mike H. Hawley](https://github.com/mikehhawley) -* [:link:](snapsvg/snapsvg.d.ts) [Snap-SVG](https://github.com/adobe-webplatform/Snap.svg) by [Lars Klein](https://github.com/lhk) -* [:link:](socket.io/socket.io.d.ts) [socket.io](http://socket.io) by [PROGRE](https://github.com/progre) -* [:link:](socket.io-client/socket.io-client.d.ts) [socket.io-client](http://socket.io) by [PROGRE](https://github.com/progre) +* [:link:](snake-case/snake-case.d.ts) [snake-case](https://github.com/blakeembrey/snake-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) +* [:link:](snapsvg/snapsvg.d.ts) [Snap-SVG](https://github.com/adobe-webplatform/Snap.svg) by [Lars Klein](https://github.com/lhk), [Mattanja Kern](https://github.com/mattanja) +* [:link:](socket.io/socket.io.d.ts) [socket.io](http://socket.io) by [PROGRE](https://github.com/progre), [Damian Connolly](https://github.com/divillysausages) +* [:link:](socket.io-client/socket.io-client.d.ts) [socket.io-client](http://socket.io) by [PROGRE](https://github.com/progre), [Damian Connolly](https://github.com/divillysausages) +* [:link:](socket.io.users/socket.io.users.d.ts) [socket.io.users](https://github.com/nodets/socket.io.users) by [Makis Maropoulos](https://github.com/kataras) * [:link:](sockjs/sockjs.d.ts) [SockJS 0.3.x](https://github.com/sockjs/sockjs-client) by [Emil Ivanov](https://github.com/vladev) +* [:link:](sockjs-client/sockjs-client.d.ts) [sockjs-client](https://github.com/sockjs/sockjs-client) by [Emil Ivanov](https://github.com/vladev), [Alexander Rusakov](https://github.com/arusakov) * [:link:](sockjs-node/sockjs-node.d.ts) [sockjs-node 0.3.x](https://github.com/sockjs/sockjs-node) by [Phil McCloghry-Laing](https://github.com/pmccloghrylaing) +* [:link:](sortablejs/sortablejs.d.ts) [Sortable.js](https://github.com/RubaXa/Sortable) by [Maw-Fox](http://github.com/Maw-Fox) * [:link:](soundjs/soundjs.d.ts) [SoundJS](http://www.createjs.com/#!/SoundJS) by [Pedro Ferreira](https://bitbucket.org/drk4) * [:link:](source-map/source-map.d.ts) [source-map](https://github.com/mozilla/source-map) by [Morten Houston Ludvigsen](https://github.com/MortenHoustonLudvigsen) * [:link:](source-map-support/source-map-support.d.ts) [source-map-support](https://github.com/evanw/source-map-support) by [Bart van der Schoor](https://github.com/Bartvds) @@ -727,43 +1270,76 @@ 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:](stampit/stampit.d.ts) [stampit](https://github.com/ericelliott/stampit) by [Vasyl Boroviak](https://github.com/koresar) +* [:link:](squirejs/squirejs.d.ts) [Squire](https://github.com/iammerrick/Squire.js) by [Bradley Ayers](https://github.com/bradleyayers) +* [:link:](ssh2/ssh2.d.ts) [ssh2](https://github.com/mscdex/ssh2) by [Qubo](https://github.com/tkQubo) +* [: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/stampit-org/stampit) by [Vasyl Boroviak](https://github.com/koresar) +* [:link:](stamplay-js-sdk/stamplay-js-sdk.d.ts) [stamplay-js-sdk](https://github.com/Stamplay/stamplay-js-sdk) by [Riderman de Sousa Barbosa](https://github.com/ridermansb) +* [:link:](static-eval/static-eval.d.ts) [static-eval](https://github.com/substack/static-eval) by [Ben Liddicott](https://github.com/benliddicott/DefinitelyTyped) * [: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:](statuses/statuses.d.ts) [statuses](https://github.com/jshttp/statuses) by [Tanguy Krotoff](https://github.com/tkrotoff) +* [:link:](steam/steam.d.ts) [steam](https://github.com/seishun/node-steam) by [Andrey Kurdyumov](https://github.com/kant2002) * [:link:](storejs/storejs.d.ts) [store.js](https://github.com/marcuswestin/store.js) by [Vincent Bortone](https://github.com/vbortone) * [:link:](stream-series/stream-series.d.ts) [stream-series](https://github.com/rschmukler/stream-series) by [Keita Kagurazaka](https://github.com/k-kagurazaka) * [:link:](stream-to-array/stream-to-array.d.ts) [stream-to-array](https://github.com/stream-utils/stream-to-array) by [Bart van der Schoor](https://github.com/Bartvds) -* [:link:](stripe/stripe.d.ts) [stripe](https://stripe.com) by [Eric J. Smith](https://github.com/ejsmith) +* [:link:](streamjs/streamjs.d.ts) [streamjs](http://winterbe.github.io/streamjs) by [Bence Eros](https://github.com/erosb) +* [:link:](string_score/string_score.d.ts) [string_score](https://github.com/joshaven/string_score) by [Marcin Porębski](https://github.com/marcinporebski) +* [:link:](string/string.d.ts) [string.js](http://stringjs.com) by [Bas Pennings](https://github.com/basp) +* [:link:](stripe/stripe.d.ts) [stripe](https://stripe.com) by [Andy Hawkins](https://github.com/a904guy/,http://a904guy.com), [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) * [:link:](supertest/supertest.d.ts) [SuperTest](https://github.com/visionmedia/supertest) by [Alex Varju](https://github.com/varju) +* [:link:](svg-injector/svg-injector.d.ts) [SVG Injector](https://github.com/iconic/SVGInjector) by [Patrick Westerhoff](https://github.com/poke) * [:link:](svg-pan-zoom/svg-pan-zoom.d.ts) [svg-pan-zoom](https://github.com/ariutta/svg-pan-zoom) by [Chintan Shah](https://github.com/Promact) +* [:link:](svg-sprite/svg-sprite.d.ts) [svg-sprite](https://github.com/jkphl/svg-sprite) by [Qubo](https://github.com/tkqubo) * [:link:](svgjs/svgjs.d.ts) [svg.js](http://www.svgjs.com) by [Sean Hess](https://seanhess.github.io) * [: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:](swaggerize-express/swaggerize-express.d.ts) [swaggerize-express 4.x](https://github.com/krakenjs/swaggerize-express) by [TANAKA Koichi](https://github.com/mugeso) +* [:link:](swap-case/swap-case.d.ts) [swap-case](https://github.com/blakeembrey/swap-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) +* [:link:](sweetalert/sweetalert.d.ts) [SweetAlert](https://github.com/t4t5/sweetalert) by [Markus Peloso](https://github.com/ToastHawaii) * [:link:](swfobject/swfobject.d.ts) [swfobject](https://code.google.com/p/swfobject) by [rou](https://github.com/rou) * [:link:](swig/swig.d.ts) [swig](http://github.com/paularmstrong/swig) by [Peter Harris](https://github.com/CodeAnimal), [Carlos Ballesteros Velasco](https://github.com/soywiz) +* [:link:](swig-email-templates/swig-email-templates.d.ts) [swig-email-templates](https://github.com/andrewrk/swig-email-templates) by [Adam Babcock](https://github.com/mrhen) +* [:link:](swipe/swipe.d.ts) [Swipe](https://github.com/thebird/Swipe) by [Andrey Kurdyumov](https://github.com/kant2002) * [:link:](swiper/swiper.d.ts) [Swiper](https://github.com/nolimits4web/Swiper) by [Sebastián Galiano](https://github.com/sgaliano) * [:link:](swipeview/swipeview.d.ts) [SwipeView](http://cubiq.org/swipeview) by [Boris Yankov](https://github.com/borisyankov) +* [:link:](switchery/switchery.d.ts) [switchery](https://github.com/abpetkov/switchery) by [Bruno Grieder](https://github.com/bgrieder), [Clayton Lautier](https://github.com/claylaut) * [:link:](swiz/swiz.d.ts) [swiz](https://github.com/racker/node-swiz) by [Jeff Goddard](https://github.com/jedigo) +* [:link:](systemjs/systemjs.d.ts) [System.js](https://github.com/systemjs/systemjs) by [Ludovic HENIN](https://github.com/ludohenin), [Nathan Walker](https://github.com/NathanWalker) +* [:link:](tabris/tabris.d.ts) [Tabris.js](http://tabrisjs.com) by [Tabris.js team](http://github.com/eclipsesource/tabris) +* [:link:](tabtab/tabtab.d.ts) [tabtab](https://github.com/mklabs/node-tabtab) by [Vojtěch Habarta](https://github.com/vojtechhabarta) * [:link:](tape/tape.d.ts) [tape](https://github.com/substack/tape) by [Bart van der Schoor](https://github.com/Bartvds) * [:link:](tar/tar.d.ts) [tar](https://github.com/npm/node-tar) by [Maxime LUCE](https://github.com/SomaticIT) -* [:link:](tcomb/tcomb.d.ts) [tcomb](http://gcanti.github.io/tcomb/guide/index.html) by [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:](tea-merge/tea-merge.d.ts) [tea-merge](https://github.com/qualiancy/tea-merge) by [Mihhail Lapushkin](https://github.com/mihhail-lapushkin) * [:link:](tedious/tedious.d.ts) [tedious](https://pekim.github.io/tedious) by [Rogier Schouten](https://github.com/rogierschouten) * [:link:](tedious-connection-pool/tedious-connection-pool.d.ts) [tedious-connection-pool](https://github.com/pekim/tedious-connection-pool) by [Cyprien Autexier](https://github.com/sandorfr) * [:link:](teechart/teechart.d.ts) [TeeChart](http://www.steema.com) by [Steema Software](https://steema.com) +* [:link:](temp-fs/temp-fs.d.ts) [temp-fs](https://github.com/jakwings/node-temp-fs) by [MEDIA CHECK s.r.o.](http://www.mediacheck.cz) * [:link:](tether/tether.d.ts) [Tether](http://github.hubspot.com/tether) by [Adi Dahiya](https://github.com/adidahiya) +* [:link:](tether-shepherd/tether-shepherd.d.ts) [Tether-Shepherd](http://github.hubspot.com/shepherd) by [Matt Gibbs](https://github.com/mtgibbs) * [:link:](text-buffer/text-buffer.d.ts) [text-buffer](https://github.com/atom/text-buffer) by [vvakame](https://github.com/vvakame) * [:link:](text-encoding/text-encoding.d.ts) [text-encoding](https://github.com/inexorabletash/text-encoding) by [MIZUNE Pine](https://github.com/pine613) +* [:link:](github-electron/github-electron-main.d.ts) [the Electron 0.25.2 main process](http://electron.atom.io) by [jedmao](https://github.com/jedmao) +* [: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-FirstPersonControls.d.ts) [three.js](http://mrdoob.github.com/three.js) by [Poul Kjeldager Sørensen](https://github.com/s093294) * [: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) * [:link:](threejs/detector.d.ts) [three.js (Detector.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/Detector.js) by [Satoru Kimura](https://github.com/gyohk) +* [:link:](threejs/three-editorcontrols.d.ts) [three.js (EditorControls.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/controls/EditorControls.js) by [Qinsi ZHU](https://github.com/qszhusightp) * [:link:](threejs/three-effectcomposer.d.ts) [three.js (EffectComposer.js)](https://github.com/mrdoob/three.js/blob/r68/examples/js/postprocessing/EffectComposer.js) by [Satoru Kimura](https://github.com/gyohk) * [:link:](threejs/three-maskpass.d.ts) [three.js (MaskPass.js)](https://github.com/mrdoob/three.js/blob/r68/examples/js/postprocessing/MaskPass.js) by [Satoru Kimura](https://github.com/gyohk) * [:link:](threejs/three-orbitcontrols.d.ts) [three.js (OrbitControls.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/controls/OrbitControls.js) by [Satoru Kimura](https://github.com/gyohk) @@ -771,63 +1347,111 @@ 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-transformcontrols.d.ts) [three.js (TransformControls.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/controls/TransformControls.js) by [Stefan Profanter](https://github.com/Pro) +* [:link:](threejs/three-vrcontrols.d.ts) [three.js (VRControls.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/controls/VRControls.js) by [Toshiya Nakakura](https://github.com/nakakura) +* [:link:](threejs/three-vreffect.d.ts) [three.js (VREffect.js)](https://github.com/mrdoob/three.js/blob/master/examples/js/effects/VREffect.js) by [Toshiya Nakakura](https://github.com/nakakura) +* [:link:](threejs/three.d.ts) [three.js r73](http://mrdoob.github.com/three.js) by [Kon](http://phyzkit.net), [Satoru Kimura](https://github.com/gyohk) +* [:link:](thrift/thrift.d.ts) [thrift](https://www.npmjs.com/package/thrift) by [Zachary Collins](https://github.com/corps) * [:link:](through/through.d.ts) [through](https://github.com/dominictarr/through) by [Andrew Gaspar](https://github.com/AndrewGaspar) * [:link:](through2/through2.d.ts) [through2 v](https://github.com/rvagg/through2) by [Bart van der Schoor](https://github.com/Bartvds), [jedmao](https://github.com/jedmao) * [:link:](timelinejs/timelinejs.d.ts) [timelinejs](https://github.com/NUKnightLab/TimelineJS) by [Roland Zwaga](https://github.com/rolandzwaga) * [:link:](timezone-js/timezone-js.d.ts) [timezone-js](https://github.com/mde/timezone-js) by [bonnici](https://github.com/bonnici) * [:link:](timezonecomplete/timezonecomplete.d.ts) [timezonecomplete](https://github.com/SpiritIT/timezonecomplete) by [Rogier Schouten](https://github.com/rogierschouten) -* [:link:](tv4/tv4.d.ts) [Tiny Validator tv4](https://github.com/geraintluff/tv4) by [Bart van der Schoor](https://github.com/Bartvds) +* [:link:](tv4/tv4.d.ts) [Tiny Validator tv4](https://github.com/geraintluff/tv4) by [Bart van der Schoor](https://github.com/Bartvds), [Peter Snider](https://github.com/psnider) * [:link:](tinycolor/tinycolor.d.ts) [tinycolor](https://github.com/bgrins/TinyColor) by [Mordechai Zuber](https://github.com/M-Zuber) -* [:link:](titanium/titanium.d.ts) [Titanium Movile 3.1.3.GA](http://www.appcelerator.com) by [Airam Rguez](https://github.com/airamrguez) +* [:link:](titanium/titanium.d.ts) [Titanium Mobile](http://www.appcelerator.com) by [Craig Younkins](https://github.com/cyounkins) +* [:link:](title-case/title-case.d.ts) [title-case](https://github.com/blakeembrey/title-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) * [:link:](tmp/tmp.d.ts) [tmp](https://www.npmjs.com/package/tmp) by [Jared Klopper](https://github.com/optical) +* [:link:](to-title-case-gouch/to-title-case-gouch.d.ts) [to-title-case](https://github.com/gouch/to-title-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) * [:link:](toastr/toastr.d.ts) [Toastr](https://github.com/CodeSeven/toastr) by [Boris Yankov](https://github.com/borisyankov) +* [:link:](tooltipster/tooltipster.d.ts) [tooltipster](https://github.com/iamceege/tooltipster) by [Stephen Lautier](https://github.com/stephenlautier) * [:link:](sencha_touch/SenchaTouch.d.ts) [Touch](http://www.sencha.com/products/touch) by [Brian Kotek](https://github.com/brian428) * [:link:](traceback/traceback.d.ts) [Traceback](http://github.com/iriscouch/traceback) by [Michael Zabka](https://github.com/misak113) +* [:link:](traverson/traverson.d.ts) [Traverson](https://github.com/basti1302/traverson) by [Marcin Porębski](https://github.com/marcinporebski) * [:link:](trunk8/trunk8.d.ts) [trunk8](https://github.com/rviscomi/trunk8) by [Blake Niemyjski](https://github.com/niemyjski) +* [:link:](tsmonad/tsmonad.d.ts) [TsMonad](https://github.com/cbowdon/TsMonad) by [Chris Bowdon](https://github.com/cbowdon) * [:link:](tspromise/tspromise.d.ts) [tspromise](https://github.com/soywiz/tspromise) by [Carlos Ballesteros Velasco](https://github.com/soywiz) * [: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:](webfontloader/webfontloader.d.ts) [typekit-webfontloader](https://github.com/typekit/webfontloader) by [doskallemaskin](https://github.com/doskallemaskin) +* [:link:](typescript-services/typescriptServices.d.ts) [TypeScript API](http://www.typescriptlang.org) by [Microsoft TypeScript](http://typescriptlang.org) * [:link:](typescript/typescript.d.ts) [TypeScript API](http://www.typescriptlang.org) by [Microsoft TypeScript](http://typescriptlang.org) -* [:link:](typescript-services/typescriptServices.d.ts) [TypeScript-Services](https://www.npmjs.org/package/typescript-services) by [Basarat Ali Syed](http://github.com/basarat) -* [:link:](unity-webapi/unity-webapi.d.ts) [Ubuntu Unity Web API](https://launchpad.net/libunity-webapps) by [John Vrbanac](jhttps://github.com/jmvrbanac) +* [:link:](typescript-deferred/typescript-deferred.d.ts) [typescript-deferred](https://github.com/DirtyHairy/typescript-deferred) by [Christian Speckner](https://github.com/DirtyHairy) +* [:link:](unity-webapi/unity-webapi.d.ts) [Ubuntu Unity Web API](https://launchpad.net/libunity-webapps) by [John Vrbanac](https://github.com/jmvrbanac) +* [:link:](ui-grid/ui-grid.d.ts) [ui-grid](http://www.ui-grid.info) by [Ben Tesser](https://github.com/btesser), [Joe Skeen](http://github.com/joeskeen) +* [:link:](ui-router-extras/ui-router-extras.d.ts) [UI-Router Extras (ct.ui.router.extras module)](https://github.com/christopherthielen/ui-router-extras) by [Michael Putters](https://github.com/mputters), [Marcel van de Kamp](https://github.com/marcel-k) +* [:link:](uikit/uikit.d.ts) [uikit](http://getuikit.org) by [Giovanni Silva](https://github.com/giovannicandido) +* [:link:](umbraco/umbraco.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland) +* [:link:](umbraco/umbraco-resources.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland) +* [:link:](umbraco/umbraco-services.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland) * [:link:](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:](undertaker/undertaker.d.ts) [undertaker](https://github.com/phated/undertaker) by [Qubo](https://github.com/tkqubo) +* [: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:](unique-random/unique-random.d.ts) [unique-random](https://github.com/sindresorhus/unique-random) by [Yuki Kokubun](https://github.com/Kuniwak) * [: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:](upper-case/upper-case.d.ts) [upper-case](https://github.com/blakeembrey/upper-case) by [Sam Saint-Pettersen](https://github.com/stpettersens) +* [:link:](upper-case-first/upper-case-first.d.ts) [upper-case-first](https://github.com/blakeembrey/upper-case-first) by [Sam Saint-Pettersen](https://github.com/stpettersens) * [: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:](url-template/url-template.d.ts) [url-template](https://github.com/bramstein/url-template) by [Marcin Porębski](https://github.com/marcinporebski) * [:link:](urlrouter/urlrouter.d.ts) [urlrouter](https://github.com/fengmk2/urlrouter) by [soywiz](https://github.com/soywiz) +* [:link:](urlsafe-base64/urlsafe-base64.d.ts) [urlsafe-base64](https://github.com/RGBboy/urlsafe-base64) by [Tanguy Krotoff](https://github.com/tkrotoff) +* [:link:](usage/usage.d.ts) [usage](https://github.com/arunoda/node-usage) by [Pascal Vomhoff](https://github.com/pvomhoff) +* [:link:](utils-merge/utils-merge.d.ts) [utils-merge](https://github.com/jaredhanson/utils-merge) by [Ilya Mochalov](https://github.com/chrootsu) * [:link:](UUID/UUID.d.ts) [UUID.js core](https://github.com/LiosK/UUID.js) by [Jason Jarrett](https://github.com/staxmanade) * [:link:](valerie/valerie.d.ts) [valerie](https://github.com/davewatts/valerie) by [Howard Richards](https://github.com/conficient) * [:link:](validator/validator.d.ts) [validator.js](https://github.com/chriso/validator.js) by [tgfjt](https://github.com/tgfjt) * [:link:](vega/vega.d.ts) [Vega](http://trifacta.github.io/vega) by [Tom Crockett](http://github.com/pelotom) * [:link:](velocity-animate/velocity-animate.d.ts) [Velocity](http://velocityjs.org) by [Greg Smith](https://github.com/smrq) +* [:link:](vex-js/vex-js.d.ts) [Vex](https://github.com/HubSpot/vex) by [Greg Cohan](https://github.com/gdcohan) +* [:link:](vexflow/vexflow.d.ts) [VexFlow](http://vexflow.com) by [Roman Quiring](https://github.com/rquiring) +* [:link:](victor/victor.d.ts) [Victor.js](http://victorjs.org) by [Ivane Gegia](https://twitter.com/ivanegegia) * [:link:](videojs/videojs.d.ts) [Video.js](https://github.com/zencoder/video-js) by [Vincent Bortone](https://github.com/vbortone) * [:link:](vimeo/froogaloop.d.ts) [Vimeo](http://developer.vimeo.com/player/js-api) by [Daz Wilkin](https://github.com/DazWilkin) * [:link:](vinyl/vinyl.d.ts) [vinyl](https://github.com/wearefractal/vinyl) by [vvakame](https://github.com/vvakame), [jedmao](https://github.com/jedmao) +* [:link:](vinyl-buffer/vinyl-buffer.d.ts) [vinyl-buffer](https://github.com/hughsk/vinyl-buffer) by [Qubo](https://github.com/tkQubo) * [:link:](vinyl-fs/vinyl-fs.d.ts) [vinyl-fs](https://github.com/wearefractal/vinyl-fs) by [vvakame](https://github.com/vvakame) +* [:link:](vinyl-paths/vinyl-paths.d.ts) [vinyl-paths](https://github.com/sindresorhus/vinyl-paths) by [Qubo](https://github.com/tkQubo) * [: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:](voximplant-websdk/voximplant-websdk.d.ts) [VoxImplant Web SDK 3.0.x](http://voximplant.com) by [Alexey Aylarov](https://github.com/aylarov) +* [:link:](vso-node-api/vso-node-api.d.ts) [vso-node-api](https://github.com/Microsoft/vso-node-api) by [Teddy Ward](https://github.com/teddyward) * [:link:](vue/vue.d.ts) [vuejs](https://github.com/yyx990803/vue) by [odangosan](https://github.com/odangosan) * [:link:](watch/watch.d.ts) [watch](https://github.com/mikeal/watch) by [Carlos Ballesteros Velasco](https://github.com/soywiz) * [:link:](jquery.watermark/jquery.watermark.d.ts) [Watermark plugin for jQuery](http://jquery-watermark.googlecode.com) by [Anwar Javed](https://github.com/anwarjaved) * [:link:](webaudioapi/waa.d.ts) [Web Audio API](http://www.w3.org/TR/webaudio) by [Baruch Berger](https://github.com/bbss), [Kon](http://phyzkit.net), [kubosho](https://github.com/kubosho) -* [:link:](webaudioapi/waa-nightly.d.ts) [Web Audio API (nightly)](http://www.w3.org/TR/2012/WD-webaudio-20120802) by [Baruch Berger](https://github.com/bbss) * [:link:](webmidi/webmidi.d.ts) [Web MIDI API](http://www.w3.org/TR/webmidi) by [Toshiya Nakakura](https://github.com/nakakura) * [:link:](webspeechapi/webspeechapi.d.ts) [Web Speech API](https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html) by [SaschaNaz](https://github.com/saschanaz) -* [:link:](webcola/webcola.d.ts) [webcola](https://github.com/tgdwyer/WebCola) by [Qinfeng Chen](https://github.com/qinfchen) +* [:link:](webcl/webcl.d.ts) [WebCL](https://www.khronos.org/registry/webcl/specs/1.0.0) by [Ralph Brown](https://github.com/NCARalph) +* [:link:](webcola/webcola.d.ts) [webcola](https://github.com/tgdwyer/WebCola) by [Qinfeng Chen](https://github.com/qinfchen), [Tim Dwyer](https://github.com/tgdwyer), [Noah Chen](https://github.com/nchen63) +* [:link:](webcomponents.js/webcomponents.js.d.ts) [webcomponents.js](https://github.com/webcomponents/webcomponentsjs) by [Adi Dahiya](https://github.com/adidahiya) * [:link:](webcrypto/WebCrypto.d.ts) [WebCrypto](http://www.w3.org/TR/WebCryptoAPI) by [Lucas Dixon](https://github.com/iislucas) +* [:link:](webgl-ext/webgl-ext.d.ts) [WebGL Extensions](http://webgl.org) by [Arthur Langereis](https://github.com/zenmumbler) +* [:link:](webix/webix.d.ts) [Webix UI](http://webix.com) by [Maksim Kozhukh](http://github.com/mkozhukh) +* [:link:](webpack/webpack.d.ts) [webpack](https://github.com/webpack/webpack) by [Qubo](https://github.com/tkqubo) +* [:link:](webpack/webpack-env.d.ts) [webpack (module API)](https://github.com/webpack/webpack) by [use-strict](https://github.com/use-strict) * [:link:](webrtc/MediaStream.d.ts) [WebRTC](http://dev.w3.org/2011/webrtc) by [Ken Smith](https://github.com/smithkl42) * [:link:](websocket/websocket.d.ts) [websocket](https://github.com/Worlize/WebSocket-Node) by [Paul Loyd](https://github.com/loyd) +* [:link:](websql/websql.d.ts) [websql](http://www.w3.org/TR/webdatabase) by [TeamworkGuy2](https://github.com/TeamworkGuy2) +* [:link:](webvr-api/webvr-api.d.ts) [WebVR API](http://mozvr.github.io/webvr-spec/webvr.html) by [Toshiya Nakakura](https://github.com/nakakura) * [:link:](when/when.d.ts) [When](https://github.com/cujojs/when) by [Derek Cicerone](https://github.com/derekcicerone), [Wim Looman](https://github.com/Nemo157) * [:link:](which/which.d.ts) [which](https://github.com/isaacs/node-which) by [vvakame](https://github.com/vvakame) +* [:link:](jquery.window/jquery.window.d.ts) [Window plugin for jQuery](http://fstoke.me/jquery/window) by [Ryan Graham](https://github.com/ryan-codingintrigue) * [:link:](windows-service/windows-service.d.ts) [windows-service](https://bitbucket.org/stephenwvickers/node-windows-service) by [Rogier Schouten](https://github.com/rogierschouten) * [:link:](winjs/winjs.d.ts) [WinJS](http://try.buildwinjs.com) by [TypeScript samples](https://www.typescriptlang.org), [Adam Hewitt](https://github.com/adamhewitt627), [Craig Treasure](https://github.com/craigktreasure), [Jeff Fisher](https://github.com/xirzec) * [:link:](winrt/winrt.d.ts) [WinRT](http://msdn.microsoft.com/en-us/library/windows/apps/br211377.aspx) by [TypeScript samples](https://www.typescriptlang.org) @@ -837,22 +1461,32 @@ 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:](xml-parser/xml-parser.d.ts) [xml-parser](https://github.com/segmentio/xml-parser) by [Matt Frantz](https://github.com/mhfrantz) +* [: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:](xregexp/xregexp.d.ts) [XRegExp](http://xregexp.com) by [Bart van der Schoor](https://github.com/Bartvds), [Johannes Fahrenkrug](https://github.com/jfahrenkrug) * [: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:](ydn-db/ydn-db.d.ts) [YDN-DB version 1](http://dev.yathit.com/ydn-db/index.html) by [Kyaw Tun](https://github.com/yathit), [Gabriel Monteagudo](https://github.com/gabrielmaldi) * [:link:](yeoman-generator/yeoman-generator.d.ts) [yeoman-generator](https://github.com/yeoman/generator) by [Kentaro Okuno](http://github.com/armorik83) * [:link:](yosay/yosay.d.ts) [yosay](https://github.com/yeoman/yosay) by [Kentaro Okuno](http://github.com/armorik83) * [:link:](youtube/youtube.d.ts) [YouTube](https://developers.google.com/youtube) by [Daz Wilkin](https://github.com/DazWilkin), [Ian Obermiller](http://ianobermiller.com) * [:link:](gapi.youtubeAnalytics/gapi.youtubeAnalytics.d.ts) [YouTube Analytics API](https://developers.google.com/youtube/analytics) by [Frank M](https://github.com/sgtfrankieboy) * [:link:](gapi.youtube/gapi.youtube.d.ts) [YouTube Data API v3](https://developers.google.com/youtube/v3) by [Frank M](https://github.com/sgtfrankieboy) * [:link:](yui/yui.d.ts) [yui](https://github.com/yui/yui3) by [Gia Bảo @ Sân Đình](https://github.com/giabao) +* [:link:](z-schema/z-schema.d.ts) [z-schema](https://github.com/zaggino/z-schema) by [Adam Meadows](https://github.com/job13er) * [:link:](zepto/zepto.d.ts) [Zepto](http://zeptojs.com) by [Josh Baldwin](https://github.com/jbaldwin) * [:link:](zeroclipboard/zeroclipboard.d.ts) [ZeroClipboard](https://github.com/jonrohan/ZeroClipboard) by [Eric J. Smith](https://github.com/ejsmith), [Blake Niemyjski](https://github.com/niemyjski), [György Balássy](https://github.com/balassy) * [:link:](node_zeromq/zmq.d.ts) [ZeroMQ Node](https://github.com/JustinTulloss/zeromq.node) by [Dave McKeown](http://github.com/davemckeown) * [:link:](zip.js/zip.js.d.ts) [zip.js 2.x](https://github.com/gildas-lormeau/zip.js) by [Louis Grignon](https://github.com/lgrignon) +* [:link:](zone.js/zone.js.d.ts) [Zone.js](https://github.com/angular/zone.js) by [angular team](https://github.com/angular) * [: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) diff --git a/DataStream.js/DataStream.js-tests.ts b/DataStream.js/DataStream.js-tests.ts new file mode 100644 index 0000000000..71bb08537e --- /dev/null +++ b/DataStream.js/DataStream.js-tests.ts @@ -0,0 +1,180 @@ +/// + +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 +// 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; +} diff --git a/FileSaver/FileSaver-tests.ts b/FileSaver/FileSaver-tests.ts index 6a5426a6a2..4cfae373e3 100644 --- a/FileSaver/FileSaver-tests.ts +++ b/FileSaver/FileSaver-tests.ts @@ -6,6 +6,7 @@ function testSaveAs() { var data: Blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"}); var filename: string = 'hello world.txt'; - - saveAs(data, filename); + var disableAutoBOM = true; + + saveAs(data, filename, disableAutoBOM); } diff --git a/FileSaver/FileSaver.d.ts b/FileSaver/FileSaver.d.ts index 0b6cc75d60..fa5f31947e 100644 --- a/FileSaver/FileSaver.d.ts +++ b/FileSaver/FileSaver.d.ts @@ -20,8 +20,14 @@ interface FileSaver { * @summary File name. * @type {DOMString} */ - filename: string + filename: string, + + /** + * @summary Disable Unicode text encoding hints or not. + * @type {boolean} + */ + disableAutoBOM?: boolean ): void } -declare var saveAs: FileSaver; \ No newline at end of file +declare var saveAs: FileSaver; diff --git a/OpenJsCad/openjscad-tests.ts b/OpenJsCad/openjscad-tests.ts new file mode 100644 index 0000000000..fd13f0dbb4 --- /dev/null +++ b/OpenJsCad/openjscad-tests.ts @@ -0,0 +1,266 @@ +/// + +function test() { + + var gProcessor: OpenJsCad.Processor = null; + + // Show all exceptions to the user: + OpenJsCad.AlertUserOfUncaughtExceptions(); + + function onload() + { + gProcessor = new OpenJsCad.Processor(document.getElementById("viewer")); + updateSolid(); + } + + function updateSolid() + { + gProcessor.setJsCad((document.getElementById('code')).value); + } + + +} + +function main() +{ + // Main entry point; here we construct our solid: + var gear = involuteGear( + 15, + 10, + 20, + 0, + 5 + ); + var centerhole = CSG.cylinder({start: [0,0,-5], end: [0,0,5], radius: 2, resolution: 16}); + gear = gear.subtract(centerhole); + return gear; +} + +function involuteGear(numTeeth: number, circularPitch: number, pressureAngle: number, clearance: number, thickness: number) +{ + // default values: + if(arguments.length < 3) pressureAngle = 20; + if(arguments.length < 4) clearance = 0; + if(arguments.length < 4) thickness = 1; + + var addendum = circularPitch / Math.PI; + var dedendum = addendum + clearance; + + // radiuses of the 4 circles: + var pitchRadius = numTeeth * circularPitch / (2 * Math.PI); + var baseRadius = pitchRadius * Math.cos(Math.PI * pressureAngle / 180); + var outerRadius = pitchRadius + addendum; + var rootRadius = pitchRadius - dedendum; + + var maxtanlength = Math.sqrt(outerRadius*outerRadius - baseRadius*baseRadius); + var maxangle = maxtanlength / baseRadius; + + var tl_at_pitchcircle = Math.sqrt(pitchRadius*pitchRadius - baseRadius*baseRadius); + var angle_at_pitchcircle = tl_at_pitchcircle / baseRadius; + var diffangle = angle_at_pitchcircle - Math.atan(angle_at_pitchcircle); + var angularToothWidthAtBase = Math.PI / numTeeth + 2*diffangle; + + // build a single 2d tooth in the 'points' array: + var resolution = 5; + var points = [new CSG.Vector2D(0,0)]; + for(var i = 0; i <= resolution; i++) + { + // first side of the tooth: + var angle = maxangle * i / resolution; + var tanlength = angle * baseRadius; + var radvector = CSG.Vector2D.fromAngle(angle); + var tanvector = radvector.normal(); + var p = radvector.times(baseRadius).plus(tanvector.times(tanlength)); + points[i+1] = p; + + // opposite side of the tooth: + radvector = CSG.Vector2D.fromAngle(angularToothWidthAtBase - angle); + tanvector = radvector.normal().negated(); + p = radvector.times(baseRadius).plus(tanvector.times(tanlength)); + points[2 * resolution + 2 - i] = p; + } + + // create the polygon and extrude into 3D: + var tooth3d = new CSG.Polygon2D(points).extrude({offset: [0, 0, thickness]}); + + var allteeth = new CSG(); + for(var i = 0; i < numTeeth; i++) + { + var angle = i*360/numTeeth; + var rotatedtooth = tooth3d.rotateZ(angle); + allteeth = allteeth.unionForNonIntersecting(rotatedtooth); + } + + // build the root circle: + points = []; + var toothAngle = 2 * Math.PI / numTeeth; + var toothCenterAngle = 0.5 * angularToothWidthAtBase; + for(var i = 0; i < numTeeth; i++) + { + var angle = toothCenterAngle + i * toothAngle; + var p = CSG.Vector2D.fromAngle(angle).times(rootRadius); + points.push(p); + } + + // create the polygon and extrude into 3D: + var rootcircle = new CSG.Polygon2D(points).extrude({offset: [0, 0, thickness]}); + + var result = rootcircle.union(allteeth); + + // center at origin: + result = result.translate([0, 0, -thickness/2]); + + return result; +} + +var cylresolution=16; + + +function main2() +{ + var params = + { + quality: 0, + diameter1: 12.2, + shaftlength1: 15, + outerlength1: 20, + nutradius1: 4.65, + nutthickness1: 4.2, + screwdiameter1: 5, + diameter2: 9.5, + shaftlength2: 10, + outerlength2: 15, + nutradius2: 3.2, + nutthickness2: 2.6, + screwdiameter2: 3, + outerdiameter: 30, + spiderlength: 12, + spidermargin: 0, + numteeth: 2 + }; + + + cylresolution=(params.quality == 1)? 64:16; + + var outerdiameter=params.outerdiameter; + outerdiameter=Math.max(outerdiameter, params.diameter1+0.5); + outerdiameter=Math.max(outerdiameter, params.diameter2+0.5); + + var spidercenterdiameter=outerdiameter/2; + + var part1=makeShaft(params.diameter1, outerdiameter,spidercenterdiameter,params.shaftlength1,params.outerlength1,params.spiderlength, params.nutradius1, params.nutthickness1, params.screwdiameter1, params.numteeth); + var part2=makeShaft(params.diameter2, outerdiameter,spidercenterdiameter,params.shaftlength2,params.outerlength2,params.spiderlength, params.nutradius2, params.nutthickness2, params.screwdiameter2, params.numteeth); + var spider=makeSpider(outerdiameter, spidercenterdiameter, params.spiderlength, params.numteeth); + + if(params.spidermargin > 0) + { + spider=spider.contract(params.spidermargin, 4); + } + + // rotate shaft parts for better 3d printing: + part1=part1.rotateX(180).translate([0,0,params.outerlength1+params.spiderlength]); + part2=part2.rotateX(180).translate([0,0,params.outerlength2+params.spiderlength]); + + var result=part1.translate([-outerdiameter-5,0,0]); + result=result.union(part2.translate([0,0,0])); + result=result.union(spider.translate([outerdiameter+5,0,-params.spidermargin])); + return result; +} + +function makeShaft(innerdiameter: number, outerdiameter: number, spidercenterdiameter: number, shaftlength: number, outerlength: number, spiderlength: number, nutradius: number, nutthickness: number, screwdiameter: number, numteeth: number) +{ + var result=CSG.cylinder({start:[0,0,0], end:[0,0,outerlength], radius:outerdiameter/2, resolution:cylresolution}); + + for(var i=0; i < numteeth; i++) + { + var angle=i*360/numteeth; + var pie=makePie(outerdiameter/2, spiderlength,angle-45/numteeth, angle+45/numteeth); + pie=pie.translate([0,0,outerlength]); + result=result.union(pie); + } + var spidercylinder=CSG.cylinder({start:[0,0,outerlength], end:[0,0,outerlength+spiderlength],radius:spidercenterdiameter/2,resolution:cylresolution}); + result=result.subtract(spidercylinder); + var shaftcylinder=CSG.cylinder({start:[0,0,0], end:[0,0,shaftlength], radius:innerdiameter/2, resolution:cylresolution}); + result=result.subtract(shaftcylinder); + + var screwz=shaftlength/2; + if(screwz < nutradius) screwz=nutradius; + var nutcutout = hexagon(nutradius, nutthickness).translate([0,0,-nutthickness/2]); + var grubnutradiusAtFlatSide = nutradius * Math.cos(Math.PI / 180 * 30); + var nutcutoutrectangle = CSG.cube({ + radius: [outerlength/2, grubnutradiusAtFlatSide, nutthickness/2], + center: [outerlength/2, 0, 0], + }); + nutcutout = nutcutout.union(nutcutoutrectangle); + nutcutout = nutcutout.rotateY(90); + nutcutout = nutcutout.translate([(outerdiameter+innerdiameter)/4, 0, screwz]); + result = result.subtract(nutcutout); + + var screwcutout=CSG.cylinder({ + start: [outerdiameter/2, 0, screwz], + end: [0, 0, screwz], + radius: screwdiameter/2, + resolution:cylresolution + }); + result=result.subtract(screwcutout); + +//return nutcutout; +// nutcutout = nutcutout.translate([-grubnutheight/2 - centerholeradius - nutdistance,0,0]); + + return result; +} + +function makePie(radius: number, height: number, startangle: number, endangle: number) +{ + var absangle=Math.abs(startangle-endangle); + if(absangle >= 180) + { + throw new Error("Pie angle must be less than 180 degrees"); + } + var numsteps=cylresolution*absangle/360; + if(numsteps < 1) numsteps=1; + var points: CSG.Vector2D[] = []; + for(var i=0; i <= numsteps; i++) + { + var angle=startangle+i/numsteps*(endangle-startangle); + var vec = CSG.Vector2D.fromAngleDegrees(angle).times(radius); + points.push(vec); + } + points.push(new CSG.Vector2D(0,0)); + var shape2d=new CSG.Polygon2D(points); + var extruded=shape2d.extrude({ + offset: [0,0,height], // direction for extrusion + }); + return extruded; +} + +function hexagon(radius: number, height: number) +{ + var vertices: CSG.Vertex[] = []; + for(var i=0; i < 6; i++) + { + var point=CSG.Vector2D.fromAngleDegrees(-i*60).times(radius).toVector3D(0); + vertices.push(new CSG.Vertex(point)); + } + var polygon=new CSG.Polygon(vertices); + var hexagon=polygon.extrude([0,0,height]); + return hexagon; +} + +function makeSpider(outerdiameter: number, spidercenterdiameter: number, spiderlength: number, numteeth: number) +{ + var result=new CSG(); + var numspiderteeth=numteeth*2; // spider has twice the number of teeth + for(var i=0; i < numspiderteeth; i++) + { + var angle=i*360/numspiderteeth; + var pie=makePie(outerdiameter/2, spiderlength,angle-90/numspiderteeth, angle+90/numspiderteeth); + pie=pie.translate([0,0,0]); + result=result.union(pie); + } + + var centercylinder=CSG.cylinder({start:[0,0,0], end:[0,0,spiderlength], radius:spidercenterdiameter/2, resolution:cylresolution}); + result=result.union(centercylinder); + + return result; +} \ No newline at end of file diff --git a/OpenJsCad/openjscad.d.ts b/OpenJsCad/openjscad.d.ts new file mode 100644 index 0000000000..072fa10b5a --- /dev/null +++ b/OpenJsCad/openjscad.d.ts @@ -0,0 +1,912 @@ +// Type definitions for OpenJsCad.js +// Project: https://github.com/joostn/OpenJsCad +// Definitions by: Dan Marshall +// Definitions: https://github.com/borisyankov/DefinitelyTyped +/// + +declare module THREE { + var CSG: { + fromCSG: (csg: CSG, defaultColor: any) => { + colorMesh: Mesh; + wireframe: Mesh; + boundLen: number; + }; + getGeometryVertex: (geometry: any, vertex_position: any) => number; + }; + function OrbitControls(object: any, domElement: any): void; + function SpriteCanvasMaterial(parameters?: any): void; + interface ICanvasRendererOptions { + canvas?: HTMLCanvasElement; + alpha?: boolean; + } + class CanvasRenderer implements Renderer { + domElement: HTMLCanvasElement; + private pixelRatio; + private autoClear; + private sortObjects; + private sortElements; + private info; + private _projector; + private _renderData; + private _elements; + private _lights; + private _canvas; + private _canvasWidth; + private _canvasHeight; + private _canvasWidthHalf; + private _canvasHeightHalf; + private _viewportX; + private _viewportY; + private _viewportWidth; + private _viewportHeight; + private _context; + private _clearColor; + private _clearAlpha; + private _contextGlobalAlpha; + private _contextGlobalCompositeOperation; + private _contextStrokeStyle; + private _camera; + private _contextFillStyle; + private _contextLineWidth; + private _contextLineCap; + private _contextLineJoin; + private _contextLineDash; + private _v1; + private _v2; + private _v3; + private _v4; + private _v5; + private _v6; + private _v1x; + private _v1y; + private _v2x; + private _v2y; + private _v3x; + private _v3y; + private _v4x; + private _v4y; + private _v5x; + private _v5y; + private _v6x; + private _v6y; + private _color; + private _color1; + private _color2; + private _color3; + private _color4; + private _diffuseColor; + private _emissiveColor; + private _lightColor; + private _patterns; + private _image; + private _uvs; + private _uv1x; + private _uv1y; + private _uv2x; + private _uv2y; + private _uv3x; + private _uv3y; + private _clipBox; + private _clearBox; + private _elemBox; + private _ambientLight; + private _directionalLights; + private _pointLights; + private _vector3; + private _centroid; + private _normal; + private _normalViewMatrix; + constructor(parameters: ICanvasRendererOptions); + supportsVertexTextures(): void; + setFaceCulling: () => void; + getPixelRatio(): number; + setPixelRatio(value: any): void; + setSize(width: any, height: any, updateStyle: any): void; + setViewport(x: any, y: any, width: any, height: any): void; + setScissor(): void; + enableScissorTest(): void; + setClearColor(color: any, alpha: any): void; + setClearColorHex(hex: any, alpha: any): void; + getClearColor(): Color; + getClearAlpha(): number; + getMaxAnisotropy(): number; + clear(): void; + clearColor(): void; + clearDepth(): void; + clearStencil(): void; + render(scene: Scene, camera: Camera, renderTarget?: RenderTarget, forceClear?: boolean): void; + calculateLights(): void; + calculateLight(position: any, normal: any, color: any): void; + renderSprite(v1: any, element: any, material: any): void; + renderLine(v1: any, v2: any, element: any, material: any): void; + renderFace3(v1: any, v2: any, v3: any, uv1: any, uv2: any, uv3: any, element: any, material: any): void; + drawTriangle(x0: any, y0: any, x1: any, y1: any, x2: any, y2: any): void; + strokePath(color: any, linewidth: any, linecap: any, linejoin: any): void; + fillPath(color: any): void; + onTextureUpdate(event: any): void; + textureToPattern(texture: any): void; + patternPath(x0: any, y0: any, x1: any, y1: any, x2: any, y2: any, u0: any, v0: any, u1: any, v1: any, u2: any, v2: any, texture: any): void; + clipImage(x0: any, y0: any, x1: any, y1: any, x2: any, y2: any, u0: any, v0: any, u1: any, v1: any, u2: any, v2: any, image: any): void; + expand(v1: any, v2: any, pixels: any): void; + setOpacity(value: any): void; + setBlending(value: any): void; + setLineWidth(value: any): void; + setLineCap(value: any): void; + setLineJoin(value: any): void; + setStrokeStyle(value: any): void; + setFillStyle(value: any): void; + setLineDash(value: any): void; + } + function RenderableObject(): void; + function RenderableFace(): void; + function RenderableVertex(): void; + function RenderableLine(): void; + function RenderableSprite(): void; + function Projector(): void; +} +declare module OpenJsCad { + interface ILog { + (x: string): void; + prevLogTime?: number; + } + var log: ILog; + interface IViewerOptions { + drawLines?: boolean; + drawFaces?: boolean; + color?: number[]; + bgColor?: number; + noWebGL?: boolean; + } + interface ProcessorOptions extends IViewerOptions { + verbose?: boolean; + viewerwidth?: number; + viewerheight?: number; + viewerheightratio?: number; + } + class Viewer { + private perspective; + private drawOptions; + private size; + private defaultColor_; + private bgColor_; + private containerElm_; + private scene_; + private camera_; + private controls_; + private renderer_; + private canvas; + private pauseRender_; + private requestID_; + constructor(containerElm: any, size: any, options: IViewerOptions); + createScene(drawAxes: any, axLen: any): void; + createCamera(): void; + createControls(canvas: any): void; + webGLAvailable(): boolean; + createRenderer(bool_noWebGL: any): void; + render(): void; + animate(): void; + cancelAnimate(): void; + refreshRenderer(bool_noWebGL: any): void; + drawAxes(axLen: any): void; + setCsg(csg: any, resetZoom: any): void; + applyDrawOptions(): void; + clear(): void; + getUserMeshes(str?: any): THREE.Object3D[]; + resetZoom(r: any): void; + parseSizeParams(): void; + handleResize(): void; + } + function makeAbsoluteUrl(url: any, baseurl: any): any; + function isChrome(): boolean; + function runMainInWorker(mainParameters: any): void; + function expandResultObjectArray(result: any): any; + function checkResult(result: any): void; + function resultToCompactBinary(resultin: any): any; + function resultFromCompactBinary(resultin: any): any; + function parseJsCadScriptSync(script: any, mainParameters: any, debugging: any): any; + function parseJsCadScriptASync(script: any, mainParameters: any, options: any, callback: any): Worker; + function getWindowURL(): URL; + function textToBlobUrl(txt: any): string; + function revokeBlobUrl(url: any): void; + function FileSystemApiErrorHandler(fileError: any, operation: any): void; + function AlertUserOfUncaughtExceptions(): void; + function getParamDefinitions(script: any): any[]; + interface EventHandler { + (ev?: Event): any; + } + /** + * options parameter: + * - drawLines: display wireframe lines + * - drawFaces: display surfaces + * - bgColor: canvas background color + * - color: object color + * - viewerwidth, viewerheight: set rendering size. Works with any css unit. + * viewerheight can also be specified as a ratio to width, ie number e (0, 1] + * - noWebGL: force render without webGL + * - verbose: show additional info (currently only time used for rendering) + */ + interface ViewerSize { + widthDefault: string; + heightDefault: string; + width: number; + height: number; + heightratio: number; + } + class Processor { + private containerdiv; + private options; + private onchange; + private static widthDefault; + private static heightDefault; + private viewerdiv; + private viewer; + private viewerSize; + private processing; + private currentObject; + private hasValidCurrentObject; + private hasOutputFile; + private worker; + private paramDefinitions; + private paramControls; + private script; + private hasError; + private debugging; + private errordiv; + private errorpre; + private statusdiv; + private controldiv; + private statusspan; + private statusbuttons; + private abortbutton; + private renderedElementDropdown; + private formatDropdown; + private generateOutputFileButton; + private downloadOutputFileLink; + private parametersdiv; + private parameterstable; + private currentFormat; + private filename; + private currentObjects; + private currentObjectIndex; + private isFirstRender_; + private outputFileDirEntry; + private outputFileBlobUrl; + constructor(containerdiv: HTMLDivElement, options?: ProcessorOptions, onchange?: EventHandler); + static convertToSolid(obj: any): any; + cleanOption(option: any, deflt: any): any; + toggleDrawOption(str: any): boolean; + setDrawOption(str: any, bool: any): void; + handleResize(): void; + createElements(): void; + getFilenameForRenderedObject(): string; + setRenderedObjects(obj: any): void; + setSelectedObjectIndex(index: number): void; + selectedFormat(): any; + selectedFormatInfo(): any; + updateDownloadLink(): void; + clearViewer(): void; + abort(): void; + enableItems(): void; + setOpenJsCadPath(path: string): void; + addLibrary(lib: any): void; + setError(txt: string): void; + setDebugging(debugging: boolean): void; + setJsCad(script: string, filename?: string): void; + getParamValues(): {}; + rebuildSolid(): void; + hasSolid(): boolean; + isProcessing(): boolean; + clearOutputFile(): void; + generateOutputFile(): void; + currentObjectToBlob(): any; + supportedFormatsForCurrentObject(): string[]; + formatInfo(format: any): any; + downloadLinkTextForCurrentObject(): string; + generateOutputFileBlobUrl(): void; + generateOutputFileFileSystem(): void; + createParamControls(): void; + } +} +interface Window { + Worker: Worker; +// URL: URL; + webkitURL: URL; + requestFileSystem: any; + webkitRequestFileSystem: any; +} +interface IAMFStringOptions { + unit: string; +} +declare class CxG { + toStlString(): string; + toStlBinary(): void; + toAMFString(AMFStringOptions?: IAMFStringOptions): void; + getBounds(): CxG[]; + transform(matrix4x4: CSG.Matrix4x4): CxG; + mirrored(plane: CSG.Plane): CxG; + mirroredX(): CxG; + mirroredY(): CxG; + mirroredZ(): CxG; + translate(v: number[]): CxG; + translate(v: CSG.Vector3D): CxG; + scale(f: CSG.Vector3D): CxG; + rotateX(deg: number): CxG; + rotateY(deg: number): CxG; + rotateZ(deg: number): CxG; + rotate(rotationCenter: CSG.Vector3D, rotationAxis: CSG.Vector3D, degrees: number): CxG; + rotateEulerAngles(alpha: number, beta: number, gamma: number, position: number[]): CxG; +} +interface ICenter { + center(cAxes: string[]): CxG; +} +declare class CSG extends CxG implements ICenter { + polygons: CSG.Polygon[]; + properties: CSG.Properties; + isCanonicalized: boolean; + isRetesselated: boolean; + cachedBoundingBox: CSG.Vector3D[]; + static defaultResolution2D: number; + static defaultResolution3D: number; + static fromPolygons(polygons: CSG.Polygon[]): CSG; + static fromSlices(options: any): CSG; + static fromObject(obj: any): CSG; + static fromCompactBinary(bin: any): CSG; + toPolygons(): CSG.Polygon[]; + union(csg: CSG[]): CSG; + union(csg: CSG): CSG; + unionSub(csg: CSG, retesselate?: boolean, canonicalize?: boolean): CSG; + unionForNonIntersecting(csg: CSG): CSG; + subtract(csg: CSG[]): CSG; + subtract(csg: CSG): CSG; + subtractSub(csg: CSG, retesselate: boolean, canonicalize: boolean): CSG; + intersect(csg: CSG[]): CSG; + intersect(csg: CSG): CSG; + intersectSub(csg: CSG, retesselate?: boolean, canonicalize?: boolean): CSG; + invert(): CSG; + transform1(matrix4x4: CSG.Matrix4x4): CSG; + transform(matrix4x4: CSG.Matrix4x4): CSG; + toString(): string; + expand(radius: number, resolution: number): CSG; + contract(radius: number, resolution: number): CSG; + stretchAtPlane(normal: number[], point: number[], length: number): CSG; + expandedShell(radius: number, resolution: number, unionWithThis: boolean): CSG; + canonicalized(): CSG; + reTesselated(): CSG; + getBounds(): CSG.Vector3D[]; + mayOverlap(csg: CSG): boolean; + cutByPlane(plane: CSG.Plane): CSG; + connectTo(myConnector: CSG.Connector, otherConnector: CSG.Connector, mirror: boolean, normalrotation: number): CSG; + setShared(shared: CSG.Polygon.Shared): CSG; + setColor(args: any): CSG; + toCompactBinary(): { + "class": string; + numPolygons: number; + numVerticesPerPolygon: Uint32Array; + polygonPlaneIndexes: Uint32Array; + polygonSharedIndexes: Uint32Array; + polygonVertices: Uint32Array; + vertexData: Float64Array; + planeData: Float64Array; + shared: CSG.Polygon.Shared[]; + }; + toPointCloud(cuberadius: any): CSG; + getTransformationAndInverseTransformationToFlatLying(): any; + getTransformationToFlatLying(): any; + lieFlat(): CSG; + projectToOrthoNormalBasis(orthobasis: CSG.OrthoNormalBasis): CAG; + sectionCut(orthobasis: CSG.OrthoNormalBasis): CAG; + fixTJunctions(): CSG; + toTriangles(): any[]; + getFeatures(features: any): any; + center(cAxes: string[]): CxG; + toX3D(): Blob; + toStlBinary(): Blob; + toStlString(): string; + toAMFString(m: IAMFStringOptions): Blob; +} +declare module CSG { + function fnNumberSort(a: any, b: any): number; + function parseOption(options: any, optionname: any, defaultvalue: any): any; + function parseOptionAs3DVector(options: any, optionname: any, defaultvalue: any): Vector3D; + function parseOptionAs3DVectorList(options: any, optionname: any, defaultvalue: any): any; + function parseOptionAs2DVector(options: any, optionname: any, defaultvalue: any): any; + function parseOptionAsFloat(options: any, optionname: any, defaultvalue: any): any; + function parseOptionAsInt(options: any, optionname: any, defaultvalue: any): any; + function parseOptionAsBool(options: any, optionname: any, defaultvalue: any): any; + function cube(options: any): CSG; + function sphere(options: any): CSG; + function cylinder(options: any): CSG; + function roundedCylinder(options: any): CSG; + function roundedCube(options: any): CSG; + /** + * polyhedron accepts openscad style arguments. I.e. define face vertices clockwise looking from outside + */ + function polyhedron(options: any): CSG; + function IsFloat(n: any): boolean; + function solve2Linear(a: any, b: any, c: any, d: any, u: any, v: any): number[]; + class Vector3D extends CxG { + x: number; + y: number; + z: number; + constructor(v3: Vector3D); + constructor(v2: Vector2D); + constructor(v2: number[]); + constructor(x: number, y: number); + constructor(x: number, y: number, z: number); + static Create(x: number, y: number, z: number): Vector3D; + clone(): Vector3D; + negated(): Vector3D; + abs(): Vector3D; + plus(a: Vector3D): Vector3D; + minus(a: Vector3D): Vector3D; + times(a: number): Vector3D; + dividedBy(a: number): Vector3D; + dot(a: Vector3D): number; + lerp(a: Vector3D, t: number): Vector3D; + lengthSquared(): number; + length(): number; + unit(): Vector3D; + cross(a: Vector3D): Vector3D; + distanceTo(a: Vector3D): number; + distanceToSquared(a: Vector3D): number; + equals(a: Vector3D): boolean; + multiply4x4(matrix4x4: Matrix4x4): Vector3D; + transform(matrix4x4: Matrix4x4): Vector3D; + toString(): string; + randomNonParallelVector(): Vector3D; + min(p: Vector3D): Vector3D; + max(p: Vector3D): Vector3D; + toStlString(): string; + toAMFString(): string; + } + class Vertex extends CxG { + pos: Vector3D; + tag: number; + constructor(pos: Vector3D); + static fromObject(obj: any): Vertex; + flipped(): Vertex; + getTag(): number; + interpolate(other: Vertex, t: number): Vertex; + transform(matrix4x4: Matrix4x4): Vertex; + toString(): string; + toStlString(): string; + toAMFString(): string; + } + class Plane extends CxG { + normal: Vector3D; + w: number; + tag: number; + constructor(normal: Vector3D, w: number); + static fromObject(obj: any): Plane; + static EPSILON: number; + static fromVector3Ds(a: Vector3D, b: Vector3D, c: Vector3D): Plane; + static anyPlaneFromVector3Ds(a: Vector3D, b: Vector3D, c: Vector3D): Plane; + static fromPoints(a: Vector3D, b: Vector3D, c: Vector3D): Plane; + static fromNormalAndPoint(normal: Vector3D, point: Vector3D): Plane; + static fromNormalAndPoint(normal: number[], point: number[]): Plane; + flipped(): Plane; + getTag(): number; + equals(n: Plane): boolean; + transform(matrix4x4: Matrix4x4): Plane; + splitPolygon(polygon: Polygon): { + type: any; + front: any; + back: any; + }; + splitLineBetweenPoints(p1: Vector3D, p2: Vector3D): Vector3D; + intersectWithLine(line3d: Line3D): Vector3D; + intersectWithPlane(plane: Plane): Line3D; + signedDistanceToPoint(point: Vector3D): number; + toString(): string; + mirrorPoint(point3d: Vector3D): Vector3D; + } + class Polygon extends CxG { + vertices: Vertex[]; + shared: Polygon.Shared; + plane: Plane; + cachedBoundingSphere: any; + cachedBoundingBox: Vector3D[]; + static defaultShared: CSG.Polygon.Shared; + constructor(vertices: Vector3D, shared?: Polygon.Shared, plane?: Plane); + constructor(vertices: Vertex[], shared?: Polygon.Shared, plane?: Plane); + static fromObject(obj: any): Polygon; + checkIfConvex(): void; + setColor(args: any): Polygon; + getSignedVolume(): number; + getArea(): number; + getTetraFeatures(features: any): any[]; + extrude(offsetvector: any): CSG; + boundingSphere(): any; + boundingBox(): Vector3D[]; + flipped(): Polygon; + transform(matrix4x4: Matrix4x4): Polygon; + toString(): string; + projectToOrthoNormalBasis(orthobasis: OrthoNormalBasis): CAG; + /** + * Creates solid from slices (CSG.Polygon) by generating walls + * @param {Object} options Solid generating options + * - numslices {Number} Number of slices to be generated + * - callback(t, slice) {Function} Callback function generating slices. + * arguments: t = [0..1], slice = [0..numslices - 1] + * return: CSG.Polygon or null to skip + * - loop {Boolean} no flats, only walls, it's used to generate solids like a tor + */ + solidFromSlices(options: any): CSG; + /** + * + * @param walls Array of wall polygons + * @param bottom Bottom polygon + * @param top Top polygon + */ + private _addWalls(walls, bottom, top, bFlipped); + static verticesConvex(vertices: Vertex[], planenormal: any): boolean; + static createFromPoints(points: number[][], shared?: CSG.Polygon.Shared, plane?: Plane): Polygon; + static isConvexPoint(prevpoint: any, point: any, nextpoint: any, normal: any): boolean; + static isStrictlyConvexPoint(prevpoint: any, point: any, nextpoint: any, normal: any): boolean; + toStlString(): string; + } +} +declare module CSG.Polygon { + class Shared { + color: any; + tag: any; + constructor(color: any); + static fromObject(obj: any): Shared; + static fromColor(args: any): Shared; + getTag(): any; + getHash(): any; + } +} +declare module CSG { + class PolygonTreeNode { + parent: any; + children: any; + polygon: Polygon; + removed: boolean; + constructor(); + addPolygons(polygons: any): void; + remove(): void; + isRemoved(): boolean; + isRootNode(): boolean; + invert(): void; + getPolygon(): Polygon; + getPolygons(result: Polygon[]): void; + splitByPlane(plane: any, coplanarfrontnodes: any, coplanarbacknodes: any, frontnodes: any, backnodes: any): void; + _splitByPlane(plane: any, coplanarfrontnodes: any, coplanarbacknodes: any, frontnodes: any, backnodes: any): void; + addChild(polygon: Polygon): PolygonTreeNode; + invertSub(): void; + recursivelyInvalidatePolygon(): void; + } + class Tree { + polygonTree: PolygonTreeNode; + rootnode: Node; + constructor(polygons: Polygon[]); + invert(): void; + clipTo(tree: Tree, alsoRemovecoplanarFront?: boolean): void; + allPolygons(): Polygon[]; + addPolygons(polygons: Polygon[]): void; + } + class Node { + parent: Node; + plane: Plane; + front: any; + back: any; + polygontreenodes: PolygonTreeNode[]; + constructor(parent: Node); + invert(): void; + clipPolygons(polygontreenodes: PolygonTreeNode[], alsoRemovecoplanarFront: boolean): void; + clipTo(tree: Tree, alsoRemovecoplanarFront: boolean): void; + addPolygonTreeNodes(polygontreenodes: PolygonTreeNode[]): void; + getParentPlaneNormals(normals: Vector3D[], maxdepth: number): void; + } + class Matrix4x4 { + elements: number[]; + constructor(elements?: number[]); + plus(m: Matrix4x4): Matrix4x4; + minus(m: Matrix4x4): Matrix4x4; + multiply(m: Matrix4x4): Matrix4x4; + clone(): Matrix4x4; + rightMultiply1x3Vector(v: Vector3D): Vector3D; + leftMultiply1x3Vector(v: Vector3D): Vector3D; + rightMultiply1x2Vector(v: Vector2D): Vector2D; + leftMultiply1x2Vector(v: Vector2D): Vector2D; + isMirroring(): boolean; + static unity(): Matrix4x4; + static rotationX(degrees: number): Matrix4x4; + static rotationY(degrees: number): Matrix4x4; + static rotationZ(degrees: number): Matrix4x4; + static rotation(rotationCenter: CSG.Vector3D, rotationAxis: CSG.Vector3D, degrees: number): Matrix4x4; + static translation(v: number[]): Matrix4x4; + static translation(v: Vector3D): Matrix4x4; + static mirroring(plane: Plane): Matrix4x4; + static scaling(v: number[]): Matrix4x4; + static scaling(v: Vector3D): Matrix4x4; + } + class Vector2D extends CxG { + x: number; + y: number; + constructor(x: number, y: number); + constructor(x: number[]); + constructor(x: Vector2D); + static fromAngle(radians: number): Vector2D; + static fromAngleDegrees(degrees: number): Vector2D; + static fromAngleRadians(radians: number): Vector2D; + static Create(x: number, y: number): Vector2D; + toVector3D(z: number): Vector3D; + equals(a: Vector2D): boolean; + clone(): Vector2D; + negated(): Vector2D; + plus(a: Vector2D): Vector2D; + minus(a: Vector2D): Vector2D; + times(a: number): Vector2D; + dividedBy(a: number): Vector2D; + dot(a: Vector2D): number; + lerp(a: Vector2D, t: number): Vector2D; + length(): number; + distanceTo(a: Vector2D): number; + distanceToSquared(a: Vector2D): number; + lengthSquared(): number; + unit(): Vector2D; + cross(a: Vector2D): number; + normal(): Vector2D; + multiply4x4(matrix4x4: Matrix4x4): Vector2D; + transform(matrix4x4: Matrix4x4): Vector2D; + angle(): number; + angleDegrees(): number; + angleRadians(): number; + min(p: Vector2D): Vector2D; + max(p: Vector2D): Vector2D; + toString(): string; + abs(): Vector2D; + } + class Line2D extends CxG { + normal: Vector2D; + w: number; + constructor(normal: Vector2D, w: number); + static fromPoints(p1: Vector2D, p2: Vector2D): Line2D; + reverse(): Line2D; + equals(l: Line2D): boolean; + origin(): Vector2D; + direction(): Vector2D; + xAtY(y: number): number; + absDistanceToPoint(point: Vector2D): number; + intersectWithLine(line2d: Line2D): Vector2D; + transform(matrix4x4: Matrix4x4): Line2D; + } + class Line3D extends CxG { + point: Vector3D; + direction: Vector3D; + constructor(point: Vector3D, direction: Vector3D); + static fromPoints(p1: Vector3D, p2: Vector3D): Line3D; + static fromPlanes(p1: Plane, p2: Plane): Line3D; + intersectWithPlane(plane: Plane): Vector3D; + clone(): Line3D; + reverse(): Line3D; + transform(matrix4x4: Matrix4x4): Line3D; + closestPointOnLine(point: Vector3D): Vector3D; + distanceToPoint(point: Vector3D): number; + equals(line3d: Line3D): boolean; + } + class OrthoNormalBasis extends CxG { + v: Vector3D; + u: Vector3D; + plane: Plane; + planeorigin: Vector3D; + constructor(plane: Plane, rightvector?: Vector3D); + static GetCartesian(xaxisid: string, yaxisid: string): OrthoNormalBasis; + static Z0Plane(): OrthoNormalBasis; + getProjectionMatrix(): Matrix4x4; + getInverseProjectionMatrix(): Matrix4x4; + to2D(vec3: Vector3D): Vector2D; + to3D(vec2: Vector2D): Vector3D; + line3Dto2D(line3d: Line3D): Line2D; + line2Dto3D(line2d: Line2D): Line3D; + transform(matrix4x4: Matrix4x4): OrthoNormalBasis; + } + function interpolateBetween2DPointsForY(point1: Vector2D, point2: Vector2D, y: number): number; + function reTesselateCoplanarPolygons(sourcepolygons: CSG.Polygon[], destpolygons: CSG.Polygon[]): void; + class fuzzyFactory { + multiplier: number; + lookuptable: any; + constructor(numdimensions: number, tolerance: number); + lookupOrCreate(els: any, creatorCallback: any): any; + } + class fuzzyCSGFactory { + vertexfactory: fuzzyFactory; + planefactory: fuzzyFactory; + polygonsharedfactory: any; + constructor(); + getPolygonShared(sourceshared: Polygon.Shared): Polygon.Shared; + getVertex(sourcevertex: Vertex): Vertex; + getPlane(sourceplane: Plane): Plane; + getPolygon(sourcepolygon: Polygon): Polygon; + getCSG(sourcecsg: CSG): CSG; + } + var staticTag: number; + function getTag(): number; + class Properties { + cube: Properties; + center: any; + facecenters: any[]; + roundedCube: Properties; + cylinder: Properties; + start: any; + end: any; + facepointH: any; + facepointH90: any; + sphere: Properties; + facepoint: any; + roundedCylinder: any; + _transform(matrix4x4: Matrix4x4): Properties; + _merge(otherproperties: Properties): Properties; + static transformObj(source: any, result: any, matrix4x4: Matrix4x4): void; + static cloneObj(source: any, result: any): void; + static addFrom(result: any, otherproperties: Properties): void; + } + class Connector extends CxG { + point: Vector3D; + axisvector: Vector3D; + normalvector: Vector3D; + constructor(point: number[], axisvector: Vector3D, normalvector: number[]); + constructor(point: number[], axisvector: number[], normalvector: number[]); + constructor(point: number[], axisvector: number[], normalvector: Vector3D); + constructor(point: Vector3D, axisvector: number[], normalvector: Vector3D); + constructor(point: Vector3D, axisvector: number[], normalvector: number[]); + constructor(point: Vector3D, axisvector: Vector3D, normalvector: Vector3D); + normalized(): Connector; + transform(matrix4x4: Matrix4x4): Connector; + getTransformationTo(other: Connector, mirror: boolean, normalrotation: number): Matrix4x4; + axisLine(): Line3D; + extend(distance: number): Connector; + } + class ConnectorList { + connectors_: Connector[]; + closed: boolean; + constructor(connectors: Connector[]); + static defaultNormal: number[]; + static fromPath2D(path2D: CSG.Path2D, arg1: any, arg2: any): ConnectorList; + static _fromPath2DTangents(path2D: any, start: any, end: any): ConnectorList; + static _fromPath2DExplicit(path2D: any, angleIsh: any): ConnectorList; + setClosed(bool: boolean): void; + appendConnector(conn: Connector): void; + followWith(cagish: any): CSG; + verify(): void; + } + interface IRadiusOptions { + radius?: number; + resolution?: number; + } + interface ICircleOptions extends IRadiusOptions { + center?: Vector2D | number[]; + } + interface IArcOptions extends ICircleOptions { + startangle?: number; + endangle?: number; + maketangent?: boolean; + } + interface IEllpiticalArcOptions extends IRadiusOptions { + clockwise?: boolean; + large?: boolean; + xaxisrotation?: number; + xradius?: number; + yradius?: number; + } + interface IRectangleOptions { + center?: Vector2D; + corner1?: Vector2D; + corner2?: Vector2D; + radius?: Vector2D; + } + interface IRoundRectangleOptions { + roundradius: number; + resolution?: number; + } + class Path2D extends CxG { + closed: boolean; + points: Vector2D[]; + lastBezierControlPoint: Vector2D; + constructor(points: number[], closed?: boolean); + constructor(points: Vector2D[], closed?: boolean); + static arc(options: IArcOptions): Path2D; + concat(otherpath: Path2D): Path2D; + appendPoint(point: Vector2D): Path2D; + appendPoints(points: Vector2D[]): Path2D; + close(): Path2D; + rectangularExtrude(width: number, height: number, resolution: number): CSG; + expandToCAG(pathradius: number, resolution: number): CAG; + innerToCAG(): CAG; + transform(matrix4x4: Matrix4x4): Path2D; + appendBezier(controlpoints: any, options: any): Path2D; + appendArc(endpoint: Vector2D, options: IEllpiticalArcOptions): Path2D; + } +} +declare class CAG extends CxG implements ICenter { + sides: CAG.Side[]; + isCanonicalized: boolean; + constructor(); + static fromSides(sides: CAG.Side[]): CAG; + static fromPoints(points: CSG.Vector2D[]): CAG; + static fromPointsNoCheck(points: CSG.Vector2D[]): CAG; + static fromFakeCSG(csg: CSG): CAG; + static linesIntersect(p0start: CSG.Vector2D, p0end: CSG.Vector2D, p1start: CSG.Vector2D, p1end: CSG.Vector2D): boolean; + static circle(options: CSG.ICircleOptions): CAG; + static rectangle(options: CSG.IRectangleOptions): CAG; + static roundedRectangle(options: any): CAG; + static fromCompactBinary(bin: any): CAG; + toString(): string; + _toCSGWall(z0: any, z1: any): CSG; + _toVector3DPairs(m: CSG.Matrix4x4): CSG.Vector3D[][]; + _toPlanePolygons(options: any): CSG.Polygon[]; + _toWallPolygons(options: any): any[]; + union(cag: CAG[]): CAG; + union(cag: CAG): CAG; + subtract(cag: CAG[]): CAG; + subtract(cag: CAG): CAG; + intersect(cag: CAG[]): CAG; + intersect(cag: CAG): CAG; + transform(matrix4x4: CSG.Matrix4x4): CAG; + area(): number; + flipped(): CAG; + getBounds(): CSG.Vector2D[]; + isSelfIntersecting(): boolean; + expandedShell(radius: number, resolution: number): CAG; + expand(radius: number, resolution: number): CAG; + contract(radius: number, resolution: number): CAG; + extrudeInOrthonormalBasis(orthonormalbasis: CSG.OrthoNormalBasis, depth: number, options?: any): CSG; + extrudeInPlane(axis1: any, axis2: any, depth: any, options: any): CSG; + extrude(options: CAG_extrude_options): CSG; + rotateExtrude(options: any): CSG; + check(): void; + canonicalized(): CAG; + toCompactBinary(): { + 'class': string; + sideVertexIndices: Uint32Array; + vertexData: Float64Array; + }; + getOutlinePaths(): CSG.Path2D[]; + overCutInsideCorners(cutterradius: any): CAG; + center(cAxes: string[]): CxG; + toDxf(): Blob; + static PathsToDxf(paths: CSG.Path2D[]): Blob; +} +declare module CAG { + class Vertex { + pos: CSG.Vector2D; + tag: number; + constructor(pos: CSG.Vector2D); + toString(): string; + getTag(): number; + } + class Side extends CxG { + vertex0: Vertex; + vertex1: Vertex; + tag: number; + constructor(vertex0: Vertex, vertex1: Vertex); + static _fromFakePolygon(polygon: CSG.Polygon): Side; + toString(): string; + toPolygon3D(z0: any, z1: any): CSG.Polygon; + transform(matrix4x4: CSG.Matrix4x4): Side; + flipped(): Side; + direction(): CSG.Vector2D; + getTag(): number; + lengthSquared(): number; + length(): number; + } + class fuzzyCAGFactory { + vertexfactory: CSG.fuzzyFactory; + constructor(); + getVertex(sourcevertex: Vertex): Vertex; + getSide(sourceside: Side): Side; + getCAG(sourcecag: CAG): CAG; + } +} +interface CAG_extrude_options { + offset?: number[]; + twistangle?: number; + twiststeps?: number; +} +declare module CSG { + class Polygon2D extends CAG { + constructor(points: Vector2D[]); + } +} diff --git a/PayPal-Cordova-Plugin/PayPal-Cordova-Plugin-tests.ts b/PayPal-Cordova-Plugin/PayPal-Cordova-Plugin-tests.ts new file mode 100644 index 0000000000..dca1f93120 --- /dev/null +++ b/PayPal-Cordova-Plugin/PayPal-Cordova-Plugin-tests.ts @@ -0,0 +1,115 @@ + +/// + +var item: PayPalItem; +item = new PayPalItem("name", 10, "25.00", "USD"); +item = new PayPalItem("name", 10, "25.00", "USD", null); +item = new PayPalItem("name", 10, "25.00", "USD", "SKU_ID"); + +var item_name: string = item.name; +var item_quantity: number = item.quantity; +var item_price: string = item.price; +var item_currency: string = item.currency; +var item_sku: string = item.sku; + + + +var paymentDetails: PayPalPaymentDetails; +paymentDetails = new PayPalPaymentDetails("10.50", "2.50", "1.25"); + +var paymentDetails_subtotal: string = paymentDetails.subtotal; +var paymentDetails_shipping: string = paymentDetails.shipping; +var paymentDetails_tax: string = paymentDetails.tax; + + + +var shippingAddress: PayPalShippingAddress; +shippingAddress = new PayPalShippingAddress("name", "line1", "line2", "city", "state", "postalCode", "countryCode"); + +var shippingAddress_recipientName: string = shippingAddress.recipientName; +var shippingAddress_line1: string = shippingAddress.line1; +var shippingAddress_line2: string = shippingAddress.line2; +var shippingAddress_city: string = shippingAddress.city; +var shippingAddress_state: string = shippingAddress.state; +var shippingAddress_postalCode: string = shippingAddress.postalCode; +var shippingAddress_countryCode: string = shippingAddress.countryCode; + + + +var payment: PayPalPayment; +payment = new PayPalPayment("10.00", "USD", "description", "Auth"); +payment = new PayPalPayment("10.00", "USD", "description", "Auth", paymentDetails); + +var payment_amount: string = payment.amount; +var payment_currency: string = payment.currency; +var payment_shortDescription: string = payment.shortDescription; +var payment_intent: string = payment.intent; +var payment_details: PayPalPaymentDetails = payment.details; +var payment_invoiceNumber: string = payment.invoiceNumber; +var payment_custom: string = payment.custom; +var payment_softDescriptor: string = payment.softDescriptor; +var payment_bnCode: string = payment.bnCode; +var payment_items: PayPalItem[] = [item, item, item]; +var payment_shippingAddress: PayPalShippingAddress = shippingAddress; + + + +var configOptions: PayPalConfigurationOptions = { + defaultUserEmail: "email", + defaultUserPhoneCountryCode: "countryCode", + defaultUserPhoneNumber: "phoneNumber", + merchantName: "merchantName", + merchantPrivacyPolicyURL: "merchantPrivacyPolicyURL", + merchantUserAgreementURL: "merchantUserAgreementURL", + acceptCreditCards: true, + payPalShippingAddressOption: 10, + rememberUser: true, + languageOrLocale: "languageOrLocal", + disableBlurWhenBackgrounding: true, + presentingInPopover: true, + forceDefaultsInSandbox: true, + sandboxUserPassword: "sandboxUserPassword", + sandboxUserPin: "sandboxUserPin" +}; + + + +var config: PayPalConfiguration; +config = new PayPalConfiguration(); +config = new PayPalConfiguration(null); +config = new PayPalConfiguration(configOptions); + +var config_defaultUserEmail: string = config.defaultUserEmail; +var config_defaultUserPhoneCountryCode: string = config.defaultUserPhoneCountryCode; +var config_defaultUserPhoneNumber: string = config.defaultUserPhoneNumber; +var config_merchantName: string = config.merchantName; +var config_merchantPrivacyPolicyURL: string = config.merchantPrivacyPolicyURL; +var config_merchantUserAgreementURL: string = config.merchantUserAgreementURL; +var config_acceptCreditCards: boolean = config.acceptCreditCards; +var config_payPalShippingAddressOption: number = config.payPalShippingAddressOption; +var config_rememberUser: boolean = config.rememberUser; +var config_languageOrLocale: string = config.languageOrLocale; +var config_disableBlurWhenBackgrounding: boolean = config.disableBlurWhenBackgrounding; +var config_presentingInPopover: boolean = config.presentingInPopover; +var config_forceDefaultsInSandbox: boolean = config.forceDefaultsInSandbox; +var config_sandboxUserPasword: string = config.sandboxUserPassword; +var config_sandboxUserPin: string = config.sandboxUserPin; + + + +var clientIds: PayPalCordovaPlugin.PayPalClientIds = { + PayPalEnvironmentProduction: "", + PayPalEnvironmentSandbox: "" +}; + + + +var apiModule: PayPalCordovaPlugin.PayPalMobileStatic = PayPalMobile; +apiModule.version((result: string) => {}); +apiModule.init(clientIds, () => {}); +apiModule.prepareToRender("environment", config, () => {}); +apiModule.renderSinglePaymentUI(payment, (result: any) => {}, (cancelReason: string) => {}); +apiModule.applicationCorrelationIDForEnvironment("environment", (applicationCorrelationId: string) => {}); +apiModule.clientMetadataID((clientMetadataId: string) => {}); +apiModule.renderFuturePaymentUI((result: any) => {}, (cancelReason: string) => {}); +apiModule.renderProfileSharingUI(["openid", "profile", "email"], (result: any) => {}, (cancelReason: string) => {}); \ No newline at end of file diff --git a/PayPal-Cordova-Plugin/PayPal-Cordova-Plugin.d.ts b/PayPal-Cordova-Plugin/PayPal-Cordova-Plugin.d.ts new file mode 100644 index 0000000000..07c172d558 --- /dev/null +++ b/PayPal-Cordova-Plugin/PayPal-Cordova-Plugin.d.ts @@ -0,0 +1,615 @@ +// Type definitions for PayPal-Cordova-Plugin 3.1.10 +// Project: https://github.com/paypal/PayPal-Cordova-Plugin +// Definitions by: Justin Unterreiner +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +//#region paypal-mobile-js-helper.js + +/** + * The PayPalItem class defines an optional itemization for a payment. + * + * @see https://developer.paypal.com/docs/api/#item-object for more details. + */ +declare class PayPalItem { + + /** + * @param name Name of the item. 127 characters max. + * @param quantity Number of units. 10 characters max. + * @param price Unit price for this item 10 characters max. + * May be negative for "coupon" etc. + * @param currency ISO standard currency code. + * @param sku The stock keeping unit for this item. 50 characters max (optional). + */ + constructor(name: string, quantity: number, price: string, currency: string, sku?: string); + + /** + * Name of the item. 127 characters max. + */ + name: string; + + /** + * Number of units. 10 characters max. + */ + quantity: number; + + /** + * Unit price for this item 10 characters max. + * May be negative for "coupon" etc. + */ + price: string; + + /** + * ISO standard currency code. + */ + currency: string; + + /** + * The stock keeping unit for this item. 50 characters max (optional). + */ + sku: string; +} + +/** + * The PayPalPaymentDetails class defines optional amount details. + * + * @see https://developer.paypal.com/webapps/developer/docs/api/#details-object for more details. + */ +declare class PayPalPaymentDetails { + + /** + * @param subtotal Sub-total (amount) of items being paid for. 10 characters max with support for 2 decimal places. + * @param shipping Amount charged for shipping. 10 characters max with support for 2 decimal places. + * @param tax Amount charged for tax. 10 characters max with support for 2 decimal places. + */ + constructor(subtotal: string, shipping: string, tax: string); + + /** + * Sub-total (amount) of items being paid for. 10 characters max with support for 2 decimal places. + */ + subtotal: string; + + /** + * Amount charged for shipping. 10 characters max with support for 2 decimal places. + */ + shipping: string; + + /** + * Amount charged for tax. 10 characters max with support for 2 decimal places. + */ + tax: string; +} + +/** + * Convenience constructor. Returns a PayPalPayment with the specified amount, currency code, and short description. + */ +declare class PayPalPayment { + + /** + * @param amount The amount of the payment. + * @param currencyCode The ISO 4217 currency for the payment. + * @param shortDescription A short descripton of the payment. + * @param intent • "Sale" for an immediate payment. + * • "Auth" for payment authorization only, to be captured separately at a later time. + * • "Order" for taking an order, with authorization and capture to be done separately at a later time. + * @param details PayPalPaymentDetails object (optional). + */ + constructor(amount: string, currency: string, shortDescription: string, intent: string, details?: PayPalPaymentDetails); + + /** + * The amount of the payment. + */ + amount: string; + + /** + * The ISO 4217 currency for the payment. + */ + currency: string; + + /** + * A short descripton of the payment. + */ + shortDescription: string; + + /** + * • "Sale" for an immediate payment. + * • "Auth" for payment authorization only, to be captured separately at a later time. + * • "Order" for taking an order, with authorization and capture to be done separately at a later time. + */ + intent: string; + + /** + * PayPalPaymentDetails object (optional). + */ + details: PayPalPaymentDetails; + + /** + * Optional invoice number, for your tracking purposes. (up to 256 characters). + */ + invoiceNumber: string; + + /** + * Optional text, for your tracking purposes. (up to 256 characters). + */ + custom: string; + + /** + * Optional text which will appear on the customer's credit card statement. (up to 22 characters). + */ + softDescriptor: string; + + /** + * Optional Build Notation code ("BN code"), obtained from partnerprogram@paypal.com, for your tracking purposes. + */ + bnCode: string; + + /** + * Optional array of PayPalItem objects. + * @see PayPalItem + * @note If you provide one or more items, be sure that the various prices correctly sum to the payment `amount` or to `paymentDetails.subtotal`. + */ + items: PayPalItem[]; + + /** + * Optional customer shipping address, if your app wishes to provide this to the SDK. + * @note make sure to set `payPalShippingAddressOption` in PayPalConfiguration to 1 or 3. + */ + shippingAddress: PayPalShippingAddress; +} + +declare class PayPalShippingAddress { + + /** + * @param recipientName Name of the recipient at this address. 50 characters max. + * @param line1 Line 1 of the address (e.g., Number, street, etc). 100 characters max. + * @param line2 Line 2 of the address (e.g., Suite, apt #, etc). 100 characters max. Optional. + * @param city City name. 50 characters max. + * @param state 2-letter code for US states, and the equivalent for other countries. 100 characters max. Required in certain countries. + * @param postalCode ZIP code or equivalent is usually required for countries that have them. 20 characters max. Required in certain countries. + * @param countryCode 2-letter country code. 2 characters max. + */ + constructor(recipientName: string, line1: string, line2: string, city: string, state: string, postalCode: string, countryCode: string); + + /** + * Name of the recipient at this address. 50 characters max. + */ + recipientName: string; + + /** + * Line 1 of the address (e.g., Number, street, etc). 100 characters max. + */ + line1: string; + + /** + * Line 2 of the address (e.g., Suite, apt #, etc). 100 characters max. Optional. + */ + line2: string; + + /** + * City name. 50 characters max. + */ + city: string; + + /** + * 2-letter code for US states, and the equivalent for other countries. 100 characters max. Required in certain countries. + */ + state: string; + + /** + * ZIP code or equivalent is usually required for countries that have them. 20 characters max. Required in certain countries. + */ + postalCode: string; + + /** + * 2-letter country code. 2 characters max. + */ + countryCode: string; +} + +declare class PayPalConfiguration { + + /** + * @param options A set of options to use. Any options not specified will assume default values. + */ + constructor(options?: PayPalConfigurationOptions); + + /** + * Will be overridden by email used in most recent PayPal login. + */ + defaultUserEmail: string; + + /** + * Will be overridden by phone country code used in most recent PayPal login + */ + defaultUserPhoneCountryCode: string; + + /** + * Will be overridden by phone number used in most recent PayPal login. + * @note If you set defaultUserPhoneNumber, be sure to also set defaultUserPhoneCountryCode. + */ + defaultUserPhoneNumber: string; + + /** + * Your company name, as it should be displayed to the user + * when requesting consent via a PayPalFuturePaymentViewController. + */ + merchantName: string; + + /** + * URL of your company's privacy policy, which will be offered to the user + * when requesting consent via a PayPalFuturePaymentViewController. + */ + merchantPrivacyPolicyURL: string; + + /** + * URL of your company's user agreement, which will be offered to the user + * when requesting consent via a PayPalFuturePaymentViewController. + */ + merchantUserAgreementURL: string; + + /** + * If set to false, the SDK will only support paying with PayPal, not with credit cards. + * This applies only to single payments (via PayPalPaymentViewController). + * Future payments (via PayPalFuturePaymentViewController) always use PayPal. + * Defaults to true. + */ + acceptCreditCards: boolean; + + /** + * For single payments, options for the shipping address. + * + * - 0 - PayPalShippingAddressOptionNone: no shipping address applies. + * + * - 1 - PayPalShippingAddressOptionProvided: shipping address will be provided by your app, + * in the shippingAddress property of PayPalPayment. + * + * - 2 - PayPalShippingAddressOptionPayPal: user will choose from shipping addresses on file + * for their PayPal account. + * + * - 3 - PayPalShippingAddressOptionBoth: user will choose from the shipping address provided by your app, + * in the shippingAddress property of PayPalPayment, plus the shipping addresses on file for the user's PayPal account. + * + * Defaults to 0 (PayPalShippingAddressOptionNone). + */ + payPalShippingAddressOption: number; + + /** + * If set to true, then if the user pays via their PayPal account, + * the SDK will remember the user's PayPal username or phone number; + * if the user pays via their credit card, then the SDK will remember + * the PayPal Vault token representing the user's credit card. + * + * If set to false, then any previously-remembered username, phone number, or + * credit card token will be erased, and subsequent payment information will + * not be remembered. + * + * Defaults to true. + */ + rememberUser: boolean; + + /** + * If not set, or if set to nil, defaults to the device's current language setting. + * + * Can be specified as a language code ("en", "fr", "zh-Hans", etc.) or as a locale ("en_AU", "fr_FR", "zh-Hant_HK", etc.). + * If the library does not contain localized strings for a specified locale, then will fall back to the language. E.g., "es_CO" -> "es". + * If the library does not contain localized strings for a specified language, then will fall back to American English. + * + * If you specify only a language code, and that code matches the device's currently preferred language, + * then the library will attempt to use the device's current region as well. + * E.g., specifying "en" on a device set to "English" and "United Kingdom" will result in "en_GB". + * + * These localizations are currently included: + * da,de,en,en_AU,en_GB,en_SV,es,es_MX,fr,he,it,ja,ko,nb,nl,pl,pt,pt_BR,ru,sv,tr,zh-Hans,zh-Hant_HK,zh-Hant_TW. + */ + languageOrLocale: string; + + /** + * Normally, the SDK blurs the screen when the app is backgrounded, + * to obscure credit card or PayPal account details in the iOS-saved screenshot. + * If your app already does its own blurring upon backgrounding, you might choose to disable this. + * Defaults to false. + */ + disableBlurWhenBackgrounding: boolean; + + /** + * If you will present the SDK's view controller within a popover, then set this property to true. + * Defaults to false. (iOS only) + */ + presentingInPopover: boolean; + + /** + * Sandbox credentials can be difficult to type on a mobile device. Setting this flag to true will + * cause the sandboxUserPassword and sandboxUserPin to always be pre-populated into login fields. + * + * This setting will have no effect if the operation mode is production. + * Defaults to false. + */ + forceDefaultsInSandbox: boolean; + + /** + * Password to use for sandbox if 'forceDefaultsInSandbox' is set. + */ + sandboxUserPassword: string; + + /** + * PIN to use for sandbox if 'forceDefaultsInSandbox' is set. + */ + sandboxUserPin: string; +} + +/** + * Describes the options that can be passed into the PayPalConfiguration class constructor. + */ +interface PayPalConfigurationOptions { + + /** + * Will be overridden by email used in most recent PayPal login. + */ + defaultUserEmail?: string; + + /** + * Will be overridden by phone country code used in most recent PayPal login + */ + defaultUserPhoneCountryCode?: string; + + /** + * Will be overridden by phone number used in most recent PayPal login. + * @note If you set defaultUserPhoneNumber, be sure to also set defaultUserPhoneCountryCode. + */ + defaultUserPhoneNumber?: string; + + /** + * Your company name, as it should be displayed to the user + * when requesting consent via a PayPalFuturePaymentViewController. + */ + merchantName?: string; + + /** + * URL of your company's privacy policy, which will be offered to the user + * when requesting consent via a PayPalFuturePaymentViewController. + */ + merchantPrivacyPolicyURL?: string; + + /** + * URL of your company's user agreement, which will be offered to the user + * when requesting consent via a PayPalFuturePaymentViewController. + */ + merchantUserAgreementURL?: string; + + /** + * If set to false, the SDK will only support paying with PayPal, not with credit cards. + * This applies only to single payments (via PayPalPaymentViewController). + * Future payments (via PayPalFuturePaymentViewController) always use PayPal. + * Defaults to true. + */ + acceptCreditCards?: boolean; + + /** + * For single payments, options for the shipping address. + * + * - 0 - PayPalShippingAddressOptionNone?: no shipping address applies. + * + * - 1 - PayPalShippingAddressOptionProvided?: shipping address will be provided by your app, + * in the shippingAddress property of PayPalPayment. + * + * - 2 - PayPalShippingAddressOptionPayPal?: user will choose from shipping addresses on file + * for their PayPal account. + * + * - 3 - PayPalShippingAddressOptionBoth?: user will choose from the shipping address provided by your app, + * in the shippingAddress property of PayPalPayment, plus the shipping addresses on file for the user's PayPal account. + * + * Defaults to 0 (PayPalShippingAddressOptionNone). + */ + payPalShippingAddressOption?: number; + + /** + * If set to true, then if the user pays via their PayPal account, + * the SDK will remember the user's PayPal username or phone number; + * if the user pays via their credit card, then the SDK will remember + * the PayPal Vault token representing the user's credit card. + * + * If set to false, then any previously-remembered username, phone number, or + * credit card token will be erased, and subsequent payment information will + * not be remembered. + * + * Defaults to true. + */ + rememberUser?: boolean; + + /** + * If not set, or if set to nil, defaults to the device's current language setting. + * + * Can be specified as a language code ("en", "fr", "zh-Hans", etc.) or as a locale ("en_AU", "fr_FR", "zh-Hant_HK", etc.). + * If the library does not contain localized strings for a specified locale, then will fall back to the language. E.g., "es_CO" -> "es". + * If the library does not contain localized strings for a specified language, then will fall back to American English. + * + * If you specify only a language code, and that code matches the device's currently preferred language, + * then the library will attempt to use the device's current region as well. + * E.g., specifying "en" on a device set to "English" and "United Kingdom" will result in "en_GB". + * + * These localizations are currently included: + * da,de,en,en_AU,en_GB,en_SV,es,es_MX,fr,he,it,ja,ko,nb,nl,pl,pt,pt_BR,ru,sv,tr,zh-Hans,zh-Hant_HK,zh-Hant_TW. + */ + languageOrLocale?: string; + + /** + * Normally, the SDK blurs the screen when the app is backgrounded, + * to obscure credit card or PayPal account details in the iOS-saved screenshot. + * If your app already does its own blurring upon backgrounding, you might choose to disable this. + * Defaults to false. + */ + disableBlurWhenBackgrounding?: boolean; + + /** + * If you will present the SDK's view controller within a popover, then set this property to true. + * Defaults to false. (iOS only) + */ + presentingInPopover?: boolean; + + /** + * Sandbox credentials can be difficult to type on a mobile device. Setting this flag to true will + * cause the sandboxUserPassword and sandboxUserPin to always be pre-populated into login fields. + * + * This setting will have no effect if the operation mode is production. + * Defaults to false. + */ + forceDefaultsInSandbox?: boolean; + + /** + * Password to use for sandbox if 'forceDefaultsInSandbox' is set. + */ + sandboxUserPassword?: string; + + /** + * PIN to use for sandbox if 'forceDefaultsInSandbox' is set. + */ + sandboxUserPin?: string; +} + +//#endregion + +//#region cdv-plugin-paypal-mobile-sdk.js + +declare module PayPalCordovaPlugin { + + export interface PayPalClientIds { + PayPalEnvironmentProduction: string; + PayPalEnvironmentSandbox: string; + } + + /** + * Represents the portion of an object that is common to all responses. + */ + export interface BaseResult { + client: Client; + response_type: string; + } + + /** + * Represents the client portion of the response. + */ + export interface Client { + paypal_sdk_version: string; + environment: string; + platform: string; + product_name: string; + } + + /** + * Represents the response for a successful callback from renderSinglePaymentUI(). + */ + export interface SinglePaymentResult extends BaseResult { + response: { + intent: string; + id: string; + state: string; + authorization_id: string; + create_time: string; + }; + } + + /** + * Represents the response for a successful callback from renderFuturePaymentUI(). + */ + export interface FuturePaymentResult extends BaseResult { + response: { + code: string; + }; + } + + export interface PayPalMobileStatic { + /** + * Retrieve the version of the PayPal iOS SDK library. Useful when contacting support. + * + * @param completionCallback a callback function accepting a string + */ + version(completionCallback: (result: string) => void): void; + + /** + * You MUST call this method to initialize the PayPal Mobile SDK. + * + * The PayPal Mobile SDK can operate in different environments to facilitate development and testing. + * + * @param clientIdsForEnvironments set of client ids for environments + * Example: var clientIdsForEnvironments = { + * PayPalEnvironmentProduction : @"my-client-id-for-Production", + * PayPalEnvironmentSandbox : @"my-client-id-for-Sandbox" + * } + * @param completionCallback a callback function on success + */ + init(clientIdsForEnvironments: PayPalCordovaPlugin.PayPalClientIds, completionCallback: () => void): void; + + /** + * You must preconnect to PayPal to prepare the device for processing payments. + * This improves the user experience, by making the presentation of the + * UI faster. The preconnect is valid for a limited time, so + * the recommended time to preconnect is on page load. + * + * @param environment available options are "PayPalEnvironmentNoNetwork", "PayPalEnvironmentProduction" and "PayPalEnvironmentSandbox" + * @param configuration PayPalConfiguration object, for Future Payments merchantName, merchantPrivacyPolicyURL + * and merchantUserAgreementURL must be set be set + * @param completionCallback a callback function on success + */ + prepareToRender(environment: string, configuration: PayPalConfiguration, completionCallback: () => void): void; + + /** + * Start PayPal UI to collect payment from the user. + * See https://developer.paypal.com/webapps/developer/docs/integration/mobile/ios-integration-guide/ + * for more documentation of the params. + * + * @param payment PayPalPayment object + * @param completionCallback a callback function accepting a js object, called when the user has completed payment + * @param cancelCallback a callback function accepting a reason string, called when the user cancels the payment + */ + renderSinglePaymentUI(payment: PayPalPayment, completionCallback: (result: PayPalCordovaPlugin.SinglePaymentResult) => void, cancelCallback: (cancelReason: string) => void): void; + + /** + * @deprecated + * Once a user has consented to future payments, when the user subsequently initiates a PayPal payment + * from their device to be completed by your server, PayPal uses a Correlation ID to verify that the + * payment is originating from a valid, user-consented device+application. + * This helps reduce fraud and decrease declines. + * This method MUST be called prior to initiating a pre-consented payment (a "future payment") from a mobile device. + * Pass the result to your server, to include in the payment request sent to PayPal. + * Do not otherwise cache or store this value. + * + * @param environment available options are "PayPalEnvironmentNoNetwork", "PayPalEnvironmentProduction" and "PayPalEnvironmentSandbox" + * @param callback applicationCorrelationID Your server will send this to PayPal in a 'Paypal-Application-Correlation-Id' header. + */ + applicationCorrelationIDForEnvironment(environment: string, completionCallback: (applicationCorrelationId: string) => void): void; + + /** + * Once a user has consented to future payments, when the user subsequently initiates a PayPal payment + * from their device to be completed by your server, PayPal uses a Correlation ID to verify that the + * payment is originating from a valid, user-consented device+application. + * This helps reduce fraud and decrease declines. + * This method MUST be called prior to initiating a pre-consented payment (a "future payment") from a mobile device. + * Pass the result to your server, to include in the payment request sent to PayPal. + * Do not otherwise cache or store this value. + * + * @param callback clientMetadataID Your server will send this to PayPal in a 'PayPal-Client-Metadata-Id' header. + */ + clientMetadataID(completionCallback: (clientMetadataId: string) => void): void; + + /** + * Please Read Docs on Future Payments at https://github.com/paypal/PayPal-iOS-SDK#future-payments + * + * @param completionCallback a callback function accepting a js object with future payment authorization + * @param cancelCallback a callback function accepting a reason string, called when the user canceled without agreement + */ + renderFuturePaymentUI(completionCallback: (result: PayPalCordovaPlugin.FuturePaymentResult) => void, cancelCallback: (cancelReason: string) => void): void; + + /** + * Please Read Docs on Profile Sharing at https://github.com/paypal/PayPal-iOS-SDK#profile-sharing + * + * @param scopes scopes Set of requested scope-values. Accepted scopes are: openid, profile, address, email, phone, futurepayments and paypalattributes + * See https://developer.paypal.com/docs/integration/direct/identity/attributes/ for more details + * @param completionCallback a callback function accepting a js object with future payment authorization + * @param cancelCallback a callback function accepting a reason string, called when the user canceled without agreement + */ + renderProfileSharingUI(scopes: string[], completionCallback: (result: any) => void, cancelCallback: (cancelReason: string) => void): void; + } +} + +declare var PayPalMobile: PayPalCordovaPlugin.PayPalMobileStatic; + +//#endregion diff --git a/README.md b/README.md index cf20cf55a1..82833752d7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # DefinitelyTyped [![Build Status](https://travis-ci.org/borisyankov/DefinitelyTyped.png?branch=master)](https://travis-ci.org/borisyankov/DefinitelyTyped) +[![Join the chat at https://gitter.im/borisyankov/DefinitelyTyped](https://badges.gitter.im/Join%20Chat.svg)](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. @@ -14,7 +16,7 @@ Include a line like this: ## Contributions -DefinitelyTyped only works because of contributions by users like you! +DefinitelyTyped only works because of contributions by users like you! Please see the [contribution guide](http://definitelytyped.org/guides/contributing.html) on how to contribute to DefinitelyTyped. @@ -32,7 +34,7 @@ Please see the [contribution guide](http://definitelytyped.org/guides/contributi Here is are the [currently requested definitions](https://github.com/borisyankov/DefinitelyTyped/labels/Definition%3ARequest). -## Licence +## License This project is licensed under the MIT license. diff --git a/_debugger/_debugger-tests.ts b/_debugger/_debugger-tests.ts new file mode 100644 index 0000000000..e6d7cf9980 --- /dev/null +++ b/_debugger/_debugger-tests.ts @@ -0,0 +1,10 @@ +/// +import _debugger = require("_debugger"); +var {Client} = _debugger; + +var client = new Client(); + +client.connect(8888, 'localhost'); +client.listbreakpoints((err, res) => { + +}); diff --git a/_debugger/_debugger.d.ts b/_debugger/_debugger.d.ts new file mode 100644 index 0000000000..15ed8bfcf1 --- /dev/null +++ b/_debugger/_debugger.d.ts @@ -0,0 +1,135 @@ +// Type definitions for Node.js debugger API +// Project: http://nodejs.org/ +// Definitions by: Basarat Ali Syed +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module NodeJS { + export module _debugger { + export interface Packet { + raw: string; + headers: string[]; + body: Message; + } + + export interface Message { + seq: number; + type: string; + } + + export interface RequestInfo { + command: string; + arguments: any; + } + + export interface Request extends Message, RequestInfo { + } + + export interface Event extends Message { + event: string; + body?: any; + } + + export interface Response extends Message { + request_seq: number; + success: boolean; + /** Contains error message if success === false. */ + message?: string; + /** Contains message body if success === true. */ + body?: any; + } + + export interface BreakpointMessageBody { + type: string; + target: number; + line: number; + } + + export class Protocol { + res: Packet; + state: string; + execute(data: string): void; + serialize(rq: Request): string; + onResponse: (pkt: Packet) => void; + } + + export var NO_FRAME: number; + export var port: number; + + export interface ScriptDesc { + name: string; + id: number; + isNative?: boolean; + handle?: number; + type: string; + lineOffset?: number; + columnOffset?: number; + lineCount?: number; + } + + export interface Breakpoint { + id: number; + scriptId: number; + script: ScriptDesc; + line: number; + condition?: string; + scriptReq?: string; + } + + export interface RequestHandler { + (err: boolean, body: Message, res: Packet): void; + request_seq?: number; + } + + export interface ResponseBodyHandler { + (err: boolean, body?: any): void; + request_seq?: number; + } + + export interface ExceptionInfo { + text: string; + } + + export interface BreakResponse { + script?: ScriptDesc; + exception?: ExceptionInfo; + sourceLine: number; + sourceLineText: string; + sourceColumn: number; + } + + export function SourceInfo(body: BreakResponse): string; + + export interface ClientInstance extends EventEmitter { + protocol: Protocol; + scripts: ScriptDesc[]; + handles: ScriptDesc[]; + breakpoints: Breakpoint[]; + currentSourceLine: number; + currentSourceColumn: number; + currentSourceLineText: string; + currentFrame: number; + currentScript: string; + + connect(port: number, host: string): void; + req(req: any, cb: RequestHandler): void; + reqFrameEval(code: string, frame: number, cb: RequestHandler): void; + mirrorObject(obj: any, depth: number, cb: ResponseBodyHandler): void; + setBreakpoint(rq: BreakpointMessageBody, cb: RequestHandler): void; + clearBreakpoint(rq: Request, cb: RequestHandler): void; + listbreakpoints(cb: RequestHandler): void; + reqSource(from: number, to: number, cb: RequestHandler): void; + reqScripts(cb: any): void; + reqContinue(cb: RequestHandler): void; + } + + export var Client : { + new (): ClientInstance + } + } +} + +declare module "_debugger"{ + export = NodeJS._debugger; +} diff --git a/abs/abs-tests.ts b/abs/abs-tests.ts new file mode 100644 index 0000000000..80f52f8ffd --- /dev/null +++ b/abs/abs-tests.ts @@ -0,0 +1,5 @@ +/// + +import Abs from 'abs'; + +const x: string = Abs('/foo'); diff --git a/abs/abs.d.ts b/abs/abs.d.ts new file mode 100644 index 0000000000..58a5335283 --- /dev/null +++ b/abs/abs.d.ts @@ -0,0 +1,14 @@ +// Type definitions for abs 1.1.0 +// Project: https://github.com/IonicaBizau/node-abs +// Definitions by: Aya Morisawa +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module "abs" { + /** + * Compute the absolute path of an input. + * @param input The input path. + */ + function Abs(input: string): string; + + export default Abs; +} diff --git a/absolute/absolute-tests.ts b/absolute/absolute-tests.ts new file mode 100644 index 0000000000..5c2514450a --- /dev/null +++ b/absolute/absolute-tests.ts @@ -0,0 +1,5 @@ +/// + +import absolute from 'absolute'; + +const x: boolean = absolute('/home/foo'); diff --git a/absolute/absolute.d.ts b/absolute/absolute.d.ts new file mode 100644 index 0000000000..c0e8e9bd6e --- /dev/null +++ b/absolute/absolute.d.ts @@ -0,0 +1,13 @@ +// Type definitions for absolute 0.0.1 +// Project: https://github.com/bahamas10/node-absolute +// Definitions by: Aya Morisawa +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module "absolute" { + /** + * Test if a path is absolute + */ + function absolute(path: string): boolean; + + export default absolute; +} diff --git a/acc-wizard/acc-wizard.d.ts b/acc-wizard/acc-wizard.d.ts index 5eb81a11c7..f6235d2caf 100644 --- a/acc-wizard/acc-wizard.d.ts +++ b/acc-wizard/acc-wizard.d.ts @@ -47,7 +47,19 @@ interface AccWizardOptions { nextText: string; /** - * @summary Text for back button + * @summary Text for back button. + * @type {string} + */ + backText: string; + + /** + * @summary HTML input type for next button. (default: "submit") + * @type {string} + */ + nextType: string; + + /** + * @summary HTML input type for back button. (default: "reset") * @type {string} */ backType: string; diff --git a/ace/ace.d.ts b/ace/ace.d.ts index 29fadf3bc7..8fed295f20 100644 --- a/ace/ace.d.ts +++ b/ace/ace.d.ts @@ -18,22 +18,24 @@ declare module AceAjax { bindKey:any; - exec:Function; + exec: Function; + + readOnly?: boolean; } export interface CommandManager { - byName; + byName: any; - commands; + commands: any; platform: string; - addCommands(commands:EditorCommand[]); + addCommands(commands:EditorCommand[]): void; - addCommand(command:EditorCommand); + addCommand(command:EditorCommand): void; - exec(name: string, editor: Editor, args: any); + exec(name: string, editor: Editor, args: any): void; } export interface Annotation { @@ -61,19 +63,19 @@ declare module AceAjax { export interface KeyBinding { - setDefaultHandler(kb); + setDefaultHandler(kb: any): void; - setKeyboardHandler(kb); + setKeyboardHandler(kb: any): void; - addKeyboardHandler(kb, pos); + addKeyboardHandler(kb: any, pos: any): void; - removeKeyboardHandler(kb): boolean; + removeKeyboardHandler(kb: any): boolean; getKeyboardHandler(): any; - onCommandKey(e, hashId, keyCode); + onCommandKey(e: any, hashId: any, keyCode: any): void; - onTextInput(text); + onTextInput(text: any): void; } var KeyBinding: { new(editor: Editor): KeyBinding; @@ -83,19 +85,19 @@ declare module AceAjax { getTokenizer(): any; - toggleCommentLines(state, doc, startRow, endRow); + toggleCommentLines(state: any, doc: any, startRow: any, endRow: any): void; - getNextLineIndent (state, line, tab): string; + getNextLineIndent (state: any, line: any, tab: any): string; - checkOutdent(state, line, input): boolean; + checkOutdent(state: any, line: any, input: any): boolean; - autoOutdent(state, doc, row); + autoOutdent(state: any, doc: any, row: any): void; - createWorker(session): any; + createWorker(session: any): any; - createModeDelegates (mapping); + createModeDelegates (mapping: any): void; - transformAction(state, action, editor, session, param): any; + transformAction(state: any, action: any, editor: any, session: any, param: any): any; } //////////////// @@ -149,7 +151,7 @@ declare module AceAjax { **/ export interface Anchor { - on(event: string, fn: (e) => any); + on(event: string, fn: (e: any) => any): void; /** * Returns an object identifying the `row` and `column` position of the current anchor. @@ -169,7 +171,7 @@ declare module AceAjax { * - `old`: An object describing the old Anchor position * - `value`: An object describing the new Anchor position **/ - onChange(e: any); + onChange(e: any): void; /** * Sets the anchor position to the specified row and column. If `noClip` is `true`, the position is not clipped. @@ -177,12 +179,12 @@ declare module AceAjax { * @param column The column index to move the anchor to * @param noClip Identifies if you want the position to be clipped **/ - setPosition(row: number, column: number, noClip: boolean); + setPosition(row: number, column: number, noClip: boolean): void; /** * When called, the `'change'` event listener is removed. **/ - detach(); + detach(): void; } var Anchor: { /** @@ -210,31 +212,31 @@ declare module AceAjax { * Sets a new tokenizer for this object. * @param tokenizer The new tokenizer to use **/ - setTokenizer(tokenizer: Tokenizer); + setTokenizer(tokenizer: Tokenizer): void; /** * Sets a new document to associate with this object. * @param doc The new document to associate with **/ - setDocument(doc: Document); + setDocument(doc: Document): void; /** * Emits the `'update'` event. `firstRow` and `lastRow` are used to define the boundaries of the region to be updated. * @param firstRow The starting row region * @param lastRow The final row region **/ - fireUpdateEvent(firstRow: number, lastRow: number); + fireUpdateEvent(firstRow: number, lastRow: number): void; /** * Starts tokenizing at the row indicated. * @param startRow The row to start at **/ - start(startRow: number); + start(startRow: number): void; /** * Stops tokenizing. **/ - stop(); + stop(): void; /** * Gives list of tokens of the row. (tokens are cached) @@ -267,13 +269,13 @@ declare module AceAjax { **/ export interface Document { - on(event: string, fn: (e) => any); + on(event: string, fn: (e: any) => any): void; /** * Replaces all the lines in the current `Document` with the value of `text`. * @param text The text to use **/ - setValue(text: string); + setValue(text: string): void; /** * Returns all the lines in the document as a single string, split by the new line character. @@ -285,7 +287,7 @@ declare module AceAjax { * @param row The row number to use * @param column The column number to use **/ - createAnchor(row: number, column: number); + createAnchor(row: number, column: number): void; /** * Returns the newline character that's being used, depending on the value of `newLineMode`. @@ -296,7 +298,7 @@ declare module AceAjax { * [Sets the new line mode.]{: #Document.setNewLineMode.desc} * @param newLineMode [The newline mode to use; can be either `windows`, `unix`, or `auto`]{: #Document.setNewLineMode.param} **/ - setNewLineMode(newLineMode: string); + setNewLineMode(newLineMode: string): void; /** * [Returns the type of newlines being used; either `windows`, `unix`, or `auto`]{: #Document.getNewLineMode} @@ -390,7 +392,7 @@ declare module AceAjax { * Removes the new line between `row` and the row immediately following it. This method also triggers the `'change'` event. * @param row The row to check **/ - removeNewLine(row: number); + removeNewLine(row: number): void; /** * Replaces a range in the document with the new `text`. @@ -402,12 +404,12 @@ declare module AceAjax { /** * Applies all the changes previously accumulated. These can be either `'includeText'`, `'insertLines'`, `'removeText'`, and `'removeLines'`. **/ - applyDeltas(deltas: Delta[]); + applyDeltas(deltas: Delta[]): void; /** * Reverts any changes previously applied. These can be either `'includeText'`, `'insertLines'`, `'removeText'`, and `'removeLines'`. **/ - revertDeltas(deltas: Delta[]); + revertDeltas(deltas: Delta[]): void; /** * Converts an index position in a document to a `{row, column}` object. @@ -464,33 +466,33 @@ declare module AceAjax { doc: Document; - on(event: string, fn: (e) => any); + on(event: string, fn: (e: any) => any): void; - findMatchingBracket(position: Position); + findMatchingBracket(position: Position): void; - addFold(text: string, range: Range); + addFold(text: string, range: Range): void; getFoldAt(row: number, column: number): any; - removeFold(arg: any); + removeFold(arg: any): void; - expandFold(arg: any); + expandFold(arg: any): void; - unfold(arg1: any, arg2: boolean); + unfold(arg1: any, arg2: boolean): void; - screenToDocumentColumn(row: number, column: number); + screenToDocumentColumn(row: number, column: number): void; getFoldDisplayLine(foldLine: any, docRow: number, docColumn: number): any; getFoldsInRange(range: Range): any; - highlight(text: string); + highlight(text: string): void; /** * Sets the `EditSession` to point to a new `Document`. If a `BackgroundTokenizer` exists, it also points to `doc`. * @param doc The new `Document` to use **/ - setDocument(doc: Document); + setDocument(doc: Document): void; /** * Returns the `Document` associated with this session. @@ -501,15 +503,15 @@ declare module AceAjax { * undefined * @param row The row to work with **/ - $resetRowCache(row: number); + $resetRowCache(row: number): void; /** * Sets the session text. * @param text The new text to place **/ - setValue(text: string); + setValue(text: string): void; - setMode(mode: string); + setMode(mode: string): void; /** * Returns the current [[Document `Document`]] as a string. @@ -544,7 +546,7 @@ declare module AceAjax { * Sets the undo manager. * @param undoManager The new undo manager **/ - setUndoManager(undoManager: UndoManager); + setUndoManager(undoManager: UndoManager): void; /** * Returns the current undo manager. @@ -552,7 +554,7 @@ declare module AceAjax { getUndoManager(): UndoManager; /** - * Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by [[EditSession.getTabSize `getTabSize()`]]); otherwise it's simply `'\t'`. + * Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by [[EditSession.getTabSize `getTabSize()`]]): void; otherwise it's simply `'\t'`. **/ getTabString(): string; @@ -560,7 +562,7 @@ declare module AceAjax { * Pass `true` to enable the use of soft tabs. Soft tabs means you're using spaces instead of the tab character (`'\t'`). * @param useSoftTabs Value indicating whether or not to use soft tabs **/ - setUseSoftTabs(useSoftTabs: boolean); + setUseSoftTabs(useSoftTabs: boolean): void; /** * Returns `true` if soft tabs are being used, `false` otherwise. @@ -571,12 +573,12 @@ declare module AceAjax { * Set the number of spaces that define a soft tab; for example, passing in `4` transforms the soft tabs to be equivalent to four spaces. This function also emits the `changeTabSize` event. * @param tabSize The new tab size **/ - setTabSize(tabSize: number); + setTabSize(tabSize: number): void; /** * Returns the current tab size. **/ - getTabSize(): string; + getTabSize(): number; /** * Returns `true` if the character at the position is a soft tab. @@ -589,7 +591,7 @@ declare module AceAjax { * If overwrites is enabled, any text you enter will type over any text after it. If the value of `overwrite` changes, this function also emites the `changeOverwrite` event. * @param overwrite Defines wheter or not to set overwrites **/ - setOverwrite(overwrite: boolean); + setOverwrite(overwrite: boolean): void; /** * Returns `true` if overwrites are enabled; `false` otherwise. @@ -599,21 +601,21 @@ declare module AceAjax { /** * Sets the value of overwrite to the opposite of whatever it currently is. **/ - toggleOverwrite(); + toggleOverwrite(): void; /** * Adds `className` to the `row`, to be used for CSS stylings and whatnot. * @param row The row number * @param className The class to add **/ - addGutterDecoration(row: number, className: string); + addGutterDecoration(row: number, className: string): void; /** * Removes `className` from the `row`. * @param row The row number * @param className The class to add **/ - removeGutterDecoration(row: number, className: string); + removeGutterDecoration(row: number, className: string): void; /** * Returns an array of numbers, indicating which rows have breakpoints. @@ -624,25 +626,25 @@ declare module AceAjax { * Sets a breakpoint on every row number given by `rows`. This function also emites the `'changeBreakpoint'` event. * @param rows An array of row indices **/ - setBreakpoints(rows: any[]); + setBreakpoints(rows: any[]): void; /** * Removes all breakpoints on the rows. This function also emites the `'changeBreakpoint'` event. **/ - clearBreakpoints(); + clearBreakpoints(): void; /** * Sets a breakpoint on the row number given by `rows`. This function also emites the `'changeBreakpoint'` event. * @param row A row index * @param className Class of the breakpoint **/ - setBreakpoint(row: number, className: string); + setBreakpoint(row: number, className: string): void; /** * Removes a breakpoint on the row number given by `rows`. This function also emites the `'changeBreakpoint'` event. * @param row A row index **/ - clearBreakpoint(row: number); + clearBreakpoint(row: number): void; /** * Adds a new marker to the given `Range`. If `inFront` is `true`, a front marker is defined, and the `'changeFrontMarker'` event fires; otherwise, the `'changeBackMarker'` event fires. @@ -651,7 +653,7 @@ declare module AceAjax { * @param type Identify the type of the marker * @param inFront Set to `true` to establish a front marker **/ - addMarker(range: Range, clazz: string, type: Function, inFront: boolean); + addMarker(range: Range, clazz: string, type: Function, inFront: boolean): void; /** * Adds a new marker to the given `Range`. If `inFront` is `true`, a front marker is defined, and the `'changeFrontMarker'` event fires; otherwise, the `'changeBackMarker'` event fires. @@ -660,20 +662,20 @@ declare module AceAjax { * @param type Identify the type of the marker * @param inFront Set to `true` to establish a front marker **/ - addMarker(range: Range, clazz: string, type: string, inFront: boolean); + addMarker(range: Range, clazz: string, type: string, inFront: boolean): void; /** * Adds a dynamic marker to the session. * @param marker object with update method * @param inFront Set to `true` to establish a front marker **/ - addDynamicMarker(marker: any, inFront: boolean); + addDynamicMarker(marker: any, inFront: boolean): void; /** * Removes the marker with the specified ID. If this marker was in front, the `'changeFrontMarker'` event is emitted. If the marker was in the back, the `'changeBackMarker'` event is emitted. * @param markerId A number representing a marker **/ - removeMarker(markerId: number); + removeMarker(markerId: number): void; /** * Returns an array containing the IDs of all the markers, either front or back. @@ -685,7 +687,7 @@ declare module AceAjax { * Sets annotations for the `EditSession`. This functions emits the `'changeAnnotation'` event. * @param annotations A list of annotations **/ - setAnnotations(annotations: Annotation[]); + setAnnotations(annotations: Annotation[]): void; /** * Returns the annotations for the `EditSession`. @@ -695,13 +697,13 @@ declare module AceAjax { /** * Clears all the annotations for this session. This function also triggers the `'changeAnnotation'` event. **/ - clearAnnotations(); + clearAnnotations(): void; /** * If `text` contains either the newline (`\n`) or carriage-return ('\r') characters, `$autoNewLine` stores that value. * @param text A block of text **/ - $detectNewLine(text: string); + $detectNewLine(text: string): void; /** * Given a starting row and column, this method returns the `Range` of the first word boundary it finds. @@ -721,7 +723,7 @@ declare module AceAjax { * {:Document.setNewLineMode.desc} * @param newLineMode {:Document.setNewLineMode.param} **/ - setNewLineMode(newLineMode: string); + setNewLineMode(newLineMode: string): void; /** * Returns the current new line mode. @@ -732,7 +734,7 @@ declare module AceAjax { * Identifies if you want to use a worker for the `EditSession`. * @param useWorker Set to `true` to use a worker **/ - setUseWorker(useWorker: boolean); + setUseWorker(useWorker: boolean): void; /** * Returns `true` if workers are being used. @@ -742,13 +744,13 @@ declare module AceAjax { /** * Reloads all the tokens on the current session. This function calls [[BackgroundTokenizer.start `BackgroundTokenizer.start ()`]] to all the rows; it also emits the `'tokenizerUpdate'` event. **/ - onReloadTokenizer(); + onReloadTokenizer(): void; /** * Sets a new text mode for the `EditSession`. This method also emits the `'changeMode'` event. If a [[BackgroundTokenizer `BackgroundTokenizer`]] is set, the `'tokenizerUpdate'` event is also emitted. * @param mode Set a new text mode **/ - $mode(mode: TextMode); + $mode(mode: TextMode): void; /** * Returns the current text mode. @@ -759,7 +761,7 @@ declare module AceAjax { * This function sets the scroll top value. It also emits the `'changeScrollTop'` event. * @param scrollTop The new scroll top value **/ - setScrollTop(scrollTop: number); + setScrollTop(scrollTop: number): void; /** * [Returns the value of the distance between the top of the editor and the topmost part of the visible content.]{: #EditSession.getScrollTop} @@ -769,7 +771,7 @@ declare module AceAjax { /** * [Sets the value of the distance between the left of the editor and the leftmost part of the visible content.]{: #EditSession.setScrollLeft} **/ - setScrollLeft(); + setScrollLeft(): void; /** * [Returns the value of the distance between the left of the editor and the leftmost part of the visible content.]{: #EditSession.getScrollLeft} @@ -836,7 +838,7 @@ declare module AceAjax { * Enables or disables highlighting of the range where an undo occured. * @param enable If `true`, selects the range of the reinserted change **/ - setUndoSelect(enable: boolean); + setUndoSelect(enable: boolean): void; /** * Replaces a range in the document with the new `text`. @@ -862,13 +864,13 @@ declare module AceAjax { * @param endRow Ending row * @param indentString The indent token **/ - indentRows(startRow: number, endRow: number, indentString: string); + indentRows(startRow: number, endRow: number, indentString: string): void; /** * Outdents all the rows defined by the `start` and `end` properties of `range`. * @param range A range of rows **/ - outdentRows(range: Range); + outdentRows(range: Range): void; /** * Shifts all the lines in the document up one, starting from `firstRow` and ending at `lastRow`. @@ -895,7 +897,7 @@ declare module AceAjax { * Sets whether or not line wrapping is enabled. If `useWrapMode` is different than the current value, the `'changeWrapMode'` event is emitted. * @param useWrapMode Enable (or disable) wrap mode **/ - setUseWrapMode(useWrapMode: boolean); + setUseWrapMode(useWrapMode: boolean): void; /** * Returns `true` if wrap mode is being used; `false` otherwise. @@ -907,7 +909,7 @@ declare module AceAjax { * @param min The minimum wrap value (the left side wrap) * @param max The maximum wrap value (the right side wrap) **/ - setWrapLimitRange(min: number, max: number); + setWrapLimitRange(min: number, max: number): void; /** * This should generally only be called by the renderer when a resize is detected. @@ -931,7 +933,7 @@ declare module AceAjax { * @param str The string to check * @param offset The value to start at **/ - $getDisplayTokens(str: string, offset: number); + $getDisplayTokens(str: string, offset: number): void; /** * Calculates the width of the string `str` on the screen while assuming that the string starts at the first column on the screen. @@ -1004,7 +1006,7 @@ declare module AceAjax { * @param docRow * @param docColumn **/ - documentToScreenRow(docRow: number, docColumn: number); + documentToScreenRow(docRow: number, docColumn: number): void; /** * Returns the length of the screen. @@ -1035,13 +1037,16 @@ declare module AceAjax { **/ export interface Editor { + addEventListener(ev: 'change', callback: (ev: EditorChangeEvent) => any): void; + addEventListener(ev: string, callback: Function): void; + inMultiSelectMode: boolean; - selectMoreLines(n: number); + selectMoreLines(n: number): void; - onTextInput(text: string); + onTextInput(text: string): void; - onCommandKey(e, hashId, keyCode); + onCommandKey(e: any, hashId: any, keyCode: any): void; commands: CommandManager; @@ -1055,17 +1060,42 @@ declare module AceAjax { container: HTMLElement; - onSelectionChange(e); + onSelectionChange(e: any): void; - onChangeMode(e?); + onChangeMode(e?: any): void; - execCommand(command:string, args?: any); + execCommand(command:string, args?: any): void; + + /** + * Sets a Configuration Option + **/ + setOption(optionName: any, optionValue: any): void; + + /** + * Sets Configuration Options + **/ + setOptions(keyValueTuples: any): void; + + /** + * 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". * @param keyboardHandler The new key handler **/ - setKeyboardHandler(keyboardHandler: string); + setKeyboardHandler(keyboardHandler: string): void; /** * Returns the keyboard handler, such as "vim" or "windows". @@ -1076,7 +1106,7 @@ declare module AceAjax { * Sets a new editsession to use. This method also emits the `'changeSession'` event. * @param session The new session to use **/ - setSession(session: IEditSession); + setSession(session: IEditSession): void; /** * Returns the current session being used. @@ -1104,13 +1134,13 @@ declare module AceAjax { * {:VirtualRenderer.onResize} * @param force If `true`, recomputes the size, even if the height and width haven't changed **/ - resize(force?: boolean); + resize(force?: boolean): void; /** * {:VirtualRenderer.setTheme} * @param theme The path to a theme **/ - setTheme(theme: string); + setTheme(theme: string): void; /** * {:VirtualRenderer.getTheme} @@ -1121,54 +1151,54 @@ declare module AceAjax { * {:VirtualRenderer.setStyle} * @param style A class name **/ - setStyle(style: string); + setStyle(style: string): void; /** * {:VirtualRenderer.unsetStyle} **/ - unsetStyle(); + unsetStyle(): void; /** * Set a new font size (in pixels) for the editor text. * @param size A font size ( _e.g._ "12px") **/ - setFontSize(size: string); + setFontSize(size: string): void; /** * Brings the current `textInput` into focus. **/ - focus(); + focus(): void; /** * Returns `true` if the current `textInput` is in focus. **/ - isFocused(); + isFocused(): void; /** * Blurs the current `textInput`. **/ - blur(); + blur(): void; /** * Emitted once the editor comes into focus. **/ - onFocus(); + onFocus(): void; /** * Emitted once the editor has been blurred. **/ - onBlur(); + onBlur(): void; /** * Emitted whenever the document is changed. * @param e Contains a single property, `data`, which has the delta of changes **/ - onDocumentChange(e: any); + onDocumentChange(e: any): void; /** * Emitted when the selection changes. **/ - onCursorChange(); + onCursorChange(): void; /** * Returns the string of text currently highlighted. @@ -1178,30 +1208,30 @@ declare module AceAjax { /** * Called whenever a text "copy" happens. **/ - onCopy(); + onCopy(): void; /** * Called whenever a text "cut" happens. **/ - onCut(); + onCut(): void; /** * Called whenever a text "paste" happens. * @param text The pasted text **/ - onPaste(text: string); + onPaste(text: string): void; /** * Inserts `text` into wherever the cursor is pointing. * @param text The new text to add **/ - insert(text: string); + insert(text: string): void; /** * Pass in `true` to enable overwrites in your session, or `false` to disable. If overwrites is enabled, any text you enter will type over any text after it. If the value of `overwrite` changes, this function also emites the `changeOverwrite` event. * @param overwrite Defines wheter or not to set overwrites **/ - setOverwrite(overwrite: boolean); + setOverwrite(overwrite: boolean): void; /** * Returns `true` if overwrites are enabled; `false` otherwise. @@ -1211,13 +1241,13 @@ declare module AceAjax { /** * Sets the value of overwrite to the opposite of whatever it currently is. **/ - toggleOverwrite(); + toggleOverwrite(): void; /** * Sets how fast the mouse scrolling should do. * @param speed A value indicating the new speed (in milliseconds) **/ - setScrollSpeed(speed: number); + setScrollSpeed(speed: number): void; /** * Returns the value indicating how fast the mouse scroll speed is (in milliseconds). @@ -1228,7 +1258,7 @@ declare module AceAjax { * Sets the delay (in milliseconds) of the mouse drag. * @param dragDelay A value indicating the new delay **/ - setDragDelay(dragDelay: number); + setDragDelay(dragDelay: number): void; /** * Returns the current mouse drag delay. @@ -1242,7 +1272,7 @@ declare module AceAjax { * This function also emits the `'changeSelectionStyle'` event. * @param style The new selection style **/ - setSelectionStyle(style: string); + setSelectionStyle(style: string): void; /** * Returns the current selection style. @@ -1253,18 +1283,18 @@ declare module AceAjax { * Determines whether or not the current line should be highlighted. * @param shouldHighlight Set to `true` to highlight the current line **/ - setHighlightActiveLine(shouldHighlight: boolean); + setHighlightActiveLine(shouldHighlight: boolean): void; /** * Returns `true` if current lines are always highlighted. **/ - getHighlightActiveLine(); + getHighlightActiveLine(): void; /** * Determines if the currently selected word should be highlighted. * @param shouldHighlight Set to `true` to highlight the currently selected word **/ - setHighlightSelectedWord(shouldHighlight: boolean); + setHighlightSelectedWord(shouldHighlight: boolean): void; /** * Returns `true` if currently highlighted words are to be highlighted. @@ -1275,7 +1305,7 @@ declare module AceAjax { * If `showInvisibiles` is set to `true`, invisible characters—like spaces or new lines—are show in the editor. * @param showInvisibles Specifies whether or not to show invisible characters **/ - setShowInvisibles(showInvisibles: boolean); + setShowInvisibles(showInvisibles: boolean): void; /** * Returns `true` if invisible characters are being shown. @@ -1286,7 +1316,7 @@ declare module AceAjax { * If `showPrintMargin` is set to `true`, the print margin is shown in the editor. * @param showPrintMargin Specifies whether or not to show the print margin **/ - setShowPrintMargin(showPrintMargin: boolean); + setShowPrintMargin(showPrintMargin: boolean): void; /** * Returns `true` if the print margin is being shown. @@ -1297,7 +1327,7 @@ declare module AceAjax { * Sets the column defining where the print margin should be. * @param showPrintMargin Specifies the new print margin **/ - setPrintMarginColumn(showPrintMargin: number); + setPrintMarginColumn(showPrintMargin: number): void; /** * Returns the column number of where the print margin is. @@ -1308,7 +1338,7 @@ declare module AceAjax { * If `readOnly` is true, then the editor is set to read-only mode, and none of the content can change. * @param readOnly Specifies whether the editor can be modified or not **/ - setReadOnly(readOnly: boolean); + setReadOnly(readOnly: boolean): void; /** * Returns `true` if the editor is set to read-only mode. @@ -1319,7 +1349,7 @@ declare module AceAjax { * Specifies whether to use behaviors or not. ["Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.]{: #BehaviorsDef} * @param enabled Enables or disables behaviors **/ - setBehavioursEnabled(enabled: boolean); + setBehavioursEnabled(enabled: boolean): void; /** * Returns `true` if the behaviors are currently enabled. {:BehaviorsDef} @@ -1331,89 +1361,89 @@ declare module AceAjax { * when such a character is typed in. * @param enabled Enables or disables wrapping behaviors **/ - setWrapBehavioursEnabled(enabled: boolean); + setWrapBehavioursEnabled(enabled: boolean): void; /** * Returns `true` if the wrapping behaviors are currently enabled. **/ - getWrapBehavioursEnabled(); + getWrapBehavioursEnabled(): void; /** * Indicates whether the fold widgets are shown or not. * @param show Specifies whether the fold widgets are shown **/ - setShowFoldWidgets(show: boolean); + setShowFoldWidgets(show: boolean): void; /** * Returns `true` if the fold widgets are shown. **/ - getShowFoldWidgets(); + getShowFoldWidgets(): void; /** * Removes words of text from the editor. A "word" is defined as a string of characters bookended by whitespace. * @param dir The direction of the deletion to occur, either "left" or "right" **/ - remove(dir: string); + remove(dir: string): void; /** * Removes the word directly to the right of the current selection. **/ - removeWordRight(); + removeWordRight(): void; /** * Removes the word directly to the left of the current selection. **/ - removeWordLeft(); + removeWordLeft(): void; /** * Removes all the words to the left of the current selection, until the start of the line. **/ - removeToLineStart(); + removeToLineStart(): void; /** * Removes all the words to the right of the current selection, until the end of the line. **/ - removeToLineEnd(); + removeToLineEnd(): void; /** * Splits the line at the current selection (by inserting an `'\n'`). **/ - splitLine(); + splitLine(): void; /** * Transposes current line. **/ - transposeLetters(); + transposeLetters(): void; /** * Converts the current selection entirely into lowercase. **/ - toLowerCase(); + toLowerCase(): void; /** * Converts the current selection entirely into uppercase. **/ - toUpperCase(); + toUpperCase(): void; /** * Inserts an indentation into the current cursor position or indents the selected lines. **/ - indent(); + indent(): void; /** * Indents the current line. **/ - blockIndent(); + blockIndent(): void; /** * Outdents the current line. **/ - blockOutdent(arg?: string); + blockOutdent(arg?: string): void; /** * Given the currently selected range, this function either comments all the lines, or uncomments all of them. **/ - toggleCommentLines(); + toggleCommentLines(): void; /** * Works like [[EditSession.getTokenAt]], except it returns a number. @@ -1424,12 +1454,12 @@ declare module AceAjax { * If the character before the cursor is a number, this functions changes its value by `amount`. * @param amount The value to change the numeral by (can be negative to decrease value) **/ - modifyNumber(amount: number); + modifyNumber(amount: number): void; /** * Removes all the lines in the current selection **/ - removeLines(); + removeLines(): void; /** * Shifts all the selected lines down one row. @@ -1486,37 +1516,37 @@ declare module AceAjax { /** * Selects the text from the current position of the document until where a "page down" finishes. **/ - selectPageDown(); + selectPageDown(): void; /** * Selects the text from the current position of the document until where a "page up" finishes. **/ - selectPageUp(); + selectPageUp(): void; /** * Shifts the document to wherever "page down" is, as well as moving the cursor position. **/ - gotoPageDown(); + gotoPageDown(): void; /** * Shifts the document to wherever "page up" is, as well as moving the cursor position. **/ - gotoPageUp(); + gotoPageUp(): void; /** * Scrolls the document to wherever "page down" is, without changing the cursor position. **/ - scrollPageDown(); + scrollPageDown(): void; /** * Scrolls the document to wherever "page up" is, without changing the cursor position. **/ - scrollPageUp(); + scrollPageUp(): void; /** * Moves the editor to the specified row. **/ - scrollToRow(); + scrollToRow(): void; /** * Scrolls to a line. If `center` is `true`, it puts the line in middle of screen (or attempts to). @@ -1525,12 +1555,12 @@ declare module AceAjax { * @param animate If `true` animates scrolling * @param callback Function to be called when the animation has finished **/ - scrollToLine(line: number, center: boolean, animate: boolean, callback: Function); + scrollToLine(line: number, center: boolean, animate: boolean, callback: Function): void; /** * Attempts to center the current selection on the screen. **/ - centerSelection(); + centerSelection(): void; /** * Gets the current position of the cursor. @@ -1550,30 +1580,30 @@ declare module AceAjax { /** * Selects all the text in editor. **/ - selectAll(); + selectAll(): void; /** * {:Selection.clearSelection} **/ - clearSelection(); + clearSelection(): void; /** * Moves the cursor to the specified row and column. Note that this does not de-select the current selection. * @param row The new row number * @param column The new column number **/ - moveCursorTo(row: number, column?: number, animate?:boolean); + moveCursorTo(row: number, column?: number, animate?:boolean): void; /** * Moves the cursor to the position indicated by `pos.row` and `pos.column`. * @param position An object with two properties, row and column **/ - moveCursorToPosition(position: Position); + moveCursorToPosition(position: Position): void; /** * Moves the cursor's row and column to the next matching bracket. **/ - jumpToMatching(); + jumpToMatching(): void; /** * Moves the cursor to the specified line number, and also into the indiciated column. @@ -1581,82 +1611,82 @@ declare module AceAjax { * @param column A column number to go to * @param animate If `true` animates scolling **/ - gotoLine(lineNumber: number, column?: number, animate?: boolean); + gotoLine(lineNumber: number, column?: number, animate?: boolean): void; /** * Moves the cursor to the specified row and column. Note that this does de-select the current selection. * @param row The new row number * @param column The new column number **/ - navigateTo(row: number, column: number); + navigateTo(row: number, column: number): void; /** * Moves the cursor up in the document the specified number of times. Note that this does de-select the current selection. * @param times The number of times to change navigation **/ - navigateUp(times?: number); + navigateUp(times?: number): void; /** * Moves the cursor down in the document the specified number of times. Note that this does de-select the current selection. * @param times The number of times to change navigation **/ - navigateDown(times?: number); + navigateDown(times?: number): void; /** * Moves the cursor left in the document the specified number of times. Note that this does de-select the current selection. * @param times The number of times to change navigation **/ - navigateLeft(times?: number); + navigateLeft(times?: number): void; /** * Moves the cursor right in the document the specified number of times. Note that this does de-select the current selection. * @param times The number of times to change navigation **/ - navigateRight(times: number); + navigateRight(times: number): void; /** * Moves the cursor to the start of the current line. Note that this does de-select the current selection. **/ - navigateLineStart(); + navigateLineStart(): void; /** * Moves the cursor to the end of the current line. Note that this does de-select the current selection. **/ - navigateLineEnd(); + navigateLineEnd(): void; /** * Moves the cursor to the end of the current file. Note that this does de-select the current selection. **/ - navigateFileEnd(); + navigateFileEnd(): void; /** * Moves the cursor to the start of the current file. Note that this does de-select the current selection. **/ - navigateFileStart(); + navigateFileStart(): void; /** * Moves the cursor to the word immediately to the right of the current position. Note that this does de-select the current selection. **/ - navigateWordRight(); + navigateWordRight(): void; /** * Moves the cursor to the word immediately to the left of the current position. Note that this does de-select the current selection. **/ - navigateWordLeft(); + navigateWordLeft(): void; /** * Replaces the first occurance of `options.needle` with the value in `replacement`. * @param replacement The text to replace with * @param options The [[Search `Search`]] options to use **/ - replace(replacement: string, options?: any); + replace(replacement: string, options?: any): void; /** * Replaces all occurances of `options.needle` with the value in `replacement`. * @param replacement The text to replace with * @param options The [[Search `Search`]] options to use **/ - replaceAll(replacement: string, options?: any); + replaceAll(replacement: string, options?: any): void; /** * {:Search.getOptions} For more information on `options`, see [[Search `Search`]]. @@ -1669,36 +1699,36 @@ declare module AceAjax { * @param options An object defining various search properties * @param animate If `true` animate scrolling **/ - find(needle: string, options?: any, animate?: boolean); + find(needle: string, options?: any, animate?: boolean): void; /** * Performs another search for `needle` in the document. For more information on `options`, see [[Search `Search`]]. * @param options search options * @param animate If `true` animate scrolling **/ - findNext(options?: any, animate?: boolean); + findNext(options?: any, animate?: boolean): void; /** * Performs a search for `needle` backwards. For more information on `options`, see [[Search `Search`]]. * @param options search options * @param animate If `true` animate scrolling **/ - findPrevious(options?: any, animate?: boolean); + findPrevious(options?: any, animate?: boolean): void; /** * {:UndoManager.undo} **/ - undo(); + undo(): void; /** * {:UndoManager.redo} **/ - redo(); + redo(): void; /** * Cleans up the entire editor. **/ - destroy(); + destroy(): void; } @@ -1711,55 +1741,62 @@ declare module AceAjax { new(renderer: VirtualRenderer, session?: IEditSession): Editor; } + interface EditorChangeEvent { + start: Position; + end: Position; + action: string; // insert, remove + lines: any[]; + } + //////////////////////////////// /// PlaceHolder //////////////////////////////// export interface PlaceHolder { - on(event: string, fn: (e) => any); + on(event: string, fn: (e: any) => any): void; /** * PlaceHolder.setup() * TODO **/ - setup(); + setup(): void; /** * PlaceHolder.showOtherMarkers() * TODO **/ - showOtherMarkers(); + showOtherMarkers(): void; /** * PlaceHolder.hideOtherMarkers() * Hides all over markers in the [[EditSession `EditSession`]] that are not the currently selected one. **/ - hideOtherMarkers(); + hideOtherMarkers(): void; /** * PlaceHolder@onUpdate(e) * Emitted when the place holder updates. **/ - onUpdate(); + onUpdate(): void; /** * PlaceHolder@onCursorChange(e) * Emitted when the cursor changes. **/ - onCursorChange(); + onCursorChange(): void; /** * PlaceHolder.detach() * TODO **/ - detach(); + detach(): void; /** * PlaceHolder.cancel() * TODO **/ - cancel(); + cancel(): void; } var PlaceHolder: { /** @@ -1782,15 +1819,15 @@ declare module AceAjax { export interface IRangeList { ranges: Range[]; - pointIndex(pos: Position, startIndex?: number); + pointIndex(pos: Position, startIndex?: number): void; - addList(ranges: Range[]); + addList(ranges: Range[]): void; - add(ranges: Range); + add(ranges: Range): void; merge(): Range[]; - substractPoint(pos: Position); + substractPoint(pos: Position): void; } export var RangeList: { new (): IRangeList; @@ -1823,7 +1860,7 @@ declare module AceAjax { * Returns `true` if and only if the starting row and column, and ending row and column, are equivalent to those given by `range`. * @param range A range to check against **/ - isEqual(range: Range); + isEqual(range: Range): void; /** * Returns a string containing the range's row and column information, given like this: @@ -1831,7 +1868,7 @@ declare module AceAjax { * [start.row/start.column] -> [end.row/end.column] * ``` **/ - toString(); + toString(): void; /** * Returns `true` if the `row` and `column` provided are within the given range. This can better be expressed as returning `true` if: @@ -1887,14 +1924,14 @@ declare module AceAjax { * @param row A row point to set * @param column A column point to set **/ - setStart(row: number, column: number); + setStart(row: number, column: number): void; /** * Sets the starting row and column for the range. * @param row A row point to set * @param column A column point to set **/ - setEnd(row: number, column: number); + setEnd(row: number, column: number): void; /** * Returns `true` if the `row` and `column` are within the given range. @@ -2022,7 +2059,7 @@ declare module AceAjax { * Emitted when the scroll bar, well, scrolls. * @param e Contains one property, `"data"`, which indicates the current scroll top position **/ - onScroll(e: any); + onScroll(e: any): void; /** * Returns the width of the scroll bar. @@ -2033,19 +2070,19 @@ declare module AceAjax { * Sets the height of the scroll bar, in pixels. * @param height The new height **/ - setHeight(height: number); + setHeight(height: number): void; /** * Sets the inner height of the scroll bar, in pixels. * @param height The new inner height **/ - setInnerHeight(height: number); + setInnerHeight(height: number): void; /** * Sets the scroll top of the scroll bar. * @param scrollTop The new scroll top **/ - setScrollTop(scrollTop: number); + setScrollTop(scrollTop: number): void; } var ScrollBar: { /** @@ -2079,7 +2116,7 @@ declare module AceAjax { * Sets the search options via the `options` parameter. * @param An object containing all the search propertie **/ - setOptions(An: any); + setOptions(An: any): void; /** * Searches for `options.needle`. If found, this method returns the [[Range `Range`]] where the text first occurs. If `options.backwards` is `true`, the search goes backwards in the session. @@ -2128,21 +2165,21 @@ declare module AceAjax { **/ export interface Selection { - addEventListener(ev: string, callback: Function); + addEventListener(ev: string, callback: Function): void; - moveCursorWordLeft(); + moveCursorWordLeft(): void; - moveCursorWordRight(); + moveCursorWordRight(): void; - fromOrientedRange(range: Range); + fromOrientedRange(range: Range): void; - setSelectionRange(match); + setSelectionRange(match: any): void; getAllRanges(): Range[]; - on(event: string, fn: (e) => any); + on(event: string, fn: (e: any) => any): void; - addRange(range: Range); + addRange(range: Range): void; /** * Returns `true` if the selection is empty. @@ -2164,7 +2201,7 @@ declare module AceAjax { * @param row The new row * @param column The new column **/ - setSelectionAnchor(row: number, column: number); + setSelectionAnchor(row: number, column: number): void; /** * Returns an object containing the `row` and `column` of the calling selection anchor. @@ -2180,7 +2217,7 @@ declare module AceAjax { * Shifts the selection up (or down, if [[Selection.isBackwards `isBackwards()`]] is true) the given number of columns. * @param columns The number of columns to shift by **/ - shiftSelection(columns: number); + shiftSelection(columns: number): void; /** * Returns `true` if the selection is going backwards in the document. @@ -2195,165 +2232,165 @@ declare module AceAjax { /** * [Empties the selection (by de-selecting it). This function also emits the `'changeSelection'` event.]{: #Selection.clearSelection} **/ - clearSelection(); + clearSelection(): void; /** * Selects all the text in the document. **/ - selectAll(); + selectAll(): void; /** * Sets the selection to the provided range. * @param range The range of text to select * @param reverse Indicates if the range should go backwards (`true`) or not **/ - setRange(range: Range, reverse: boolean); + setRange(range: Range, reverse: boolean): void; /** * Moves the selection cursor to the indicated row and column. * @param row The row to select to * @param column The column to select to **/ - selectTo(row: number, column: number); + selectTo(row: number, column: number): void; /** * Moves the selection cursor to the row and column indicated by `pos`. * @param pos An object containing the row and column **/ - selectToPosition(pos: any); + selectToPosition(pos: any): void; /** * Moves the selection up one row. **/ - selectUp(); + selectUp(): void; /** * Moves the selection down one row. **/ - selectDown(); + selectDown(): void; /** * Moves the selection right one column. **/ - selectRight(); + selectRight(): void; /** * Moves the selection left one column. **/ - selectLeft(); + selectLeft(): void; /** * Moves the selection to the beginning of the current line. **/ - selectLineStart(); + selectLineStart(): void; /** * Moves the selection to the end of the current line. **/ - selectLineEnd(); + selectLineEnd(): void; /** * Moves the selection to the end of the file. **/ - selectFileEnd(); + selectFileEnd(): void; /** * Moves the selection to the start of the file. **/ - selectFileStart(); + selectFileStart(): void; /** * Moves the selection to the first word on the right. **/ - selectWordRight(); + selectWordRight(): void; /** * Moves the selection to the first word on the left. **/ - selectWordLeft(); + selectWordLeft(): void; /** * Moves the selection to highlight the entire word. **/ - getWordRange(); + getWordRange(): void; /** * Selects an entire word boundary. **/ - selectWord(); + selectWord(): void; /** * Selects a word, including its right whitespace. **/ - selectAWord(); + selectAWord(): void; /** * Selects the entire line. **/ - selectLine(); + selectLine(): void; /** * Moves the cursor up one row. **/ - moveCursorUp(); + moveCursorUp(): void; /** * Moves the cursor down one row. **/ - moveCursorDown(); + moveCursorDown(): void; /** * Moves the cursor left one column. **/ - moveCursorLeft(); + moveCursorLeft(): void; /** * Moves the cursor right one column. **/ - moveCursorRight(); + moveCursorRight(): void; /** * Moves the cursor to the start of the line. **/ - moveCursorLineStart(); + moveCursorLineStart(): void; /** * Moves the cursor to the end of the line. **/ - moveCursorLineEnd(); + moveCursorLineEnd(): void; /** * Moves the cursor to the end of the file. **/ - moveCursorFileEnd(); + moveCursorFileEnd(): void; /** * Moves the cursor to the start of the file. **/ - moveCursorFileStart(); + moveCursorFileStart(): void; /** * Moves the cursor to the word on the right. **/ - moveCursorLongWordRight(); + moveCursorLongWordRight(): void; /** * Moves the cursor to the word on the left. **/ - moveCursorLongWordLeft(); + moveCursorLongWordLeft(): void; /** * Moves the cursor to position indicated by the parameters. Negative numbers move the cursor backwards in the document. * @param rows The number of rows to move by * @param chars The number of characters to move by **/ - moveCursorBy(rows: number, chars: number); + moveCursorBy(rows: number, chars: number): void; /** * Moves the selection to the position indicated by its `row` and `column`. * @param position The position to move to **/ - moveCursorToPosition(position: any); + moveCursorToPosition(position: any): void; /** * Moves the cursor to the row and column provided. [If `preventUpdateDesiredColumn` is `true`, then the cursor stays in the same column position as its original point.]{: #preventUpdateBoolDesc} @@ -2361,7 +2398,7 @@ declare module AceAjax { * @param column The column to move to * @param keepDesiredColumn [If `true`, the cursor move does not respect the previous column]{: #preventUpdateBool} **/ - moveCursorTo(row: number, column: number, keepDesiredColumn?: boolean); + moveCursorTo(row: number, column: number, keepDesiredColumn?: boolean): void; /** * Moves the cursor to the screen position indicated by row and column. {:preventUpdateBoolDesc} @@ -2369,7 +2406,7 @@ declare module AceAjax { * @param column The column to move to * @param keepDesiredColumn {:preventUpdateBool} **/ - moveCursorToScreen(row: number, column: number, keepDesiredColumn: boolean); + moveCursorToScreen(row: number, column: number, keepDesiredColumn: boolean): void; } var Selection: { /** @@ -2394,7 +2431,7 @@ declare module AceAjax { * Returns the editor identified by the index `idx`. * @param idx The index of the editor you want **/ - getEditor(idx: number); + getEditor(idx: number): void; /** * Returns the current editor. @@ -2404,44 +2441,44 @@ declare module AceAjax { /** * Focuses the current editor. **/ - focus(); + focus(): void; /** * Blurs the current editor. **/ - blur(); + blur(): void; /** * Sets a theme for each of the available editors. * @param theme The name of the theme to set **/ - setTheme(theme: string); + setTheme(theme: string): void; /** * Sets the keyboard handler for the editor. * @param keybinding **/ - setKeyboardHandler(keybinding: string); + setKeyboardHandler(keybinding: string): void; /** * Executes `callback` on all of the available editors. * @param callback A callback function to execute * @param scope The default scope for the callback **/ - forEach(callback: Function, scope: string); + forEach(callback: Function, scope: string): void; /** * Sets the font size, in pixels, for all the available editors. * @param size The new font size **/ - setFontSize(size: number); + setFontSize(size: number): void; /** * Sets a new [[EditSession `EditSession`]] for the indicated editor. * @param session The new edit session * @param idx The editor's index you're interested in **/ - setSession(session: IEditSession, idx: number); + setSession(session: IEditSession, idx: number): void; /** * Returns the orientation. @@ -2452,12 +2489,12 @@ declare module AceAjax { * Sets the orientation. * @param orientation The new orientation value **/ - setOrientation(orientation: number); + setOrientation(orientation: number): void; /** * Resizes the editor. **/ - resize(); + resize(): void; } var Split: { new(): Split; @@ -2546,7 +2583,7 @@ declare module AceAjax { * - `args[1]` is the document to associate with * @param options Contains additional properties **/ - execute(options: any); + execute(options: any): void; /** * [Perform an undo operation on the document, reverting the last change.]{: #UndoManager.undo} @@ -2558,12 +2595,12 @@ declare module AceAjax { * [Perform a redo operation on the document, reimplementing the last change.]{: #UndoManager.redo} * @param dontSelect {:dontSelect} **/ - redo(dontSelect: boolean); + redo(dontSelect: boolean): void; /** * Destroys the stack of undo and redo redo operations. **/ - reset(); + reset(): void; /** * Returns `true` if there are undo operations left to perform. @@ -2575,6 +2612,16 @@ declare module AceAjax { **/ hasRedo(): boolean; + /** + * Returns `true` if the dirty counter is 0 + **/ + isClean(): boolean; + + /** + * Sets dirty counter to 0 + **/ + markClean(): void; + } var UndoManager: { /** @@ -2598,35 +2645,35 @@ declare module AceAjax { lineHeight: number; - screenToTextCoordinates(left: number, top: number); + screenToTextCoordinates(left: number, top: number): void; /** * Associates the renderer with an [[EditSession `EditSession`]]. **/ - setSession(session: IEditSession); + setSession(session: IEditSession): void; /** * Triggers a partial update of the text, from the range given by the two parameters. * @param firstRow The first row to update * @param lastRow The last row to update **/ - updateLines(firstRow: number, lastRow: number); + updateLines(firstRow: number, lastRow: number): void; /** * Triggers a full update of the text, for all the rows. **/ - updateText(); + updateText(): void; /** * Triggers a full update of all the layers, for all the rows. * @param force If `true`, forces the changes through **/ - updateFull(force: boolean); + updateFull(force: boolean): void; /** * Updates the font size. **/ - updateFontSize(); + updateFontSize(): void; /** * [Triggers a resize of the editor.]{: #VirtualRenderer.onResize} @@ -2635,18 +2682,18 @@ declare module AceAjax { * @param width The width of the editor in pixels * @param height The hiehgt of the editor, in pixels **/ - onResize(force: boolean, gutterWidth: number, width: number, height: number); + onResize(force: boolean, gutterWidth: number, width: number, height: number): void; /** * Adjusts the wrap limit, which is the number of characters that can fit within the width of the edit area on screen. **/ - adjustWrapLimit(); + adjustWrapLimit(): void; /** * Identifies whether you want to have an animated scroll or not. * @param shouldAnimate Set to `true` to show animated scrolls **/ - setAnimatedScroll(shouldAnimate: boolean); + setAnimatedScroll(shouldAnimate: boolean): void; /** * Returns whether an animated scroll happens or not. @@ -2657,7 +2704,7 @@ declare module AceAjax { * Identifies whether you want to show invisible characters or not. * @param showInvisibles Set to `true` to show invisibles **/ - setShowInvisibles(showInvisibles: boolean); + setShowInvisibles(showInvisibles: boolean): void; /** * Returns whether invisible characters are being shown or not. @@ -2668,7 +2715,7 @@ declare module AceAjax { * Identifies whether you want to show the print margin or not. * @param showPrintMargin Set to `true` to show the print margin **/ - setShowPrintMargin(showPrintMargin: boolean); + setShowPrintMargin(showPrintMargin: boolean): void; /** * Returns whether the print margin is being shown or not. @@ -2679,7 +2726,7 @@ declare module AceAjax { * Identifies whether you want to show the print margin column or not. * @param showPrintMargin Set to `true` to show the print margin column **/ - setPrintMarginColumn(showPrintMargin: boolean); + setPrintMarginColumn(showPrintMargin: boolean): void; /** * Returns whether the print margin column is being shown or not. @@ -2695,7 +2742,7 @@ declare module AceAjax { * Identifies whether you want to show the gutter or not. * @param show Set to `true` to show the gutter **/ - setShowGutter(show: boolean); + setShowGutter(show: boolean): void; /** * Returns the root element containing this renderer. @@ -2736,7 +2783,7 @@ declare module AceAjax { * Sets the padding for all the layers. * @param padding A new padding value (in pixels) **/ - setPadding(padding: number); + setPadding(padding: number): void; /** * Returns whether the horizontal scrollbar is set to be always visible. @@ -2747,58 +2794,58 @@ declare module AceAjax { * Identifies whether you want to show the horizontal scrollbar or not. * @param alwaysVisible Set to `true` to make the horizontal scroll bar visible **/ - setHScrollBarAlwaysVisible(alwaysVisible: boolean); + setHScrollBarAlwaysVisible(alwaysVisible: boolean): void; /** * Schedules an update to all the front markers in the document. **/ - updateFrontMarkers(); + updateFrontMarkers(): void; /** * Schedules an update to all the back markers in the document. **/ - updateBackMarkers(); + updateBackMarkers(): void; /** * Deprecated; (moved to [[EditSession]]) **/ - addGutterDecoration(); + addGutterDecoration(): void; /** * Deprecated; (moved to [[EditSession]]) **/ - removeGutterDecoration(); + removeGutterDecoration(): void; /** * Redraw breakpoints. **/ - updateBreakpoints(); + updateBreakpoints(): void; /** * Sets annotations for the gutter. * @param annotations An array containing annotations **/ - setAnnotations(annotations: any[]); + setAnnotations(annotations: any[]): void; /** * Updates the cursor icon. **/ - updateCursor(); + updateCursor(): void; /** * Hides the cursor icon. **/ - hideCursor(); + hideCursor(): void; /** * Shows the cursor icon. **/ - showCursor(); + showCursor(): void; /** * Scrolls the cursor into the first visibile area of the editor **/ - scrollCursorIntoView(); + scrollCursorIntoView(): void; /** * {:EditSession.getScrollTop} @@ -2824,7 +2871,7 @@ declare module AceAjax { * Gracefully scrolls from the top of the editor to the row indicated. * @param row A row id **/ - scrollToRow(row: number); + scrollToRow(row: number): void; /** * Gracefully scrolls the editor to the row indicated. @@ -2833,7 +2880,7 @@ declare module AceAjax { * @param animate If `true` animates scrolling * @param callback Function to be called after the animation has finished **/ - scrollToLine(line: number, center: boolean, animate: boolean, callback: Function); + scrollToLine(line: number, center: boolean, animate: boolean, callback: Function): void; /** * Scrolls the editor to the y pixel indicated. @@ -2852,7 +2899,7 @@ declare module AceAjax { * @param deltaX The x value to scroll by * @param deltaY The y value to scroll by **/ - scrollBy(deltaX: number, deltaY: number); + scrollBy(deltaX: number, deltaY: number): void; /** * Returns `true` if you can still scroll by either parameter; in other words, you haven't reached the end of the file or line. @@ -2871,35 +2918,35 @@ declare module AceAjax { /** * Focuses the current container. **/ - visualizeFocus(); + visualizeFocus(): void; /** * Blurs the current container. **/ - visualizeBlur(); + visualizeBlur(): void; /** * undefined * @param position **/ - showComposition(position: number); + showComposition(position: number): void; /** * Sets the inner text of the current composition to `text`. * @param text A string of text to use **/ - setCompositionText(text: string); + setCompositionText(text: string): void; /** * Hides the current composition. **/ - hideComposition(); + hideComposition(): void; /** * [Sets a new theme for the editor. `theme` should exist, and be a directory path, like `ace/theme/textmate`.]{: #VirtualRenderer.setTheme} * @param theme The path to a theme **/ - setTheme(theme: string); + setTheme(theme: string): void; /** * [Returns the path of the current theme.]{: #VirtualRenderer.getTheme} @@ -2910,18 +2957,18 @@ declare module AceAjax { * [Adds a new class, `style`, to the editor.]{: #VirtualRenderer.setStyle} * @param style A class name **/ - setStyle(style: string); + setStyle(style: string): void; /** * [Removes the class `style` from the editor.]{: #VirtualRenderer.unsetStyle} * @param style A class name **/ - unsetStyle(style: string); + unsetStyle(style: string): void; /** * Destroys the text and cursor layers for this renderer. **/ - destroy(); + destroy(): void; } var VirtualRenderer: { diff --git a/acl/acl-mongodbBackend-tests.ts b/acl/acl-mongodbBackend-tests.ts index 31411b65c7..01c9af9082 100644 --- a/acl/acl-mongodbBackend-tests.ts +++ b/acl/acl-mongodbBackend-tests.ts @@ -1,4 +1,4 @@ -/// +/// // https://github.com/OptimalBits/node_acl/blob/master/Readme.md import Acl = require('acl'); @@ -14,4 +14,3 @@ acl.allow('guest', 'blogs', 'view'); // allow function accepts arrays as any parameter acl.allow('member', 'blogs', ['edit','view', 'delete']); - diff --git a/acl/acl-mongodbBackend.d.ts b/acl/acl-mongodbBackend.d.ts deleted file mode 100644 index 8dbfb7e905..0000000000 --- a/acl/acl-mongodbBackend.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Type definitions for node_acl 0.4.7 -// Project: https://github.com/optimalbits/node_acl -// Definitions by: Qubo -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// -/// - -declare module "acl" { - import mongo = require('mongodb'); - - interface AclStatic { - mongodbBackend: MongodbBackendStatic; - } - - interface MongodbBackend extends Backend { } - interface MongodbBackendStatic { - new(db: mongo.Db, prefix: string, useSingle: boolean): MongodbBackend; - new(db: mongo.Db, prefix: string): MongodbBackend; - new(db: mongo.Db): MongodbBackend; - } -} diff --git a/acl/acl-redisBackend-test.ts b/acl/acl-redisBackend-tests.ts similarity index 90% rename from acl/acl-redisBackend-test.ts rename to acl/acl-redisBackend-tests.ts index e1bf29af49..273aeab3b7 100644 --- a/acl/acl-redisBackend-test.ts +++ b/acl/acl-redisBackend-tests.ts @@ -1,4 +1,4 @@ -/// +/// // https://github.com/OptimalBits/node_acl/blob/master/Readme.md import Acl = require('acl'); diff --git a/acl/acl-redisBackend.d.ts b/acl/acl-redisBackend.d.ts deleted file mode 100644 index e199f8b81c..0000000000 --- a/acl/acl-redisBackend.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Type definitions for node_acl 0.4.7 -// Project: https://github.com/optimalbits/node_acl -// Definitions by: Qubo -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// -/// - -declare module "acl" { - import redis = require('redis'); - - interface AclStatic { - redisBackend: RedisBackendStatic; - } - - interface RedisBackend extends Backend { } - interface RedisBackendStatic { - new(redis: redis.RedisClient, prefix: string): RedisBackend; - new(redis: redis.RedisClient): RedisBackend; - } -} diff --git a/acl/acl.d.ts b/acl/acl.d.ts index 5d0498fed9..57e85d9d58 100644 --- a/acl/acl.d.ts +++ b/acl/acl.d.ts @@ -6,6 +6,9 @@ /// /// +/// +/// + declare module "acl" { import http = require('http'); import Promise = require("bluebird"); @@ -115,6 +118,33 @@ declare module "acl" { end: () => void; } + // for redis backend + import redis = require('redis'); + + interface AclStatic { + redisBackend: RedisBackendStatic; + } + + interface RedisBackend extends Backend { } + interface RedisBackendStatic { + new(redis: redis.RedisClient, prefix: string): RedisBackend; + new(redis: redis.RedisClient): RedisBackend; + } + + // for mongodb backend + import mongo = require('mongodb'); + + interface AclStatic { + mongodbBackend: MongodbBackendStatic; + } + + interface MongodbBackend extends Backend { } + interface MongodbBackendStatic { + new(db: mongo.Db, prefix: string, useSingle: boolean): MongodbBackend; + new(db: mongo.Db, prefix: string): MongodbBackend; + new(db: mongo.Db): MongodbBackend; + } + var _: AclStatic; export = _; } diff --git a/acorn/acorn-tests.ts b/acorn/acorn-tests.ts new file mode 100644 index 0000000000..796ffc3eed --- /dev/null +++ b/acorn/acorn-tests.ts @@ -0,0 +1,30 @@ +/// +/// + +import acorn = require('acorn'); + +var token: acorn.Token; +var tokens: acorn.Token[]; +var comment: acorn.Comment; +var comments: acorn.Comment[]; +var program: ESTree.Program; +var any: any; +var string: string; + +// acorn +string = acorn.version; +program = acorn.parse('code'); +program = acorn.parse('code', {ranges: true, onToken: tokens, onComment: comments}); +program = acorn.parse('code', { + ranges: true, + onToken: (token) => tokens.push(token), + onComment: (isBlock, text, start, end) => { } +}); + +// Token +token = tokens[0]; +string = token.type.label; +any = token.value; + +// Comment +string = comment.value; diff --git a/acorn/acorn.d.ts b/acorn/acorn.d.ts new file mode 100644 index 0000000000..315d107185 --- /dev/null +++ b/acorn/acorn.d.ts @@ -0,0 +1,68 @@ +// Type definitions for Acorn v1.0.1 +// Project: https://github.com/marijnh/acorn +// Definitions by: RReverser +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module acorn { + var version: string; + function parse(input: string, options?: Options): ESTree.Program; + function parseExpressionAt(input: string, pos: number, options?: Options): ESTree.Expression; + function getLineInfo(input: string, offset: number): ESTree.Position; + var defaultOptions: Options; + + interface TokenType { + label: string; + keyword: string; + beforeExpr: boolean; + startsExpr: boolean; + isLoop: boolean; + isAssign: boolean; + prefix: boolean; + postfix: boolean; + binop: number; + updateContext: (prevType: TokenType) => any; + } + + interface AbstractToken { + start: number; + end: number; + loc: ESTree.SourceLocation; + range: [number, number]; + } + + interface Token extends AbstractToken { + type: TokenType; + value: any; + } + + interface Comment extends AbstractToken { + type: string; + value: string; + } + + interface Options { + ecmaVersion?: number; + sourceType?: string; + onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: ESTree.Position) => any; + onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: ESTree.Position) => any; + allowReserved?: boolean; + allowReturnOutsideFunction?: boolean; + allowImportExportEverywhere?: boolean; + allowHashBang?: boolean; + locations?: boolean; + onToken?: ((token: Token) => any) | Token[]; + onComment?: ((isBlock: boolean, text: string, start: number, end: number, startLoc?: ESTree.Position, endLoc?: ESTree.Position) => any) | Comment[]; + ranges?: boolean; + program?: ESTree.Program; + sourceFile?: string; + directSourceFile?: string; + preserveParens?: boolean; + plugins?: { [name: string]: Function; }; + } +} + +declare module "acorn" { + export = acorn +} diff --git a/adm-zip/adm-zip-tests.ts b/adm-zip/adm-zip-tests.ts index f8583ae617..93f8f2f2d7 100644 --- a/adm-zip/adm-zip-tests.ts +++ b/adm-zip/adm-zip-tests.ts @@ -1,10 +1,9 @@ /// import AdmZip = require("adm-zip"); - // reading archives var zip = new AdmZip("./my_file.zip"); -var zipEntries = zip.getEntries(); // an array of ZipEntry records +var zipEntries: AdmZip.IZipEntry[] = zip.getEntries(); // an array of ZipEntry records zipEntries.forEach(function (zipEntry) { console.log(zipEntry.toString()); // outputs zip entries information @@ -31,3 +30,32 @@ zip.addLocalFile("/home/me/some_picture.png"); var willSendthis = zip.toBuffer(); // or write everything to disk zip.writeZip(/*target file name*/"/home/me/files.zip"); + +function processZipEntry(zipEntry: AdmZip.IZipEntry) { + console.log('comment', zipEntry.comment); +} + +//tests taken from examples at https://github.com/cthackers/adm-zip/wiki/ADM-ZIP +import Zip = require("adm-zip"); +// loads and parses existing zip file local_file.zip +var zip = new Zip("local_file.zip"); +// creates new in memory zip +zip = new Zip(); +// loads and parses existing zip file local_file.zip +zip = new Zip("local_file.zip"); +// get all entries and iterate them +zip.getEntries().forEach((entry) => { + var entryName = entry.entryName; + var decompressedData = zip.readFile(entry); // decompressed buffer of the entry + console.log(zip.readAsText(entry)); // outputs the decompressed content of the entry +}); + +// will extract the file myfile.txt from the archive to /home/user/folder/subfolder/myfile.txt +zip.extractEntryTo("folder/subfolder/myfile.txt", "/home/user/", true, true); + +// will extract the file myfile.txt from the archive to /home/user/myfile.txt +zip.extractEntryTo("folder/subfolder/myfile.txt", "/home/user/", false, true); + +function isAdmZipEntry(obj: any): obj is AdmZip.IZipEntry { + return obj !== null && typeof obj === "object" && typeof obj['entryName'] === 'string'; +} \ No newline at end of file diff --git a/adm-zip/adm-zip.d.ts b/adm-zip/adm-zip.d.ts index 9f2eb7dfdb..208c13b27b 100644 --- a/adm-zip/adm-zip.d.ts +++ b/adm-zip/adm-zip.d.ts @@ -5,8 +5,8 @@ /// -declare module AdmZip { - class ZipFile { +declare module "adm-zip" { + class AdmZip { /** * Create a new, empty archive. */ @@ -28,7 +28,7 @@ declare module AdmZip { * @param entry ZipEntry object * @return Buffer or Null in case of error */ - readFile(entry: IZipEntry): Buffer; + readFile(entry: AdmZip.IZipEntry): Buffer; /** * Asynchronous readFile * @param entry String with the full path of the entry @@ -41,7 +41,7 @@ declare module AdmZip { * @param callback Called with a Buffer or Null in case of error * @return Buffer or Null in case of error */ - readFileAsync(entry: IZipEntry, callback: (data: Buffer, err: string) => any): void; + readFileAsync(entry: AdmZip.IZipEntry, callback: (data: Buffer, err: string) => any): void; /** * Extracts the given entry from the archive and returns the content as * plain text in the given encoding @@ -57,7 +57,7 @@ declare module AdmZip { * @param encoding Optional. If no encoding is specified utf8 is used * @return String */ - readAsText(fileName: IZipEntry, encoding?: string): string; + readAsText(fileName: AdmZip.IZipEntry, encoding?: string): string; /** * Asynchronous readAsText * @param entry String with the full path of the entry @@ -71,7 +71,7 @@ declare module AdmZip { * @param callback Called with the resulting string. * @param encoding Optional. If no encoding is specified utf8 is used */ - readAsTextAsync(fileName: IZipEntry, callback: (data: string) => any, encoding?: string): void; + readAsTextAsync(fileName: AdmZip.IZipEntry, callback: (data: string) => any, encoding?: string): void; /** * Remove the entry from the file or the entry and all its nested directories * and files if the given entry is a directory @@ -83,7 +83,7 @@ declare module AdmZip { * and files if the given entry is a directory * @param entry A ZipEntry object. */ - deleteFile(entry: IZipEntry): void; + deleteFile(entry: AdmZip.IZipEntry): void; /** * Adds a comment to the zip. The zip must be rewritten after * adding the comment. @@ -110,7 +110,7 @@ declare module AdmZip { * @param entry ZipEntry object. * @param comment The comment to add to the entry. */ - addZipEntryComment(entry: IZipEntry, comment: string): void; + addZipEntryComment(entry: AdmZip.IZipEntry, comment: string): void; /** * Returns the comment of the specified entry. * @param entry String with the full path of the entry. @@ -122,7 +122,7 @@ declare module AdmZip { * @param entry ZipEntry object. * @return String The comment of the specified entry. */ - getZipEntryComment(entry: IZipEntry): string; + getZipEntryComment(entry: AdmZip.IZipEntry): string; /** * Updates the content of an existing entry inside the archive. The zip * must be rewritten after updating the content @@ -136,7 +136,7 @@ declare module AdmZip { * @param entry ZipEntry object. * @param content The entry's new contents. */ - updateFile(entry: IZipEntry, content: Buffer): void; + updateFile(entry: AdmZip.IZipEntry, content: Buffer): void; /** * Adds a file from the disk to the archive. * @param localPath Path to a file on disk. @@ -167,14 +167,14 @@ declare module AdmZip { * Returns an array of ZipEntry objects representing the files and folders * inside the archive */ - getEntries(): IZipEntry[]; + getEntries(): AdmZip.IZipEntry[]; /** * Returns a ZipEntry object representing the file or folder specified by * ``name``. * @param name Name of the file or folder to retrieve. * @return ZipEntry The entry corresponding to the name. */ - getEntry(name: string): IZipEntry; + getEntry(name: string): AdmZip.IZipEntry; /** * Extracts the given entry to the given targetPath. * If the entry is a directory inside the archive, the entire directory and @@ -203,7 +203,7 @@ declare module AdmZip { * will be overwriten if this is true. Default is FALSE * @return Boolean */ - extractEntryTo(entryPath: IZipEntry, targetPath: string, maintainEntryPath?: boolean, overwrite?: boolean): boolean; + extractEntryTo(entryPath: AdmZip.IZipEntry, targetPath: string, maintainEntryPath?: boolean, overwrite?: boolean): boolean; /** * Extracts the entire archive to the given location * @param targetPath Target location @@ -225,76 +225,75 @@ declare module AdmZip { toBuffer(): Buffer; } - /** - * The ZipEntry is more than a structure representing the entry inside the - * zip file. Beside the normal attributes and headers a entry can have, the - * class contains a reference to the part of the file where the compressed - * data resides and decompresses it when requested. It also compresses the - * data and creates the headers required to write in the zip file. - */ - interface IZipEntry { + module AdmZip { /** - * Represents the full name and path of the file + * The ZipEntry is more than a structure representing the entry inside the + * zip file. Beside the normal attributes and headers a entry can have, the + * class contains a reference to the part of the file where the compressed + * data resides and decompresses it when requested. It also compresses the + * data and creates the headers required to write in the zip file. */ - entryName: string; - rawEntryName: Buffer; - /** - * Extra data associated with this entry. - */ - extra: Buffer; - /** - * Entry comment. - */ - comment: string; - name: string; - /** - * Read-Only property that indicates the type of the entry. - */ - isDirectory: boolean; - /** - * Get the header associated with this ZipEntry. - */ - header: Buffer; - /** - * Retrieve the compressed data for this entry. Note that this may trigger - * compression if any properties were modified. - */ - getCompressedData(): Buffer; - /** - * Asynchronously retrieve the compressed data for this entry. Note that - * this may trigger compression if any properties were modified. - */ - getCompressedDataAsync(callback: (data: Buffer) => void): void; - /** - * Set the (uncompressed) data to be associated with this entry. - */ - setData(value: string): void; - /** - * Set the (uncompressed) data to be associated with this entry. - */ - setData(value: Buffer): void; - /** - * Get the decompressed data associated with this entry. - */ - getData(): Buffer; - /** - * Asynchronously get the decompressed data associated with this entry. - */ - getDataAsync(callback: (data: Buffer) => void): void; - /** - * Returns the CEN Entry Header to be written to the output zip file, plus - * the extra data and the entry comment. - */ - packHeader(): Buffer; - /** - * Returns a nicely formatted string with the most important properties of - * the ZipEntry. - */ - toString(): string; + interface IZipEntry { + /** + * Represents the full name and path of the file + */ + entryName: string; + rawEntryName: Buffer; + /** + * Extra data associated with this entry. + */ + extra: Buffer; + /** + * Entry comment. + */ + comment: string; + name: string; + /** + * Read-Only property that indicates the type of the entry. + */ + isDirectory: boolean; + /** + * Get the header associated with this ZipEntry. + */ + header: Buffer; + /** + * Retrieve the compressed data for this entry. Note that this may trigger + * compression if any properties were modified. + */ + getCompressedData(): Buffer; + /** + * Asynchronously retrieve the compressed data for this entry. Note that + * this may trigger compression if any properties were modified. + */ + getCompressedDataAsync(callback: (data: Buffer) => void): void; + /** + * Set the (uncompressed) data to be associated with this entry. + */ + setData(value: string): void; + /** + * Set the (uncompressed) data to be associated with this entry. + */ + setData(value: Buffer): void; + /** + * Get the decompressed data associated with this entry. + */ + getData(): Buffer; + /** + * Asynchronously get the decompressed data associated with this entry. + */ + getDataAsync(callback: (data: Buffer) => void): void; + /** + * Returns the CEN Entry Header to be written to the output zip file, plus + * the extra data and the entry comment. + */ + packHeader(): Buffer; + /** + * Returns a nicely formatted string with the most important properties of + * the ZipEntry. + */ + toString(): string; + } } -} -declare module "adm-zip" { - import zipFile = AdmZip.ZipFile; - export = zipFile; + export = AdmZip; } diff --git a/ag-grid/ag-grid-tests.ts b/ag-grid/ag-grid-tests.ts new file mode 100644 index 0000000000..67b98f9f33 --- /dev/null +++ b/ag-grid/ag-grid-tests.ts @@ -0,0 +1,137 @@ +/// + +checkGridOptions({}); +checkColDef({}); + +function checkGridOptions(gridOptions: ag.grid.GridOptions): void { + + gridOptions.virtualPaging = true; + gridOptions.toolPanelSuppressPivot = true; + gridOptions.toolPanelSuppressValues = true; + gridOptions.rowsAlreadyGrouped = true; + gridOptions.suppressRowClickSelection = true; + gridOptions.suppressCellSelection = true; + gridOptions.sortingOrder = ['asc','desc']; + gridOptions.suppressMultiSort = true; + gridOptions.suppressHorizontalScroll = true; + gridOptions.unSortIcon = true; + gridOptions.rowHeight = 0; + gridOptions.rowBuffer = 0; + gridOptions.enableColResize = true; + gridOptions.enableCellExpressions = true; + gridOptions.enableSorting = true; + gridOptions.enableServerSideSorting = true; + gridOptions.enableFilter = true; + gridOptions.enableServerSideFilter = true; + gridOptions.colWidth = 0; + gridOptions.suppressMenuHide = true; + gridOptions.singleClickEdit = true; + gridOptions.debug = true; + gridOptions.icons = {}; + gridOptions.angularCompileRows = true; + gridOptions.angularCompileFilters = true; + gridOptions.angularCompileHeaders = true; + gridOptions.localeText = {}; + gridOptions.localeTextFunc = function() {} + gridOptions.suppressScrollLag = true; + gridOptions.groupSuppressAutoColumn = true; + gridOptions.groupSelectsChildren = true; + gridOptions.groupHidePivotColumns = true; + gridOptions.groupIncludeFooter = true; + gridOptions.groupUseEntireRow = true; + gridOptions.groupSuppressRow = true; + gridOptions.groupSuppressBlankHeader = true; + gridOptions.forPrint = true; + gridOptions.groupColumnDef = {}; + gridOptions.context = {}; + gridOptions.rowStyle = {color: 'red'}; + gridOptions.rowClass = 'green'; + gridOptions.groupDefaultExpanded = false; + gridOptions.slaveGrids = []; + gridOptions.rowSelection = 'single'; + gridOptions.rowDeselection = true; + gridOptions.rowData = []; + gridOptions.floatingTopRowData = []; + gridOptions.floatingBottomRowData = []; + gridOptions.showToolPanel = true; + gridOptions.groupKeys = ['a','b'] + gridOptions.groupAggFields = ['a','b'] + gridOptions.columnDefs = []; + gridOptions.datasource = {}; + gridOptions.pinnedColumnCount = 0; + gridOptions.groupHeaders = true; + gridOptions.headerHeight = 0; + gridOptions.groupRowInnerRenderer = function(params) {}; + gridOptions.groupRowRenderer = {}; + gridOptions.isScrollLag = function() {return true;} + gridOptions.isExternalFilterPresent = function() { return true; }; + gridOptions.doesExternalFilterPass = function(node: ag.grid.RowNode) { return false; }; + gridOptions.getRowStyle = function() {}; + gridOptions.getRowClass = function() {}; + gridOptions.headerCellRenderer = function() {}; + gridOptions.groupAggFunction = function(nodes: any[]) {}; + gridOptions.onReady = function(api: any) {}; + gridOptions.onModelUpdated = function() {}; + gridOptions.onCellClicked = function(params) {}; + gridOptions.onCellDoubleClicked = function(params) {}; + gridOptions.onCellContextMenu = function(params) {}; + gridOptions.onCellValueChanged = function(params) {}; + gridOptions.onCellFocused = function(params) {}; + gridOptions.onRowSelected = function(params) {}; + gridOptions.onSelectionChanged = function() {}; + gridOptions.onBeforeFilterChanged = function() {}; + gridOptions.onAfterFilterChanged = function() {}; + gridOptions.onFilterModified = function() {}; + gridOptions.onBeforeSortChanged = function() {}; + gridOptions.onAfterSortChanged = function() {}; + gridOptions.onVirtualRowRemoved = function(params) {}; + gridOptions.onRowClicked = function(params) {}; + gridOptions.api = null; + gridOptions.columnApi = null; + +} + +function checkColDef(colDef: ag.grid.ColDef): void { + + colDef.sort = 'test'; + colDef.sortedAt = 0; + colDef.sortingOrder = ['asc','desc']; + colDef.headerName = 'test'; + colDef.field = 'test'; + colDef.headerValueGetter = 'test'; + colDef.colId = 'test'; + colDef.hide = true; + colDef.headerTooltip = 'test'; + colDef.valueGetter = 'test'; + colDef.headerCellRenderer = {}; + colDef.headerClass = 'test'; + colDef.width = 0; + colDef.minWidth = 0; + colDef.maxWidth = 0; + colDef.cellClass = 'test'; + colDef.cellStyle = {color: 'test'}; + colDef.cellRenderer = function() {}; + colDef.floatingCellRenderer = function() {}; + colDef.aggFunc = 'test'; + colDef.comparator = function() {}; + colDef.checkboxSelection = true; + colDef.suppressMenu = true; + colDef.suppressSorting = true; + colDef.unSortIcon = true; + colDef.suppressSizeToFit = true; + colDef.suppressResize = true; + colDef.headerGroup = 'test'; + colDef.headerGroupShow = 'test'; + colDef.editable = true; + colDef.newValueHandler = function() {}; + colDef.volatile = true; + colDef.template = 'test'; + colDef.templateUrl = 'test'; + colDef.filter = 'test'; + colDef.filterParams = {}; + colDef.onCellValueChanged = function() {}; + colDef.onCellClicked = function() {}; + colDef.onCellDoubleClicked = function() {}; + colDef.onCellContextMenu = function() {}; + colDef.cellClassRules = {}; +} diff --git a/ag-grid/ag-grid.d-2.1.2.ts b/ag-grid/ag-grid.d-2.1.2.ts new file mode 100644 index 0000000000..f385a90f44 --- /dev/null +++ b/ag-grid/ag-grid.d-2.1.2.ts @@ -0,0 +1,1991 @@ +// Type definitions for ag-grid v2.1.2 +// Project: http://www.ag-grid.com/ +// Definitions by: Niall Crosby +// Definitions: https://github.com/borisyankov/DefinitelyTyped +declare module ag.grid { + class ColumnChangeEvent { + private type; + private column; + private columnGroup; + private fromIndex; + private toIndex; + private pinnedColumnCount; + constructor(type: string); + toString(): string; + withColumn(column: Column): ColumnChangeEvent; + withColumnGroup(columnGroup: ColumnGroup): ColumnChangeEvent; + withFromIndex(fromIndex: number): ColumnChangeEvent; + withPinnedColumnCount(pinnedColumnCount: number): ColumnChangeEvent; + withToIndex(toIndex: number): ColumnChangeEvent; + getFromIndex(): number; + getToIndex(): number; + getPinnedColumnCount(): number; + getType(): string; + getColumn(): Column; + getColumnGroup(): ColumnGroup; + isPivotChanged(): boolean; + isValueChanged(): boolean; + isIndividualColumnResized(): boolean; + } +} +declare module ag.grid { + class Utils { + private static isSafari; + private static isIE; + static iterateObject(object: any, callback: (key: string, value: any) => void): void; + static cloneObject(object: any): any; + static map(array: TItem[], callback: (item: TItem) => TResult): TResult[]; + static forEach(array: T[], callback: (item: T, index: number) => void): void; + static filter(array: T[], callback: (item: T) => boolean): T[]; + static assign(object: any, source: any): void; + static getFunctionParameters(func: any): any; + static find(collection: any, predicate: any, value: any): any; + static toStrings(array: T[]): string[]; + static iterateArray(array: T[], callback: (item: T, index: number) => void): void; + static isNode(o: any): boolean; + static isElement(o: any): boolean; + static isNodeOrElement(o: any): boolean; + static addChangeListener(element: HTMLElement, listener: EventListener): void; + static makeNull(value: any): any; + static removeAllChildren(node: HTMLElement): void; + static removeElement(parent: HTMLElement, cssSelector: string): void; + static removeFromParent(node: Element): void; + static isVisible(element: HTMLElement): boolean; + /** + * loads the template and returns it as an element. makes up for no simple way in + * the dom api to load html directly, eg we cannot do this: document.createElement(template) + */ + static loadTemplate(template: string): Node; + static querySelectorAll_addCssClass(eParent: any, selector: string, cssClass: string): void; + static querySelectorAll_removeCssClass(eParent: any, selector: string, cssClass: string): void; + static querySelectorAll_replaceCssClass(eParent: any, selector: string, cssClassToRemove: string, cssClassToAdd: string): void; + static addOrRemoveCssClass(element: HTMLElement, className: string, addOrRemove: boolean): void; + static addCssClass(element: HTMLElement, className: string): void; + static offsetHeight(element: HTMLElement): number; + static offsetWidth(element: HTMLElement): number; + static removeCssClass(element: HTMLElement, className: string): void; + static removeFromArray(array: T[], object: T): void; + static defaultComparator(valueA: any, valueB: any): number; + static formatWidth(width: number | string): string; + /** + * Tries to use the provided renderer. + */ + static useRenderer(eParent: Element, eRenderer: (params: TParams) => Node | string, params: TParams): void; + /** + * If icon provided, use this (either a string, or a function callback). + * if not, then use the second parameter, which is the svgFactory function + */ + static createIcon(iconName: any, gridOptionsWrapper: any, colDefWrapper: any, svgFactoryFunc: () => Node): HTMLSpanElement; + static addStylesToElement(eElement: any, styles: any): void; + static getScrollbarWidth(): number; + static isKeyPressed(event: KeyboardEvent, keyToCheck: number): boolean; + static setVisible(element: HTMLElement, visible: boolean): void; + static isBrowserIE(): boolean; + static isBrowserSafari(): boolean; + } +} +declare module ag.grid { + class Constants { + static STEP_EVERYTHING: number; + static STEP_FILTER: number; + static STEP_SORT: number; + static STEP_MAP: number; + static ASC: string; + static DESC: string; + static ROW_BUFFER_SIZE: number; + static MIN_COL_WIDTH: number; + static SUM: string; + static MIN: string; + static MAX: string; + static KEY_TAB: number; + static KEY_ENTER: number; + static KEY_BACKSPACE: number; + static KEY_DELETE: number; + static KEY_ESCAPE: number; + static KEY_SPACE: number; + static KEY_DOWN: number; + static KEY_UP: number; + static KEY_LEFT: number; + static KEY_RIGHT: number; + } +} +declare module ag.grid { + class Column { + static colIdSequence: number; + colDef: ColDef; + actualWidth: any; + visible: any; + colId: any; + pinned: boolean; + index: number; + aggFunc: string; + pivotIndex: number; + sort: string; + sortedAt: number; + constructor(colDef: ColDef, actualWidth: any); + isGreaterThanMax(width: number): boolean; + getMinimumWidth(): number; + setMinimum(): void; + } +} +declare module ag.grid { + class ColumnGroup { + pinned: any; + name: any; + allColumns: Column[]; + displayedColumns: Column[]; + expandable: boolean; + expanded: boolean; + actualWidth: number; + constructor(pinned: any, name: any); + getMinimumWidth(): number; + addColumn(column: any): void; + calculateExpandable(): void; + calculateActualWidth(): void; + calculateDisplayedColumns(): void; + addToVisibleColumns(colsToAdd: any): void; + } +} +declare module ag.grid { + class GridOptionsWrapper { + private gridOptions; + private groupHeaders; + private headerHeight; + private rowHeight; + private floatingTopRowData; + private floatingBottomRowData; + init(gridOptions: GridOptions, eventService: EventService): void; + isRowSelection(): boolean; + isRowDeselection(): boolean; + isRowSelectionMulti(): boolean; + getContext(): any; + isVirtualPaging(): boolean; + isShowToolPanel(): boolean; + isToolPanelSuppressPivot(): boolean; + isToolPanelSuppressValues(): boolean; + isRowsAlreadyGrouped(): boolean; + isGroupSelectsChildren(): boolean; + isGroupHidePivotColumns(): boolean; + isGroupIncludeFooter(): boolean; + isGroupSuppressBlankHeader(): boolean; + isSuppressRowClickSelection(): boolean; + isSuppressCellSelection(): boolean; + isSuppressMultiSort(): boolean; + isGroupSuppressAutoColumn(): boolean; + isForPrint(): boolean; + isSuppressHorizontalScroll(): boolean; + isUnSortIcon(): boolean; + isSuppressMenuHide(): boolean; + getRowStyle(): any; + getRowClass(): any; + getRowStyleFunc(): any; + getRowClassFunc(): any; + getHeaderCellRenderer(): any; + getApi(): GridApi; + isEnableColResize(): boolean; + isSingleClickEdit(): boolean; + getGroupDefaultExpanded(): any; + getGroupKeys(): string[]; + getGroupAggFunction(): (nodes: any[]) => any; + getGroupAggFields(): string[]; + getRowData(): any[]; + isGroupUseEntireRow(): boolean; + getGroupColumnDef(): any; + isGroupSuppressRow(): boolean; + isAngularCompileRows(): boolean; + isAngularCompileFilters(): boolean; + isAngularCompileHeaders(): boolean; + isDebug(): boolean; + getColumnDefs(): any[]; + getDatasource(): any; + getRowBuffer(): number; + isEnableSorting(): boolean; + isEnableCellExpressions(): boolean; + isEnableServerSideSorting(): boolean; + isEnableFilter(): boolean; + isEnableServerSideFilter(): boolean; + isSuppressScrollLag(): boolean; + getIcons(): any; + getIsScrollLag(): () => boolean; + getSortingOrder(): string[]; + getSlaveGrids(): GridOptions[]; + getGroupRowRenderer(): Object | Function; + getRowHeight(): number; + getHeaderHeight(): number; + setHeaderHeight(headerHeight: number): void; + isGroupHeaders(): boolean; + setGroupHeaders(groupHeaders: boolean): void; + getFloatingTopRowData(): any[]; + setFloatingTopRowData(rows: any[]): void; + getFloatingBottomRowData(): any[]; + setFloatingBottomRowData(rows: any[]): void; + isExternalFilterPresent(): boolean; + doesExternalFilterPass(node: RowNode): boolean; + getGroupRowInnerRenderer(): (params: any) => void; + getColWidth(): number; + private checkForDeprecated(); + getPinnedColCount(): number; + getLocaleTextFunc(): Function; + globalEventHandler(eventName: string, event?: any): void; + private getCallbackForEvent(eventName); + } +} +declare module ag.grid { + class LoggerFactory { + private logging; + init(gridOptionsWrapper: GridOptionsWrapper): void; + create(name: string): Logger; + } + class Logger { + private logging; + private name; + constructor(name: string, logging: boolean); + log(message: string): void; + } +} +declare module ag.grid { + class Events { + /** A new set of columns has been entered, everything has potentially changed. */ + static EVENT_COLUMN_EVERYTHING_CHANGED: string; + /** A pivot column was added, removed or order changed. */ + static EVENT_COLUMN_PIVOT_CHANGE: string; + /** A value column was added, removed or agg function was changed. */ + static EVENT_COLUMN_VALUE_CHANGE: string; + /** A column was moved */ + static EVENT_COLUMN_MOVED: string; + /** One or more columns was shown / hidden */ + static EVENT_COLUMN_VISIBLE: string; + /** A column group was opened / closed */ + static EVENT_COLUMN_GROUP_OPENED: string; + /** One or more columns was resized. If just one, the column in the event is set. */ + static EVENT_COLUMN_RESIZED: string; + /** One or more columns was resized. If just one, the column in the event is set. */ + static EVENT_COLUMN_PINNED_COUNT_CHANGED: string; + static EVENT_MODEL_UPDATED: string; + static EVENT_CELL_CLICKED: string; + static EVENT_CELL_DOUBLE_CLICKED: string; + static EVENT_CELL_CONTEXT_MENU: string; + static EVENT_CELL_VALUE_CHANGED: string; + static EVENT_CELL_FOCUSED: string; + static EVENT_ROW_SELECTED: string; + static EVENT_SELECTION_CHANGED: string; + static EVENT_BEFORE_FILTER_CHANGED: string; + static EVENT_AFTER_FILTER_CHANGED: string; + static EVENT_FILTER_MODIFIED: string; + static EVENT_BEFORE_SORT_CHANGED: string; + static EVENT_AFTER_SORT_CHANGED: string; + static EVENT_VIRTUAL_ROW_REMOVED: string; + static EVENT_ROW_CLICKED: string; + static EVENT_READY: string; + } +} +declare module ag.grid { + class EventService { + private allListeners; + private globalListeners; + private getListenerList(eventType); + addEventListener(eventType: string, listener: Function): void; + addGlobalListener(listener: Function): void; + removeEventListener(eventType: string, listener: Function): void; + removeGlobalListener(listener: Function): void; + dispatchEvent(eventType: string, event?: any): void; + } +} +declare module ag.grid { + class MasterSlaveService { + private gridOptionsWrapper; + private columnController; + private gridPanel; + private logger; + private eventService; + private consuming; + init(gridOptionsWrapper: GridOptionsWrapper, columnController: ColumnController, gridPanel: GridPanel, loggerFactory: LoggerFactory, eventService: EventService): void; + private fireEvent(callback); + private onEvent(callback); + private fireColumnEvent(event); + fireHorizontalScrollEvent(horizontalScroll: number): void; + onScrollEvent(horizontalScroll: number): void; + onColumnEvent(event: ColumnChangeEvent): void; + } +} +declare module ag.grid { + class ColumnApi { + private _columnController; + constructor(_columnController: ColumnController); + sizeColumnsToFit(gridWidth: any): void; + hideColumns(colIds: any, hide: any): void; + columnGroupOpened(group: ColumnGroup, newValue: boolean): void; + getColumnGroup(name: string): ColumnGroup; + getDisplayNameForCol(column: any): string; + getColumn(key: any): Column; + setState(columnState: any): void; + getState(): [any]; + isPinning(): boolean; + getVisibleColAfter(col: Column): Column; + getVisibleColBefore(col: Column): Column; + setColumnVisible(column: Column, visible: boolean): void; + getAllColumns(): Column[]; + getDisplayedColumns(): Column[]; + getPivotedColumns(): Column[]; + getValueColumns(): Column[]; + moveColumn(fromIndex: number, toIndex: number): void; + movePivotColumn(fromIndex: number, toIndex: number): void; + setColumnAggFunction(column: Column, aggFunc: string): void; + setColumnWidth(column: Column, newWidth: number): void; + removeValueColumn(column: Column): void; + addValueColumn(column: Column): void; + removePivotColumn(column: Column): void; + setPinnedColumnCount(count: number): void; + addPivotColumn(column: Column): void; + getHeaderGroups(): ColumnGroup[]; + hideColumn(colId: any, hide: any): void; + } + class ColumnController { + private gridOptionsWrapper; + private angularGrid; + private selectionRendererFactory; + private expressionService; + private masterSlaveController; + private allColumns; + private visibleColumns; + private displayedColumns; + private pivotColumns; + private valueColumns; + private columnGroups; + private setupComplete; + private valueService; + private pinnedColumnCount; + private eventService; + constructor(); + init(angularGrid: Grid, selectionRendererFactory: SelectionRendererFactory, gridOptionsWrapper: GridOptionsWrapper, expressionService: ExpressionService, valueService: ValueService, masterSlaveController: MasterSlaveService, eventService: EventService): void; + getColumnApi(): ColumnApi; + isSetupComplete(): boolean; + getHeaderGroups(): ColumnGroup[]; + getPinnedContainerWidth(): number; + addPivotColumn(column: Column): void; + setPinnedColumnCount(count: number): void; + removePivotColumn(column: Column): void; + addValueColumn(column: Column): void; + removeValueColumn(column: Column): void; + private doesColumnExistInGrid(column); + setColumnWidth(column: Column, newWidth: number): void; + private updateGroupWidthsAfterColumnResize(column); + setColumnAggFunction(column: Column, aggFunc: string): void; + movePivotColumn(fromIndex: number, toIndex: number): void; + moveColumn(fromIndex: number, toIndex: number): void; + getBodyContainerWidth(): number; + getValueColumns(): Column[]; + getPivotedColumns(): Column[]; + getDisplayedColumns(): Column[]; + getAllColumns(): Column[]; + setColumnVisible(column: Column, visible: boolean): void; + getVisibleColBefore(col: any): Column; + getVisibleColAfter(col: Column): Column; + isPinning(): boolean; + getState(): [any]; + setState(columnState: any): void; + getColumns(keys: any[]): Column[]; + getColumn(key: any): Column; + getDisplayNameForCol(column: any): string; + getColumnGroup(name: string): ColumnGroup; + onColumnsChanged(): void; + private checkForDeprecatedItems(columnDefs); + columnGroupOpened(group: ColumnGroup, newValue: boolean): void; + hideColumns(colIds: any, hide: any): void; + private updateModel(); + private updateDisplayedColumns(); + sizeColumnsToFit(gridWidth: any): void; + private buildGroups(); + private updateGroups(); + private updateVisibleColumns(); + private updatePinnedColumns(); + private createColumns(colDefs); + private createPivotColumns(); + private createValueColumns(); + private createDummyColumn(field); + private calculateColInitialWidth(colDef); + private getTotalColWidth(includePinned); + } +} +declare module ag.grid { + interface CsvExportParams { + skipHeader?: boolean; + skipFooters?: boolean; + skipGroups?: boolean; + fileName?: string; + } + class CsvCreator { + private rowController; + private columnController; + private grid; + private valueService; + constructor(rowController: InMemoryRowController, columnController: ColumnController, grid: Grid, valueService: ValueService); + exportDataAsCsv(params?: CsvExportParams): void; + getDataAsCsv(params?: CsvExportParams): string; + private createValueForGroupNode(node); + private escape(value); + } +} +declare module ag.grid { + class ExpressionService { + private expressionToFunctionCache; + private logger; + init(loggerFactory: LoggerFactory): void; + evaluate(expression: string, params: any): any; + private createExpressionFunction(expression); + private createFunctionBody(expression); + } +} +declare module ag.grid { + interface TextAndNumberFilterParameters { + /** What to do when new rows are loaded. The default is to reset the filter, to keep it in line with 'set' filters. If you want to keep the selection, then set this value to 'keep'. */ + newRowsAction?: string; + } +} +declare module ag.grid { + class TextFilter implements Filter { + private filterParams; + private filterChangedCallback; + private filterModifiedCallback; + private localeTextFunc; + private valueGetter; + private filterText; + private filterType; + private api; + private eGui; + private eFilterTextField; + private eTypeSelect; + private applyActive; + private eApplyButton; + init(params: any): void; + onNewRowsLoaded(): void; + afterGuiAttached(): void; + doesFilterPass(node: any): boolean; + getGui(): any; + isFilterActive(): boolean; + private createTemplate(); + private createGui(); + private setupApply(); + private onTypeChanged(); + private onFilterChanged(); + private filterChanged(); + private createApi(); + private getApi(); + } +} +declare module ag.grid { + class NumberFilter implements Filter { + private filterParams; + private filterChangedCallback; + private filterModifiedCallback; + private localeTextFunc; + private valueGetter; + private filterNumber; + private filterType; + private api; + private eGui; + private eFilterTextField; + private eTypeSelect; + private applyActive; + private eApplyButton; + init(params: any): void; + onNewRowsLoaded(): void; + afterGuiAttached(): void; + doesFilterPass(node: any): boolean; + getGui(): any; + isFilterActive(): boolean; + private createTemplate(); + private createGui(); + private setupApply(); + private onTypeChanged(); + private filterChanged(); + private onFilterChanged(); + private createApi(); + private getApi(); + } +} +declare module ag.grid { + interface ColDef { + /** If sorting by default, set it here. Set to 'asc' or 'desc' */ + sort?: string; + /** If sorting more than one column by default, the milliseconds when this column was sorted, so we know what order to sort the columns in. */ + sortedAt?: number; + /** The sort order, provide an array with any of the following in any order ['asc','desc',null] */ + sortingOrder?: string[]; + /** The name to render in the column header */ + headerName: string; + /** The field of the row to get the cells data from */ + field: string; + /** Expression or function to get the cells value. */ + headerValueGetter?: string | Function; + /** The unique ID to give the column. This is optional. If missing, the ID will default to the field. If both field and colId are missing, a unique ID will be generated. + * This ID is used to identify the column in the API for sorting, filtering etc. */ + colId?: string; + /** Set to true for this column to be hidden. Naturally you might think, it would make more sense to call this field 'visible' and mark it false to hide, + * however we want all default values to be false and we want columns to be visible by default. */ + hide?: boolean; + /** Tooltip for the column header */ + headerTooltip?: string; + /** Expression or function to get the cells value. */ + valueGetter?: string | Function; + /** To provide custom rendering to the header. */ + headerCellRenderer?: Function | Object; + /** CSS class for the header */ + headerClass?: string | string[] | ((params: any) => string | string[]); + /** Initial width, in pixels, of the cell */ + width?: number; + /** Min width, in pixels, of the cell */ + minWidth?: number; + /** Max width, in pixels, of the cell */ + maxWidth?: number; + /** Class to use for the cell. Can be string, array of strings, or function. */ + cellClass?: string | string[] | ((cellClassParams: any) => string | string[]); + /** An object of css values. Or a function returning an object of css values. */ + cellStyle?: {} | ((params: any) => {}); + /** A function for rendering a cell. */ + cellRenderer?: Function | {}; + /** A function for rendering a floating cell. */ + floatingCellRenderer?: Function | {}; + /** Name of function to use for aggregation. One of [sum,min,max]. */ + aggFunc?: string; + /** Comparator function for custom sorting. */ + comparator?: Function; + /** Set to true to render a selection checkbox in the column. */ + checkboxSelection?: boolean; + /** Set to true if no menu should be shown for this column header. */ + suppressMenu?: boolean; + /** Set to true if no sorting should be done for this column. */ + suppressSorting?: boolean; + /** Set to true if you want the unsorted icon to be shown when no sort is applied to this column. */ + unSortIcon?: boolean; + /** Set to true if you want this columns width to be fixed during 'size to fit' operation. */ + suppressSizeToFit?: boolean; + /** Set to true if you do not want this column to be resizable by dragging it's edge. */ + suppressResize?: boolean; + /** If grouping columns, the group this column belongs to. */ + headerGroup?: string; + /** Whether to show the column when the group is open / closed. */ + headerGroupShow?: string; + /** Set to true if this col is editable, otherwise false. Can also be a function to have different rows editable. */ + editable?: boolean | (Function); + /** Callbacks for editing.See editing section for further details. */ + newValueHandler?: Function; + /** If true, this cell gets refreshed when api.softRefreshView() gets called. */ + volatile?: boolean; + /** Cell template to use for cell. Useful for AngularJS cells. */ + template?: string; + /** Cell template URL to load template from to use for cell. Useful for AngularJS cells. */ + templateUrl?: string; + /** one of the built in filter names: [set, number, text], or a filter function*/ + filter?: string | Function; + /** The filter params are specific to each filter! */ + filterParams?: SetFilterParameters | TextAndNumberFilterParameters; + /** Rules for applying css classes */ + cellClassRules?: { + [cssClassName: string]: (Function | string); + }; + /** Callbacks for editing.See editing section for further details. */ + onCellValueChanged?: Function; + /** Function callback, gets called when a cell is clicked. */ + onCellClicked?: Function; + /** Function callback, gets called when a cell is double clicked. */ + onCellDoubleClicked?: Function; + /** Function callback, gets called when a cell is right clicked. */ + onCellContextMenu?: Function; + } +} +declare module ag.grid { + class SetFilterModel { + private colDef; + private filterParams; + private rowModel; + private valueGetter; + private allUniqueValues; + private availableUniqueValues; + private displayedValues; + private miniFilter; + private selectedValuesCount; + private selectedValuesMap; + private showingAvailableOnly; + private usingProvidedSet; + private doesRowPassOtherFilters; + constructor(colDef: ColDef, rowModel: any, valueGetter: any, doesRowPassOtherFilters: any); + refreshAfterNewRowsLoaded(keepSelection: any, isSelectAll: boolean): void; + refreshAfterAnyFilterChanged(): void; + private createAllUniqueValues(); + private createAvailableUniqueValues(); + private getUniqueValues(filterOutNotAvailable); + setMiniFilter(newMiniFilter: any): boolean; + getMiniFilter(): any; + private processMiniFilter(); + getDisplayedValueCount(): any; + getDisplayedValue(index: any): any; + selectEverything(): void; + isFilterActive(): boolean; + selectNothing(): void; + getUniqueValueCount(): any; + getUniqueValue(index: any): any; + unselectValue(value: any): void; + selectValue(value: any): void; + isValueSelected(value: any): boolean; + isEverythingSelected(): boolean; + isNothingSelected(): boolean; + getModel(): any; + setModel(model: any, isSelectAll: boolean): void; + } +} +/** The filter parameters for set filter */ +declare module ag.grid { + interface SetFilterParameters { + /** Same as cell renderer for grid (you can use the same one in both locations). Setting it separatly here allows for the value to be rendered differently in the filter. */ + cellRenderer?: Function; + /** The height of the cell. */ + cellHeight?: number; + /** The values to display in the filter. */ + values?: any; + /** What to do when new rows are loaded. The default is to reset the filter, as the set of values to select from can have changed. If you want to keep the selection, then set this value to 'keep'. */ + newRowsAction?: string; + /** If true, the filter will not remove items that are no longer availabe due to other filters. */ + suppressRemoveEntries?: boolean; + } +} +declare module ag.grid { + class SetFilter implements Filter { + private eGui; + private filterParams; + private rowHeight; + private model; + private filterChangedCallback; + private filterModifiedCallback; + private valueGetter; + private rowsInBodyContainer; + private colDef; + private localeTextFunc; + private cellRenderer; + private eListContainer; + private eFilterValueTemplate; + private eSelectAll; + private eListViewport; + private eMiniFilter; + private api; + private applyActive; + private eApplyButton; + init(params: any): void; + afterGuiAttached(): void; + isFilterActive(): boolean; + doesFilterPass(node: any): boolean; + getGui(): any; + onNewRowsLoaded(): void; + onAnyFilterChanged(): void; + private createTemplate(); + private createGui(); + private setupApply(); + private setContainerHeight(); + private drawVirtualRows(); + private ensureRowsRendered(start, finish); + private removeVirtualRows(rowsToRemove); + private insertRow(value, rowIndex); + private onCheckboxClicked(eCheckbox, value); + private filterChanged(); + private onMiniFilterChanged(); + private refreshVirtualRows(); + private clearVirtualRows(); + private onSelectAll(); + private updateAllCheckboxes(checked); + private addScrollListener(); + getApi(): any; + private createApi(); + } +} +declare module ag.grid { + class PopupService { + private ePopupParent; + init(ePopupParent: any): void; + positionPopup(eventSource: any, ePopup: any, minWidth: any): void; + addAsModalPopup(eChild: any, closeOnEsc: boolean): (event: any) => void; + } +} +declare module ag.grid { + interface RowNode { + /** Unique ID for the node. Can be though of as the index of the row in the original list, + * however exceptions apply so don't depend on uniqueness. */ + id?: number; + /** The user provided data */ + data?: any; + /** The parent node to this node, or empty if top level */ + parent?: RowNode; + /** How many levels this node is from the top */ + level?: number; + /** True if this node is a group node (ie has children) */ + group?: boolean; + /** True if this is the first child in this group */ + firstChild?: boolean; + /** True if this is the last child in this group */ + lastChild?: boolean; + /** The index of this node in the group */ + childIndex?: number; + /** True if this row is a floating row */ + floating?: boolean; + /** True if this row is a floating top row */ + floatingTop?: boolean; + /** True if this row is a floating bottom row */ + floatingBottom?: boolean; + /** If using quick filter, stores a string representation of the row for searching against */ + quickFilterAggregateText?: string; + /** Groups only - True if row is a footer. Footers have group = true and footer = true */ + footer?: boolean; + /** Groups only - Children of this group */ + children?: RowNode[]; + /** Groups only - The field we are pivoting on eg Country*/ + field?: string; + /** Groups only - The key for the pivot eg Ireland, UK, USA */ + key?: any; + /** Groups only - Filtered children of this group */ + childrenAfterFilter?: RowNode[]; + /** Groups only - Sorted children of this group */ + childrenAfterSort?: RowNode[]; + /** Groups only - Number of children and grand children */ + allChildrenCount?: number; + /** Groups only - True if group is expanded, otherwise false */ + expanded?: boolean; + /** Groups only - If doing footers, reference to the footer node for this group */ + sibling?: RowNode; + /** Not to be used, internal temporary map used by the grid when creating groups */ + _childrenMap?: {}; + } +} +declare module ag.grid { + class FilterManager { + private $compile; + private $scope; + private gridOptionsWrapper; + private grid; + private allFilters; + private rowModel; + private popupService; + private valueService; + private columnController; + private quickFilter; + private advancedFilterPresent; + private externalFilterPresent; + init(grid: Grid, gridOptionsWrapper: GridOptionsWrapper, $compile: any, $scope: any, columnController: ColumnController, popupService: PopupService, valueService: ValueService): void; + setFilterModel(model: any): void; + private setModelOnFilterWrapper(filter, newModel); + getFilterModel(): any; + setRowModel(rowModel: any): void; + isAdvancedFilterPresent(): boolean; + isAnyFilterPresent(): boolean; + isFilterPresentForCol(colId: any): any; + private doesFilterPass(node, filterToSkip?); + setQuickFilter(newFilter: any): boolean; + onFilterChanged(): void; + isQuickFilterPresent(): boolean; + doesRowPassOtherFilters(filterToSkip: any, node: any): boolean; + doesRowPassFilter(node: any, filterToSkip?: any): boolean; + private aggregateRowForQuickFilter(node); + refreshDisplayedValues(): void; + onNewRowsLoaded(): void; + private createValueGetter(column); + getFilterApi(column: Column): any; + private getOrCreateFilterWrapper(column); + private createFilterWrapper(column); + private assertMethodHasNoParameters(theMethod); + showFilter(column: Column, eventSource: any): void; + } +} +declare module ag.grid { + class TemplateService { + templateCache: any; + waitingCallbacks: any; + $scope: any; + init($scope: any): void; + getTemplate(url: any, callback: any): any; + handleHttpResult(httpResult: any, url: any): void; + } +} +declare module ag.grid { + class SelectionRendererFactory { + private angularGrid; + private selectionController; + init(angularGrid: any, selectionController: any): void; + createSelectionCheckbox(node: any, rowIndex: any): HTMLInputElement; + } +} +declare module ag.vdom { + class VElement { + static idSequence: number; + private id; + private elementAttachedListeners; + constructor(); + getId(): number; + addElementAttachedListener(listener: (element: Element) => void): void; + protected fireElementAttached(element: Element): void; + elementAttached(element: Element): void; + toHtmlString(): string; + } +} +declare module ag.vdom { + class VHtmlElement extends VElement { + private type; + private classes; + private eventListeners; + private attributes; + private children; + private innerHtml; + private style; + private bound; + private element; + constructor(type: string); + getElement(): HTMLElement; + setInnerHtml(innerHtml: string): void; + addStyles(styles: any): void; + private attachEventListeners(node); + addClass(newClass: string): void; + removeClass(oldClass: string): void; + addClasses(classes: string[]): void; + toHtmlString(): string; + private toHtmlStringChildren(); + private toHtmlStringAttributes(); + private toHtmlStringClasses(); + private toHtmlStringStyles(); + appendChild(child: any): void; + setAttribute(key: string, value: string): void; + addEventListener(event: string, listener: EventListener): void; + elementAttached(element: Element): void; + fireElementAttachedToChildren(element: Element): void; + } +} +declare module ag.vdom { + class VWrapperElement extends VElement { + private wrappedElement; + constructor(wrappedElement: Element); + toHtmlString(): string; + elementAttached(element: Element): void; + } +} +declare module ag.grid { + class RenderedCell { + private vGridCell; + private vSpanWithValue; + private vCellWrapper; + private vParentOfValue; + private checkboxOnChangeListener; + private column; + private data; + private node; + private rowIndex; + private editingCell; + private scope; + private isFirstColumn; + private gridOptionsWrapper; + private expressionService; + private selectionRendererFactory; + private rowRenderer; + private selectionController; + private $compile; + private templateService; + private cellRendererMap; + private eCheckbox; + private columnController; + private valueService; + private eventService; + private value; + private checkboxSelection; + constructor(isFirstColumn: any, column: any, $compile: any, rowRenderer: RowRenderer, gridOptionsWrapper: GridOptionsWrapper, expressionService: ExpressionService, selectionRendererFactory: SelectionRendererFactory, selectionController: SelectionController, templateService: TemplateService, cellRendererMap: { + [key: string]: any; + }, node: any, rowIndex: number, scope: any, columnController: ColumnController, valueService: ValueService, eventService: EventService); + getColumn(): Column; + private getValue(); + getVGridCell(): ag.vdom.VHtmlElement; + private getDataForRow(); + private setupComponents(); + startEditing(key?: number): void; + focusCell(forceBrowserFocus: boolean): void; + private stopEditing(eInput, blurListener, reset?); + createParams(): any; + createEvent(event: any, eventSource: any): any; + private addCellDoubleClickedHandler(); + private addCellContextMenuHandler(); + isCellEditable(): any; + private addCellClickedHandler(); + private populateCell(); + private addStylesFromCollDef(); + private addClassesFromCollDef(); + private addClassesFromRules(); + private addCellNavigationHandler(); + private isKeycodeForStartEditing(key); + createSelectionCheckbox(): void; + setSelected(state: boolean): void; + private createParentOfValue(); + isVolatile(): boolean; + refreshCell(): void; + private putDataIntoCell(); + private useCellRenderer(cellRenderer); + private addClasses(); + } +} +declare module ag.grid { + class RenderedRow { + vPinnedRow: any; + vBodyRow: any; + private renderedCells; + private scope; + private node; + private rowIndex; + private cellRendererMap; + private gridOptionsWrapper; + private parentScope; + private angularGrid; + private columnController; + private expressionService; + private rowRenderer; + private selectionRendererFactory; + private $compile; + private templateService; + private selectionController; + private pinning; + private eBodyContainer; + private ePinnedContainer; + private valueService; + private eventService; + constructor(gridOptionsWrapper: GridOptionsWrapper, valueService: ValueService, parentScope: any, angularGrid: Grid, columnController: ColumnController, expressionService: ExpressionService, cellRendererMap: { + [key: string]: any; + }, selectionRendererFactory: SelectionRendererFactory, $compile: any, templateService: TemplateService, selectionController: SelectionController, rowRenderer: RowRenderer, eBodyContainer: HTMLElement, ePinnedContainer: HTMLElement, node: any, rowIndex: number, eventService: EventService); + onRowSelected(selected: boolean): void; + softRefresh(): void; + getRenderedCellForColumn(column: Column): RenderedCell; + getCellForCol(column: Column): any; + destroy(): void; + private destroyScope(); + isDataInList(rows: any[]): boolean; + isNodeInList(nodes: RowNode[]): boolean; + isGroup(): boolean; + private drawNormalRow(); + private bindVirtualElement(vElement); + private createGroupRow(); + private createGroupSpanningEntireRowCell(padding); + setMainRowWidth(width: number): void; + private createChildScopeOrNull(data); + private addDynamicStyles(); + private createRowContainer(); + getRowNode(): any; + getRowIndex(): any; + refreshCells(colIds: string[]): void; + private addDynamicClasses(); + } +} +declare module ag.grid { + class SvgFactory { + static theInstance: SvgFactory; + static getInstance(): SvgFactory; + createFilterSvg(): Element; + createColumnShowingSvg(): Element; + createColumnHiddenSvg(): Element; + createMenuSvg(): Element; + createArrowUpSvg(): Element; + createArrowLeftSvg(): Element; + createArrowDownSvg(): Element; + createArrowRightSvg(): Element; + createSmallArrowDownSvg(): Element; + createArrowUpDownSvg(): Element; + } +} +declare module ag.grid { + function groupCellRendererFactory(gridOptionsWrapper: GridOptionsWrapper, selectionRendererFactory: SelectionRendererFactory, expressionService: ExpressionService): (params: any) => HTMLSpanElement; +} +declare module ag.grid { + class RowRenderer { + private columnModel; + private gridOptionsWrapper; + private angularGrid; + private selectionRendererFactory; + private gridPanel; + private $compile; + private $scope; + private selectionController; + private expressionService; + private templateService; + private cellRendererMap; + private rowModel; + private firstVirtualRenderedRow; + private lastVirtualRenderedRow; + private focusedCell; + private valueService; + private eventService; + private renderedRows; + private renderedTopFloatingRows; + private renderedBottomFloatingRows; + private eAllBodyContainers; + private eAllPinnedContainers; + private eBodyContainer; + private eBodyViewport; + private ePinnedColsContainer; + private eFloatingTopContainer; + private eFloatingTopPinnedContainer; + private eFloatingBottomContainer; + private eFloatingBottomPinnedContainer; + private eParentsOfRows; + init(columnModel: any, gridOptionsWrapper: GridOptionsWrapper, gridPanel: GridPanel, angularGrid: Grid, selectionRendererFactory: SelectionRendererFactory, $compile: any, $scope: any, selectionController: SelectionController, expressionService: ExpressionService, templateService: TemplateService, valueService: ValueService, eventService: EventService): void; + setRowModel(rowModel: any): void; + onIndividualColumnResized(column: Column): void; + setMainRowWidths(): void; + private findAllElements(gridPanel); + refreshAllFloatingRows(): void; + private refreshFloatingRows(renderedRows, rowData, pinnedContainer, bodyContainer, isTop); + refreshView(refreshFromIndex?: any): void; + softRefreshView(): void; + refreshRows(rowNodes: RowNode[]): void; + refreshCells(rowNodes: RowNode[], colIds: string[]): void; + rowDataChanged(rows: any): void; + private refreshAllVirtualRows(fromIndex); + refreshGroupRows(): void; + private removeVirtualRow(rowsToRemove, fromIndex?); + private unbindVirtualRow(indexToRemove); + drawVirtualRows(): void; + getFirstVirtualRenderedRow(): number; + getLastVirtualRenderedRow(): number; + private ensureRowsRendered(); + private insertRow(node, rowIndex, mainRowWidth); + getRenderedNodes(): any[]; + getIndexOfRenderedNode(node: any): number; + navigateToNextCell(key: any, rowIndex: number, column: Column): void; + private getNextCellToFocus(key, lastCellToFocus); + onRowSelected(rowIndex: number, selected: boolean): void; + focusCell(eCell: any, rowIndex: number, colIndex: number, colDef: ColDef, forceBrowserFocus: any): void; + getFocusedCell(): any; + setFocusedCell(rowIndex: any, colIndex: any): void; + startEditingNextCell(rowIndex: any, column: any, shiftKey: any): void; + } +} +declare module ag.grid { + class SelectionController { + private eParentsOfRows; + private angularGrid; + private gridOptionsWrapper; + private $scope; + private rowRenderer; + private selectedRows; + private selectedNodesById; + private rowModel; + private eventService; + init(angularGrid: Grid, gridPanel: GridPanel, gridOptionsWrapper: GridOptionsWrapper, $scope: any, rowRenderer: RowRenderer, eventService: EventService): void; + private initSelectedNodesById(); + getSelectedNodesById(): any; + getSelectedRows(): any; + getSelectedNodes(): any; + getBestCostNodeSelection(): any; + setRowModel(rowModel: any): void; + deselectAll(): void; + selectAll(): void; + selectNode(node: any, tryMulti: any, suppressEvents?: any): void; + private recursivelySelectAllChildren(node, suppressEvents?); + private recursivelyDeselectAllChildren(node); + private doWorkOfSelectNode(node, suppressEvents); + private addCssClassForNode_andInformVirtualRowListener(node); + private doWorkOfDeselectAllNodes(nodeToKeepSelected?); + private deselectRealNode(node); + private removeCssClassForNode(node); + deselectIndex(rowIndex: any): void; + deselectNode(node: any): void; + selectIndex(index: any, tryMulti: any, suppressEvents?: any): void; + private syncSelectedRowsAndCallListener(suppressEvents?); + private recursivelyCheckIfSelected(node); + isNodeSelected(node: any): boolean; + private updateGroupParentsIfNeeded(); + } +} +declare module ag.grid { + class RenderedHeaderElement { + private eRoot; + private dragStartX; + constructor(eRoot: HTMLElement); + getERoot(): HTMLElement; + destroy(): void; + refreshFilterIcon(): void; + refreshSortIcon(): void; + onDragStart(): void; + onDragging(dragChange: number): void; + onIndividualColumnResized(column: Column): void; + addDragHandler(eDraggableElement: any): void; + stopDragging(listenersToRemove: any): void; + } +} +declare module ag.grid { + class RenderedHeaderCell extends RenderedHeaderElement { + private static DEFAULT_SORTING_ORDER; + private eHeaderCell; + private eSortAsc; + private eSortDesc; + private eSortNone; + private eFilterIcon; + private column; + private gridOptionsWrapper; + private parentScope; + private childScope; + private filterManager; + private columnController; + private $compile; + private angularGrid; + private parentGroup; + private startWidth; + constructor(column: Column, parentGroup: RenderedHeaderGroupCell, gridOptionsWrapper: GridOptionsWrapper, parentScope: any, filterManager: FilterManager, columnController: ColumnController, $compile: any, angularGrid: Grid, eRoot: HTMLElement); + getGui(): HTMLElement; + destroy(): void; + private createScope(); + private addAttributes(); + private addClasses(); + private addMenu(); + private addSortIcons(headerCellLabel); + private setupComponents(); + private useRenderer(headerNameValue, headerCellRenderer, headerCellLabel); + refreshFilterIcon(): void; + refreshSortIcon(): void; + private getNextSortDirection(); + private addSortHandling(headerCellLabel); + onDragStart(): void; + onDragging(dragChange: number): void; + onIndividualColumnResized(column: Column): void; + private addHeaderClassesFromCollDef(); + } +} +declare module ag.grid { + class RenderedHeaderGroupCell extends RenderedHeaderElement { + private eHeaderGroup; + private eHeaderGroupCell; + private eHeaderCellResize; + private columnGroup; + private gridOptionsWrapper; + private columnController; + private children; + private groupWidthStart; + private childrenWidthStarts; + private minWidth; + private parentScope; + private filterManager; + private $compile; + private angularGrid; + constructor(columnGroup: ColumnGroup, gridOptionsWrapper: GridOptionsWrapper, columnController: ColumnController, eRoot: HTMLElement, angularGrid: Grid, parentScope: any, filterManager: FilterManager, $compile: any); + getGui(): HTMLElement; + destroy(): void; + refreshFilterIcon(): void; + refreshSortIcon(): void; + onIndividualColumnResized(column: Column): void; + private setupComponents(); + private isColumnInOurDisplayedGroup(column); + private setWidthOfGroupHeaderCell(); + private addGroupExpandIcon(eGroupCellLabel); + onDragStart(): void; + onDragging(dragChange: any): void; + } +} +declare module ag.grid { + class HeaderRenderer { + private gridOptionsWrapper; + private columnController; + private angularGrid; + private filterManager; + private $scope; + private $compile; + private ePinnedHeader; + private eHeaderContainer; + private eRoot; + private headerElements; + init(gridOptionsWrapper: GridOptionsWrapper, columnController: ColumnController, gridPanel: GridPanel, angularGrid: Grid, filterManager: FilterManager, $scope: any, $compile: any): void; + private findAllElements(gridPanel); + refreshHeader(): void; + private insertHeadersWithGrouping(); + private insertHeadersWithoutGrouping(); + updateSortIcons(): void; + updateFilterIcons(): void; + onIndividualColumnResized(column: Column): void; + } +} +declare module ag.grid { + class GroupCreator { + private valueService; + init(valueService: ValueService): void; + group(rowNodes: RowNode[], groupedCols: Column[], expandByDefault: any): RowNode[]; + isExpanded(expandByDefault: any, level: any): boolean; + } +} +declare module ag.grid { + class InMemoryRowController { + private gridOptionsWrapper; + private columnController; + private angularGrid; + private filterManager; + private $scope; + private allRows; + private rowsAfterGroup; + private rowsAfterFilter; + private rowsAfterSort; + private rowsAfterMap; + private model; + private groupCreator; + private valueService; + private eventService; + constructor(); + init(gridOptionsWrapper: GridOptionsWrapper, columnController: ColumnController, angularGrid: any, filterManager: FilterManager, $scope: any, groupCreator: GroupCreator, valueService: ValueService, eventService: EventService): void; + private createModel(); + getModel(): any; + forEachInMemory(callback: Function): void; + forEachNode(callback: Function): void; + forEachNodeAfterFilter(callback: Function): void; + forEachNodeAfterFilterAndSort(callback: Function): void; + private recursivelyWalkNodesAndCallback(list, callback); + updateModel(step: any): void; + private defaultGroupAggFunctionFactory(valueColumns, valueKeys); + doAggregate(): void; + expandOrCollapseAll(expand: boolean, rowNodes: RowNode[]): void; + private recursivelyClearAggData(nodes); + private recursivelyCreateAggData(nodes, groupAggFunction, level); + private doSort(); + private recursivelyResetSort(rowNodes); + private sortList(nodes, sortOptions); + private updateChildIndexes(nodes); + onPivotChanged(): void; + private doPivoting(); + private doFilter(); + private filterItems(rowNodes); + private recursivelyResetFilter(nodes); + setAllRows(rows: RowNode[], firstId?: number): void; + private recursivelyAddIdToNodes(nodes, index); + private recursivelyCheckUserProvidedNodes(nodes, parent, level); + private getTotalChildCount(rowNodes); + private doGroupMapping(); + private addToMap(mappedData, originalNodes); + private createFooterNode(groupNode); + } +} +declare module ag.grid { + class VirtualPageRowController { + rowRenderer: any; + datasourceVersion: any; + gridOptionsWrapper: any; + angularGrid: any; + datasource: any; + virtualRowCount: any; + foundMaxRow: any; + pageCache: any; + pageCacheSize: any; + pageLoadsInProgress: any; + pageLoadsQueued: any; + pageAccessTimes: any; + accessTime: any; + maxConcurrentDatasourceRequests: any; + maxPagesInCache: any; + pageSize: any; + overflowSize: any; + init(rowRenderer: any, gridOptionsWrapper: any, angularGrid: any): void; + setDatasource(datasource: any): void; + reset(): void; + createNodesFromRows(pageNumber: any, rows: any): any; + removeFromLoading(pageNumber: any): void; + pageLoadFailed(pageNumber: any): void; + pageLoaded(pageNumber: any, rows: any, lastRow: any): void; + putPageIntoCacheAndPurge(pageNumber: any, rows: any): void; + checkMaxRowAndInformRowRenderer(pageNumber: any, lastRow: any): void; + isPageAlreadyLoading(pageNumber: any): boolean; + doLoadOrQueue(pageNumber: any): void; + addToQueueAndPurgeQueue(pageNumber: any): void; + findLeastRecentlyAccessedPage(pageIndexes: any): number; + checkQueueForNextLoad(): void; + loadPage(pageNumber: any): void; + requestIsDaemon(datasourceVersionCopy: any): boolean; + getVirtualRow(rowIndex: any): any; + forEachNode(callback: any): void; + getModel(): { + getVirtualRow: (index: any) => any; + getVirtualRowCount: () => any; + forEachInMemory: (callback: any) => void; + forEachNode: (callback: any) => void; + forEachNodeAfterFilter: (callback: any) => void; + forEachNodeAfterFilterAndSort: (callback: any) => void; + }; + } +} +declare module ag.grid { + class PaginationController { + eGui: any; + btNext: any; + btPrevious: any; + btFirst: any; + btLast: any; + lbCurrent: any; + lbTotal: any; + lbRecordCount: any; + lbFirstRowOnPage: any; + lbLastRowOnPage: any; + ePageRowSummaryPanel: any; + angularGrid: any; + callVersion: any; + gridOptionsWrapper: any; + datasource: any; + pageSize: any; + rowCount: any; + foundMaxRow: any; + totalPages: any; + currentPage: any; + init(angularGrid: any, gridOptionsWrapper: any): void; + setDatasource(datasource: any): void; + reset(): void; + setTotalLabels(): void; + calculateTotalPages(): void; + pageLoaded(rows: any, lastRowIndex: any): void; + updateRowLabels(): void; + loadPage(): void; + isCallDaemon(versionCopy: any): boolean; + onBtNext(): void; + onBtPrevious(): void; + onBtFirst(): void; + onBtLast(): void; + isZeroPagesToDisplay(): boolean; + enableOrDisableButtons(): void; + createTemplate(): string; + getGui(): any; + setupComponents(): void; + } +} +declare module ag.grid { + class BorderLayout { + private eNorthWrapper; + private eSouthWrapper; + private eEastWrapper; + private eWestWrapper; + private eCenterWrapper; + private eOverlayWrapper; + private eCenterRow; + private eNorthChildLayout; + private eSouthChildLayout; + private eEastChildLayout; + private eWestChildLayout; + private eCenterChildLayout; + private isLayoutPanel; + private fullHeight; + private layoutActive; + private eGui; + private id; + private childPanels; + private centerHeightLastTime; + private sizeChangeListners; + constructor(params: any); + addSizeChangeListener(listener: Function): void; + fireSizeChanged(): void; + private setupPanels(params); + private setupPanel(content, ePanel); + getGui(): any; + doLayout(): boolean; + private layoutChild(childPanel); + private layoutHeight(); + private layoutHeightFullHeight(); + private layoutHeightNormal(); + getCentreHeight(): number; + private layoutWidth(); + setEastVisible(visible: any): void; + setOverlayVisible(visible: any): void; + setSouthVisible(visible: any): void; + } +} +declare module ag.grid { + class GridPanel { + private masterSlaveService; + private gridOptionsWrapper; + private columnModel; + private rowRenderer; + private rowModel; + private layout; + private forPrint; + private scrollWidth; + private scrollLagCounter; + private eBodyViewport; + private eRoot; + private eBody; + private eBodyContainer; + private ePinnedColsContainer; + private eHeaderContainer; + private ePinnedHeader; + private eHeader; + private eParentsOfRows; + private eBodyViewportWrapper; + private ePinnedColsViewport; + private eFloatingTop; + private ePinnedFloatingTop; + private eFloatingTopContainer; + private eFloatingBottom; + private ePinnedFloatingBottom; + private eFloatingBottomContainer; + init(gridOptionsWrapper: GridOptionsWrapper, columnModel: ColumnController, rowRenderer: RowRenderer, masterSlaveService: MasterSlaveService): void; + getLayout(): BorderLayout; + private setupComponents(); + getPinnedFloatingTop(): HTMLElement; + getFloatingTopContainer(): HTMLElement; + getPinnedFloatingBottom(): HTMLElement; + getFloatingBottomContainer(): HTMLElement; + private createTemplate(); + ensureIndexVisible(index: any): void; + ensureColIndexVisible(index: any): void; + showLoading(loading: any): void; + getWidthForSizeColsToFit(): number; + setRowModel(rowModel: any): void; + getBodyContainer(): HTMLElement; + getBodyViewport(): HTMLElement; + getPinnedColsContainer(): HTMLElement; + getHeaderContainer(): HTMLElement; + getRoot(): HTMLElement; + getPinnedHeader(): HTMLElement; + getRowsParent(): HTMLElement[]; + private queryHtmlElement(selector); + private findElements(); + private mouseWheelListener(event); + setBodyContainerWidth(): void; + setPinnedColContainerWidth(): void; + showPinnedColContainersIfNeeded(): void; + onBodyHeightChange(): void; + private sizeHeaderAndBody(); + private sizeHeaderAndBodyNormal(); + private sizeHeaderAndBodyForPrint(); + setHorizontalScrollPosition(hScrollPosition: number): void; + private addScrollListener(); + private requestDrawVirtualRows(); + private scrollHeader(bodyLeftPosition); + private scrollPinned(bodyTopPosition); + } +} +declare module ag.grid { + class DragAndDropService { + static theInstance: DragAndDropService; + static getInstance(): DragAndDropService; + dragItem: any; + constructor(); + stopDragging(): void; + setDragCssClasses(eListItem: any, dragging: any): void; + addDragSource(eDragSource: any, dragSourceCallback: any): void; + onMouseDownDragSource(eDragSource: any, dragSourceCallback: any): void; + addDropTarget(eDropTarget: any, dropTargetCallback: any): void; + } +} +declare function require(name: string): any; +declare module ag.grid { + class AgList { + private eGui; + private uniqueId; + private modelChangedListeners; + private itemSelectedListeners; + private beforeDropListeners; + private itemMovedListeners; + private dragSources; + private emptyMessage; + private eFilterValueTemplate; + private eListParent; + private model; + private cellRenderer; + private readOnly; + constructor(); + setReadOnly(readOnly: boolean): void; + setEmptyMessage(emptyMessage: any): void; + getUniqueId(): any; + addStyles(styles: any): void; + addCssClass(cssClass: any): void; + addDragSource(dragSource: any): void; + addModelChangedListener(listener: Function): void; + addItemSelectedListener(listener: any): void; + addItemMovedListener(listener: any): void; + addBeforeDropListener(listener: any): void; + private fireItemMoved(fromIndex, toIndex); + private fireModelChanged(); + private fireItemSelected(item); + private fireBeforeDrop(item); + private setupComponents(); + setModel(model: any): void; + getModel(): any; + setCellRenderer(cellRenderer: any): void; + refreshView(): void; + private insertRows(); + private insertBlankMessage(); + private setupAsDropTarget(); + private externalAcceptDrag(dragEvent); + private externalDrop(dragEvent); + private externalNoDrop(); + private addItemToList(newItem); + private addDragAndDropToListItem(eListItem, item); + private internalAcceptDrag(targetColumn, dragItem, eListItem); + private internalDrop(targetColumn, draggedColumn); + private internalNoDrop(eListItem); + private dragAfterThisItem(targetColumn, draggedColumn); + private setDropCssClasses(eListItem, state); + getGui(): any; + } +} +declare module ag.grid { + class ColumnSelectionPanel { + private gridOptionsWrapper; + private columnController; + private cColumnList; + layout: any; + private eRootPanel; + constructor(columnController: ColumnController, gridOptionsWrapper: GridOptionsWrapper, eventService: EventService); + private columnsChanged(); + getDragSource(): any; + private columnCellRenderer(params); + private setupComponents(); + private onItemMoved(fromIndex, toIndex); + getGui(): any; + } +} +declare module ag.grid { + class GroupSelectionPanel { + gridOptionsWrapper: any; + columnController: ColumnController; + inMemoryRowController: any; + cColumnList: any; + layout: any; + constructor(columnController: ColumnController, inMemoryRowController: any, gridOptionsWrapper: GridOptionsWrapper, eventService: EventService); + private columnsChanged(); + addDragSource(dragSource: any): void; + private columnCellRenderer(params); + private setupComponents(); + private onBeforeDrop(newItem); + private onItemMoved(fromIndex, toIndex); + } +} +declare module ag.grid { + class AgDropdownList { + private itemSelectedListeners; + private eValue; + private agList; + private eGui; + private hidePopupCallback; + private selectedItem; + private cellRenderer; + private popupService; + constructor(popupService: PopupService); + setWidth(width: any): void; + addItemSelectedListener(listener: any): void; + fireItemSelected(item: any): void; + setupComponents(): void; + itemSelected(item: any): void; + onClick(): void; + getGui(): any; + setSelected(item: any): void; + setCellRenderer(cellRenderer: any): void; + refreshView(): void; + setModel(model: any): void; + } +} +declare module ag.grid { + class ValuesSelectionPanel { + private gridOptionsWrapper; + private columnController; + private cColumnList; + private layout; + private popupService; + constructor(columnController: ColumnController, gridOptionsWrapper: GridOptionsWrapper, popupService: PopupService, eventService: EventService); + getLayout(): any; + private columnsChanged(); + addDragSource(dragSource: any): void; + private cellRenderer(params); + private setupComponents(); + private beforeDropListener(newItem); + } +} +declare module ag.grid { + class VerticalStack { + isLayoutPanel: any; + childPanels: any; + eGui: any; + constructor(); + addPanel(panel: any, height: any): void; + getGui(): any; + doLayout(): void; + } +} +declare module ag.grid { + class ToolPanel { + layout: any; + constructor(); + init(columnController: any, inMemoryRowController: any, gridOptionsWrapper: GridOptionsWrapper, popupService: PopupService, eventService: EventService): void; + } +} +declare module ag.grid { + interface GridOptions { + virtualPaging?: boolean; + toolPanelSuppressPivot?: boolean; + toolPanelSuppressValues?: boolean; + rowsAlreadyGrouped?: boolean; + suppressRowClickSelection?: boolean; + suppressCellSelection?: boolean; + sortingOrder?: string[]; + suppressMultiSort?: boolean; + suppressHorizontalScroll?: boolean; + unSortIcon?: boolean; + rowHeight?: number; + rowBuffer?: number; + enableColResize?: boolean; + enableCellExpressions?: boolean; + enableSorting?: boolean; + enableServerSideSorting?: boolean; + enableFilter?: boolean; + enableServerSideFilter?: boolean; + colWidth?: number; + suppressMenuHide?: boolean; + singleClickEdit?: boolean; + debug?: boolean; + icons?: any; + angularCompileRows?: boolean; + angularCompileFilters?: boolean; + angularCompileHeaders?: boolean; + localeText?: any; + localeTextFunc?: Function; + suppressScrollLag?: boolean; + groupSuppressAutoColumn?: boolean; + groupSelectsChildren?: boolean; + groupHidePivotColumns?: boolean; + groupIncludeFooter?: boolean; + groupUseEntireRow?: boolean; + groupSuppressRow?: boolean; + groupSuppressBlankHeader?: boolean; + forPrint?: boolean; + groupColumnDef?: any; + context?: any; + rowStyle?: any; + rowClass?: any; + groupDefaultExpanded?: any; + slaveGrids?: GridOptions[]; + rowSelection?: string; + rowDeselection?: boolean; + rowData?: any[]; + floatingTopRowData?: any[]; + floatingBottomRowData?: any[]; + showToolPanel?: boolean; + groupKeys?: string[]; + groupAggFields?: string[]; + columnDefs?: any[]; + datasource?: any; + pinnedColumnCount?: number; + groupHeaders?: boolean; + headerHeight?: number; + groupRowInnerRenderer?(params: any): void; + groupRowRenderer?: Function | Object; + isScrollLag?(): boolean; + isExternalFilterPresent?(): boolean; + doesExternalFilterPass?(node: RowNode): boolean; + getRowStyle?: any; + getRowClass?: any; + headerCellRenderer?: any; + groupAggFunction?(nodes: any[]): any; + onReady?(api: any): void; + onModelUpdated?(): void; + onCellClicked?(params: any): void; + onCellDoubleClicked?(params: any): void; + onCellContextMenu?(params: any): void; + onCellValueChanged?(params: any): void; + onCellFocused?(params: any): void; + onRowSelected?(params: any): void; + onSelectionChanged?(): void; + onBeforeFilterChanged?(): void; + onAfterFilterChanged?(): void; + onFilterModified?(): void; + onBeforeSortChanged?(): void; + onAfterSortChanged?(): void; + onVirtualRowRemoved?(params: any): void; + onRowClicked?(params: any): void; + api?: GridApi; + columnApi?: ColumnApi; + } +} +declare module ag.grid { + class GridApi { + private grid; + private rowRenderer; + private headerRenderer; + private filterManager; + private columnController; + private inMemoryRowController; + private selectionController; + private gridOptionsWrapper; + private gridPanel; + private valueService; + private masterSlaveService; + private eventService; + private csvCreator; + constructor(grid: Grid, rowRenderer: RowRenderer, headerRenderer: HeaderRenderer, filterManager: FilterManager, columnController: ColumnController, inMemoryRowController: InMemoryRowController, selectionController: SelectionController, gridOptionsWrapper: GridOptionsWrapper, gridPanel: GridPanel, valueService: ValueService, masterSlaveService: MasterSlaveService, eventService: EventService); + /** Used internally by grid. Not intended to be used by the client. Interface may change between releases. */ + __getMasterSlaveService(): MasterSlaveService; + getDataAsCsv(params?: CsvExportParams): string; + exportDataAsCsv(params?: CsvExportParams): void; + setDatasource(datasource: any): void; + onNewDatasource(): void; + setRowData(rowData: any): void; + setRows(rows: any): void; + onNewRows(): void; + setFloatingTopRowData(rows: any[]): void; + setFloatingBottomRowData(rows: any[]): void; + onNewCols(): void; + setColumnDefs(colDefs: ColDef[]): void; + unselectAll(): void; + refreshRows(rowNodes: RowNode[]): void; + refreshCells(rowNodes: RowNode[], colIds: string[]): void; + rowDataChanged(rows: any): void; + refreshView(): void; + softRefreshView(): void; + refreshGroupRows(): void; + refreshHeader(): void; + isAnyFilterPresent(): boolean; + isAdvancedFilterPresent(): boolean; + isQuickFilterPresent(): boolean; + getModel(): any; + onGroupExpandedOrCollapsed(refreshFromIndex: any): void; + expandAll(): void; + collapseAll(): void; + addVirtualRowListener(rowIndex: any, callback: any): void; + setQuickFilter(newFilter: any): void; + selectIndex(index: any, tryMulti: any, suppressEvents: any): void; + deselectIndex(index: any): void; + selectNode(node: any, tryMulti: any, suppressEvents: any): void; + deselectNode(node: any): void; + selectAll(): void; + deselectAll(): void; + recomputeAggregates(): void; + sizeColumnsToFit(): void; + showLoading(show: any): void; + isNodeSelected(node: any): boolean; + getSelectedNodesById(): { + [nodeId: number]: RowNode; + }; + getSelectedNodes(): RowNode[]; + getSelectedRows(): any[]; + getBestCostNodeSelection(): any; + getRenderedNodes(): any[]; + ensureColIndexVisible(index: any): void; + ensureIndexVisible(index: any): void; + ensureNodeVisible(comparator: any): void; + forEachInMemory(callback: Function): void; + forEachNode(callback: Function): void; + forEachNodeAfterFilter(callback: Function): void; + forEachNodeAfterFilterAndSort(callback: Function): void; + getFilterApiForColDef(colDef: any): any; + getFilterApi(key: any): any; + getColumnDef(key: any): ColDef; + onFilterChanged(): void; + setSortModel(sortModel: any): void; + getSortModel(): any; + setFilterModel(model: any): void; + getFilterModel(): any; + getFocusedCell(): any; + setFocusedCell(rowIndex: any, colIndex: any): void; + setHeaderHeight(headerHeight: number): void; + setGroupHeaders(groupHeaders: boolean): void; + showToolPanel(show: any): void; + isToolPanelShowing(): boolean; + hideColumn(colId: any, hide: any): void; + hideColumns(colIds: any, hide: any): void; + getColumnState(): [any]; + setColumnState(state: any): void; + doLayout(): void; + getValue(colDef: ColDef, data: any, node: any): any; + addEventListener(eventType: string, listener: Function): void; + addGlobalListener(listener: Function): void; + removeEventListener(eventType: string, listener: Function): void; + removeGlobalListener(listener: Function): void; + refreshPivot(): void; + } +} +declare module ag.grid { + class ValueService { + private gridOptionsWrapper; + private expressionService; + private columnController; + init(gridOptionsWrapper: GridOptionsWrapper, expressionService: ExpressionService, columnController: ColumnController): void; + getValue(colDef: ColDef, data: any, node: any): any; + private executeValueGetter(valueGetter, data, colDef, node); + private getValueCallback(data, node, field); + } +} +declare module ag.grid { + class Grid { + private virtualRowCallbacks; + private gridOptions; + private gridOptionsWrapper; + private inMemoryRowController; + private doingVirtualPaging; + private paginationController; + private virtualPageRowController; + private finished; + private selectionController; + private columnController; + private rowRenderer; + private headerRenderer; + private filterManager; + private valueService; + private masterSlaveService; + private eventService; + private toolPanel; + private gridPanel; + private eRootPanel; + private toolPanelShowing; + private doingPagination; + private usingInMemoryModel; + private rowModel; + constructor(eGridDiv: any, gridOptions: any, globalEventListener?: Function, $scope?: any, $compile?: any, quickFilterOnScope?: any); + getRowModel(): any; + private periodicallyDoLayout(); + private setupComponents($scope, $compile, eUserProvidedDiv, globalEventListener); + private onColumnChanged(event); + refreshPivot(): void; + getEventService(): EventService; + private onIndividualColumnResized(column); + showToolPanel(show: any): void; + isToolPanelShowing(): boolean; + isUsingInMemoryModel(): boolean; + setDatasource(datasource?: any): void; + private refreshHeaderAndBody(); + setFinished(): void; + onQuickFilterChanged(newFilter: any): void; + onFilterModified(): void; + onFilterChanged(): void; + onRowClicked(event: any, rowIndex: any, node: any): void; + showLoadingPanel(show: any): void; + private setupColumns(); + updateModelAndRefresh(step: any, refreshFromIndex?: any): void; + setRows(rows?: any, firstId?: any): void; + ensureNodeVisible(comparator: any): void; + getFilterModel(): any; + setFocusedCell(rowIndex: any, colIndex: any): void; + getSortModel(): any; + setSortModel(sortModel: any): void; + onSortingChanged(): void; + addVirtualRowListener(rowIndex: any, callback: any): void; + onVirtualRowSelected(rowIndex: any, selected: any): void; + onVirtualRowRemoved(rowIndex: any): void; + setColumnDefs(colDefs?: ColDef[]): void; + updateBodyContainerWidthAfterColResize(): void; + updatePinnedColContainerWidthAfterColResize(): void; + doLayout(): void; + } +} +declare module ag.grid { + class ComponentUtil { + static SIMPLE_PROPERTIES: string[]; + static SIMPLE_NUMBER_PROPERTIES: string[]; + static SIMPLE_BOOLEAN_PROPERTIES: string[]; + static WITH_IMPACT_NUMBER_PROPERTIES: string[]; + static WITH_IMPACT_BOOLEAN_PROPERTIES: string[]; + static WITH_IMPACT_OTHER_PROPERTIES: string[]; + static CALLBACKS: string[]; + static ALL_PROPERTIES: string[]; + static copyAttributesToGridOptions(gridOptions: GridOptions, component: any): GridOptions; + static processOnChange(changes: any, gridOptions: GridOptions, component: any): void; + static toBoolean(value: any): boolean; + static toNumber(value: any): number; + } +} +declare module ag.grid { + class AgGridNg2 { + private elementDef; + private _agGrid; + private _initialised; + private gridOptions; + private api; + private columnApi; + modelUpdated: any; + cellClicked: any; + cellDoubleClicked: any; + cellContextMenu: any; + cellValueChanged: any; + cellFocused: any; + rowSelected: any; + selectionChanged: any; + beforeFilterChanged: any; + afterFilterChanged: any; + filterModified: any; + beforeSortChanged: any; + afterSortChanged: any; + virtualRowRemoved: any; + rowClicked: any; + ready: any; + columnEverythingChanged: any; + columnPivotChanged: any; + columnValueChanged: any; + columnMoved: any; + columnVisible: any; + columnGroupOpened: any; + columnResized: any; + columnPinnedCountChanged: any; + virtualPaging: boolean; + toolPanelSuppressPivot: boolean; + toolPanelSuppressValues: boolean; + rowsAlreadyGrouped: boolean; + suppressRowClickSelection: boolean; + suppressCellSelection: boolean; + sortingOrder: string[]; + suppressMultiSort: boolean; + suppressHorizontalScroll: boolean; + unSortIcon: boolean; + rowHeight: number; + rowBuffer: number; + enableColResize: boolean; + enableCellExpressions: boolean; + enableSorting: boolean; + enableServerSideSorting: boolean; + enableFilter: boolean; + enableServerSideFilter: boolean; + colWidth: number; + suppressMenuHide: boolean; + debug: boolean; + icons: any; + angularCompileRows: boolean; + angularCompileFilters: boolean; + angularCompileHeaders: boolean; + localeText: any; + localeTextFunc: Function; + groupSuppressAutoColumn: boolean; + groupSelectsChildren: boolean; + groupHidePivotColumns: boolean; + groupIncludeFooter: boolean; + groupUseEntireRow: boolean; + groupSuppressRow: boolean; + groupSuppressBlankHeader: boolean; + groupColumnDef: any; + forPrint: boolean; + context: any; + rowStyle: any; + rowClass: any; + headerCellRenderer: any; + groupDefaultExpanded: any; + slaveGrids: GridOptions[]; + rowSelection: string; + rowDeselection: boolean; + rowData: any[]; + floatingTopRowData: any[]; + floatingBottomRowData: any[]; + showToolPanel: boolean; + groupKeys: string[]; + groupAggFunction: (nodes: any[]) => void; + groupAggFields: string[]; + columnDefs: any[]; + datasource: any; + pinnedColumnCount: number; + quickFilterText: string; + groupHeaders: boolean; + headerHeight: number; + constructor(elementDef: any); + onInit(): void; + onChange(changes: any): void; + private globalEventListener(eventType, event); + } +} +declare module ag.grid { +} +declare var exports: any; +declare var module: any; +declare module ag.grid { + interface Filter { + getGui(): any; + isFilterActive(): boolean; + doesFilterPass(params: any): boolean; + afterGuiAttached?(params?: { + hidePopup?: Function; + }): void; + onNewRowsLoaded?(): void; + } +} diff --git a/ag-grid/ag-grid.d.ts b/ag-grid/ag-grid.d.ts new file mode 100644 index 0000000000..f385a90f44 --- /dev/null +++ b/ag-grid/ag-grid.d.ts @@ -0,0 +1,1991 @@ +// Type definitions for ag-grid v2.1.2 +// Project: http://www.ag-grid.com/ +// Definitions by: Niall Crosby +// Definitions: https://github.com/borisyankov/DefinitelyTyped +declare module ag.grid { + class ColumnChangeEvent { + private type; + private column; + private columnGroup; + private fromIndex; + private toIndex; + private pinnedColumnCount; + constructor(type: string); + toString(): string; + withColumn(column: Column): ColumnChangeEvent; + withColumnGroup(columnGroup: ColumnGroup): ColumnChangeEvent; + withFromIndex(fromIndex: number): ColumnChangeEvent; + withPinnedColumnCount(pinnedColumnCount: number): ColumnChangeEvent; + withToIndex(toIndex: number): ColumnChangeEvent; + getFromIndex(): number; + getToIndex(): number; + getPinnedColumnCount(): number; + getType(): string; + getColumn(): Column; + getColumnGroup(): ColumnGroup; + isPivotChanged(): boolean; + isValueChanged(): boolean; + isIndividualColumnResized(): boolean; + } +} +declare module ag.grid { + class Utils { + private static isSafari; + private static isIE; + static iterateObject(object: any, callback: (key: string, value: any) => void): void; + static cloneObject(object: any): any; + static map(array: TItem[], callback: (item: TItem) => TResult): TResult[]; + static forEach(array: T[], callback: (item: T, index: number) => void): void; + static filter(array: T[], callback: (item: T) => boolean): T[]; + static assign(object: any, source: any): void; + static getFunctionParameters(func: any): any; + static find(collection: any, predicate: any, value: any): any; + static toStrings(array: T[]): string[]; + static iterateArray(array: T[], callback: (item: T, index: number) => void): void; + static isNode(o: any): boolean; + static isElement(o: any): boolean; + static isNodeOrElement(o: any): boolean; + static addChangeListener(element: HTMLElement, listener: EventListener): void; + static makeNull(value: any): any; + static removeAllChildren(node: HTMLElement): void; + static removeElement(parent: HTMLElement, cssSelector: string): void; + static removeFromParent(node: Element): void; + static isVisible(element: HTMLElement): boolean; + /** + * loads the template and returns it as an element. makes up for no simple way in + * the dom api to load html directly, eg we cannot do this: document.createElement(template) + */ + static loadTemplate(template: string): Node; + static querySelectorAll_addCssClass(eParent: any, selector: string, cssClass: string): void; + static querySelectorAll_removeCssClass(eParent: any, selector: string, cssClass: string): void; + static querySelectorAll_replaceCssClass(eParent: any, selector: string, cssClassToRemove: string, cssClassToAdd: string): void; + static addOrRemoveCssClass(element: HTMLElement, className: string, addOrRemove: boolean): void; + static addCssClass(element: HTMLElement, className: string): void; + static offsetHeight(element: HTMLElement): number; + static offsetWidth(element: HTMLElement): number; + static removeCssClass(element: HTMLElement, className: string): void; + static removeFromArray(array: T[], object: T): void; + static defaultComparator(valueA: any, valueB: any): number; + static formatWidth(width: number | string): string; + /** + * Tries to use the provided renderer. + */ + static useRenderer(eParent: Element, eRenderer: (params: TParams) => Node | string, params: TParams): void; + /** + * If icon provided, use this (either a string, or a function callback). + * if not, then use the second parameter, which is the svgFactory function + */ + static createIcon(iconName: any, gridOptionsWrapper: any, colDefWrapper: any, svgFactoryFunc: () => Node): HTMLSpanElement; + static addStylesToElement(eElement: any, styles: any): void; + static getScrollbarWidth(): number; + static isKeyPressed(event: KeyboardEvent, keyToCheck: number): boolean; + static setVisible(element: HTMLElement, visible: boolean): void; + static isBrowserIE(): boolean; + static isBrowserSafari(): boolean; + } +} +declare module ag.grid { + class Constants { + static STEP_EVERYTHING: number; + static STEP_FILTER: number; + static STEP_SORT: number; + static STEP_MAP: number; + static ASC: string; + static DESC: string; + static ROW_BUFFER_SIZE: number; + static MIN_COL_WIDTH: number; + static SUM: string; + static MIN: string; + static MAX: string; + static KEY_TAB: number; + static KEY_ENTER: number; + static KEY_BACKSPACE: number; + static KEY_DELETE: number; + static KEY_ESCAPE: number; + static KEY_SPACE: number; + static KEY_DOWN: number; + static KEY_UP: number; + static KEY_LEFT: number; + static KEY_RIGHT: number; + } +} +declare module ag.grid { + class Column { + static colIdSequence: number; + colDef: ColDef; + actualWidth: any; + visible: any; + colId: any; + pinned: boolean; + index: number; + aggFunc: string; + pivotIndex: number; + sort: string; + sortedAt: number; + constructor(colDef: ColDef, actualWidth: any); + isGreaterThanMax(width: number): boolean; + getMinimumWidth(): number; + setMinimum(): void; + } +} +declare module ag.grid { + class ColumnGroup { + pinned: any; + name: any; + allColumns: Column[]; + displayedColumns: Column[]; + expandable: boolean; + expanded: boolean; + actualWidth: number; + constructor(pinned: any, name: any); + getMinimumWidth(): number; + addColumn(column: any): void; + calculateExpandable(): void; + calculateActualWidth(): void; + calculateDisplayedColumns(): void; + addToVisibleColumns(colsToAdd: any): void; + } +} +declare module ag.grid { + class GridOptionsWrapper { + private gridOptions; + private groupHeaders; + private headerHeight; + private rowHeight; + private floatingTopRowData; + private floatingBottomRowData; + init(gridOptions: GridOptions, eventService: EventService): void; + isRowSelection(): boolean; + isRowDeselection(): boolean; + isRowSelectionMulti(): boolean; + getContext(): any; + isVirtualPaging(): boolean; + isShowToolPanel(): boolean; + isToolPanelSuppressPivot(): boolean; + isToolPanelSuppressValues(): boolean; + isRowsAlreadyGrouped(): boolean; + isGroupSelectsChildren(): boolean; + isGroupHidePivotColumns(): boolean; + isGroupIncludeFooter(): boolean; + isGroupSuppressBlankHeader(): boolean; + isSuppressRowClickSelection(): boolean; + isSuppressCellSelection(): boolean; + isSuppressMultiSort(): boolean; + isGroupSuppressAutoColumn(): boolean; + isForPrint(): boolean; + isSuppressHorizontalScroll(): boolean; + isUnSortIcon(): boolean; + isSuppressMenuHide(): boolean; + getRowStyle(): any; + getRowClass(): any; + getRowStyleFunc(): any; + getRowClassFunc(): any; + getHeaderCellRenderer(): any; + getApi(): GridApi; + isEnableColResize(): boolean; + isSingleClickEdit(): boolean; + getGroupDefaultExpanded(): any; + getGroupKeys(): string[]; + getGroupAggFunction(): (nodes: any[]) => any; + getGroupAggFields(): string[]; + getRowData(): any[]; + isGroupUseEntireRow(): boolean; + getGroupColumnDef(): any; + isGroupSuppressRow(): boolean; + isAngularCompileRows(): boolean; + isAngularCompileFilters(): boolean; + isAngularCompileHeaders(): boolean; + isDebug(): boolean; + getColumnDefs(): any[]; + getDatasource(): any; + getRowBuffer(): number; + isEnableSorting(): boolean; + isEnableCellExpressions(): boolean; + isEnableServerSideSorting(): boolean; + isEnableFilter(): boolean; + isEnableServerSideFilter(): boolean; + isSuppressScrollLag(): boolean; + getIcons(): any; + getIsScrollLag(): () => boolean; + getSortingOrder(): string[]; + getSlaveGrids(): GridOptions[]; + getGroupRowRenderer(): Object | Function; + getRowHeight(): number; + getHeaderHeight(): number; + setHeaderHeight(headerHeight: number): void; + isGroupHeaders(): boolean; + setGroupHeaders(groupHeaders: boolean): void; + getFloatingTopRowData(): any[]; + setFloatingTopRowData(rows: any[]): void; + getFloatingBottomRowData(): any[]; + setFloatingBottomRowData(rows: any[]): void; + isExternalFilterPresent(): boolean; + doesExternalFilterPass(node: RowNode): boolean; + getGroupRowInnerRenderer(): (params: any) => void; + getColWidth(): number; + private checkForDeprecated(); + getPinnedColCount(): number; + getLocaleTextFunc(): Function; + globalEventHandler(eventName: string, event?: any): void; + private getCallbackForEvent(eventName); + } +} +declare module ag.grid { + class LoggerFactory { + private logging; + init(gridOptionsWrapper: GridOptionsWrapper): void; + create(name: string): Logger; + } + class Logger { + private logging; + private name; + constructor(name: string, logging: boolean); + log(message: string): void; + } +} +declare module ag.grid { + class Events { + /** A new set of columns has been entered, everything has potentially changed. */ + static EVENT_COLUMN_EVERYTHING_CHANGED: string; + /** A pivot column was added, removed or order changed. */ + static EVENT_COLUMN_PIVOT_CHANGE: string; + /** A value column was added, removed or agg function was changed. */ + static EVENT_COLUMN_VALUE_CHANGE: string; + /** A column was moved */ + static EVENT_COLUMN_MOVED: string; + /** One or more columns was shown / hidden */ + static EVENT_COLUMN_VISIBLE: string; + /** A column group was opened / closed */ + static EVENT_COLUMN_GROUP_OPENED: string; + /** One or more columns was resized. If just one, the column in the event is set. */ + static EVENT_COLUMN_RESIZED: string; + /** One or more columns was resized. If just one, the column in the event is set. */ + static EVENT_COLUMN_PINNED_COUNT_CHANGED: string; + static EVENT_MODEL_UPDATED: string; + static EVENT_CELL_CLICKED: string; + static EVENT_CELL_DOUBLE_CLICKED: string; + static EVENT_CELL_CONTEXT_MENU: string; + static EVENT_CELL_VALUE_CHANGED: string; + static EVENT_CELL_FOCUSED: string; + static EVENT_ROW_SELECTED: string; + static EVENT_SELECTION_CHANGED: string; + static EVENT_BEFORE_FILTER_CHANGED: string; + static EVENT_AFTER_FILTER_CHANGED: string; + static EVENT_FILTER_MODIFIED: string; + static EVENT_BEFORE_SORT_CHANGED: string; + static EVENT_AFTER_SORT_CHANGED: string; + static EVENT_VIRTUAL_ROW_REMOVED: string; + static EVENT_ROW_CLICKED: string; + static EVENT_READY: string; + } +} +declare module ag.grid { + class EventService { + private allListeners; + private globalListeners; + private getListenerList(eventType); + addEventListener(eventType: string, listener: Function): void; + addGlobalListener(listener: Function): void; + removeEventListener(eventType: string, listener: Function): void; + removeGlobalListener(listener: Function): void; + dispatchEvent(eventType: string, event?: any): void; + } +} +declare module ag.grid { + class MasterSlaveService { + private gridOptionsWrapper; + private columnController; + private gridPanel; + private logger; + private eventService; + private consuming; + init(gridOptionsWrapper: GridOptionsWrapper, columnController: ColumnController, gridPanel: GridPanel, loggerFactory: LoggerFactory, eventService: EventService): void; + private fireEvent(callback); + private onEvent(callback); + private fireColumnEvent(event); + fireHorizontalScrollEvent(horizontalScroll: number): void; + onScrollEvent(horizontalScroll: number): void; + onColumnEvent(event: ColumnChangeEvent): void; + } +} +declare module ag.grid { + class ColumnApi { + private _columnController; + constructor(_columnController: ColumnController); + sizeColumnsToFit(gridWidth: any): void; + hideColumns(colIds: any, hide: any): void; + columnGroupOpened(group: ColumnGroup, newValue: boolean): void; + getColumnGroup(name: string): ColumnGroup; + getDisplayNameForCol(column: any): string; + getColumn(key: any): Column; + setState(columnState: any): void; + getState(): [any]; + isPinning(): boolean; + getVisibleColAfter(col: Column): Column; + getVisibleColBefore(col: Column): Column; + setColumnVisible(column: Column, visible: boolean): void; + getAllColumns(): Column[]; + getDisplayedColumns(): Column[]; + getPivotedColumns(): Column[]; + getValueColumns(): Column[]; + moveColumn(fromIndex: number, toIndex: number): void; + movePivotColumn(fromIndex: number, toIndex: number): void; + setColumnAggFunction(column: Column, aggFunc: string): void; + setColumnWidth(column: Column, newWidth: number): void; + removeValueColumn(column: Column): void; + addValueColumn(column: Column): void; + removePivotColumn(column: Column): void; + setPinnedColumnCount(count: number): void; + addPivotColumn(column: Column): void; + getHeaderGroups(): ColumnGroup[]; + hideColumn(colId: any, hide: any): void; + } + class ColumnController { + private gridOptionsWrapper; + private angularGrid; + private selectionRendererFactory; + private expressionService; + private masterSlaveController; + private allColumns; + private visibleColumns; + private displayedColumns; + private pivotColumns; + private valueColumns; + private columnGroups; + private setupComplete; + private valueService; + private pinnedColumnCount; + private eventService; + constructor(); + init(angularGrid: Grid, selectionRendererFactory: SelectionRendererFactory, gridOptionsWrapper: GridOptionsWrapper, expressionService: ExpressionService, valueService: ValueService, masterSlaveController: MasterSlaveService, eventService: EventService): void; + getColumnApi(): ColumnApi; + isSetupComplete(): boolean; + getHeaderGroups(): ColumnGroup[]; + getPinnedContainerWidth(): number; + addPivotColumn(column: Column): void; + setPinnedColumnCount(count: number): void; + removePivotColumn(column: Column): void; + addValueColumn(column: Column): void; + removeValueColumn(column: Column): void; + private doesColumnExistInGrid(column); + setColumnWidth(column: Column, newWidth: number): void; + private updateGroupWidthsAfterColumnResize(column); + setColumnAggFunction(column: Column, aggFunc: string): void; + movePivotColumn(fromIndex: number, toIndex: number): void; + moveColumn(fromIndex: number, toIndex: number): void; + getBodyContainerWidth(): number; + getValueColumns(): Column[]; + getPivotedColumns(): Column[]; + getDisplayedColumns(): Column[]; + getAllColumns(): Column[]; + setColumnVisible(column: Column, visible: boolean): void; + getVisibleColBefore(col: any): Column; + getVisibleColAfter(col: Column): Column; + isPinning(): boolean; + getState(): [any]; + setState(columnState: any): void; + getColumns(keys: any[]): Column[]; + getColumn(key: any): Column; + getDisplayNameForCol(column: any): string; + getColumnGroup(name: string): ColumnGroup; + onColumnsChanged(): void; + private checkForDeprecatedItems(columnDefs); + columnGroupOpened(group: ColumnGroup, newValue: boolean): void; + hideColumns(colIds: any, hide: any): void; + private updateModel(); + private updateDisplayedColumns(); + sizeColumnsToFit(gridWidth: any): void; + private buildGroups(); + private updateGroups(); + private updateVisibleColumns(); + private updatePinnedColumns(); + private createColumns(colDefs); + private createPivotColumns(); + private createValueColumns(); + private createDummyColumn(field); + private calculateColInitialWidth(colDef); + private getTotalColWidth(includePinned); + } +} +declare module ag.grid { + interface CsvExportParams { + skipHeader?: boolean; + skipFooters?: boolean; + skipGroups?: boolean; + fileName?: string; + } + class CsvCreator { + private rowController; + private columnController; + private grid; + private valueService; + constructor(rowController: InMemoryRowController, columnController: ColumnController, grid: Grid, valueService: ValueService); + exportDataAsCsv(params?: CsvExportParams): void; + getDataAsCsv(params?: CsvExportParams): string; + private createValueForGroupNode(node); + private escape(value); + } +} +declare module ag.grid { + class ExpressionService { + private expressionToFunctionCache; + private logger; + init(loggerFactory: LoggerFactory): void; + evaluate(expression: string, params: any): any; + private createExpressionFunction(expression); + private createFunctionBody(expression); + } +} +declare module ag.grid { + interface TextAndNumberFilterParameters { + /** What to do when new rows are loaded. The default is to reset the filter, to keep it in line with 'set' filters. If you want to keep the selection, then set this value to 'keep'. */ + newRowsAction?: string; + } +} +declare module ag.grid { + class TextFilter implements Filter { + private filterParams; + private filterChangedCallback; + private filterModifiedCallback; + private localeTextFunc; + private valueGetter; + private filterText; + private filterType; + private api; + private eGui; + private eFilterTextField; + private eTypeSelect; + private applyActive; + private eApplyButton; + init(params: any): void; + onNewRowsLoaded(): void; + afterGuiAttached(): void; + doesFilterPass(node: any): boolean; + getGui(): any; + isFilterActive(): boolean; + private createTemplate(); + private createGui(); + private setupApply(); + private onTypeChanged(); + private onFilterChanged(); + private filterChanged(); + private createApi(); + private getApi(); + } +} +declare module ag.grid { + class NumberFilter implements Filter { + private filterParams; + private filterChangedCallback; + private filterModifiedCallback; + private localeTextFunc; + private valueGetter; + private filterNumber; + private filterType; + private api; + private eGui; + private eFilterTextField; + private eTypeSelect; + private applyActive; + private eApplyButton; + init(params: any): void; + onNewRowsLoaded(): void; + afterGuiAttached(): void; + doesFilterPass(node: any): boolean; + getGui(): any; + isFilterActive(): boolean; + private createTemplate(); + private createGui(); + private setupApply(); + private onTypeChanged(); + private filterChanged(); + private onFilterChanged(); + private createApi(); + private getApi(); + } +} +declare module ag.grid { + interface ColDef { + /** If sorting by default, set it here. Set to 'asc' or 'desc' */ + sort?: string; + /** If sorting more than one column by default, the milliseconds when this column was sorted, so we know what order to sort the columns in. */ + sortedAt?: number; + /** The sort order, provide an array with any of the following in any order ['asc','desc',null] */ + sortingOrder?: string[]; + /** The name to render in the column header */ + headerName: string; + /** The field of the row to get the cells data from */ + field: string; + /** Expression or function to get the cells value. */ + headerValueGetter?: string | Function; + /** The unique ID to give the column. This is optional. If missing, the ID will default to the field. If both field and colId are missing, a unique ID will be generated. + * This ID is used to identify the column in the API for sorting, filtering etc. */ + colId?: string; + /** Set to true for this column to be hidden. Naturally you might think, it would make more sense to call this field 'visible' and mark it false to hide, + * however we want all default values to be false and we want columns to be visible by default. */ + hide?: boolean; + /** Tooltip for the column header */ + headerTooltip?: string; + /** Expression or function to get the cells value. */ + valueGetter?: string | Function; + /** To provide custom rendering to the header. */ + headerCellRenderer?: Function | Object; + /** CSS class for the header */ + headerClass?: string | string[] | ((params: any) => string | string[]); + /** Initial width, in pixels, of the cell */ + width?: number; + /** Min width, in pixels, of the cell */ + minWidth?: number; + /** Max width, in pixels, of the cell */ + maxWidth?: number; + /** Class to use for the cell. Can be string, array of strings, or function. */ + cellClass?: string | string[] | ((cellClassParams: any) => string | string[]); + /** An object of css values. Or a function returning an object of css values. */ + cellStyle?: {} | ((params: any) => {}); + /** A function for rendering a cell. */ + cellRenderer?: Function | {}; + /** A function for rendering a floating cell. */ + floatingCellRenderer?: Function | {}; + /** Name of function to use for aggregation. One of [sum,min,max]. */ + aggFunc?: string; + /** Comparator function for custom sorting. */ + comparator?: Function; + /** Set to true to render a selection checkbox in the column. */ + checkboxSelection?: boolean; + /** Set to true if no menu should be shown for this column header. */ + suppressMenu?: boolean; + /** Set to true if no sorting should be done for this column. */ + suppressSorting?: boolean; + /** Set to true if you want the unsorted icon to be shown when no sort is applied to this column. */ + unSortIcon?: boolean; + /** Set to true if you want this columns width to be fixed during 'size to fit' operation. */ + suppressSizeToFit?: boolean; + /** Set to true if you do not want this column to be resizable by dragging it's edge. */ + suppressResize?: boolean; + /** If grouping columns, the group this column belongs to. */ + headerGroup?: string; + /** Whether to show the column when the group is open / closed. */ + headerGroupShow?: string; + /** Set to true if this col is editable, otherwise false. Can also be a function to have different rows editable. */ + editable?: boolean | (Function); + /** Callbacks for editing.See editing section for further details. */ + newValueHandler?: Function; + /** If true, this cell gets refreshed when api.softRefreshView() gets called. */ + volatile?: boolean; + /** Cell template to use for cell. Useful for AngularJS cells. */ + template?: string; + /** Cell template URL to load template from to use for cell. Useful for AngularJS cells. */ + templateUrl?: string; + /** one of the built in filter names: [set, number, text], or a filter function*/ + filter?: string | Function; + /** The filter params are specific to each filter! */ + filterParams?: SetFilterParameters | TextAndNumberFilterParameters; + /** Rules for applying css classes */ + cellClassRules?: { + [cssClassName: string]: (Function | string); + }; + /** Callbacks for editing.See editing section for further details. */ + onCellValueChanged?: Function; + /** Function callback, gets called when a cell is clicked. */ + onCellClicked?: Function; + /** Function callback, gets called when a cell is double clicked. */ + onCellDoubleClicked?: Function; + /** Function callback, gets called when a cell is right clicked. */ + onCellContextMenu?: Function; + } +} +declare module ag.grid { + class SetFilterModel { + private colDef; + private filterParams; + private rowModel; + private valueGetter; + private allUniqueValues; + private availableUniqueValues; + private displayedValues; + private miniFilter; + private selectedValuesCount; + private selectedValuesMap; + private showingAvailableOnly; + private usingProvidedSet; + private doesRowPassOtherFilters; + constructor(colDef: ColDef, rowModel: any, valueGetter: any, doesRowPassOtherFilters: any); + refreshAfterNewRowsLoaded(keepSelection: any, isSelectAll: boolean): void; + refreshAfterAnyFilterChanged(): void; + private createAllUniqueValues(); + private createAvailableUniqueValues(); + private getUniqueValues(filterOutNotAvailable); + setMiniFilter(newMiniFilter: any): boolean; + getMiniFilter(): any; + private processMiniFilter(); + getDisplayedValueCount(): any; + getDisplayedValue(index: any): any; + selectEverything(): void; + isFilterActive(): boolean; + selectNothing(): void; + getUniqueValueCount(): any; + getUniqueValue(index: any): any; + unselectValue(value: any): void; + selectValue(value: any): void; + isValueSelected(value: any): boolean; + isEverythingSelected(): boolean; + isNothingSelected(): boolean; + getModel(): any; + setModel(model: any, isSelectAll: boolean): void; + } +} +/** The filter parameters for set filter */ +declare module ag.grid { + interface SetFilterParameters { + /** Same as cell renderer for grid (you can use the same one in both locations). Setting it separatly here allows for the value to be rendered differently in the filter. */ + cellRenderer?: Function; + /** The height of the cell. */ + cellHeight?: number; + /** The values to display in the filter. */ + values?: any; + /** What to do when new rows are loaded. The default is to reset the filter, as the set of values to select from can have changed. If you want to keep the selection, then set this value to 'keep'. */ + newRowsAction?: string; + /** If true, the filter will not remove items that are no longer availabe due to other filters. */ + suppressRemoveEntries?: boolean; + } +} +declare module ag.grid { + class SetFilter implements Filter { + private eGui; + private filterParams; + private rowHeight; + private model; + private filterChangedCallback; + private filterModifiedCallback; + private valueGetter; + private rowsInBodyContainer; + private colDef; + private localeTextFunc; + private cellRenderer; + private eListContainer; + private eFilterValueTemplate; + private eSelectAll; + private eListViewport; + private eMiniFilter; + private api; + private applyActive; + private eApplyButton; + init(params: any): void; + afterGuiAttached(): void; + isFilterActive(): boolean; + doesFilterPass(node: any): boolean; + getGui(): any; + onNewRowsLoaded(): void; + onAnyFilterChanged(): void; + private createTemplate(); + private createGui(); + private setupApply(); + private setContainerHeight(); + private drawVirtualRows(); + private ensureRowsRendered(start, finish); + private removeVirtualRows(rowsToRemove); + private insertRow(value, rowIndex); + private onCheckboxClicked(eCheckbox, value); + private filterChanged(); + private onMiniFilterChanged(); + private refreshVirtualRows(); + private clearVirtualRows(); + private onSelectAll(); + private updateAllCheckboxes(checked); + private addScrollListener(); + getApi(): any; + private createApi(); + } +} +declare module ag.grid { + class PopupService { + private ePopupParent; + init(ePopupParent: any): void; + positionPopup(eventSource: any, ePopup: any, minWidth: any): void; + addAsModalPopup(eChild: any, closeOnEsc: boolean): (event: any) => void; + } +} +declare module ag.grid { + interface RowNode { + /** Unique ID for the node. Can be though of as the index of the row in the original list, + * however exceptions apply so don't depend on uniqueness. */ + id?: number; + /** The user provided data */ + data?: any; + /** The parent node to this node, or empty if top level */ + parent?: RowNode; + /** How many levels this node is from the top */ + level?: number; + /** True if this node is a group node (ie has children) */ + group?: boolean; + /** True if this is the first child in this group */ + firstChild?: boolean; + /** True if this is the last child in this group */ + lastChild?: boolean; + /** The index of this node in the group */ + childIndex?: number; + /** True if this row is a floating row */ + floating?: boolean; + /** True if this row is a floating top row */ + floatingTop?: boolean; + /** True if this row is a floating bottom row */ + floatingBottom?: boolean; + /** If using quick filter, stores a string representation of the row for searching against */ + quickFilterAggregateText?: string; + /** Groups only - True if row is a footer. Footers have group = true and footer = true */ + footer?: boolean; + /** Groups only - Children of this group */ + children?: RowNode[]; + /** Groups only - The field we are pivoting on eg Country*/ + field?: string; + /** Groups only - The key for the pivot eg Ireland, UK, USA */ + key?: any; + /** Groups only - Filtered children of this group */ + childrenAfterFilter?: RowNode[]; + /** Groups only - Sorted children of this group */ + childrenAfterSort?: RowNode[]; + /** Groups only - Number of children and grand children */ + allChildrenCount?: number; + /** Groups only - True if group is expanded, otherwise false */ + expanded?: boolean; + /** Groups only - If doing footers, reference to the footer node for this group */ + sibling?: RowNode; + /** Not to be used, internal temporary map used by the grid when creating groups */ + _childrenMap?: {}; + } +} +declare module ag.grid { + class FilterManager { + private $compile; + private $scope; + private gridOptionsWrapper; + private grid; + private allFilters; + private rowModel; + private popupService; + private valueService; + private columnController; + private quickFilter; + private advancedFilterPresent; + private externalFilterPresent; + init(grid: Grid, gridOptionsWrapper: GridOptionsWrapper, $compile: any, $scope: any, columnController: ColumnController, popupService: PopupService, valueService: ValueService): void; + setFilterModel(model: any): void; + private setModelOnFilterWrapper(filter, newModel); + getFilterModel(): any; + setRowModel(rowModel: any): void; + isAdvancedFilterPresent(): boolean; + isAnyFilterPresent(): boolean; + isFilterPresentForCol(colId: any): any; + private doesFilterPass(node, filterToSkip?); + setQuickFilter(newFilter: any): boolean; + onFilterChanged(): void; + isQuickFilterPresent(): boolean; + doesRowPassOtherFilters(filterToSkip: any, node: any): boolean; + doesRowPassFilter(node: any, filterToSkip?: any): boolean; + private aggregateRowForQuickFilter(node); + refreshDisplayedValues(): void; + onNewRowsLoaded(): void; + private createValueGetter(column); + getFilterApi(column: Column): any; + private getOrCreateFilterWrapper(column); + private createFilterWrapper(column); + private assertMethodHasNoParameters(theMethod); + showFilter(column: Column, eventSource: any): void; + } +} +declare module ag.grid { + class TemplateService { + templateCache: any; + waitingCallbacks: any; + $scope: any; + init($scope: any): void; + getTemplate(url: any, callback: any): any; + handleHttpResult(httpResult: any, url: any): void; + } +} +declare module ag.grid { + class SelectionRendererFactory { + private angularGrid; + private selectionController; + init(angularGrid: any, selectionController: any): void; + createSelectionCheckbox(node: any, rowIndex: any): HTMLInputElement; + } +} +declare module ag.vdom { + class VElement { + static idSequence: number; + private id; + private elementAttachedListeners; + constructor(); + getId(): number; + addElementAttachedListener(listener: (element: Element) => void): void; + protected fireElementAttached(element: Element): void; + elementAttached(element: Element): void; + toHtmlString(): string; + } +} +declare module ag.vdom { + class VHtmlElement extends VElement { + private type; + private classes; + private eventListeners; + private attributes; + private children; + private innerHtml; + private style; + private bound; + private element; + constructor(type: string); + getElement(): HTMLElement; + setInnerHtml(innerHtml: string): void; + addStyles(styles: any): void; + private attachEventListeners(node); + addClass(newClass: string): void; + removeClass(oldClass: string): void; + addClasses(classes: string[]): void; + toHtmlString(): string; + private toHtmlStringChildren(); + private toHtmlStringAttributes(); + private toHtmlStringClasses(); + private toHtmlStringStyles(); + appendChild(child: any): void; + setAttribute(key: string, value: string): void; + addEventListener(event: string, listener: EventListener): void; + elementAttached(element: Element): void; + fireElementAttachedToChildren(element: Element): void; + } +} +declare module ag.vdom { + class VWrapperElement extends VElement { + private wrappedElement; + constructor(wrappedElement: Element); + toHtmlString(): string; + elementAttached(element: Element): void; + } +} +declare module ag.grid { + class RenderedCell { + private vGridCell; + private vSpanWithValue; + private vCellWrapper; + private vParentOfValue; + private checkboxOnChangeListener; + private column; + private data; + private node; + private rowIndex; + private editingCell; + private scope; + private isFirstColumn; + private gridOptionsWrapper; + private expressionService; + private selectionRendererFactory; + private rowRenderer; + private selectionController; + private $compile; + private templateService; + private cellRendererMap; + private eCheckbox; + private columnController; + private valueService; + private eventService; + private value; + private checkboxSelection; + constructor(isFirstColumn: any, column: any, $compile: any, rowRenderer: RowRenderer, gridOptionsWrapper: GridOptionsWrapper, expressionService: ExpressionService, selectionRendererFactory: SelectionRendererFactory, selectionController: SelectionController, templateService: TemplateService, cellRendererMap: { + [key: string]: any; + }, node: any, rowIndex: number, scope: any, columnController: ColumnController, valueService: ValueService, eventService: EventService); + getColumn(): Column; + private getValue(); + getVGridCell(): ag.vdom.VHtmlElement; + private getDataForRow(); + private setupComponents(); + startEditing(key?: number): void; + focusCell(forceBrowserFocus: boolean): void; + private stopEditing(eInput, blurListener, reset?); + createParams(): any; + createEvent(event: any, eventSource: any): any; + private addCellDoubleClickedHandler(); + private addCellContextMenuHandler(); + isCellEditable(): any; + private addCellClickedHandler(); + private populateCell(); + private addStylesFromCollDef(); + private addClassesFromCollDef(); + private addClassesFromRules(); + private addCellNavigationHandler(); + private isKeycodeForStartEditing(key); + createSelectionCheckbox(): void; + setSelected(state: boolean): void; + private createParentOfValue(); + isVolatile(): boolean; + refreshCell(): void; + private putDataIntoCell(); + private useCellRenderer(cellRenderer); + private addClasses(); + } +} +declare module ag.grid { + class RenderedRow { + vPinnedRow: any; + vBodyRow: any; + private renderedCells; + private scope; + private node; + private rowIndex; + private cellRendererMap; + private gridOptionsWrapper; + private parentScope; + private angularGrid; + private columnController; + private expressionService; + private rowRenderer; + private selectionRendererFactory; + private $compile; + private templateService; + private selectionController; + private pinning; + private eBodyContainer; + private ePinnedContainer; + private valueService; + private eventService; + constructor(gridOptionsWrapper: GridOptionsWrapper, valueService: ValueService, parentScope: any, angularGrid: Grid, columnController: ColumnController, expressionService: ExpressionService, cellRendererMap: { + [key: string]: any; + }, selectionRendererFactory: SelectionRendererFactory, $compile: any, templateService: TemplateService, selectionController: SelectionController, rowRenderer: RowRenderer, eBodyContainer: HTMLElement, ePinnedContainer: HTMLElement, node: any, rowIndex: number, eventService: EventService); + onRowSelected(selected: boolean): void; + softRefresh(): void; + getRenderedCellForColumn(column: Column): RenderedCell; + getCellForCol(column: Column): any; + destroy(): void; + private destroyScope(); + isDataInList(rows: any[]): boolean; + isNodeInList(nodes: RowNode[]): boolean; + isGroup(): boolean; + private drawNormalRow(); + private bindVirtualElement(vElement); + private createGroupRow(); + private createGroupSpanningEntireRowCell(padding); + setMainRowWidth(width: number): void; + private createChildScopeOrNull(data); + private addDynamicStyles(); + private createRowContainer(); + getRowNode(): any; + getRowIndex(): any; + refreshCells(colIds: string[]): void; + private addDynamicClasses(); + } +} +declare module ag.grid { + class SvgFactory { + static theInstance: SvgFactory; + static getInstance(): SvgFactory; + createFilterSvg(): Element; + createColumnShowingSvg(): Element; + createColumnHiddenSvg(): Element; + createMenuSvg(): Element; + createArrowUpSvg(): Element; + createArrowLeftSvg(): Element; + createArrowDownSvg(): Element; + createArrowRightSvg(): Element; + createSmallArrowDownSvg(): Element; + createArrowUpDownSvg(): Element; + } +} +declare module ag.grid { + function groupCellRendererFactory(gridOptionsWrapper: GridOptionsWrapper, selectionRendererFactory: SelectionRendererFactory, expressionService: ExpressionService): (params: any) => HTMLSpanElement; +} +declare module ag.grid { + class RowRenderer { + private columnModel; + private gridOptionsWrapper; + private angularGrid; + private selectionRendererFactory; + private gridPanel; + private $compile; + private $scope; + private selectionController; + private expressionService; + private templateService; + private cellRendererMap; + private rowModel; + private firstVirtualRenderedRow; + private lastVirtualRenderedRow; + private focusedCell; + private valueService; + private eventService; + private renderedRows; + private renderedTopFloatingRows; + private renderedBottomFloatingRows; + private eAllBodyContainers; + private eAllPinnedContainers; + private eBodyContainer; + private eBodyViewport; + private ePinnedColsContainer; + private eFloatingTopContainer; + private eFloatingTopPinnedContainer; + private eFloatingBottomContainer; + private eFloatingBottomPinnedContainer; + private eParentsOfRows; + init(columnModel: any, gridOptionsWrapper: GridOptionsWrapper, gridPanel: GridPanel, angularGrid: Grid, selectionRendererFactory: SelectionRendererFactory, $compile: any, $scope: any, selectionController: SelectionController, expressionService: ExpressionService, templateService: TemplateService, valueService: ValueService, eventService: EventService): void; + setRowModel(rowModel: any): void; + onIndividualColumnResized(column: Column): void; + setMainRowWidths(): void; + private findAllElements(gridPanel); + refreshAllFloatingRows(): void; + private refreshFloatingRows(renderedRows, rowData, pinnedContainer, bodyContainer, isTop); + refreshView(refreshFromIndex?: any): void; + softRefreshView(): void; + refreshRows(rowNodes: RowNode[]): void; + refreshCells(rowNodes: RowNode[], colIds: string[]): void; + rowDataChanged(rows: any): void; + private refreshAllVirtualRows(fromIndex); + refreshGroupRows(): void; + private removeVirtualRow(rowsToRemove, fromIndex?); + private unbindVirtualRow(indexToRemove); + drawVirtualRows(): void; + getFirstVirtualRenderedRow(): number; + getLastVirtualRenderedRow(): number; + private ensureRowsRendered(); + private insertRow(node, rowIndex, mainRowWidth); + getRenderedNodes(): any[]; + getIndexOfRenderedNode(node: any): number; + navigateToNextCell(key: any, rowIndex: number, column: Column): void; + private getNextCellToFocus(key, lastCellToFocus); + onRowSelected(rowIndex: number, selected: boolean): void; + focusCell(eCell: any, rowIndex: number, colIndex: number, colDef: ColDef, forceBrowserFocus: any): void; + getFocusedCell(): any; + setFocusedCell(rowIndex: any, colIndex: any): void; + startEditingNextCell(rowIndex: any, column: any, shiftKey: any): void; + } +} +declare module ag.grid { + class SelectionController { + private eParentsOfRows; + private angularGrid; + private gridOptionsWrapper; + private $scope; + private rowRenderer; + private selectedRows; + private selectedNodesById; + private rowModel; + private eventService; + init(angularGrid: Grid, gridPanel: GridPanel, gridOptionsWrapper: GridOptionsWrapper, $scope: any, rowRenderer: RowRenderer, eventService: EventService): void; + private initSelectedNodesById(); + getSelectedNodesById(): any; + getSelectedRows(): any; + getSelectedNodes(): any; + getBestCostNodeSelection(): any; + setRowModel(rowModel: any): void; + deselectAll(): void; + selectAll(): void; + selectNode(node: any, tryMulti: any, suppressEvents?: any): void; + private recursivelySelectAllChildren(node, suppressEvents?); + private recursivelyDeselectAllChildren(node); + private doWorkOfSelectNode(node, suppressEvents); + private addCssClassForNode_andInformVirtualRowListener(node); + private doWorkOfDeselectAllNodes(nodeToKeepSelected?); + private deselectRealNode(node); + private removeCssClassForNode(node); + deselectIndex(rowIndex: any): void; + deselectNode(node: any): void; + selectIndex(index: any, tryMulti: any, suppressEvents?: any): void; + private syncSelectedRowsAndCallListener(suppressEvents?); + private recursivelyCheckIfSelected(node); + isNodeSelected(node: any): boolean; + private updateGroupParentsIfNeeded(); + } +} +declare module ag.grid { + class RenderedHeaderElement { + private eRoot; + private dragStartX; + constructor(eRoot: HTMLElement); + getERoot(): HTMLElement; + destroy(): void; + refreshFilterIcon(): void; + refreshSortIcon(): void; + onDragStart(): void; + onDragging(dragChange: number): void; + onIndividualColumnResized(column: Column): void; + addDragHandler(eDraggableElement: any): void; + stopDragging(listenersToRemove: any): void; + } +} +declare module ag.grid { + class RenderedHeaderCell extends RenderedHeaderElement { + private static DEFAULT_SORTING_ORDER; + private eHeaderCell; + private eSortAsc; + private eSortDesc; + private eSortNone; + private eFilterIcon; + private column; + private gridOptionsWrapper; + private parentScope; + private childScope; + private filterManager; + private columnController; + private $compile; + private angularGrid; + private parentGroup; + private startWidth; + constructor(column: Column, parentGroup: RenderedHeaderGroupCell, gridOptionsWrapper: GridOptionsWrapper, parentScope: any, filterManager: FilterManager, columnController: ColumnController, $compile: any, angularGrid: Grid, eRoot: HTMLElement); + getGui(): HTMLElement; + destroy(): void; + private createScope(); + private addAttributes(); + private addClasses(); + private addMenu(); + private addSortIcons(headerCellLabel); + private setupComponents(); + private useRenderer(headerNameValue, headerCellRenderer, headerCellLabel); + refreshFilterIcon(): void; + refreshSortIcon(): void; + private getNextSortDirection(); + private addSortHandling(headerCellLabel); + onDragStart(): void; + onDragging(dragChange: number): void; + onIndividualColumnResized(column: Column): void; + private addHeaderClassesFromCollDef(); + } +} +declare module ag.grid { + class RenderedHeaderGroupCell extends RenderedHeaderElement { + private eHeaderGroup; + private eHeaderGroupCell; + private eHeaderCellResize; + private columnGroup; + private gridOptionsWrapper; + private columnController; + private children; + private groupWidthStart; + private childrenWidthStarts; + private minWidth; + private parentScope; + private filterManager; + private $compile; + private angularGrid; + constructor(columnGroup: ColumnGroup, gridOptionsWrapper: GridOptionsWrapper, columnController: ColumnController, eRoot: HTMLElement, angularGrid: Grid, parentScope: any, filterManager: FilterManager, $compile: any); + getGui(): HTMLElement; + destroy(): void; + refreshFilterIcon(): void; + refreshSortIcon(): void; + onIndividualColumnResized(column: Column): void; + private setupComponents(); + private isColumnInOurDisplayedGroup(column); + private setWidthOfGroupHeaderCell(); + private addGroupExpandIcon(eGroupCellLabel); + onDragStart(): void; + onDragging(dragChange: any): void; + } +} +declare module ag.grid { + class HeaderRenderer { + private gridOptionsWrapper; + private columnController; + private angularGrid; + private filterManager; + private $scope; + private $compile; + private ePinnedHeader; + private eHeaderContainer; + private eRoot; + private headerElements; + init(gridOptionsWrapper: GridOptionsWrapper, columnController: ColumnController, gridPanel: GridPanel, angularGrid: Grid, filterManager: FilterManager, $scope: any, $compile: any): void; + private findAllElements(gridPanel); + refreshHeader(): void; + private insertHeadersWithGrouping(); + private insertHeadersWithoutGrouping(); + updateSortIcons(): void; + updateFilterIcons(): void; + onIndividualColumnResized(column: Column): void; + } +} +declare module ag.grid { + class GroupCreator { + private valueService; + init(valueService: ValueService): void; + group(rowNodes: RowNode[], groupedCols: Column[], expandByDefault: any): RowNode[]; + isExpanded(expandByDefault: any, level: any): boolean; + } +} +declare module ag.grid { + class InMemoryRowController { + private gridOptionsWrapper; + private columnController; + private angularGrid; + private filterManager; + private $scope; + private allRows; + private rowsAfterGroup; + private rowsAfterFilter; + private rowsAfterSort; + private rowsAfterMap; + private model; + private groupCreator; + private valueService; + private eventService; + constructor(); + init(gridOptionsWrapper: GridOptionsWrapper, columnController: ColumnController, angularGrid: any, filterManager: FilterManager, $scope: any, groupCreator: GroupCreator, valueService: ValueService, eventService: EventService): void; + private createModel(); + getModel(): any; + forEachInMemory(callback: Function): void; + forEachNode(callback: Function): void; + forEachNodeAfterFilter(callback: Function): void; + forEachNodeAfterFilterAndSort(callback: Function): void; + private recursivelyWalkNodesAndCallback(list, callback); + updateModel(step: any): void; + private defaultGroupAggFunctionFactory(valueColumns, valueKeys); + doAggregate(): void; + expandOrCollapseAll(expand: boolean, rowNodes: RowNode[]): void; + private recursivelyClearAggData(nodes); + private recursivelyCreateAggData(nodes, groupAggFunction, level); + private doSort(); + private recursivelyResetSort(rowNodes); + private sortList(nodes, sortOptions); + private updateChildIndexes(nodes); + onPivotChanged(): void; + private doPivoting(); + private doFilter(); + private filterItems(rowNodes); + private recursivelyResetFilter(nodes); + setAllRows(rows: RowNode[], firstId?: number): void; + private recursivelyAddIdToNodes(nodes, index); + private recursivelyCheckUserProvidedNodes(nodes, parent, level); + private getTotalChildCount(rowNodes); + private doGroupMapping(); + private addToMap(mappedData, originalNodes); + private createFooterNode(groupNode); + } +} +declare module ag.grid { + class VirtualPageRowController { + rowRenderer: any; + datasourceVersion: any; + gridOptionsWrapper: any; + angularGrid: any; + datasource: any; + virtualRowCount: any; + foundMaxRow: any; + pageCache: any; + pageCacheSize: any; + pageLoadsInProgress: any; + pageLoadsQueued: any; + pageAccessTimes: any; + accessTime: any; + maxConcurrentDatasourceRequests: any; + maxPagesInCache: any; + pageSize: any; + overflowSize: any; + init(rowRenderer: any, gridOptionsWrapper: any, angularGrid: any): void; + setDatasource(datasource: any): void; + reset(): void; + createNodesFromRows(pageNumber: any, rows: any): any; + removeFromLoading(pageNumber: any): void; + pageLoadFailed(pageNumber: any): void; + pageLoaded(pageNumber: any, rows: any, lastRow: any): void; + putPageIntoCacheAndPurge(pageNumber: any, rows: any): void; + checkMaxRowAndInformRowRenderer(pageNumber: any, lastRow: any): void; + isPageAlreadyLoading(pageNumber: any): boolean; + doLoadOrQueue(pageNumber: any): void; + addToQueueAndPurgeQueue(pageNumber: any): void; + findLeastRecentlyAccessedPage(pageIndexes: any): number; + checkQueueForNextLoad(): void; + loadPage(pageNumber: any): void; + requestIsDaemon(datasourceVersionCopy: any): boolean; + getVirtualRow(rowIndex: any): any; + forEachNode(callback: any): void; + getModel(): { + getVirtualRow: (index: any) => any; + getVirtualRowCount: () => any; + forEachInMemory: (callback: any) => void; + forEachNode: (callback: any) => void; + forEachNodeAfterFilter: (callback: any) => void; + forEachNodeAfterFilterAndSort: (callback: any) => void; + }; + } +} +declare module ag.grid { + class PaginationController { + eGui: any; + btNext: any; + btPrevious: any; + btFirst: any; + btLast: any; + lbCurrent: any; + lbTotal: any; + lbRecordCount: any; + lbFirstRowOnPage: any; + lbLastRowOnPage: any; + ePageRowSummaryPanel: any; + angularGrid: any; + callVersion: any; + gridOptionsWrapper: any; + datasource: any; + pageSize: any; + rowCount: any; + foundMaxRow: any; + totalPages: any; + currentPage: any; + init(angularGrid: any, gridOptionsWrapper: any): void; + setDatasource(datasource: any): void; + reset(): void; + setTotalLabels(): void; + calculateTotalPages(): void; + pageLoaded(rows: any, lastRowIndex: any): void; + updateRowLabels(): void; + loadPage(): void; + isCallDaemon(versionCopy: any): boolean; + onBtNext(): void; + onBtPrevious(): void; + onBtFirst(): void; + onBtLast(): void; + isZeroPagesToDisplay(): boolean; + enableOrDisableButtons(): void; + createTemplate(): string; + getGui(): any; + setupComponents(): void; + } +} +declare module ag.grid { + class BorderLayout { + private eNorthWrapper; + private eSouthWrapper; + private eEastWrapper; + private eWestWrapper; + private eCenterWrapper; + private eOverlayWrapper; + private eCenterRow; + private eNorthChildLayout; + private eSouthChildLayout; + private eEastChildLayout; + private eWestChildLayout; + private eCenterChildLayout; + private isLayoutPanel; + private fullHeight; + private layoutActive; + private eGui; + private id; + private childPanels; + private centerHeightLastTime; + private sizeChangeListners; + constructor(params: any); + addSizeChangeListener(listener: Function): void; + fireSizeChanged(): void; + private setupPanels(params); + private setupPanel(content, ePanel); + getGui(): any; + doLayout(): boolean; + private layoutChild(childPanel); + private layoutHeight(); + private layoutHeightFullHeight(); + private layoutHeightNormal(); + getCentreHeight(): number; + private layoutWidth(); + setEastVisible(visible: any): void; + setOverlayVisible(visible: any): void; + setSouthVisible(visible: any): void; + } +} +declare module ag.grid { + class GridPanel { + private masterSlaveService; + private gridOptionsWrapper; + private columnModel; + private rowRenderer; + private rowModel; + private layout; + private forPrint; + private scrollWidth; + private scrollLagCounter; + private eBodyViewport; + private eRoot; + private eBody; + private eBodyContainer; + private ePinnedColsContainer; + private eHeaderContainer; + private ePinnedHeader; + private eHeader; + private eParentsOfRows; + private eBodyViewportWrapper; + private ePinnedColsViewport; + private eFloatingTop; + private ePinnedFloatingTop; + private eFloatingTopContainer; + private eFloatingBottom; + private ePinnedFloatingBottom; + private eFloatingBottomContainer; + init(gridOptionsWrapper: GridOptionsWrapper, columnModel: ColumnController, rowRenderer: RowRenderer, masterSlaveService: MasterSlaveService): void; + getLayout(): BorderLayout; + private setupComponents(); + getPinnedFloatingTop(): HTMLElement; + getFloatingTopContainer(): HTMLElement; + getPinnedFloatingBottom(): HTMLElement; + getFloatingBottomContainer(): HTMLElement; + private createTemplate(); + ensureIndexVisible(index: any): void; + ensureColIndexVisible(index: any): void; + showLoading(loading: any): void; + getWidthForSizeColsToFit(): number; + setRowModel(rowModel: any): void; + getBodyContainer(): HTMLElement; + getBodyViewport(): HTMLElement; + getPinnedColsContainer(): HTMLElement; + getHeaderContainer(): HTMLElement; + getRoot(): HTMLElement; + getPinnedHeader(): HTMLElement; + getRowsParent(): HTMLElement[]; + private queryHtmlElement(selector); + private findElements(); + private mouseWheelListener(event); + setBodyContainerWidth(): void; + setPinnedColContainerWidth(): void; + showPinnedColContainersIfNeeded(): void; + onBodyHeightChange(): void; + private sizeHeaderAndBody(); + private sizeHeaderAndBodyNormal(); + private sizeHeaderAndBodyForPrint(); + setHorizontalScrollPosition(hScrollPosition: number): void; + private addScrollListener(); + private requestDrawVirtualRows(); + private scrollHeader(bodyLeftPosition); + private scrollPinned(bodyTopPosition); + } +} +declare module ag.grid { + class DragAndDropService { + static theInstance: DragAndDropService; + static getInstance(): DragAndDropService; + dragItem: any; + constructor(); + stopDragging(): void; + setDragCssClasses(eListItem: any, dragging: any): void; + addDragSource(eDragSource: any, dragSourceCallback: any): void; + onMouseDownDragSource(eDragSource: any, dragSourceCallback: any): void; + addDropTarget(eDropTarget: any, dropTargetCallback: any): void; + } +} +declare function require(name: string): any; +declare module ag.grid { + class AgList { + private eGui; + private uniqueId; + private modelChangedListeners; + private itemSelectedListeners; + private beforeDropListeners; + private itemMovedListeners; + private dragSources; + private emptyMessage; + private eFilterValueTemplate; + private eListParent; + private model; + private cellRenderer; + private readOnly; + constructor(); + setReadOnly(readOnly: boolean): void; + setEmptyMessage(emptyMessage: any): void; + getUniqueId(): any; + addStyles(styles: any): void; + addCssClass(cssClass: any): void; + addDragSource(dragSource: any): void; + addModelChangedListener(listener: Function): void; + addItemSelectedListener(listener: any): void; + addItemMovedListener(listener: any): void; + addBeforeDropListener(listener: any): void; + private fireItemMoved(fromIndex, toIndex); + private fireModelChanged(); + private fireItemSelected(item); + private fireBeforeDrop(item); + private setupComponents(); + setModel(model: any): void; + getModel(): any; + setCellRenderer(cellRenderer: any): void; + refreshView(): void; + private insertRows(); + private insertBlankMessage(); + private setupAsDropTarget(); + private externalAcceptDrag(dragEvent); + private externalDrop(dragEvent); + private externalNoDrop(); + private addItemToList(newItem); + private addDragAndDropToListItem(eListItem, item); + private internalAcceptDrag(targetColumn, dragItem, eListItem); + private internalDrop(targetColumn, draggedColumn); + private internalNoDrop(eListItem); + private dragAfterThisItem(targetColumn, draggedColumn); + private setDropCssClasses(eListItem, state); + getGui(): any; + } +} +declare module ag.grid { + class ColumnSelectionPanel { + private gridOptionsWrapper; + private columnController; + private cColumnList; + layout: any; + private eRootPanel; + constructor(columnController: ColumnController, gridOptionsWrapper: GridOptionsWrapper, eventService: EventService); + private columnsChanged(); + getDragSource(): any; + private columnCellRenderer(params); + private setupComponents(); + private onItemMoved(fromIndex, toIndex); + getGui(): any; + } +} +declare module ag.grid { + class GroupSelectionPanel { + gridOptionsWrapper: any; + columnController: ColumnController; + inMemoryRowController: any; + cColumnList: any; + layout: any; + constructor(columnController: ColumnController, inMemoryRowController: any, gridOptionsWrapper: GridOptionsWrapper, eventService: EventService); + private columnsChanged(); + addDragSource(dragSource: any): void; + private columnCellRenderer(params); + private setupComponents(); + private onBeforeDrop(newItem); + private onItemMoved(fromIndex, toIndex); + } +} +declare module ag.grid { + class AgDropdownList { + private itemSelectedListeners; + private eValue; + private agList; + private eGui; + private hidePopupCallback; + private selectedItem; + private cellRenderer; + private popupService; + constructor(popupService: PopupService); + setWidth(width: any): void; + addItemSelectedListener(listener: any): void; + fireItemSelected(item: any): void; + setupComponents(): void; + itemSelected(item: any): void; + onClick(): void; + getGui(): any; + setSelected(item: any): void; + setCellRenderer(cellRenderer: any): void; + refreshView(): void; + setModel(model: any): void; + } +} +declare module ag.grid { + class ValuesSelectionPanel { + private gridOptionsWrapper; + private columnController; + private cColumnList; + private layout; + private popupService; + constructor(columnController: ColumnController, gridOptionsWrapper: GridOptionsWrapper, popupService: PopupService, eventService: EventService); + getLayout(): any; + private columnsChanged(); + addDragSource(dragSource: any): void; + private cellRenderer(params); + private setupComponents(); + private beforeDropListener(newItem); + } +} +declare module ag.grid { + class VerticalStack { + isLayoutPanel: any; + childPanels: any; + eGui: any; + constructor(); + addPanel(panel: any, height: any): void; + getGui(): any; + doLayout(): void; + } +} +declare module ag.grid { + class ToolPanel { + layout: any; + constructor(); + init(columnController: any, inMemoryRowController: any, gridOptionsWrapper: GridOptionsWrapper, popupService: PopupService, eventService: EventService): void; + } +} +declare module ag.grid { + interface GridOptions { + virtualPaging?: boolean; + toolPanelSuppressPivot?: boolean; + toolPanelSuppressValues?: boolean; + rowsAlreadyGrouped?: boolean; + suppressRowClickSelection?: boolean; + suppressCellSelection?: boolean; + sortingOrder?: string[]; + suppressMultiSort?: boolean; + suppressHorizontalScroll?: boolean; + unSortIcon?: boolean; + rowHeight?: number; + rowBuffer?: number; + enableColResize?: boolean; + enableCellExpressions?: boolean; + enableSorting?: boolean; + enableServerSideSorting?: boolean; + enableFilter?: boolean; + enableServerSideFilter?: boolean; + colWidth?: number; + suppressMenuHide?: boolean; + singleClickEdit?: boolean; + debug?: boolean; + icons?: any; + angularCompileRows?: boolean; + angularCompileFilters?: boolean; + angularCompileHeaders?: boolean; + localeText?: any; + localeTextFunc?: Function; + suppressScrollLag?: boolean; + groupSuppressAutoColumn?: boolean; + groupSelectsChildren?: boolean; + groupHidePivotColumns?: boolean; + groupIncludeFooter?: boolean; + groupUseEntireRow?: boolean; + groupSuppressRow?: boolean; + groupSuppressBlankHeader?: boolean; + forPrint?: boolean; + groupColumnDef?: any; + context?: any; + rowStyle?: any; + rowClass?: any; + groupDefaultExpanded?: any; + slaveGrids?: GridOptions[]; + rowSelection?: string; + rowDeselection?: boolean; + rowData?: any[]; + floatingTopRowData?: any[]; + floatingBottomRowData?: any[]; + showToolPanel?: boolean; + groupKeys?: string[]; + groupAggFields?: string[]; + columnDefs?: any[]; + datasource?: any; + pinnedColumnCount?: number; + groupHeaders?: boolean; + headerHeight?: number; + groupRowInnerRenderer?(params: any): void; + groupRowRenderer?: Function | Object; + isScrollLag?(): boolean; + isExternalFilterPresent?(): boolean; + doesExternalFilterPass?(node: RowNode): boolean; + getRowStyle?: any; + getRowClass?: any; + headerCellRenderer?: any; + groupAggFunction?(nodes: any[]): any; + onReady?(api: any): void; + onModelUpdated?(): void; + onCellClicked?(params: any): void; + onCellDoubleClicked?(params: any): void; + onCellContextMenu?(params: any): void; + onCellValueChanged?(params: any): void; + onCellFocused?(params: any): void; + onRowSelected?(params: any): void; + onSelectionChanged?(): void; + onBeforeFilterChanged?(): void; + onAfterFilterChanged?(): void; + onFilterModified?(): void; + onBeforeSortChanged?(): void; + onAfterSortChanged?(): void; + onVirtualRowRemoved?(params: any): void; + onRowClicked?(params: any): void; + api?: GridApi; + columnApi?: ColumnApi; + } +} +declare module ag.grid { + class GridApi { + private grid; + private rowRenderer; + private headerRenderer; + private filterManager; + private columnController; + private inMemoryRowController; + private selectionController; + private gridOptionsWrapper; + private gridPanel; + private valueService; + private masterSlaveService; + private eventService; + private csvCreator; + constructor(grid: Grid, rowRenderer: RowRenderer, headerRenderer: HeaderRenderer, filterManager: FilterManager, columnController: ColumnController, inMemoryRowController: InMemoryRowController, selectionController: SelectionController, gridOptionsWrapper: GridOptionsWrapper, gridPanel: GridPanel, valueService: ValueService, masterSlaveService: MasterSlaveService, eventService: EventService); + /** Used internally by grid. Not intended to be used by the client. Interface may change between releases. */ + __getMasterSlaveService(): MasterSlaveService; + getDataAsCsv(params?: CsvExportParams): string; + exportDataAsCsv(params?: CsvExportParams): void; + setDatasource(datasource: any): void; + onNewDatasource(): void; + setRowData(rowData: any): void; + setRows(rows: any): void; + onNewRows(): void; + setFloatingTopRowData(rows: any[]): void; + setFloatingBottomRowData(rows: any[]): void; + onNewCols(): void; + setColumnDefs(colDefs: ColDef[]): void; + unselectAll(): void; + refreshRows(rowNodes: RowNode[]): void; + refreshCells(rowNodes: RowNode[], colIds: string[]): void; + rowDataChanged(rows: any): void; + refreshView(): void; + softRefreshView(): void; + refreshGroupRows(): void; + refreshHeader(): void; + isAnyFilterPresent(): boolean; + isAdvancedFilterPresent(): boolean; + isQuickFilterPresent(): boolean; + getModel(): any; + onGroupExpandedOrCollapsed(refreshFromIndex: any): void; + expandAll(): void; + collapseAll(): void; + addVirtualRowListener(rowIndex: any, callback: any): void; + setQuickFilter(newFilter: any): void; + selectIndex(index: any, tryMulti: any, suppressEvents: any): void; + deselectIndex(index: any): void; + selectNode(node: any, tryMulti: any, suppressEvents: any): void; + deselectNode(node: any): void; + selectAll(): void; + deselectAll(): void; + recomputeAggregates(): void; + sizeColumnsToFit(): void; + showLoading(show: any): void; + isNodeSelected(node: any): boolean; + getSelectedNodesById(): { + [nodeId: number]: RowNode; + }; + getSelectedNodes(): RowNode[]; + getSelectedRows(): any[]; + getBestCostNodeSelection(): any; + getRenderedNodes(): any[]; + ensureColIndexVisible(index: any): void; + ensureIndexVisible(index: any): void; + ensureNodeVisible(comparator: any): void; + forEachInMemory(callback: Function): void; + forEachNode(callback: Function): void; + forEachNodeAfterFilter(callback: Function): void; + forEachNodeAfterFilterAndSort(callback: Function): void; + getFilterApiForColDef(colDef: any): any; + getFilterApi(key: any): any; + getColumnDef(key: any): ColDef; + onFilterChanged(): void; + setSortModel(sortModel: any): void; + getSortModel(): any; + setFilterModel(model: any): void; + getFilterModel(): any; + getFocusedCell(): any; + setFocusedCell(rowIndex: any, colIndex: any): void; + setHeaderHeight(headerHeight: number): void; + setGroupHeaders(groupHeaders: boolean): void; + showToolPanel(show: any): void; + isToolPanelShowing(): boolean; + hideColumn(colId: any, hide: any): void; + hideColumns(colIds: any, hide: any): void; + getColumnState(): [any]; + setColumnState(state: any): void; + doLayout(): void; + getValue(colDef: ColDef, data: any, node: any): any; + addEventListener(eventType: string, listener: Function): void; + addGlobalListener(listener: Function): void; + removeEventListener(eventType: string, listener: Function): void; + removeGlobalListener(listener: Function): void; + refreshPivot(): void; + } +} +declare module ag.grid { + class ValueService { + private gridOptionsWrapper; + private expressionService; + private columnController; + init(gridOptionsWrapper: GridOptionsWrapper, expressionService: ExpressionService, columnController: ColumnController): void; + getValue(colDef: ColDef, data: any, node: any): any; + private executeValueGetter(valueGetter, data, colDef, node); + private getValueCallback(data, node, field); + } +} +declare module ag.grid { + class Grid { + private virtualRowCallbacks; + private gridOptions; + private gridOptionsWrapper; + private inMemoryRowController; + private doingVirtualPaging; + private paginationController; + private virtualPageRowController; + private finished; + private selectionController; + private columnController; + private rowRenderer; + private headerRenderer; + private filterManager; + private valueService; + private masterSlaveService; + private eventService; + private toolPanel; + private gridPanel; + private eRootPanel; + private toolPanelShowing; + private doingPagination; + private usingInMemoryModel; + private rowModel; + constructor(eGridDiv: any, gridOptions: any, globalEventListener?: Function, $scope?: any, $compile?: any, quickFilterOnScope?: any); + getRowModel(): any; + private periodicallyDoLayout(); + private setupComponents($scope, $compile, eUserProvidedDiv, globalEventListener); + private onColumnChanged(event); + refreshPivot(): void; + getEventService(): EventService; + private onIndividualColumnResized(column); + showToolPanel(show: any): void; + isToolPanelShowing(): boolean; + isUsingInMemoryModel(): boolean; + setDatasource(datasource?: any): void; + private refreshHeaderAndBody(); + setFinished(): void; + onQuickFilterChanged(newFilter: any): void; + onFilterModified(): void; + onFilterChanged(): void; + onRowClicked(event: any, rowIndex: any, node: any): void; + showLoadingPanel(show: any): void; + private setupColumns(); + updateModelAndRefresh(step: any, refreshFromIndex?: any): void; + setRows(rows?: any, firstId?: any): void; + ensureNodeVisible(comparator: any): void; + getFilterModel(): any; + setFocusedCell(rowIndex: any, colIndex: any): void; + getSortModel(): any; + setSortModel(sortModel: any): void; + onSortingChanged(): void; + addVirtualRowListener(rowIndex: any, callback: any): void; + onVirtualRowSelected(rowIndex: any, selected: any): void; + onVirtualRowRemoved(rowIndex: any): void; + setColumnDefs(colDefs?: ColDef[]): void; + updateBodyContainerWidthAfterColResize(): void; + updatePinnedColContainerWidthAfterColResize(): void; + doLayout(): void; + } +} +declare module ag.grid { + class ComponentUtil { + static SIMPLE_PROPERTIES: string[]; + static SIMPLE_NUMBER_PROPERTIES: string[]; + static SIMPLE_BOOLEAN_PROPERTIES: string[]; + static WITH_IMPACT_NUMBER_PROPERTIES: string[]; + static WITH_IMPACT_BOOLEAN_PROPERTIES: string[]; + static WITH_IMPACT_OTHER_PROPERTIES: string[]; + static CALLBACKS: string[]; + static ALL_PROPERTIES: string[]; + static copyAttributesToGridOptions(gridOptions: GridOptions, component: any): GridOptions; + static processOnChange(changes: any, gridOptions: GridOptions, component: any): void; + static toBoolean(value: any): boolean; + static toNumber(value: any): number; + } +} +declare module ag.grid { + class AgGridNg2 { + private elementDef; + private _agGrid; + private _initialised; + private gridOptions; + private api; + private columnApi; + modelUpdated: any; + cellClicked: any; + cellDoubleClicked: any; + cellContextMenu: any; + cellValueChanged: any; + cellFocused: any; + rowSelected: any; + selectionChanged: any; + beforeFilterChanged: any; + afterFilterChanged: any; + filterModified: any; + beforeSortChanged: any; + afterSortChanged: any; + virtualRowRemoved: any; + rowClicked: any; + ready: any; + columnEverythingChanged: any; + columnPivotChanged: any; + columnValueChanged: any; + columnMoved: any; + columnVisible: any; + columnGroupOpened: any; + columnResized: any; + columnPinnedCountChanged: any; + virtualPaging: boolean; + toolPanelSuppressPivot: boolean; + toolPanelSuppressValues: boolean; + rowsAlreadyGrouped: boolean; + suppressRowClickSelection: boolean; + suppressCellSelection: boolean; + sortingOrder: string[]; + suppressMultiSort: boolean; + suppressHorizontalScroll: boolean; + unSortIcon: boolean; + rowHeight: number; + rowBuffer: number; + enableColResize: boolean; + enableCellExpressions: boolean; + enableSorting: boolean; + enableServerSideSorting: boolean; + enableFilter: boolean; + enableServerSideFilter: boolean; + colWidth: number; + suppressMenuHide: boolean; + debug: boolean; + icons: any; + angularCompileRows: boolean; + angularCompileFilters: boolean; + angularCompileHeaders: boolean; + localeText: any; + localeTextFunc: Function; + groupSuppressAutoColumn: boolean; + groupSelectsChildren: boolean; + groupHidePivotColumns: boolean; + groupIncludeFooter: boolean; + groupUseEntireRow: boolean; + groupSuppressRow: boolean; + groupSuppressBlankHeader: boolean; + groupColumnDef: any; + forPrint: boolean; + context: any; + rowStyle: any; + rowClass: any; + headerCellRenderer: any; + groupDefaultExpanded: any; + slaveGrids: GridOptions[]; + rowSelection: string; + rowDeselection: boolean; + rowData: any[]; + floatingTopRowData: any[]; + floatingBottomRowData: any[]; + showToolPanel: boolean; + groupKeys: string[]; + groupAggFunction: (nodes: any[]) => void; + groupAggFields: string[]; + columnDefs: any[]; + datasource: any; + pinnedColumnCount: number; + quickFilterText: string; + groupHeaders: boolean; + headerHeight: number; + constructor(elementDef: any); + onInit(): void; + onChange(changes: any): void; + private globalEventListener(eventType, event); + } +} +declare module ag.grid { +} +declare var exports: any; +declare var module: any; +declare module ag.grid { + interface Filter { + getGui(): any; + isFilterActive(): boolean; + doesFilterPass(params: any): boolean; + afterGuiAttached?(params?: { + hidePopup?: Function; + }): void; + onNewRowsLoaded?(): void; + } +} diff --git a/alt/alt-tests.ts b/alt/alt-tests.ts new file mode 100644 index 0000000000..403c9d99ae --- /dev/null +++ b/alt/alt-tests.ts @@ -0,0 +1,143 @@ +/** + * Created by shearerbeard on 6/28/15. + */ +/// +/// + +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) => void; + generateActions:( ...actions:Array) => void; +} + +class AbstractStoreModel implements AltJS.StoreModel { + bindActions:( ...actions:Array) => void; + bindAction:( ...args:Array) => void; + bindListeners:(obj:any)=> void; + exportPublicMethods:(config:{[key:string]:(...args:Array) => 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(GenerateActionsClass); +var explicitActions = alt.createActions(ExplicitActionsClass); + +interface AltTestState { + hello:string; +} + +var testSource:AltJS.Source = { + fakeLoad():AltJS.SourceModel { + return { + remote() { + return new Promise.Promise((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 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 { + fakeLoad():string; + split():Array; +} + +var testStore = alt.createStore(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 = testStore.split(); + +generatedActions.notifyTest("types"); +explicitActions.doTest("more types"); + +export var result = testStore.getState(); diff --git a/alt/alt.d.ts b/alt/alt.d.ts new file mode 100644 index 0000000000..0e0b40d8fb --- /dev/null +++ b/alt/alt.d.ts @@ -0,0 +1,167 @@ +// Type definitions for Alt 0.16.10 +// Project: https://github.com/goatslacker/alt +// Definitions by: Michael Shearer +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +/// + +declare module AltJS { + + interface StoreReduce { + action:any; + data: any; + } + + export interface StoreModel { + //Actions + bindAction?( action:Action, handler:ActionHandler):void; + bindActions?(actions:ActionsClass):void; + + //Methods/Listeners + exportPublicMethods?(exportConfig:any):void; + bindListeners?(config:{[methodName:string]:Action | 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):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 | Array>):void; + otherwise?(data:any, action:AltJS.Action):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; + alt?:Alt; + displayName?:string; + } + + export type Source = {[name:string]: () => SourceModel}; + + export interface SourceModel { + local(state:any):any; + remote(state:any):Promise; + shouldFetch?(fetchFn:(...args:Array) => boolean):void; + loading?:(args:any) => void; + success?:(state:S) => void; + error?:(args:any) => void; + interceptResponse?(response:any, action:Action, ...args:Array):any; + } + + export interface AltStore { + 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}; + + export interface Action { + ( args:T):void; + defer(data:any):void; + } + + export interface ActionsClass { + generateActions?( ...action:Array):void; + dispatch( ...payload:Array):void; + actions?:Actions; + } + + type StateTransform = (store:StoreModel) => AltJS.AltStore; + + interface AltConfig { + dispatcher?:any; + serialize?:(serializeFn:(data:Object) => string) => void; + deserialize?:(deserializeFn:(serialData:string) => Object) => void; + storeTransforms?:Array; + batchingFunction?:(callback:( ...data:Array) => any) => void; + } + + class Alt { + constructor(config?:AltConfig); + actions:Actions; + bootstrap(jsonData:string):void; + takeSnapshot( ...storeNames:Array):string; + flush():Object; + recycle( ...stores:Array>):void; + rollback():void; + dispatch(action?:AltJS.Action, data?:Object, details?:any):void; + + //Actions methods + addActions(actionsName:string, ActionsClass: ActionsClassConstructor):void; + createActions(ActionsClass: ActionsClassConstructor, exportObj?: Object):T; + createActions(ActionsClass: ActionsClassConstructor, exportObj?: Object, ...constructorArgs:Array):T; + generateActions( ...actions:Array):T; + getActions(actionsName:string):AltJS.Actions; + + //Stores methods + addStore(name:string, store:StoreModel, saveStore?:boolean):void; + createStore(store:StoreModel, name?:string):AltJS.AltStore; + getStore(name:string):AltJS.AltStore; + } + + export interface AltFactory { + new(config?:AltConfig):Alt; + } + + type ActionsClassConstructor = new (alt:Alt) => AltJS.ActionsClass; + + type ActionHandler = ( ...data:Array) => any; + type ExportConfig = {[key:string]:(...args:Array) => 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; + stores?:Array>; + inject?:{[key:string]:any}; + actions?:{[key:string]:Object}; + render?:(...props:Array) => React.ReactElement; + flux?:AltJS.Alt; + transform?:(store:AltJS.AltStore, actions:any) => any; + shouldComponentUpdate?:(props:any) => boolean; + component?:React.Component; + } + + type AltContainer = React.ReactElement; + var AltContainer:React.ComponentClass; + + export = AltContainer; +} + +declare module "alt" { + var alt:AltJS.AltFactory; + export = alt; +} diff --git a/amazon-product-api/amazon-product-api-tests.ts b/amazon-product-api/amazon-product-api-tests.ts new file mode 100644 index 0000000000..b98e15710f --- /dev/null +++ b/amazon-product-api/amazon-product-api-tests.ts @@ -0,0 +1,84 @@ +/// +/// + +import amazon = require('amazon-product-api'); + +var client = amazon.createClient({ + awsId: process.env.AWS_ACCESS_KEY_ID, + awsSecret: process.env.AWS_SECRET, + awsTag: process.env.AWS_ASSOCIATE_TAG +}); + + +// Item Search + +var searchQuery = { + director: 'Quentin Tarantino', + actor: 'Samuel L. Jackson', + searchIndex: 'DVD', + audienceRating: 'R', + responseGroup: 'ItemAttributes,Offers,Images' +}; + +client.itemSearch(searchQuery).then((results) => { + console.log(getResultCount(results) + " search results"); +}).catch(function(err){ + console.log(err); +}); + +client.itemSearch(searchQuery, (err, results) => { + if(err) { + console.log(err); + return; + } + console.log(getResultCount(results) + " search results"); +}); + + +// Item Lookup + +var lookupQuery = { + itemId: 'B00008OE6I', + idType: 'ASIN', + responseGroup: 'OfferFull', + Condition: 'All' +}; + +client.itemLookup(lookupQuery).then((results) => { + console.log(getResultCount(results) + " lookup results"); +}).catch(function(err){ + console.log(err); +}); + +client.itemLookup(lookupQuery, (err, results) => { + if(err) { + console.log(err); + return; + } + console.log(getResultCount(results) + " lookup results"); +}); + +// Browse Node Lookup + +var nodeLookupQuery = { + browseNodeId: '2625373011' +}; + +client.browseNodeLookup(nodeLookupQuery).then((results) => { + console.log(getResultCount(results) + " node lookup results"); +}).catch(function(err){ + console.log(err); +}); + +client.browseNodeLookup(nodeLookupQuery, (err, results) => { + if(err) { + console.log(err); + return; + } + + console.log(getResultCount(results) + " node lookup results"); +}); + +function getResultCount(results: Object[]) { + return results != undefined ? results.length : 0; +} \ No newline at end of file diff --git a/amazon-product-api/amazon-product-api.d.ts b/amazon-product-api/amazon-product-api.d.ts new file mode 100644 index 0000000000..fc84dcc090 --- /dev/null +++ b/amazon-product-api/amazon-product-api.d.ts @@ -0,0 +1,27 @@ +// Type definitions for amazon-product-api +// Project: https://github.com/t3chnoboy/amazon-product-api +// Definitions by: Matti Lehtinen +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "amazon-product-api" { + + interface ICredentials { + awsId: string, + awsSecret: string, + awsTag: string + } + + interface IAmazonProductQueryCallback { + (err: string, results: Object[]): void; + } + + interface IAmazonProductClient { + itemSearch(query: any, callback?: IAmazonProductQueryCallback) : Promise; + itemLookup(query: any, callback?: IAmazonProductQueryCallback) : Promise; + browseNodeLookup(query: any, callback?: IAmazonProductQueryCallback) : Promise; + } + + export function createClient(credentials:ICredentials) : IAmazonProductClient; +} diff --git a/amcharts/AmCharts.d.ts b/amcharts/AmCharts.d.ts index 97dd3a3ffd..647fc6e254 100644 --- a/amcharts/AmCharts.d.ts +++ b/amcharts/AmCharts.d.ts @@ -178,15 +178,15 @@ declare module AmCharts { /** You can trigger the animation of the pie chart. */ animateAgain(); /** You can trigger the click on a slice from outside. index - the number of a slice or Slice object. */ - clickSlice(index); + clickSlice(index: number); /** Hides slice. index - the number of a slice or Slice object. */ - hideSlice(index); + hideSlice(index: number); /** You can simulate roll-out of a slice from outside. index - the number of a slice or Slice object. */ - rollOutSlice(index); + rollOutSlice(index: number); /** You can simulate roll-over a slice from outside. index - the number of a slice or Slice object. */ - rollOverSlice(index); + rollOverSlice(index: number); /** Shows slice. index - the number of a slice or Slice object. */ - showSlice(index); + showSlice(index: number); /** Adds event listener of the type "clickSlice" or "pullInSlice" or "pullOutSlice" to the object. @param type Always "clickSlice" or "pullInSlice" or "pullOutSlice". @@ -311,22 +311,32 @@ declare module AmCharts { If you do not set properties such as dashLength, lineAlpha, lineColor, etc - values of the axis are used.*/ class Guide { + /** If you set it to true, the guide will be displayed above the graphs. */ + above: boolean; /** Radar chart only. Specifies angle at which guide should start. Affects only fills, not lines. */ angle: number; /** Baloon fill color. */ balloonColor: string; /** The text which will be displayed if the user rolls-over the guide. */ balloonText: string; + /** Specifies if label should be bold or not. */ + boldLabel: boolean; /** Category of the guide (in case the guide is for category axis). */ category: string; /** Dash length. */ dashLength: number; /** Date of the guide (in case the guide is for category axis and parseDates is set to true). */ date: Date; + /** Works if a guide is added to CategoryAxis and this axis is non-date-based. If you set it to true, the guide will start (or be placed, if it's not a fill) on the beginning of the category cell and will end at the end of toCategory cell. */ + expand: boolean; /** Fill opacity. Value range is 0 - 1. */ fillAlpha: number; /** Fill color. */ fillColor: string; + /** Font size of guide label. */ + fontSize: string; + /** Unique id of a Guide. You don't need to set it, unless you want to. */ + id: string; /** Specifies whether label should be placed inside or outside plot area. */ inside: boolean; /** The label which will be displayed near the guide. */ @@ -339,6 +349,8 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val lineColor: string; /** Line thickness. */ lineThickness: number; + /** Position of guide label. Possible values are "left" or "right" for horizontal axis and "top" or "bottom" for vertical axis. */ + position: string; /** Tick length. */ tickLength: number; /** Radar chart only. Specifies angle at which guide should end. Affects only fills, not lines. */ @@ -351,6 +363,8 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val toValue: number; /** Value of the guide (in case the guide is for value axis). */ value: number; + /** Value axis of a guide. As you can add guides directly to the chart, you might need to specify which which value axis should be used. */ + valueAxis: ValueAxis; } /** ImagesSettings is a class which holds common settings of all MapImage objects. */ class ImagesSettings { @@ -381,7 +395,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val /** Font size of a label. @default 11 */ - labelFontSize: number; + labelfontSize: string; /** Position of the label. Allowed values are: left, right, top, bottom and middle. right */ labelPosition: string; /** Label roll-over color. #00CC00 */ @@ -546,7 +560,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val /** Hides event bullets. */ hideStockEvents(); /** Removes event listener from the object. */ - removeListener(obj, type, handler); + removeListener(obj: any, type: string, handler: any); /** Removes panel from the stock chart. Requires stockChart.validateNow() method to be called after this action. */ removePanel(panel: StockPanel); /** Shows event bullets. */ @@ -556,7 +570,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val /** Method which forces the stock chart to rebuild. Should be called after properties are changed. */ validateNow(); /** Zooms chart to specified dates. startDate, endDate - Date objects. */ - zoom(startDate, endDate); + zoom(startDate: Date, endDate: Date); /** Zooms out the chart. */ zoomOut(); @@ -716,7 +730,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val */ equalWidths: boolean; /** Font size. Will use chart's font size if not set. */ - fontSize: number; + fontSize: string; /** Horizontal space between legend item and left/right border. */ horizontalGap: number; /** The text which will be displayed in the legend. Tag [[title]] will be replaced with the title of the graph. [[title]] */ @@ -886,8 +900,17 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val /** AmChart is a base class of all charts. It can not be instantiated explicitly. AmCoordinateChart, AmPieChart and AmMap extend AmChart class. */ class AmChart { /** used when constructing a chart with a theme */ - constructor(theme: any); - /** Background color. You should set backgroundAlpha to >0 value in order background to be visible. We recommend setting background color directly on a chart's DIV instead of using this property. #FFFFFF */ + constructor(theme?: any); + /** Specifies, if class names should be added to chart elements. */ + addClassNames: boolean; + /** Array of Labels. Example of label object, with all possible properties: +{"x": 20, "y": 20, "text": "this is label", "align": "left", "size": 12, "color": "#CC0000", "alpha": 1, "rotation": 0, "bold": true, "url": "http://www.amcharts.com"} */ + allLabels: Label[]; + /** Set this to false if you don't want chart to resize itself whenever its parent container size changes. */ + autoResize: boolean; + /** Opacity of background. Set it to >0 value if you want backgroundColor to work. However we recommend changing div's background-color style for changing background color. */ + backgroundAlpha: number; + /** Background color. You should set backgroundAlpha to >0 value in order background to be visible. We recommend setting background color directly on a chart's DIV instead of using this property. #FFFFFF */ backgroundColor: string; /** The chart creates AmBalloon class itself. If you want to customize balloon, get balloon instance using this property, and then change balloon's properties. AmBalloon */ balloon: AmBalloon; @@ -895,32 +918,83 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val borderAlpha: number; /** Color of chart's border. You should set borderAlpha >0 in order border to be visible. We recommend setting border color directly on a chart's DIV instead of using this property. #000000 */ borderColor: string; + /** This prefix is added to all class names which are added to all visual elements of a chart in case addClassNames is set to true. */ + classNamePrefix: string; /** Text color. #000000 */ color: string; + /** Non-commercial version only. Specifies position of link to amCharts site. Allowed values are: top-left, top-right, bottom-left and bottom-right. + @default 'top-left' + */ + creditsPosition: string; /** Array of data objects, for example: [{country:"US", value:524},{country:"UK", value:624},{country:"Lithuania", value:824}]. You can have any number of fields and use any field names. In case of AmMap, data provider should be MapData object. */ dataProvider: any[]; + /** Decimal separator. + @Default . */ + decimalSeparator: string; + /** Using this property you can add any additional information to SVG, like SVG filters or clip paths. The structure of this object should be identical to XML structure of a object you are adding, only in JSON format. */ + defs: any; + /** Export config. Specifies how export to image/data export/print/annotate menu will look and behave. You can find a lot of examples in amcharts/plugins/export folder. */ + export: ExportSettings; /** Font family. Verdana */ fontFamily: string; /** Font size. @default 11 */ - fontSize: number; - /** Height of a chart. "100%" means the chart's height will be equal to it's container's (DIV) height and will resize if height of the container changes. Set a number instead of percents if your chart's size needs to be fixed. - @default 1 + fontSize: string; + /** If you set this to true, the lines of the chart will be distorted and will produce hand-drawn effect. Try to adjust chart.handDrawScatter and chart.handDrawThickness properties for a more scattered result. + @Default false */ - height: any; + handDrawn: boolean; + /** Defines by how many pixels hand-drawn line (when handDrawn is set to true) will fluctuate. + @Default 2 + */ + handDrawScatter: number; + /** Defines by how many pixels line thickness will fluctuate (when handDrawn is set to true). + @Default 1 + */ + handDrawThickness: number; + /** Time, in milliseconds after which balloon is hidden if the user rolls-out of the object. Might be useful for AmMap to avoid balloon flickering while moving mouse over the areas. Note, this is not duration of fade-out. Duration of fade-out is set in AmBalloon class. + @Default 150 + */ + hideBalloonTime: number; + /** Legend of a chart. */ + legend: AmLegend; /** Reference to the div of the legend. */ legendDiv: HTMLElement; - /** Object with precision, decimalSeparator and thousandsSeparator set which will be used for number formatting. Precision set to -1 means that values won't be rounded. {precision:-1, decimalSeparator:'.', thousandsSeparator:','} */ - numberFormatter: Object; + /** You can add listeners of events using this property. Example: listeners = [{"event":"dataUpdated", "method":handleEvent}]; */ + listerns: Object[]; /** This setting affects touch-screen devices only. If a chart is on a page, and panEventsEnabled are set to true, the page won't move if the user touches the chart first. If a chart is big enough and occupies all the screen of your touch device, the user won’t be able to move the page at all. That's why the default value is "false". If you think that selecting/panning the chart or moving/pinching the map is a primary purpose of your users, you should set panEventsEnabled to true. */ panEventsEnabled: boolean; - /** Object with precision, decimalSeparator and thousandsSeparator set which will be used for formatting percent values. {precision:2, decimalSeparator:'.', thousandsSeparator:','} */ - percentFormatter: Object; + /** Specifies absolute or relative path to amCharts files, i.e. "amcharts/". (where all .js files are located) + If relative URLs are used, they will be relative to the current web page, displaying the chart. + You can also set path globally, using global JavaScript variable AmCharts_path. If this variable is set, and "path" is not set in chart config, the chart will assume the path from the global variable. This allows setting amCharts path globally. I.e.: + var AmCharts_path = "/libs/amcharts/"; + "path" parameter will be used by the charts to locate it's files, like images, plugins or patterns.*/ + path: string; + /** Specifies path to the folder where images like resize grips, lens and similar are. + IMPORTANT: Since V3.14.12, you should use "path" to point to amCharts directory instead. The "pathToImages" will be automatically set and does not need to be in the chart config, unless you keep your images separately from other amCharts files. */ + pathToImages: string; + /** Precision of percent values. -1 means percent values won't be rounded at all and show as they are. + @default 2 + */ + percentPrecision: number; + /** Precision of values. -1 means values won't be rounded at all and show as they are. + @Default 1*/ + precision: number; /** Prefixes which are used to make big numbers shorter: 2M instead of 2000000, etc. Prefixes are used on value axes and in the legend. To enable prefixes, set usePrefixes property to true. [{number:1e+3,prefix:"k"},{number:1e+6,prefix:"M"},{number:1e+9,prefix:"G"},{number:1e+12,prefix:"T"},{number:1e+15,prefix:"P"},{number:1e+18,prefix:"E"},{number:1e+21,prefix:"Z"},{number:1e+24,prefix:"Y"}] */ prefixesOfBigNumbers: any[]; /** Prefixes which are used to make small numbers shorter: 2μ instead of 0.000002, etc. Prefixes are used on value axes and in the legend. To enable prefixes, set usePrefixes property to true. [{number:1e-24, prefix:"y"},{number:1e-21, prefix:"z"},{number:1e-18, prefix:"a"},{number:1e-15, prefix:"f"},{number:1e-12, prefix:"p"},{number:1e-9, prefix:"n"},{number:1e-6, prefix:"μ"},{number:1e-3, prefix:"m"}] */ prefixesOfSmallNumbers: any[]; + /** Theme of a chart. Config files of themes can be found in amcharts/themes/ folder. More info about using themes. */ + theme: string; + /** Thousands separator. + @default . + */ + thousandsSeparator: string; + /** Array of Title objects. */ + titles: Title[]; + /** Type of a chart. Required when creating chart using JSON. Possible types are: serial, pie, xy, radar, funnel, gauge, map, stock. */ + type: string; /** If true, prefixes will be used for big and small numbers. You can set arrays of prefixes via prefixesOfSmallNumbers and prefixesOfBigNumbers properties. */ usePrefixes: boolean; /** Read-only. Indicates current version of a script. */ @@ -938,7 +1012,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val bold - specifies if text is bold (true/false), url - url */ - addLabel(x: number, y: number, text: string, align: string, size, color: string, rotation, alpha: number, bold: boolean, url: string); + addLabel(x: number, y: number, text: string, align: string, size: number, color: string, rotation: number, alpha: number, bold: boolean, url: string); /** Adds a legend to the chart. By default, you don't need to create div for your legend, however if you want it to be positioned in some different way, you can create div anywhere you want and pass id or reference to your div as a second parameter. (NOTE: This method will not work on StockPanel.) @@ -955,7 +1029,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val addLegend(legend: AmLegend, legendDiv: HTMLElement); /** Adds title to the top of the chart. Pie, Radar positions are updated so that they won't overlap. Plot area of Serial/XY chart is also updated unless autoMargins property is set to false. You can add any number of titles - each of them will be placed in a new line. To remove titles, simply clear titles array: chart.titles = []; and call chart.validateNow() method. text - text of a title size - font size color - title color alpha - title opacity bold - boolean value indicating if title should be bold. */ - addTitle(text, size, color, alpha, bold); + addTitle(text: string, size: number, color: string, alpha: number, bold: boolean); /** Clears the chart area, intervals, etc. */ clear(); /** Removes all labels added to the chart. */ @@ -996,34 +1070,22 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val /** AmCoordinateChart is a base class of AmRectangularChart. It can not be instantiated explicitly. */ class AmCoordinateChart extends AmChart { + /** Read-only. Array, holding processed chart's data. */ + chartData: Object[]; /** Specifies the colors of the graphs if the lineColor of a graph is not set. It there are more graphs then colors in this array, the chart picks random color. @default ['#FF6600', '#FCD202', '#B0DE09', '#0D8ECF', '#2A0CD0', '#CD0D74', '#CC0000', '#00CC00', '#0000CC', '#DDDDDD', '#999999', '#333333', '#990000'] */ - colors: any[]; + colors: string[]; /** The array of graphs belonging to this chart. To add/remove graph use addGraph/removeGraph methods instead of adding/removing graphs directly to array. */ - graphs: any[]; - /** The opacity of plot area's border. - Value range is 0 - 1. + graphs: AmGraph[]; + /** Specifies if grid should be drawn above the graphs or below. Will not work properly with 3D charts. + @default false */ - plotAreaBorderAlpha: number; - /** The color of the plot area's border. - Note, the it is invisible by default, as plotAreaBorderAlpha default value is 0. - Set it to a value higher than 0 to make it visible. - @default #000000 - */ - plotAreaBorderColor: string; - /** Opacity of plot area. - Plural form is used to keep the same property names as our Flex charts'. - Flex charts can accept array of numbers to generate gradients. - Although you can set array here, only first value of this array will be used. - */ - plotAreaFillAlphas: number; - /** You can set both one color if you need a solid color or array of colors to generate gradients, for example: ["#000000", "#0000CC"] - @default #FFFFFF - */ - plotAreaFillColors: any; + gridAboveGraphs: boolean; + /** Instead of adding guides to the axes, you can push all of them to this array. In case guide has category or date defined, it will automatically will be assigned to the category axis. Otherwise to first value axis, unless you specify a different valueAxis for the guide. */ + guides: Guide[]; /** Specifies whether the animation should be sequenced or all objects should appear at once. @default true */ @@ -1053,6 +1115,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val /** Adds a graph to the chart. */ addGraph(graph: AmGraph); + /** Adds a legend to the chart. By default, you don't need to create div for your legend, however if you want it to be positioned in some different way, you can create div anywhere you want and pass id or reference to your div as a second parameter. (NOTE: This method will not work on StockPanel.) */ /** Adds value axis to the chart. One value axis is created automatically, so if you don't want to change anything or add more value axes, you don't need to add it. */ @@ -1186,16 +1249,16 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val startOnAxis: boolean; /** Number returns coordinate of a category. Works only if parseDates is false. If parseDates is true, use dateToCoordinate method. category - String */ - categoryToCoordinate(category); + categoryToCoordinate(category: string); /** date - Date object Returns Date of the coordinate, in case parseDates is set to true and equalSpacing is set to false. coordinate - Number */ - coordinateToDate(coordinate); + coordinateToDate(coordinate: number); /** Number Returns coordinate of the date, in case parseDates is set to true. if parseDates is false, use categoryToCoordinate method. date - Date object */ - dateToCoordinate(date); + dateToCoordinate(date: Date); /** Number Returns index of the category which is most close to specified coordinate. x - coordinate */ - xToIndex(x); + xToIndex(x: number); } /** ChartScrollbar class displays chart scrollbar. Supported by AmSerialChart and AmXYChart. @@ -1269,7 +1332,9 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val /** AmRectangularChart is a base class of AmSerialChart and AmXYChart. It can not be instantiated explicitly.*/ class AmRectangularChart extends AmCoordinateChart { - /** The angle of the 3D part of plot area. This creates a 3D effect (if the "depth3D" is > 0). */ + /** The angle of the 3D part of plot area. This creates a 3D effect (if the "depth3D" is > 0). + @default 0 + */ angle: number; /** Space left from axis labels/title to the chart's outside border, if autoMargins set to true. @default 10 @@ -1279,11 +1344,12 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val @default true */ autoMargins: boolean; - /** Chart cursor. */ + /** Cursor of a chart. */ chartCursor: ChartCursor; /** Chart scrollbar. */ chartScrollbar: ChartScrollbar; - /** The depth of the 3D part of plot area. This creates a 3D effect (if the "angle" is > 0). */ + /** The depth of the 3D part of plot area. This creates a 3D effect (if the "angle" is > 0). + @default 0*/ depth3D: number; /** Number of pixels between the container's bottom border and plot area. This space can be used for bottom axis' values. If autoMargin is true and bottom side has axis, this property is ignored. @default 20 @@ -1297,18 +1363,66 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val @default 20 */ marginRight: number; - /** Flag which should be set to false if you need margins to be recalculated on next chart.validateNow() call. */ + /** Flag which should be set to false if you need margins to be recalculated on next chart.validateNow() call. + @default false + */ marginsUpdated: boolean; /** Number of pixels between the container's top border and plot area. This space can be used for top axis' values. If autoMargin is true and top side has axis, this property is ignored. @default 20 */ marginTop: number; + /** The opacity of plot area's border. Value range is 0 - 1. + @default 0 + */ + plotAreaBorderAlpha: number; + /** The color of the plot area's border. Note, the it is invisible by default, as plotAreaBorderAlpha default value is 0. Set it to a value higher than 0 to make it visible. + @default '#000000'*/ + plotAreaBorderColor: string; + /** Opacity of plot area. Plural form is used to keep the same property names as our Flex charts'. Flex charts can accept array of numbers to generate gradients. Although you can set array here, only first value of this array will be used. + @default 0 + */ + plotAreaFillAlphas: number; + /** You can set both one color if you need a solid color or array of colors to generate gradients, for example: ["#000000", "#0000CC"] + @default '#FFFFFF' + */ + plotAreaFillColors: any; + /** If you are using gradients to fill the plot area, you can use this property to set gradient angle. The only allowed values are horizontal and vertical: 0, 90, 180, 270. + @default 0 + */ + plotAreaGradientAngle: number; /** Array of trend lines added to a chart. You can add trend lines to a chart using this array or access already existing trend lines */ - trendLines: any[]; - /** It's a simple object containing information about zoom-out button. Other available properties of this object are fontSize and color. color specifies text color of a button. {backgroundColor:'#b2e1ff',backgroundAlpha:1} */ - zoomOutButton: Object; + trendLines: TrendLine[]; + /** Opacity of zoom-out button background. + @default 0 + */ + zoomOutButtonAlpha: number; + /** Zoom-out button background color. + @default '#e5e5e5' + */ + zoomOutButtonColor: string; + /** Name of zoom-out button image. In the images folder there is another lens image, called lensWhite.png. You might want to have white lens when background is dark. Or you can simply use your own image. + @default lens.png + */ + zoomOutButtonImage: string; + /** Size of zoom-out button image + @default: 17 + */ + zoomOutButtonImageSize: number; + /** Padding around the text and image. + @default: 8 + */ + zoomOutButtonPadding: number; + /** Opacity of zoom-out button background when mouse is over it. + @default: 1 + */ + zoomOutButtonRollOverAlpha: number; /** Text in the zoom-out button. Show all */ zoomOutText: string; + + /** Adds a ChartCursor object to a chart */ + addChartCursor(cursor: ChartCursor); + /** Adds a ChartScrollbar to a chart */ + addChartScrollbar(scrollbar: ChartScrollbar); /** Adds a TrendLine to a chart. You should call chart.validateNow() after this method is called in order the trend line to be visible. */ addTrendLine(trendLine: TrendLine); @@ -1318,7 +1432,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val removeChartScrollbar(); /** Removes a trend line from a chart. You should call chart.validateNow() in order the changes to be visible. */ - removeTrendLine; + removeTrendLine(trendLine: TrendLine); } /* Trend lines are straight lines indicating trends, might also be used for some different purposes. Can be used by Serial and XY charts. To add/remove trend line, use chart.addTrendLine(trendLine)/chart.removeTrendLine(trendLine) methods or simply pass array of trend lines: chart.trendLines = [trendLine1, trendLine2]. @@ -1395,7 +1509,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val /** Hides cursor. */ hideCursor(); /** You can force cursor to appear at specified cateogry or date. */ - showCursorAt(category); + showCursorAt(category: string); /** Adds event listener of the type "changed" to the object. @param type Always "changed". @param handler Dispatched when cursor position is changed. "index" is a series index over which chart cursors currently is. "zooming" specifies if user is currently zooming (is selecting) the chart. mostCloseGraph property is set only when oneBalloonOnly is set to true.*/ @@ -1439,20 +1553,26 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val chart.write("chartdiv"); */ class AmSerialChart extends AmRectangularChart { - /** Read-only. Chart creates category axis itself. If you want to change some properties, you should get this axis from the chart and set properties to this object. */ + /** Date format of the graph balloon (if chart parses dates and you don't use chartCursor). + @default 'MMM DD, YYYY' + */ + balloonDateFormat: string; + /** Read-only. Chart creates category axis itself. If you want to change some properties, you should get this axis from the chart and set properties to this object. */ categoryAxis: CategoryAxis; /** Category field name tells the chart the name of the field in your dataProvider object which will be used for category axis values. */ categoryField: string; - /** Read-only. Array of SerialDataItem objects generated from dataProvider. */ - chartData: any[]; /** The gap in pixels between two columns of the same category. @default 5 */ columnSpacing: number; - /** Relative width of columns. Value range is 0 - 1. 0.8 */ + /** Space between 3D stacked columns. + @default 0 + */ + columnSpacing3D: number; + /** Relative width of columns. Value range is 0 - 1. + @default 0.8 + */ columnWidth: number; - /** Array holding chart's data. */ - dataProvider: any[]; /** Read-only. If category axis parses dates endDate indicates date to which the chart is currently displayed. */ endDate: Date; /** Read-only. Category index to which the chart is currently displayed. */ @@ -1461,8 +1581,14 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val maxSelectedSeries: number; /** The longest time span allowed to select (in milliseconds) for example, 259200000 will limit selection to 3 days. */ maxSelectedTime: number; - /** The shortest time span allowed to select (in milliseconds) for example, 1000 will limit selection to 1 second. */ + /** The shortest time span allowed to select (in milliseconds) for example, 1000 will limit selection to 1 second. + @default 0 + */ minSelectedTime: number; + /** Specifies if scrolling of a chart with mouse wheel is enabled. If you press shift while rotating mouse wheel, the chart will zoom-in/out. */ + mouseWheelScrollEnabled: boolean; + /** Specifies if zooming of a chart with mouse wheel is enabled. If you press shift while rotating mouse wheel, the chart will scroll. */ + mouseWheelZoomEnabled: boolean; /** If you set this to true, the chart will be rotated by 90 degrees (the columns will become bars). */ rotate: boolean; /** Read-only. If category axis parses dates startDate indicates date from which the chart is currently displayed. */ @@ -1475,15 +1601,15 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val zoomOutOnDataUpdate: boolean; /** Number Returns index of the specified category value. value - series (category value) which index you want to find. */ - getCategoryIndexByValue(value); + getCategoryIndexByValue(value: number); /** Zooms out, charts shows all available data. */ zoomOut(); /** Zooms the chart by the value of the category axis. start - category value, String \\ end - category value, String */ - zoomToCategoryValues(start, end); + zoomToCategoryValues(start: Date, end: Date); /** Zooms the chart from one date to another. start - start date, Date object \\ end - end date, Date object */ - zoomToDates(start, end); + zoomToDates(start: Date, end: Date); /** Zooms the chart by the index of the category. start - start index, Number \\ end - end index, Number */ - zoomToIndexes(start, end); + zoomToIndexes(start: Date, end: Date); } class PeriodSelector { @@ -1522,7 +1648,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val . @param handler - Dispatched when dates in period selector input fields are changed or user clicks on one of the predefined period buttons. */ - addListener(type, handler: (e: { + addListener(type: string, handler: (e: { /** Always: "changed" */ type: string; @@ -1695,6 +1821,31 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val urlTarget: string; } + /** Creates a label on the chart which can be placed anywhere, multiple can be assigned. */ + class Label { + /** @Default 'left' */ + align: string; + /** @Default 1 */ + alpha: number; + /** Specifies if label is bold or not. */ + bold: boolean; + /** Color of a label */ + color: string; + /** Unique id of a Label. You don't need to set it, unless you want to. */ + id: string; + /** Rotation angle. */ + rotation: number; + /** Text size */ + size: number; + /** Text of a label */ + text: string; + /** URL which will be access if user clicks on a label. */ + url: string; + /** X position of a label. */ + x: number|string; + /** y position of a label. */ + y: number|string; + } /** Common settings of legends. If you change a property after the chart is initialized, you should call stockChart.validateNow() method in order for it to work. If there is no default value specified, default value of StockLegend class will be used. */ class LegendSettings { /** Alignment of legend entries. Possible values are: "left", "right" and "center". */ @@ -1807,7 +1958,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val /** Balloon background color. Usually balloon background color is set by the chart. Only if "adjustBorderColor" is "true" this color will be used. #CC0000 */ fillColor: string; /** Size of text in the balloon. Chart's fontSize is used by default. */ - fontSize: number; + fontSize: string; /** Horizontal padding of the balloon. @default 8 3*/ @@ -1865,7 +2016,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val /** Fill color. Every second space between grid lines can be filled with color. Set fillAlpha to a value greater than 0 to see the fills. */ fillColor: string; /** Text size. */ - fontSize: number; + fontSize: string; /** Opacity of grid lines. */ gridAlpha: number; /** Color of grid lines. */ @@ -1945,7 +2096,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val */ enabled: boolean; /** Font size. */ - fontSize: number; + fontSize: string; /** Specifies which graph will be displayed in the scrollbar. */ graph: AmGraph; /** Graph fill opacity. */ @@ -2004,6 +2155,8 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val alphaField: string; /** Value balloon color. Will use graph or data item color if not set. */ balloonColor: string; + /** If you set some function, the graph will call it and pass GraphDataItem and AmGraph object to it. This function should return a string which will be displayed in a balloon. */ + balloonFunction(graphDataItem: GraphDataItem, amGraph: AmGraph): string; /** Balloon text. You can use tags like [[value]], [[description]], [[percents]], [[open]], [[category]] [[value]] */ balloonText: string; /** Specifies if the line graph should be placed behind column graphs */ @@ -2069,7 +2222,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val /** You can set another graph here and if fillAlpha is >0, the area from this graph to fillToGraph will be filled (instead of filling the area to the X axis). */ fillToGraph: AmGraph; /** Size of value labels text. Will use chart's fontSize if not set. */ - fontSize: number; + fontSize: string; /** Orientation of the gradient fills (only for "column" graph type). Possible values are "vertical" and "horizontal". vertical */ gradientOrientation: string; /** Specifies whether the graph is hidden. Do not use this to show/hide the graph, use hideGraph(graph) and showGraph(graph) methods instead. */ @@ -2193,7 +2346,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val /** Fill color. Every second space between grid lines can be filled with color. Set fillAlpha to a value greater than 0 to see the fills. #FFFFFF */ fillColor: string; /** Size of value labels text. Will use chart's fontSize if not set. */ - fontSize: number; + fontSize: string; /** Opacity of grid lines. 0.2 */ gridAlpha: number; /** Color of grid lines. #000000 */ @@ -2247,7 +2400,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val /** Color of axis title. Will use text color of chart if not set any. */ titleColor: string; /** Font size of axis title. Will use font size of chart plus two pixels if not set any. */ - titleFontSize: number; + titlefontSize: string; /** Adds guide to the axis. */ addGuide(guide:Guide); @@ -2269,24 +2422,43 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val durationUnits: Object; /** Radar chart only. Possible values are: "polygons" and "circles". Set "circles" for polar charts. polygons */ gridType: string; + /** Unique id of value axis. It is not required to set it, unless you need to tell the graph which exact value axis it should use. */ + id: string; /** Specifies whether guide values should be included when calculating min and max of the axis. */ includeGuidesInMinMax: boolean; /** If true, the axis will include hidden graphs when calculating min and max values. */ includeHidden: boolean; /** Specifies whether values on axis can only be integers or both integers and doubles. */ integersOnly: boolean; + /** You can use this function to format Value axis labels. This function is called and these parameters are passed: labelFunction(value, valueText, valueAxis); +Where value is numeric value, valueText is formatted string and valueAxis is a reference to valueAxis object. + +If axis type is "date", labelFunction will pass different arguments: +labelFunction(valueText, date, valueAxis) + +Your function should return string.*/ + labelFunction(value: number, valueText: string, valueAxis: ValueAxis): string; + labelFunction(valueText: string, data: Date, valueAxis: ValueAxis): string; /** Specifies if this value axis' scale should be logarithmic. */ logarithmic: boolean; /** Read-only. Maximum value of the axis. */ max: number; /** If you don't want max value to be calculated by the chart, set it using this property. This value might still be adjusted so that it would be possible to draw grid at rounded intervals. */ maximum: number; + /** If your value axis is date-based, you can specify maximum date of the axis. Can be set as date object, timestamp number or string if dataDateFormat is set. */ + maximumData: Date; /** Read-only. Minimum value of the axis. */ min: number; /** If you don't want min value to be calculated by the chart, set it using this property. This value might still be adjusted so that it would be possible to draw grid at rounded intervals. */ minimum: number; + /** If your value axis is date-based, you can specify minimum date of the axis. Can be set as date object, timestamp number or string if dataDateFormat is set. */ + minimumDate: Date; /** If set value axis scale (min and max numbers) will be multiplied by it. I.e. if set to 1.2 the scope of values will increase by 20%. */ minMaxMultiplier: number; + /** Works with radar charts only. If you set it to “middle”, labels and data points will be placed in the middle between axes. */ + pointPosition: string; + /** Possible values are: "top", "bottom", "left", "right". If axis is vertical, default position is "left". If axis is horizontal, default position is "bottom". */ + position: string; /** Precision (number of decimals) of values. */ precision: number; /** Radar chart only. Specifies if categories (axes' titles) should be displayed near axes) @@ -2301,10 +2473,22 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val stackType: string; /** Read-only. Value difference between two grid lines. */ step: number; + /** If you set minimum and maximum for your axis, chart adjusts them so that grid would start and end on the beginning and end of plot area and grid would be at equal intervals. If you set strictMinMax to true, the chart will not adjust minimum and maximum of value axis. */ + strictMinMax: boolean; /** In case you synchronize one value axis with another, you need to set the synchronization multiplier. Use synchronizeWithAxis method to set with which axis it should be synced. */ synchronizationMultiplier: number; + /** One value axis can be synchronized with another value axis. You can use both reference to your axis or id of the axis here. You should set synchronizationMultiplyer in order for this to work. */ + synchronizeWith: ValueAxis; /** If this value axis is stacked and has columns, setting valueAxis.totalText = "[[total]]" will make it to display total value above the most-top column. */ totalText: string; + /** Color of total text. */ + totalTextColor: string; + /** Distance from data point to total text. */ + totalTextOffset: number; + /** This allows you to have logarithmic value axis and have zero values in the data. You must set it to >0 value in order to work. */ + treatZeroAs: number; + /** Type of value axis. If your values in data provider are dates and you want this axis to show dates instead of numbers, set it to "date". */ + type: string; /** Unit which will be added to the value label. */ unit: string; /** Position of the unit. Possible values are "left" and "right". right */ @@ -2314,20 +2498,23 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val /** If true, values will always be formatted using scientific notation (5e+8, 5e-8...) Otherwise only values bigger then 1e+21 and smaller then 1e-7 will be displayed in scientific notation. */ useScientificNotation: boolean; + /** Adds guide to the axis. */ + addGuide(guide: Guide); /** Adds event listener to the object. type - string like 'axisChanged' (should be listed in 'events' section of this class or classes which extend this class). handler - function which is called when event happens */ - addListener(type, handler); + addListener(type: string, handler: any); /** Number, - value of coordinate. Returns value of the coordinate. coordinate - y or x coordinate, in pixels. */ - coordinateToValue(coordinate); + coordinateToValue(coordinate: number); /** Number - coordinate Returns coordinate of the value in pixels. value - Number */ - getCoordinate(value); - + getCoordinate(value: number); + /** Removes guide from the axis.*/ + removeGuide(guide: Guide); /** Removes event listener from the object. */ - removeListener(obj, type, handler); + removeListener(obj: any, type: string, handler: any); /** One value axis can be synchronized with another value axis. You should set synchronizationMultiplyer in order for this to work. */ synchronizeWithAxis(axis:ValueAxis); /** XY Chart only. Zooms-in the axis to the provided values. */ - zoomToValues(startValue, endValue); + zoomToValues(startValue: number, endValue: number); /** Adds event listener of the type "axisZoomed" to the object. @param type Always "axisZoomed". @@ -2347,4 +2534,25 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val /** Removes event listener from chart object. */ removeListener(chart: AmChart, type: string, handler: any); } -} + + class Title { + /** @default 1 */ + alpha: number; + /** Specifies if the tile is bold or not. + @default false*/ + bold: boolean; + /** Text color of a title. */ + color: string; + /** Unique id of a Title. You don't need to set it, unless you want to. */ + id: string; + /** Text size */ + size: number; + /** Text of a label */ + text: string; + } + class ExportSettings { + enabled: boolean; + libs: Object; + menu: Object; + } +} \ No newline at end of file diff --git a/amplify-deferred/amplify-deferred-tests.ts b/amplify-deferred/amplify-deferred-tests.ts new file mode 100644 index 0000000000..957941cd29 --- /dev/null +++ b/amplify-deferred/amplify-deferred-tests.ts @@ -0,0 +1,265 @@ +/// +/// + +// Copied examples directly from AmplifyJs site + +// Subscribe and publish with no data + +amplify.subscribe("nodataexample", function () { + alert("nodataexample topic published!"); +}); + +// Subscribe and publish with data + +amplify.publish("nodataexample"); + +amplify.subscribe("dataexample", function (data) { + alert(data.foo); // bar +}); + + +amplify.publish("dataexample", { foo: "bar" }); + +amplify.subscribe("dataexample2", function (param1, param2) { + alert(param1 + param2); // barbaz +}); + +//... + +amplify.publish("dataexample2", "bar", "baz"); + +// Subscribe and publish with context and data + +amplify.subscribe("datacontextexample", $("p:first"), function (data) { + this.text(data.exampleText); // first p element would have "foo bar baz" as text +}); + +amplify.publish("datacontextexample", { exampleText: "foo bar baz" }); + +// Subscribe to a topic with high priority + +amplify.subscribe("priorityexample", function (data) { + alert(data.foo); +}); + +amplify.subscribe("priorityexample", function (data) { + if (data.foo === "oops") { + return false; + } +}, 1); + + +// Store data with amplify storage picking the default storage technology: + +amplify.publish("priorityexample", { foo: "bar" }); +amplify.publish("priorityexample", { foo: "oops" }); + +amplify.store("storeExample1", { foo: "bar" }); +amplify.store("storeExample2", "baz"); +// retrieve the data later via the key +var myStoredValue = amplify.store("storeExample1"), + myStoredValue2 = amplify.store("storeExample2"), + myStoredValues = amplify.store(); +myStoredValue.foo; // bar +myStoredValue2; // baz +myStoredValues.storeExample1.foo; // bar +myStoredValues.storeExample2; // baz + +// Store data explicitly with session storage + +amplify.store.sessionStorage("explicitExample", { foo2: "baz" }); +// retrieve the data later via the key +var myStoredValue2 = amplify.store.sessionStorage("explicitExample"); +myStoredValue2.foo2; // baz + + +// REQUEST + +// Set up and use a request utilizing Ajax + + +amplify.request.define("ajaxExample1", "ajax", { + url: "/myApiUrl", + dataType: "json", + type: "GET" +}); + +// later in code +amplify.request("ajaxExample1", function (data) { + data.foo; // bar +}); + +// Set up and use a request utilizing Ajax and Caching + +amplify.request.define("ajaxExample2", "ajax", { + url: "/myApiUrl", + dataType: "json", + type: "GET", + cache: "persist" +}); + +// later in code +amplify.request("ajaxExample2", function (data) { + data.foo; // bar +}); + +// a second call will result in pulling from the cache +amplify.request("ajaxExample2", function (data) { + data.baz; // qux +}) + +// Set up and use a RESTful request utilizing Ajax + +amplify.request.define("ajaxRESTFulExample", "ajax", { + url: "/myRestFulApi/{type}/{id}", + type: "GET" +}) + +// later in code +amplify.request("ajaxRESTFulExample", + { + type: "foo", + id: "bar" + }, + function (data) { + // /myRESTFulApi/foo/bar was the URL used + data.foo; // bar + } + ); + +// POST data with Ajax + +amplify.request.define("ajaxPostExample", "ajax", { + url: "/myRestFulApi", + type: "POST" +}) + +// later in code +amplify.request("ajaxPostExample", + { + type: "foo", + id: "bar" + }, + function (data) { + data.foo; // bar + } + ); +// Using data maps + +// When searching Twitter, the key for the search phrase is q.If we want a more descriptive name, such as term, we can use a data map: + +amplify.request.define("twitter-search", "ajax", { + url: "http://search.twitter.com/search.json", + dataType: "jsonp", + dataMap: { + term: "q" + } +}); + +amplify.request("twitter-search", { term: "amplifyjs" }); + +// Similarly, we can create a request that searches for mentions, by accepting a username: + +amplify.request.define("twitter-mentions", "ajax", { + url: "http://search.twitter.com/search.json", + dataType: "jsonp", + dataMap: function (data) { + return { + q: "@" + data.user + }; + } +}); + +amplify.request("twitter-mentions", { user: "amplifyjs" }); + +// Setting up and using decoders + +//Example: + +var appEnvelopeDecoder: amplifyDecoder = function (data, status, xhr, success, error) { + if (data.status === "success") { + success(data.data); + } else if (data.status === "fail" || data.status === "error") { + error(data.message, data.status); + } else { + error(data.message, "fatal"); + } +}; + +//a new decoder can be added to the amplifyDecoders interface +interface amplifyDecoders { + appEnvelope: amplifyDecoder; +} + +amplify.request.decoders.appEnvelope = appEnvelopeDecoder; + +//but you can also just add it via an index +amplify.request.decoders['appEnvelopeStr'] = appEnvelopeDecoder; + + +amplify.request.define("decoderExample", "ajax", { + url: "/myAjaxUrl", + type: "POST", + decoder: "appEnvelope" +}); + +amplify.request({ + resourceId: "decoderExample", + success: function (data) { + data.foo; // bar + }, + error: function (message, level) { + alert("always handle errors with alerts."); + } +}); + +// POST with caching and single - use decoder + +// Example: + +amplify.request.define("decoderSingleExample", "ajax", { + url: "/myAjaxUrl", + type: "POST", + decoder: function (data, status, xhr, success, error) { + if (data.status === "success") { + success(data.data); + } else if (data.status === "fail" || data.status === "error") { + error(data.message, data.status); + } else { + error(data.message, "fatal"); + } + } +}); + +amplify.request({ + resourceId: "decoderSingleExample", + success: function (data) { + data.foo; // bar + }, + error: function (message, level) { + alert("always handle errors with alerts."); + } +}); +// Handling Status +// Status in Success and Error Callbacks + +// amplify.request comes with built in support for status.The status parameter appears in the default success or error callbacks when using an ajax definition. + +amplify.request.define("statusExample1", "ajax", { + //... +}); + +amplify.request({ + resourceId: "statusExample1", + success: function (data, status) { + }, + error: function (data, status) { + } +}); + +amplify.request({ + resourceId: "statusExample1" +}).done(function (data, status) { +}).fail(function (data, status) { +}).always(function (data, status) { }); + diff --git a/socket.io/legacy/socket.io-0.9-tests.ts.tscparams b/amplify-deferred/amplify-deferred-tests.ts.tscparams similarity index 100% rename from socket.io/legacy/socket.io-0.9-tests.ts.tscparams rename to amplify-deferred/amplify-deferred-tests.ts.tscparams diff --git a/amplify-deferred/amplify-deferred.d.ts b/amplify-deferred/amplify-deferred.d.ts new file mode 100644 index 0000000000..11e6d05e0f --- /dev/null +++ b/amplify-deferred/amplify-deferred.d.ts @@ -0,0 +1,182 @@ +// Type definitions for AmplifyJs 1.1.0 using JQuery Deferred +// Project: http://amplifyjs.com/ +// Definitions by: Jonas Eriksson , Laurentiu Stamate +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +interface amplifyRequestSettings { + resourceId: string; + data?: any; + success?: (...args: any[]) => void; + error?: (...args: any[]) => void; +} + +interface amplifyDecoder { + ( + data?: any, + status?: string, + xhr?: JQueryXHR, + success?: (...args: any[]) => void, + error?: (...args: any[]) => void + ): void +} + +interface amplifyDecoders { + [decoderName: string]: amplifyDecoder; + jsSend: amplifyDecoder; +} + +interface amplifyAjaxSettings extends JQueryAjaxSettings { + cache?: any; + dataMap?: {} | ((data: any) => {}); + decoder?: any /* string or amplifyDecoder */; +} + +interface amplifyRequest { + + /*** + * Request a resource. + * resourceId: Identifier string for the resource. + * data: A set of key/value pairs of data to be sent to the resource. + * callback: A function to invoke if the resource is retrieved successfully. + */ + (resourceId: string, hash?: any, callback?: Function): JQueryPromise; + + /*** + * Request a resource. + * settings: A set of key/value pairs of settings for the request. + * resourceId: Identifier string for the resource. + * data (optional): Data associated with the request. + * success (optional): Function to invoke on success. + * error (optional): Function to invoke on error. + */ + (settings: amplifyRequestSettings): JQueryPromise; + + /*** + * Define a resource. + * resourceId: Identifier string for the resource. + * requestType: The type of data retrieval method from the server. See the request types sections for more information. + * settings: A set of key/value pairs that relate to the server communication technology. The following settings are available: + * Any settings found in jQuery.ajax(). + * cache: See the cache section for more details. + * decoder: See the decoder section for more details. + */ + define(resourceId: string, requestType: string, settings?: amplifyAjaxSettings): void; + + /*** + * Define a custom request. + * resourceId: Identifier string for the resource. + * resource: Function to handle requests. Receives a hash with the following properties: + * resourceId: Identifier string for the resource. + * data: Data provided by the user. + * success: Callback to invoke on success. + * error: Callback to invoke on error. + */ + define(resourceId: string, resource: (settings: amplifyRequestSettings) => void): void; + + decoders: amplifyDecoders; + cache: any; +} + +interface amplifySubscribe { + /*** + * Subscribe to a message. + * topic: Name of the message to subscribe to. + * callback: Function to invoke when the message is published. + */ + (topic: string, callback: Function): void; + /*** + * Subscribe to a message. + * topic: Name of the message to subscribe to. + * context: What this will be when the callback is invoked. + * callback: Function to invoke when the message is published. + * [priority]: Priority relative to other subscriptions for the same message. Lower values have higher priority. Default is 10. + */ + (topic: string, context: any, callback: Function, priority?: number): void; + /*** + * Subscribe to a message. + * topic: Name of the message to subscribe to. + * callback: Function to invoke when the message is published. + * [priority]: Priority relative to other subscriptions for the same message. Lower values have higher priority. Default is 10. + */ + (topic: string, callback: Function, priority?: number): void; +} +interface amplifyStorageTypeStore { + /*** + * Stores a value for a given key using the default storage type. + * + * key: Identifier for the value being stored. + * value: The value to store. The value can be anything that can be serialized as JSON. + * [options]: A set of key/value pairs that relate to settings for storing the value. + */ + (key: string, value: any, options?: any): void; + + /*** + * Gets a stored value based on the key. + */ + (key: string): any; + + /*** + * Gets a hash of all stored values. + */ + (): any; +} + +interface amplifyStore extends amplifyStorageTypeStore { + + /*** + * IE 8+, Firefox 3.5+, Safari 4+, Chrome, Opera 10.5+, iPhone 2+, Android 2+ + */ + localStorage: amplifyStorageTypeStore; + + /*** + * IE 8+, Firefox 2+, Safari 4+, Chrome, Opera 10.5+, iPhone 2+, Android 2+ + */ + sessionStorage: amplifyStorageTypeStore; + + /*** + * Firefox 2+ + */ + globalStorage: amplifyStorageTypeStore; + + /*** + * IE 5 - 7 + */ + userData: amplifyStorageTypeStore; + + /*** + * An in-memory store is provided as a fallback if none of the other storage types are available. + */ + memory: amplifyStorageTypeStore; + + +} + +interface amplifyStatic { + + subscribe: amplifySubscribe; + + /*** + * Remove a subscription. + * topic: The topic being unsubscribed from. + * callback: The callback that was originally subscribed. + */ + unsubscribe(topic: string, callback: Function): void; + + /*** + * Publish a message. + * topic: The name of the message to publish. + * Any additional parameters will be passed to the subscriptions. + * amplify.publish returns a boolean indicating whether any subscriptions returned false. The return value is true if none of the subscriptions returned false, and false otherwise. Note that only one subscription can return false because doing so will prevent additional subscriptions from being invoked. + */ + publish(topic: string, ...args: any[]): boolean; + + store: amplifyStore; + + request: amplifyRequest; + +} + +declare var amplify: amplifyStatic; + diff --git a/amplifyjs/amplifyjs.d.ts b/amplifyjs/amplifyjs.d.ts index 364845f3c4..961d815c60 100644 --- a/amplifyjs/amplifyjs.d.ts +++ b/amplifyjs/amplifyjs.d.ts @@ -29,6 +29,7 @@ interface amplifyDecoders { interface amplifyAjaxSettings extends JQueryAjaxSettings { cache?: any; + dataMap?: {} | ((data: any) => {}); decoder?: any /* string or amplifyDecoder */; } @@ -50,7 +51,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. diff --git a/amqplib/amqplib-tests.ts b/amqplib/amqplib-tests.ts new file mode 100644 index 0000000000..85763c9ee1 --- /dev/null +++ b/amqplib/amqplib-tests.ts @@ -0,0 +1,67 @@ +/// + +// promise api tests +import amqp = require("amqplib"); + +var msg = "Hello World"; + +// test promise api +amqp.connect("amqp://localhost") + .then(connection => { + return connection.createChannel() + .tap(channel => channel.checkQueue("myQueue")) + .then(channel => channel.sendToQueue("myQueue", new Buffer(msg))) + .ensure(() => connection.close()); + }); + +amqp.connect("amqp://localhost") + .then(connection => { + return connection.createChannel() + .tap(channel => channel.checkQueue("myQueue")) + .then(channel => channel.consume("myQueue", newMsg => console.log("New Message: " + newMsg.content.toString()))) + .ensure(() => connection.close()); + }); + +// test promise api properties +var amqpMessage: amqp.Message; +amqpMessage.properties.contentType = "application/json"; +var amqpAssertExchangeOptions: amqp.Options.AssertExchange; +var anqpAssertExchangeReplies: amqp.Replies.AssertExchange; + + +// callback api tests +import amqpcb = require("amqplib/callback_api"); + +amqpcb.connect("amqp://localhost", (err, connection) => { + if(!err) { + connection.createChannel((err, channel) => { + if (!err) { + channel.assertQueue("myQueue", {}, (err, ok) => { + if(!err) { + channel.sendToQueue("myQueue", new Buffer(msg)); + } + }); + } + }); + } +}); + +amqpcb.connect("amqp://localhost", (err, connection) => { + if(!err) { + connection.createChannel((err, channel) => { + if (!err) { + channel.assertQueue("myQueue", {}, (err, ok) => { + if(!err) { + channel.consume("myQueue", newMsg => console.log("New Message: " + newMsg.content.toString())); + } + }); + } + }); + } +}); + +// test callback api properties +var amqpcbMessage: amqpcb.Message; +amqpcbMessage.properties.contentType = "application/json"; +var amqpcbAssertExchangeOptions: amqpcb.Options.AssertExchange; +var anqpcbAssertExchangeReplies: amqpcb.Replies.AssertExchange; \ No newline at end of file diff --git a/amqplib/amqplib.d.ts b/amqplib/amqplib.d.ts new file mode 100644 index 0000000000..d03c46ed79 --- /dev/null +++ b/amqplib/amqplib.d.ts @@ -0,0 +1,218 @@ +// Type definitions for amqplib 0.3.x +// Project: https://github.com/squaremo/amqp.node +// Definitions by: Michael Nahkies , Ab Reitsma +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +/// + +declare module "amqplib/properties" { + module Replies { + interface Empty { + } + interface AssertQueue { + queue: string; + messageCount: number; + consumerCount: number; + } + interface PurgeQueue { + messageCount: number; + } + interface DeleteQueue { + messageCount: number; + } + interface AssertExchange { + exchange: string; + } + interface Consume { + consumerTag: string; + } + } + + module Options { + interface AssertQueue { + exclusive?: boolean; + durable?: boolean; + autoDelete?: boolean; + arguments?: any; + messageTtl?: number; + expires?: number; + deadLetterExchange?: string; + maxLength?: number; + } + interface DeleteQueue { + ifUnused?: boolean; + ifEmpty?: boolean; + } + interface AssertExchange { + durable?: boolean; + internal?: boolean; + autoDelete?: boolean; + alternateExchange?: string; + arguments?: any; + } + interface DeleteExchange { + ifUnused?: boolean; + } + interface Publish { + expiration?: string; + userId?: string; + CC?: string | string[]; + + mandatory?: boolean; + persistent?: boolean; + deliveryMode?: boolean | number; + BCC?: string | string[]; + + contentType?: string; + contentEncoding?: string; + headers?: any; + priority?: number; + correlationId?: string; + replyTo?: string; + messageId?: string; + timestamp?: number; + type?: string; + appId?: string; + } + interface Consume { + consumerTag?: string; + noLocal?: boolean; + noAck?: boolean; + exclusive?: boolean; + priority?: number; + arguments?: any; + } + interface Get { + noAck?: boolean; + } + } + + interface Message { + content: Buffer; + fields: any; + properties: any; + } +} + +declare module "amqplib" { + + import events = require("events"); + import when = require("when"); + import shared = require("amqplib/properties") + export import Replies = shared.Replies; + export import Options = shared.Options; + export import Message = shared.Message; + + interface Connection extends events.EventEmitter { + close(): when.Promise; + createChannel(): when.Promise; + createConfirmChannel(): when.Promise; + } + + interface Channel extends events.EventEmitter { + close(): when.Promise; + + assertQueue(queue: string, options?: Options.AssertQueue): when.Promise; + checkQueue(queue: string): when.Promise; + + deleteQueue(queue: string, options?: Options.DeleteQueue): when.Promise; + purgeQueue(queue: string): when.Promise; + + bindQueue(queue: string, source: string, pattern: string, args?: any): when.Promise; + unbindQueue(queue: string, source: string, pattern: string, args?: any): when.Promise; + + assertExchange(exchange: string, type: string, options?: Options.AssertExchange): when.Promise; + checkExchange(exchange: string): when.Promise; + + deleteExchange(exchange: string, options?: Options.DeleteExchange): when.Promise; + + bindExchange(destination: string, source: string, pattern: string, args?: any): when.Promise; + unbindExchange(destination: string, source: string, pattern: string, args?: any): when.Promise; + + publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish): boolean; + sendToQueue(queue: string, content: Buffer, options?: Options.Publish): boolean; + + consume(queue: string, onMessage: (msg: Message) => any, options?: Options.Consume): when.Promise; + + cancel(consumerTag: string): when.Promise; + get(queue: string, options?: Options.Get): when.Promise; + + ack(message: Message, allUpTo?: boolean): void; + ackAll(): void; + + nack(message: Message, allUpTo?: boolean, requeue?: boolean): void; + nackAll(requeue?: boolean): void; + reject(message: Message, requeue?: boolean): void; + + prefetch(count: number, global?: boolean): when.Promise; + recover(): when.Promise; + } + + function connect(url: string, socketOptions?: any): when.Promise; +} + +declare module "amqplib/callback_api" { + + import events = require("events"); + import shared = require("amqplib/properties") + export import Replies = shared.Replies; + export import Options = shared.Options; + export import Message = shared.Message; + + interface Connection extends events.EventEmitter { + close(callback?: (err: any) => void): void; + createChannel(callback: (err: any, channel: Channel) => void): void; + createConfirmChannel(callback: (err: any, confirmChannel: ConfirmChannel) => void): void; + } + + interface Channel extends events.EventEmitter { + close(callback: (err: any) => void): void; + + assertQueue(queue?: string, options?: Options.AssertQueue, callback?: (err:any, ok: Replies.AssertQueue) => void): void; + checkQueue(queue: string, callback?: (err: any, ok: Replies.AssertQueue) => void): void; + + deleteQueue(queue: string, options?: Options.DeleteQueue, callback?: (err:any, ok: Replies.DeleteQueue) => void): void; + purgeQueue(queue: string, callback?: (err:any, ok: Replies.PurgeQueue) => void): void; + + bindQueue(queue: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void; + unbindQueue(queue: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void; + + assertExchange(exchange: string, type: string, options?: Options.AssertExchange, callback?: (err: any, ok: Replies.AssertExchange) => void): void; + checkExchange(exchange: string, callback?: (err: any, ok: Replies.Empty) => void): void; + + deleteExchange(exchange: string, options?: Options.DeleteExchange, callback?: (err: any, ok: Replies.Empty) => void): void; + + bindExchange(destination: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void; + unbindExchange(destination: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void; + + publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish): boolean; + sendToQueue(queue: string, content: Buffer, options?: Options.Publish): boolean; + + consume(queue: string, onMessage: (msg: Message) => any, options?: Options.Consume, callback?: (err: any, ok: Replies.Consume) => void): void; + + cancel(consumerTag: string, callback?: (err: any, ok: Replies.Empty) => void): void; + get(queue: string, options?: Options.Get, callback?: (err: any, ok: Message | boolean) => void): void; + + ack(message: Message, allUpTo?: boolean): void; + ackAll(): void; + + nack(message: Message, allUpTo?: boolean, requeue?: boolean): void; + nackAll(requeue?: boolean): void; + reject(message: Message, requeue?: boolean): void; + + prefetch(count: number, global?: boolean): void; + recover(callback?: (err: any, ok: Replies.Empty) => void): void; + } + + interface ConfirmChannel extends Channel { + publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish, callback?: (err: any, ok: Replies.Empty) => void): boolean; + sendToQueue(queue: string, content: Buffer, options?: Options.Publish, callback?: (err: any, ok: Replies.Empty) => void): boolean; + + waitForConfirms(callback?: (err: any) => void): void; + } + + function connect(callback: (err: any, connection: Connection) => void): void; + function connect(url: string, callback: (err: any, connection: Connection) => void): void; + function connect(url: string, socketOptions: any, callback: (err: any, connection: Connection) => void): void; +} diff --git a/analytics-node/analytics-node-tests.ts b/analytics-node/analytics-node-tests.ts new file mode 100644 index 0000000000..57c48252ff --- /dev/null +++ b/analytics-node/analytics-node-tests.ts @@ -0,0 +1,91 @@ +/// + +var analytics: AnalyticsNode.Analytics; +import Analytics = require("analytics-node"); + +function testConfig(): void { + analytics = new Analytics('YOUR_WRITE_KEY', { + flushAt: 20, + flushAfter: 10000 + }); +} + +function testIdentify(): void { + analytics.identify({ + userId: '019mr8mf4r', + traits: { + name: 'Michael Bolton', + email: 'mbolton@initech.com', + plan: 'Enterprise', + friends: 42 + } + }); +} + +function testTrack(): void { + analytics.track({ + userId: '019mr8mf4r', + event: 'Purchased an Item', + properties: { + revenue: 39.95, + shippingMethod: '2-day' + } + }); +} + +function testPage(): void { + analytics.page({ + userId: '019mr8mf4r', + category: 'Docs', + name: 'Node.js Library', + properties: { + url: 'https://segment.com/docs/libraries/node', + path: '/docs/libraries/node/', + title: 'Node.js Library - Segment', + referrer: 'https://github.com/segmentio/analytics-node' + } + }); +} + +function testAlias(): void { + // the anonymous user does actions ... + analytics.track({ userId: 'anonymous_user', event: 'Anonymous Event' }) + // the anonymous user signs up and is aliased + analytics.alias({ previousId: 'anonymous_user', userId: 'identified@gmail.com' }) + // the identified user is identified + analytics.identify({ userId: 'identified@gmail.com', traits: { plan: 'Free' } }) + // the identified user does actions ... + analytics.track({ userId: 'identified@gmail.com', event: 'Identified Action' }) +} + +function testGroup(): void { + analytics.group({ + userId: '019mr8mf4r', + groupId: '56', + traits: { + name: 'Initech', + description: 'Accounting Software' + } + }); +} + +function testIntegrations(): void { + analytics.track({ + event: 'Upgraded Membershipt', + userId: '97234974', + integrations: { + 'All': false, + 'Vero': true, + 'Google Analytics': false + } + }); +} + +function testFlush(): void { + analytics.flush(); + analytics.flush(function(err, batch) { + if (err) { alert("Oh nos!"); } + else { console.log(batch.batch[0].type); } + }); +} + diff --git a/analytics-node/analytics-node.d.ts b/analytics-node/analytics-node.d.ts new file mode 100644 index 0000000000..d4376d83ea --- /dev/null +++ b/analytics-node/analytics-node.d.ts @@ -0,0 +1,83 @@ +// Type definitions for Segment's analytics.js for Node.js +// Project: https://segment.com/docs/libraries/node/ +// Definitions by: Andrew Fong +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module AnalyticsNode { + + interface Integrations { + [index: string]: boolean; + } + + export class Analytics { + constructor(writeKey: string, opts?: { + flushAt?: number, + flushAfter?: number + }); + + /* The identify method lets you tie a user to their actions and record + traits about them. */ + identify(message: { + userId: string | number; + traits?: Object; + timestamp?: Date; + context?: Object; + integrations?: Integrations; + }): Analytics; + + /* The track method lets you record the actions your users perform. */ + track(message: { + userId: string | number; + event: string; + properties?: Object; + timestamp?: Date; + context?: Object; + integrations?: Integrations; + }): Analytics; + + /* The page method lets you record page views on your website, along with + optional extra information about the page being viewed. */ + page(message: { + userId: string | number; + category?: string; + name?: string; + properties?: Object; + timestamp?: Date; + context?: Object; + integrations?: Integrations; + }): Analytics; + + /* alias is how you associate one identity with another. */ + alias(message: { + previousId: string | number; + userId: string | number; + integrations?: Integrations; + }): Analytics; + + /* Group calls can be used to associate individual users with shared + accounts or companies. */ + group(message: { + userId: string | number; + groupId: string | number; + traits?: Object; + context?: Object; + timestamp?: Date; + anonymous_id?: string | number; + integrations?: Integrations; + }): Analytics; + + /* Flush batched calls to make sure nothing is left in the queue */ + flush(fn?: (err: Error, batch: { + batch: Array<{ + type: string; + }>; + messageId: string; + sentAt: Date; + timestamp: Date; + }) => void): Analytics; + } +} + +declare module "analytics-node" { + export = AnalyticsNode.Analytics; +} diff --git a/angular-dialog-service/angular-dialog-service-tests.ts b/angular-dialog-service/angular-dialog-service-tests.ts new file mode 100644 index 0000000000..8142a3a713 --- /dev/null +++ b/angular-dialog-service/angular-dialog-service-tests.ts @@ -0,0 +1,16 @@ +/// + + +var options : angular.dialogservice.IDialogOptions = {}; +options.animation = true; +options.backdrop = true; +options.keyboard = true; +options.backdropClass = "some-css-class"; +options.windowClass = "some-css-class"; +options.size = 'md'; + +var dialogs : angular.dialogservice.IDialogService; +dialogs.error('Error','An unknown error occurred preventing the completion of the requested action.'); +dialogs.wait('Creating User','Please wait while we attempt to create user "Michael Conroy."

This should only take a moment.',50); +dialogs.notify('Something Happened','Something happened at this point in the application that I wish to let you know about'); +dialogs.create('url/to/a/template','ctrlrToUse',{},{}); diff --git a/angular-dialog-service/angular-dialog-service.d.ts b/angular-dialog-service/angular-dialog-service.d.ts new file mode 100644 index 0000000000..38ce8589e4 --- /dev/null +++ b/angular-dialog-service/angular-dialog-service.d.ts @@ -0,0 +1,82 @@ +// Type definitions for Angular Dialog Service 5.2.8 +// Project: https://github.com/m-e-conroy/angular-dialog-service +// Definitions by: William Comartin +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +/// + +declare module angular.dialogservice { + + interface IDialogOptions { + /** + * Set to false to disable animations on new modal/backdrop. Does not toggle animations for modals/backdrops that are already displayed. + * + * @default false + */ + animation?: boolean; + + /** + * controls the presence of a backdrop + * Allowed values: + * - true (default) + * - false (no backdrop) + * - 'static' backdrop is present but modal window is not closed when clicking outside of the modal window + * + * @default true + */ + backdrop?: boolean | string; + + /** + * indicates whether the dialog should be closable by hitting the ESC key + * + * @default true + */ + keyboard?: boolean; + + /** + * additional CSS class(es) to be added to a modal backdrop template + * + * @default 'dialogs-backdrop-default' + */ + backdropClass?: string; + + /** + * additional CSS class(es) to be added to a modal window template + * + * @default 'dialogs-default' + */ + windowClass?: string; + + /** + * Optional suffix of modal window class. The value used is appended to the `modal-` class, i.e. a value of `sm` gives `modal-sm`. + * + * @default 'lg' + */ + size?: string; + } + + interface IDialogService { + /** + * Opens a new error modal instance. + */ + error(header: string, msg: string, opts?: IDialogOptions): ng.ui.bootstrap.IModalServiceInstance + /** + * Opens a new wait modal instance. + */ + wait(header: string, msg: string, progress: number, opts?: IDialogOptions): ng.ui.bootstrap.IModalServiceInstance + /** + * Opens a new notify modal instance. + */ + notify(header: string, msg: string, opts?: IDialogOptions): ng.ui.bootstrap.IModalServiceInstance + /** + * Opens a new confirm modal instance. + */ + confirm(header: string, msg: string, opts?: IDialogOptions): ng.ui.bootstrap.IModalServiceInstance + /** + * Opens a new custom modal instance. + */ + create(url: string, ctrlr: string, data: any, opts?: IDialogOptions): ng.ui.bootstrap.IModalServiceInstance + } + +} diff --git a/angular-dynamic-locale/angular-dynamic-locale-tests.ts b/angular-dynamic-locale/angular-dynamic-locale-tests.ts new file mode 100644 index 0000000000..a42d0c4460 --- /dev/null +++ b/angular-dynamic-locale/angular-dynamic-locale-tests.ts @@ -0,0 +1,23 @@ +/// +/// + +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); diff --git a/angular-dynamic-locale/angular-dynamic-locale.d.ts b/angular-dynamic-locale/angular-dynamic-locale.d.ts new file mode 100644 index 0000000000..a30df1d7ed --- /dev/null +++ b/angular-dynamic-locale/angular-dynamic-locale.d.ts @@ -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 +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +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; + } +} \ No newline at end of file diff --git a/angular-file-upload/angular-file-upload-tests.ts b/angular-file-upload/angular-file-upload-tests.ts deleted file mode 100644 index d59e65b4e2..0000000000 --- a/angular-file-upload/angular-file-upload-tests.ts +++ /dev/null @@ -1,47 +0,0 @@ -/// - -module controllers { - - "use strict"; - - var controllerId = "upload"; - - class Upload { - - static $inject = ["$upload"]; - constructor( - private $upload: ng.angularFileUpload.IUploadService - ) { - } - - onFileSelect($files: File[]) { - //$files: an array of files selected, each file has name, size, and type. - var uploads: ng.IPromise[] = []; - for (var i = 0; i < $files.length; i++) { - var file = $files[i]; - uploads.push(this.$upload.upload({ - url: "/api/upload", - method: "POST", - data: { - extraData: { - fileName: file.name, test: "anything" - } - }, - file: file - }) - .progress((evt: any) => { - console.log('progress'); - }) - .then(success => { - // file is uploaded successfully - console.log(success.data); - }) - .catch(err => { - console.error(err); - })); - } - } - } - - angular.module("app").controller(controllerId, Upload); -} diff --git a/angular-file-upload/angular-file-upload.d.ts b/angular-file-upload/angular-file-upload.d.ts index 2eb0e72b56..78efa0ecc5 100644 --- a/angular-file-upload/angular-file-upload.d.ts +++ b/angular-file-upload/angular-file-upload.d.ts @@ -1,26 +1,8 @@ -// 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 // Definitions: https://github.com/borisyankov/DefinitelyTyped -/// +/// -declare module angular.angularFileUpload { - - interface IUploadService { - - http(config: ng.IRequestConfig): IUploadPromise; - upload(config: IFileUploadConfig): IUploadPromise; - } - - interface IUploadPromise extends IHttpPromise { - - progress(callback: IHttpPromiseCallback): IUploadPromise; - } - - interface IFileUploadConfig extends ng.IRequestConfig { - - file: File; - fileName?: string; - } -} +// THIS FILE WILL REMOVE IF angular-file-upload.d.ts incoming. diff --git a/angular-formly/angular-formly-tests.ts b/angular-formly/angular-formly-tests.ts new file mode 100644 index 0000000000..ef6a384637 --- /dev/null +++ b/angular-formly/angular-formly-tests.ts @@ -0,0 +1,108 @@ +/// + +var app = angular.module('app', ['formly']); + +interface IScope extends ng.IScope { + to: { label: string; } +} + +class FormConfig { + constructor(formlyConfig: AngularFormly.IFormlyConfig, formlyValidationMessages: AngularFormly.IValidationMessages) { + formlyConfig.setWrapper({ + name: 'validation', + types: ['input', 'customInput'], + templateUrl: 'my-messages.html' + }); + + formlyValidationMessages.addStringMessage('required', 'This field is required'); + + formlyConfig.setType({ + name: 'customInput', + extends: 'input' + }); + } +} + +class AppController { + fields: AngularFormly.IFieldConfigurationObject[]; + constructor() { + var vm = this; + vm.fields = [ + { + key: 'firstName', + type: 'customInput', + templateOptions: { + required: true, + label: 'First Name', + foo: 'hi' + } + }, + { + key: 'email', + type: 'input', + templateOptions: { + label: 'Email', + required: true, + type: 'email', + maxlength: 10, + minlength: 6, + placeholder: 'example@example.com' + } + }, + { + key: 'ip', + type: 'input', + validators: { + ipAddress: { + expression: function(viewValue, modelValue) { + var value = modelValue || viewValue; + return /(\d{1,3}\.){3}\d{1,3}/.test(value); + }, + message: '$viewValue + " is not a valid IP Address"' + } + }, + templateOptions: { + label: 'IP Address', + required: true, + type: 'text', + placeholder: '127.0.0.1', + }, + validation: { + messages: { + required: function($viewValue: any, $modelValue: any, scope: AngularFormly.ITemplateScope) { + return scope.to.label + ' is required' + } + } + } + }, + { + key: 'mac', + type: 'input', + templateOptions: { + label: 'MAC Address', + required: true, + placeholder: '49-8A-BD-4E-00-1D', + pattern: '([0-9A-F]{2}[:-]){5}([0-9A-F]{2})' + } + }, + { + type: 'checkbox', + key: 'checked', + templateOptions: { + label: 'Check this' + } + }, + { + key: 'checked2', + type: 'checkbox', + wrapper: null, + templateOptions: { + label: 'no wrapper here...' + } + } + ] + } +} + +app.controller("AppController", AppController); + diff --git a/angular-formly/angular-formly.d.ts b/angular-formly/angular-formly.d.ts new file mode 100644 index 0000000000..2bf75af7d7 --- /dev/null +++ b/angular-formly/angular-formly.d.ts @@ -0,0 +1,591 @@ +// Type definitions for angular-formly 6.18.0 +// Project: https://github.com/formly-js/angular-formly +// Definitions by: Scott Hatcher +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module 'AngularFormly' { + export = AngularFormly; +} + +declare module 'angular-formly' { + var angularFormlyDefaultExport: string; + export = angularFormlyDefaultExport; +} + +declare module AngularFormly { + + + interface IFieldGroup { + data?: Object; + className?: string; + elementAttributes?: { [key: string]: string }; + fieldGroup: IFieldConfigurationObject[]; + form?: Object; + hide?: boolean; + hideExpression?: string | IExpresssionFunction; + key?: string | number; + model?: string | Object; + options?: IFormOptionsAPI + } + + + interface IFormOptionsAPI { + data?: Object; + fieldTransform?: Function; + formState?: Object; + removeChromeAutoComplete?: boolean; + resetModel?: Function; + templateManipulators?: ITemplateManipulators; + updateInitialValue?: Function; + wrapper?: string | string[]; + } + + + /** + * see http://docs.angular-formly.com/docs/formly-expressions#expressionproperties-validators--messages + */ + interface IExpresssionFunction { + ($viewValue: any, $modelValue: any, scope: ITemplateScope): any; + } + + + interface IModelOptions { + updateOn?: string; + debounce?: number; + allowInvalid?: boolean; + getterSetter?: string; + timezone?: string; + } + + + interface ITemplateManipulator { + (template: string | HTMLElement, options: Object, scope: ITemplateScope): string | HTMLElement; + } + + + interface ITemplateManipulators { + preWrapper?: ITemplateManipulator[]; + postWrapper?: ITemplateManipulator[]; + } + + + /** + * see http://docs.angular-formly.com/docs/ngmodelattrstemplatemanipulator + */ + interface ITemplateOptions { + + // both attribute or regular attribute + disabled?: boolean; + maxlength?: number; + minlength?: number; + pattern?: string; + required?: boolean; + + //attribute only + max?: number; + min?: number; + placeholder?: number | string; + tabindex?: number; + type?: string; + + //expression types + onBlur?: string; + onChange?: string; + onClick?: string; + onFocus?: string; + onKeydown?: string; + onKeypress?: string; + onKeyup?: string; + + //Bootstrap types + label?: string; + description?: string; + [key: string]: any; + + } + + + /** + * see http://docs.angular-formly.com/docs/field-configuration-object#validators-object + */ + interface IValidator { + expression: string | IExpresssionFunction; + message?: string | IExpresssionFunction; + } + + + /** + * An object which has at least two properties called expression and listener. The watch.expression + * is added to the formly-form directive's scope (to allow it to run even when hide is true). You + * can specify a type ($watchCollection or $watchGroup) via the watcher.type property (defaults to + * $watch) and whether you want it to be a deep watch via the watcher.deep property (defaults to false). + * + * see http://docs.angular-formly.com/docs/field-configuration-object#watcher-objectarray-of-watches + */ + interface IWatcher { + deep?: boolean; //Defaults to false + expression?: string | { (field: string, scope: ITemplateScope): boolean }; + listener: (field: string, newValue: any, oldValue: any, scope: ITemplateScope, stopWatching: Function) => void; + type?: string; //Defaults to $watch but can be set to $watchCollection or $watchGroup + } + + + // see http://docs.angular-formly.com/docs/field-configuration-object + interface IFieldConfigurationObject { + + + /** + * Added in 6.18.0 + * + * Demo + * see http://angular-formly.com/#/example/other/unique-value-async-validation + */ + asyncValidators?: { + [key: string]: string | IExpresssionFunction | IValidator; + } + + /** + * This is a great way to add custom behavior to a specific field. It is injectable with the $scope of the + * field, and anything else you have in your injector. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#controller-controller-name-as-string--controller-f + */ + controller?: string | Function; + + + /** + * This is reserved for the developer. You have our guarantee to be able to use this and not worry about + * future versions of formly overriding your usage and preventing you from upgrading :-) + * + * see http://docs.angular-formly.com/docs/field-configuration-object#data-object + */ + data?: Object; + + + /** + * Use defaultValue to initialize it the model. If this is provided and the value of the + * model at compile-time is undefined, then the value of the model will be assigned to defaultValue. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#defaultvalue-any + */ + defaultValue?: any; + + + /** + * You can specify your own class that will be applied to the formly-field directive (or ng-form of + * a fieldGroup). + * + * see http://docs.angular-formly.com/docs/field-configuration-object#classname-string + */ + className?: string; + + + elementAttributes?: string; + + + /** + * An object where the key is a property to be set on the main field config and the value is an + * expression used to assign that property. The value is a formly expressions. The returned value is + * wrapped in $q.when so you can return a promise from your function :-) + * + * see http://docs.angular-formly.com/docs/field-configuration-object#expressionproperties-object + */ + expressionProperties?: { + [key: string]: string | IExpresssionFunction | IValidator; + } + + + /** + * Uses ng-if. Whether to hide the field. Defaults to false. If you wish this to be conditional, use + * hideExpression. See below. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#hide-boolean + */ + hide?: boolean + + + /** + * This is similar to expressionProperties with a slight difference. You should (hopefully) never + * notice the difference with the most common use case. This is available due to limitations with + * expressionProperties and ng-if not working together very nicely. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#hideexpression-string--function + */ + hideExpression?: string | IExpresssionFunction; + + + /** + * This allows you to specify the id of your field (which will be used for its name as well unless + * a name is provided). Note, you can also override the id generation code using the formlyConfig + * extra called getFieldId. + * + * AVOID THIS + * If you don't have to do this, don't. Specifying IDs makes it harder to re-use things and it's + * just extra work. Part of the beauty that angular-formly provides is the fact that you don't need + * to concern yourself with making sure that this is unique. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#id-string + */ + id?: string; + + + initialValue?: any; + + + /** + * Can be set instead of type or template to use a custom html template form field. Works + * just like a directive templateUrl and uses the $templateCache + * + * see http://docs.angular-formly.com/docs/field-configuration-object#key-string + */ + key?: string | number; + + + /** + * This allows you to specify a link function. It is invoked after your template has finished compiling. + * You are passed the normal arguments for a normal link function. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#link-link-function + */ + link?: ng.IDirectiveLinkFn; + + + /** + * By default, the model passed to the formly-field directive is the same as the model passed to the + * formly-form. However, if the field has a model specified, then it is used for that field (and that + * field only). In addition, a deep watch is added to the formly-field directive's scope to run the + * expressionProperties when the specified model changes. + * + * Note, the formly-form directive will allow you to specify a string which is an (almost) formly + * expression which allows you to define the model as relative to the scope of the form. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#model-object--string + */ + model?: Object | string; + + + /** + * Allows you to take advantage of ng-model-options directive. Formly's built-in templateManipulator (see + * below) will add this attribute to your ng-model element automatically if this property exists. Note, + * if you use the getter/setter option, formly's templateManipulator will change the value of ng-model + * to options.value which is a getterSetter that formly adds to field options. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#modeloptions + */ + modelOptions?: IModelOptions; + + + /** + * If you wish to, you can specify a specific name for your ng-model. This is useful if you're posting + * the form to a server using techniques of yester-year. + * + * AVOID THIS + * If you don't have to do this, don't. It's just extra work. Part of the beauty that angular-formly + * provides is the fact that you don't need to concern yourself with stuff like this. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#name-string + */ + name?: string; + + + /** + * This is used by ngModelAttrsTemplateManipulator to automatically add attributes to the ng-model element + * of field templates. You will likely not use this often. This object is a little complex, but extremely + * powerful. It's best to explain this api via an example. For more information, see the guide on ngModelAttrs. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#ngmodelattrs-object + */ + ngModelAttrs?: { + attribute?: any; + bound?: any; + expression?: any; + value?: any; + [key: string]: any; + }; + + + /** + * This allows you to place attributes with string values on the ng-model element. + * Easy to use alternative to ngModelAttrs option. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#ngmodelelattrs-object + */ + ngModelElAttrs?: { + [key: string]: string; + }; + + + /** + * Used to tell angular-formly to not attempt to add the formControl property to your object. This is useful + * for things like validation, but not necessary if your "field" doesn't use ng-model (if it's just a horizontal + * line for example). Defaults to undefined. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#noformcontrol-boolean + */ + noFormControl?: boolean; + + + /** + * Allows you to specify extra types to get options from. Duplicate options are overridden in later priority + * (index 1 will override index 0 properties). Also, these are applied after the type's defaultOptions and + * hence will override any duplicates of those properties as well. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#optionstypes-string--array-of-strings + */ + optionsTypes?: string | string[]; + + + /** + * Can be set instead of type or templateUrl to use a custom html + * template form field. Recommended to be used with one-liners mostly + * (like a directive), or if you're using webpack with the ability to require templates :-) + * + * If a function is passed, it is invoked with the field configuration object and can return + * either a string for the template or a promise that resolves to a string. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#template-string--function + */ + template?: string | { (fieldConfiguration: IFieldConfigurationObject): string | ng.IPromise }; + + + /** + * Allows you to specify custom template manipulators for this specific field. (use defaultOptions in a + * type configuration if you want it to apply to all fields of a certain type). + * + * see http://docs.angular-formly.com/docs/field-configuration-object#templatemanipulator-object-of-arrays-of-functions + */ + templateManipulators?: ITemplateManipulators; + + + /** + * This is reserved for the templates. Any template-specific options go in here. Look at your specific + * template implementation to know the options required for this. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#templateoptions-object + */ + templateOptions?: ITemplateOptions; + + + /** + * Can be set instead of type or template to use a custom html template form field. Works + * just like a directive templateUrl and uses the $templateCache + * + * see http://docs.angular-formly.com/docs/field-configuration-object#templateurl-string--function + */ + templateUrl?: string | { (fieldConfiguration: IFieldConfigurationObject): string | ng.IPromise }; + + + /** + * The type of field to be rendered. This is the recommended method + * for defining fields. Types must be pre-defined using formlyConfig. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#type-string + */ + type?: string; + + + /** + * An object with a few useful properties mostly handy when used in combination with ng-messages + */ + validation?: { + + /** + * This is set by angular-formly. This is a boolean indicating whether an error message should be shown. Because + * you generally only want to show error messages when the user has interacted with a specific field, this value + * is set to true based on this rule: field invalid && (field touched || validation.show) (with slight difference + * for pre-angular 1.3 because it doesn't have touched support). + */ + errorExistsAndShouldBeVisible?: boolean; + + + /** + * A map of Formly Expressions mapped to message names. This is really useful when you're using ng-messages + * like in this example. + */ + messages?: { + [key: string]: IExpresssionFunction | string; + } + + + /** + * A boolean you as the developer can set to specify to force options.validation.errorExistsAndShouldBeVisible + * to be set to true when there are $errors. This is useful when you're trying to call the user's attention to + * some fields for some reason. + */ + show?: boolean; + + } + + + /** + * An object where the keys are the name of the validator and the values are Formly Expressions; + * + * Async Validation + * All function validators can return true/false/Promise. A validator passes if it returns true or a promise + * that is resolved. A validator fails if it returns false or a promise that is rejected. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#validators-object + */ + validators?: { + [key: string]: string | IExpresssionFunction | IValidator; + } + + + /** + * This is a getter/setter function for the value that your field is representing. Useful when using getterSetter: true + * in the modelOptions (in fact, if you don't disable the ngModelAttrsTemplateManipulator that comes built-in with formly, + * it will automagically change your field's ng-model attribute to use options.value. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#value-gettersetter-function + */ + value?(): any; //Getter + value?(val: any): void; //Setter + + + /** + * An object which has at least two properties called expression and listener. The watch.expression is added + * to the formly-form directive's scope (to allow it to run even when hide is true). You can specify a type + * ($watchCollection or $watchGroup) via the watcher.type property (defaults to $watch) and whether you want + * it to be a deep watch via the watcher.deep property (defaults to false). + * + * see http://docs.angular-formly.com/docs/field-configuration-object#watcher-objectarray-of-watches + */ + watcher?: IWatcher | IWatcher[]; + + + /** + * This makes reference to setWrapper in formlyConfig. It is expected to be the name of the wrapper. If + * given an array, the formly field template will be wrapped by the first wrapper, then the second, then + * the third, etc. You can also specify these as part of a type (which is the recommended approach). + * Specifying this property will override the wrappers for the type for this field. + * + * http://docs.angular-formly.com/docs/field-configuration-object#wrapper-string--array-of-strings + */ + wrapper?: string | string[]; + + + //ALL PROPERTIES BELOW ARE ADDED (So you should not be setting them yourself.) + + + /** + * This is the NgModelController for the field. It provides you with awesome stuff like $errors :-) + * + * see http://docs.angular-formly.com/docs/field-configuration-object#formcontrol-ngmodelcontroller + */ + formControl?: ng.IFormController | ng.IFormController[]; + + + /** + * Will reset the field's model and the field control to the last initialValue. This is used by the + * formly-form's options.resetModel function. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#resetmodel-function + */ + resetModel?: () => void; + + + /** + * It is not likely that you'll ever want to invoke this function. It simply runs the expressionProperties expressions. + * It is used internally and you shouldn't have to use it, but you can if you want to, and any breaking changes to the + * way it works will result in a major version change, so you can rely on its api. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#runexpressions-function + */ + runExpressions?: () => void; + + + /** + * Will reset the field's initialValue to the current state of the model. Useful if you load the model asynchronously. + * Invoke this when the model gets set. This is used by the formly-form's options.updateInitialValue function. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#updateinitialvalue-function + */ + updateInitialValue?: () => void; + + } + + /** + * + * + * see http://docs.angular-formly.com/docs/custom-templates#section-formlyconfig-settype-options + */ + interface ITypeOptions { + apiCheck?: { [key: string]: Function }; + apiCheckFunction?: string; //'throw' or 'warn + apiCheckInstance?: any; + apiCheckOptions?: Object; + defaultOptions?: IFieldConfigurationObject | Function; + controller?: Function | string | any[]; + data?: Object; + extends?: string; + link?: ng.IDirectiveLinkFn; + overwriteOk?: boolean; + name: string; + template?: Function | string; + templateUrl?: Function | string; + validateOptions?: Function; + wrapper?: string | string[]; + } + + interface IWrapperOptions { + apiCheck?: { [key: string]: Function }; + apiCheckFunction?: string; //'throw' or 'warn + apiCheckInstance?: any; + apiCheckOptions?: Object; + overwriteOk?: boolean; + name?: string; + template?: string; + templateUrl?: string; + types?: string[]; + validateOptions?: Function; + } + + interface IFormlyConfig { + setType(typeOptions: ITypeOptions): void; + setWrapper(wrapperOptions: IWrapperOptions): void; + + } + + interface ITemplateScopeOptions { + formControl: ng.IFormController | ng.IFormController[]; + templateOptions: ITemplateOptions; + validation: Object; + } + + /** + * see http://docs.angular-formly.com/docs/custom-templates#templates-scope + */ + interface ITemplateScope { + options: ITemplateScopeOptions; + //Shortcut to options.formControl + fc: ng.IFormController | ng.IFormController[]; + //all the fields for the form + fields: IFieldConfigurationObject[]; + //the form controller the field is in + form: any; + //The object passed as options.formState to the formly-form directive. Use this to share state between fields. + formState: Object; + //The id of the field. You shouldn't have to use this. + id: string; + //The index of the field the form is on (in ng-repeat) + index: number; + //the model of the form (or the model specified by the field if it was specified). + model: Object | string; + //Shortcut to options.validation.errorExistsAndShouldBeVisible + showError: boolean; + //Shortcut to options.templateOptions + to: ITemplateOptions; + } + + /** + * see http://docs.angular-formly.com/docs/formlyvalidationmessages#addtemplateoptionvaluemessage + */ + interface IValidationMessages { + addTemplateOptionValueMessage(name: string, prop: string, prefix: string, suffix: string, alternate: string): void; + addStringMessage(name: string, string: string): void; + messages: { [key: string]: ($viewValue: any, $modelValue: any, scope: ITemplateScope) => string }; + } + +} diff --git a/angular-gettext/angular-gettext-tests.ts b/angular-gettext/angular-gettext-tests.ts new file mode 100644 index 0000000000..0b0532fc4f --- /dev/null +++ b/angular-gettext/angular-gettext-tests.ts @@ -0,0 +1,61 @@ +/// + +module angular_gettext_tests { + + + // Configuring angular-gettext + // https://angular-gettext.rocketeer.be/dev-guide/configure/ + //Setting the language + angular.module('myApp').run(function (gettextCatalog: angular.gettext.gettextCatalog) { + gettextCatalog.setCurrentLanguage('nl'); + }); + + //Highlighting untranslated strings + angular.module('myApp').run(function (gettextCatalog: angular.gettext.gettextCatalog) { + gettextCatalog.debug = true; + }); + + + // Marking strings in JavaScript code as translatable. + // https://angular-gettext.rocketeer.be/dev-guide/annotate-js/ + angular.module("myApp").controller("helloController", function (gettext: angular.gettext.gettextFunction) { + var myString = gettext("Hello"); + }); + + //Translating directly in JavaScript. + angular.module("myApp").controller("helloController", function (gettextCatalog: angular.gettext.gettextCatalog) { + var translated: string = gettextCatalog.getString("Hello"); + }); + + angular.module("myApp").controller("helloController", function (gettextCatalog: angular.gettext.gettextCatalog) { + var myString2: string = gettextCatalog.getPlural(3, "Bird", "Birds"); + }); + + angular.module("myApp").controller("helloController", function (gettextCatalog: angular.gettext.gettextCatalog) { + var translated: string = gettextCatalog.getString("Hello {{name}}", { name: "Ruben" }); + }); + + // Setting strings manually + // https://angular-gettext.rocketeer.be/dev-guide/manual-setstrings/ + + angular.module("myApp").run(function (gettextCatalog: angular.gettext.gettextCatalog) { + // Load the strings automatically during initialization. + gettextCatalog.setStrings("nl", { + "Hello": "Hallo", + "One boat": ["Een boot", "{{$count}} boats"] + }); + }); + + + interface helloControllerScope extends ng.IScope { + switchLanguage: (lang: string) => void; + } + // Lazy-loading languages + // https://angular-gettext.rocketeer.be/dev-guide/lazy-loading/ + angular.module("myApp").controller("helloController", function ($scope: helloControllerScope, gettextCatalog: angular.gettext.gettextCatalog) { + $scope.switchLanguage = function (lang: string) { + gettextCatalog.setCurrentLanguage(lang); + gettextCatalog.loadRemote("/languages/" + lang + ".json"); + }; + }); +} \ No newline at end of file diff --git a/angular-gettext/angular-gettext.d.ts b/angular-gettext/angular-gettext.d.ts new file mode 100644 index 0000000000..dc1de2bf6c --- /dev/null +++ b/angular-gettext/angular-gettext.d.ts @@ -0,0 +1,73 @@ +// Type definitions for angular-gettext v2.1.0 +// Project: https://angular-gettext.rocketeer.be/ +// Definitions by: Ákos Lukács +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module angular.gettext { + interface gettextCatalog { + + ////////////// + /// Fields /// + ////////////// + + /** (default: false): Whether or not to prefix untranslated strings with [MISSING]: or a custom prefix. */ + debug: boolean; + /** (default: [MISSING]:): Custom prefix for untranslated strings. */ + debugPrefix: string; + /** (default: false): Whether or not to wrap all processed text with markers.Example output: [Welcome] */ + showTranslatedMarkers: boolean; + /** (default: [): Custom prefix to mark strings that have been run through angular-gettext. */ + translatedMarkerPrefix: string; + /** (default: ]): Custom suffix to mark strings that have been run through angular-gettext. */ + translatedMarkerSuffix: string; + /** An object of loaded translation strings.Shouldn't be used directly. */ + strings: {}; + /** The default language, in which you're application is written. This defaults to English and it's generally a bad idea to use anything else: if your language has different pluralization rules you'll end up with incorrect translations. Deprecated + * @deprecreated + */ + baseLanguage: string; + + + /////////////// + /// Methods /// + /////////////// + + /** Sets the current language and makes sure that all translations get updated correctly. */ + setCurrentLanguage(lang: string): void; + + /** Returns the current language. */ + getCurrentLanguage(): string; + + /** Processes an object of string definitions. More details https://angular-gettext.rocketeer.be/dev-guide/manual-setstrings/ + * @param language A language code. + * @param strings A dictionary of strings. The format of this dictionary is: + * - Keys: Singular English strings (as defined in the source files) + * - Values: Either a single string for signular-only strings or an array of plural forms. + */ + setStrings(language: string, strings: { [key: string]: string|string[] }): void; + + /** Get the correct pluralized (but untranslated) string for the value of n. */ + getStringForm(string: string, n: number): string; + + /** Translate a string with the given context. Uses Angular.JS interpolation, so something like this will do what you expect: + * var hello = gettextCatalog.getString("Hello {{name}}!", { name: "Ruben" }); + * // var hello will be "Hallo Ruben!" in Dutch. + * The context parameter is optional: pass null (or don't pass anything) if you're not using it: this skips interpolation and is a lot faster. + */ + getString(string: string, context?: any): string; + + /** Translate a plural string with the given context. */ + getPlural(n: number, string: string, stringPlural: string, context?: any): string; + + /** Load a set of translation strings from a given URL.This should be a JSON catalog generated with grunt-angular-gettext. More details https://angular-gettext.rocketeer.be/dev-guide/lazy-loading/ */ + loadRemote(url: string): ng.IHttpPromise; + } + + /** If you have text that should be translated in your JavaScript code, wrap it with a call to a function named gettext. This module provides an injectable function to do so */ + interface gettextFunction { + (dummyString: string): string; + } +} + diff --git a/angular-google-analytics/angular-google-analytics-tests.ts b/angular-google-analytics/angular-google-analytics-tests.ts new file mode 100644 index 0000000000..9da39ba3c7 --- /dev/null +++ b/angular-google-analytics/angular-google-analytics-tests.ts @@ -0,0 +1,56 @@ +/// + +function ConfigurationMethodChaining(AnalyticsProvider: angular.google.analytics.AnalyticsProvider) { + AnalyticsProvider + .logAllCalls(true) + .startOffline(true) + .useECommerce(true, true); +} + +function EnableECommerce(AnalyticsProvider: angular.google.analytics.AnalyticsProvider) { + AnalyticsProvider.useECommerce(true, false); + AnalyticsProvider.useECommerce(true, true); + AnalyticsProvider.setCurrency("CDN"); +} + +function SetGoogleAnalyticsAccounts(AnalyticsProvider: angular.google.analytics.AnalyticsProvider) { + AnalyticsProvider.setAccount("UA-XXXXX-xx"); + AnalyticsProvider.setAccount([ + { tracker: "UA-12345-12", name: "tracker1" }, + { tracker: "UA-12345-34", name: "tracker2" } + ]); +} + +function UseClassicAnalytics(AnalyticsProvider: angular.google.analytics.AnalyticsProvider) { + AnalyticsProvider.useAnalytics(false); +} + +function UseDisplayFeatures(AnalyticsProvider: angular.google.analytics.AnalyticsProvider) { + AnalyticsProvider.useDisplayFeatures(true); +} + +function UseEnhancedLinkAttribution(AnalyticsProvider: angular.google.analytics.AnalyticsProvider) { + AnalyticsProvider.useEnhancedLinkAttribution(true); +} + +function UseCrossDomainLinking(AnalyticsProvider: angular.google.analytics.AnalyticsProvider) { + AnalyticsProvider.useCrossDomainLinker(true); + AnalyticsProvider.setCrossLinkDomains(["domain-1.com", "domain-2.com"]); +} + +function SetCookieConfiguration(AnalyticsProvider: angular.google.analytics.AnalyticsProvider) { + AnalyticsProvider.setCookieConfig({ + cookieDomain: "foo.example.com", + cookieName: "myNewName", + cookieExpires: 20000 + }); +} + +function SetRouteTrackingBehaviors(AnalyticsProvider: angular.google.analytics.AnalyticsProvider) { + AnalyticsProvider.trackPages(true); + AnalyticsProvider.trackUrlParams(true); + AnalyticsProvider.ignoreFirstPageLoad(true); + AnalyticsProvider.trackPrefix("my-application"); + AnalyticsProvider.setPageEvent("$stateChangeSuccess"); + AnalyticsProvider.setRemoveRegExp(/\/\d+?$/); +} diff --git a/angular-google-analytics/angular-google-analytics.d.ts b/angular-google-analytics/angular-google-analytics.d.ts new file mode 100644 index 0000000000..e3aa5551eb --- /dev/null +++ b/angular-google-analytics/angular-google-analytics.d.ts @@ -0,0 +1,173 @@ +// Type definitions for angular-google-analytics v1.1.0 +// Project: https://github.com/revolunet/angular-google-analytics +// Definitions by: Cyril Schumacher +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module angular.google.analytics { + /** + * @summary Interface for {@link AnalysticsProvider}. + * @interface + */ + interface AnalyticsProvider { + /** + * @summary Use Delay Script Tag Insertion. + * @param {boolean} val If true, the delay script tag is inserted. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + delayScriptTag(val: boolean): AnalyticsProvider; + + /** + * @summary Activates the test mode. + */ + enterTestMode(): void; + + /** + * @summary Gets the global cookie configuration. + * @return {Object} The global cookie configuration. + */ + getCookieConfig(): Object; + + /** + * @summary Ignore first page view. + * @param {boolean} val If true, the first page view is ignored. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + ignoreFirstPageLoad(val: boolean): AnalyticsProvider; + + /** + * @summary Enable Service Logging. + * @param {boolean} val If true, log all outbound calls to an in-memory array accessible. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + logAllCalls(val: boolean): AnalyticsProvider; + + /** + * @summary Set Google Analytics Accounts. + * @param {Object} tracker The account identifier(s). + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + setAccount(tracker: string|Object|Array): AnalyticsProvider; + + /** + * @summary Set Cookie Configuration. + * @param {Object} config The custom cookie parameters. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + * @deprecated + */ + setCookieConfig(config: Object): AnalyticsProvider; + + /** + * @summary Set cross-linked domains. + * @param {Array} domains The domains. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + setCrossLinkDomains(domains: Array): AnalyticsProvider; + + /** + * @summary Set currency. + * @param {string} currencyCode The currency code. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + setCurrency(currencyCode: string): AnalyticsProvider; + + /** + * @summary Set Domain Name. + * @param {string} domain The domain name. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + setDomainName(domain: string): AnalyticsProvider; + + /** + * @summary Enable Experiment (universal analytics only). + * @param {string} id The experiment identifier. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + setExperimentId(id: string): AnalyticsProvider; + + /** + * @summary Support Hybrid Mobile Applications. + * @param {boolean} val If true, each account object will disable protocol checking and all injected scripts will use the HTTPS protocol. + */ + setHybridMobileSupport(val: boolean): AnalyticsProvider; + + /** + * @summary Set the default page event name. + * @param {string} name The default page event name. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + setPageEvent(name: string): AnalyticsProvider; + + /** + * @summary Sets the regex to scrub location before sending to analytics. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + * @param {RegExp} regex The regex. + */ + setRemoveRegExp(regex: RegExp): AnalyticsProvider; + + /** + * @summary Starts the offline mode. + * @param {boolean} val If true, the offline mode is started. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + startOffline(val: boolean): AnalyticsProvider; + + /** + * @summary Track all routes. + * @param {boolean} val If true, all routes are tracked. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + trackPages(doTrack: boolean): AnalyticsProvider; + + /** + * @summary Sets the URL prefix. + * @param {string} prefix The URL prefix. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + trackPrefix(prefix: string): AnalyticsProvider; + + /** + * @summary Track all URL query parameters. + * @param {boolean} val If true, all URL query parameters are tracked. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + trackUrlParams(val: boolean): AnalyticsProvider; + + /** + * @summary Use Classic Analytics. + * @param {boolean} val If true, use classic analytics. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + useAnalytics(val: boolean): AnalyticsProvider; + + /** + * @summary Use Cross Domain Linking. + * @param {boolean} val If true, the cross-linked domains are registered with Google Analytics. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + useCrossDomainLinker(val: boolean): AnalyticsProvider; + + /** + * @summary Use Display Features. + * @param {boolean} val If true, the display features module is loaded with Google Analytics. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + useDisplayFeatures(val: boolean): AnalyticsProvider; + + /** + * @summary Enable enhanced e-commerce module. + * @param {boolean} val If true, the enhanced e-commerce module is enabled. + * @param {boolean} enhanced If true, the "ec.js" file is used, otherwises, the "ecommerce.js" is used. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + useECommerce(val: boolean, enhanced: boolean): AnalyticsProvider; + + /** + * @summary Use Enhanced Link Attribution. + * @param {boolean} val If true, the enhanced link attribution module is loaded with Google Analytics. + * @return {angular.google.analytics.IAnalyticsProvider} The object instance. + */ + useEnhancedLinkAttribution(val: boolean): AnalyticsProvider; + } +} diff --git a/angular-growl-v2/angular-growl-v2-tests.ts b/angular-growl-v2/angular-growl-v2-tests.ts new file mode 100644 index 0000000000..fdb661161e --- /dev/null +++ b/angular-growl-v2/angular-growl-v2-tests.ts @@ -0,0 +1,61 @@ +/// + +var app = angular.module("ag", ["pascalprecht.translate", "$httpProvider"]); + +app.config((growlProvider:angular.growl.IGrowlProvider, $httpProvider:angular.IHttpProvider) => { + var ttl:angular.growl.IGrowlTTLConfig = { + success: 5000, + error: 4000 + }; + + growlProvider.globalTimeToLive(ttl) + .globalTimeToLive(5000) + .globalDisableCloseButton(true) + .globalDisableIcons(true) + .globalReversedOrder(false) + .globalDisableCountDown(true) + .messageVariableKey("someKey") + .globalInlineMessages(false) + .globalPosition("top-center") + .messagesKey("someKey") + .messageTextKey("someKey") + .messageTitleKey("someKey") + .messageSeverityKey("someKey") + .onlyUniqueMessages(false); + + $httpProvider.interceptors.push(growlProvider.serverMessagesInterceptor); +}); + +app.controller("Ctrl", ($scope:angular.IScope, + growl:angular.growl.IGrowlService, + growlMessages:angular.growl.IGrowlMessagesService) => { + var config:angular.growl.IGrowlMessageConfig = { + ttl: 5000, + disableCountDown: true, + disableCloseButton: true + }; + + var message = "Some message"; + + growl.warning(message); + growl.warning(message, config); + growl.error(message); + growl.error(message, config); + growl.info(message); + growl.info(message, config); + growl.success(message); + growl.success(message, config); + growl.general(message); + growl.general(message, config); + growl.general(message, config, "error"); + growl.onlyUnique(); + growl.reverseOrder(); + growl.inlineMessages(); + growl.position(); + + growlMessages.initDirective(1, 10); + var messages:angular.growl.IGrowlMessage[] = growlMessages.getAllMessages(2); + growlMessages.destroyAllMessages(0); + growlMessages.addMessage(messages[0]); + growlMessages.deleteMessage(messages[1]); +}); diff --git a/angular-growl-v2/angular-growl-v2.d.ts b/angular-growl-v2/angular-growl-v2.d.ts new file mode 100644 index 0000000000..a8e2620713 --- /dev/null +++ b/angular-growl-v2/angular-growl-v2.d.ts @@ -0,0 +1,249 @@ +// Type definitions for Angular Growl 2 v.0.7.5 +// Project: http://janstevens.github.io/angular-growl-2 +// Definitions by: Tadeusz Hucal +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module angular.growl { + + /** + * Global Time-To-Leave configuration. + */ + interface IGrowlTTLConfig { + success?: number; + error?: number; + warning?: number; + info?: number; + } + + /** + * Custom configuration used in single message call. + */ + interface IGrowlMessageConfig { + title?: string; + ttl?: number; + disableCountDown?: boolean; + disableIcons?: boolean; + disableCloseButton?: boolean; + onclose?: Function; + onopen?: Function; + position?: string; + referenceId?: number; + translateMessage?: boolean; + variables?: { [variable: string]: any; }; + } + + /** + * Growl message with configuration. + */ + interface IGrowlMessage extends IGrowlMessageConfig { + text: string; + } + + /** + * Growl service provider. + */ + interface IGrowlProvider extends angular.IServiceProvider { + /** + * Pre-defined server error interceptor. + */ + serverMessagesInterceptor: (string|IHttpInterceptorFactory)[]; + + /** + * Set default TTL settings. + * @param ttl configuration of TTL for different type of message + */ + globalTimeToLive(ttl: IGrowlTTLConfig): IGrowlProvider; + /** + * Set default TTL settings. + * @param ttl ttl in milliseconds + */ + globalTimeToLive(ttl: number): IGrowlProvider; + /** + * Set default setting for disabling close button. + * @param disableCloseButton + */ + globalDisableCloseButton(disableCloseButton: boolean): IGrowlProvider; + /** + * Set default setting for disabling icons. + * @param disableIcons + */ + globalDisableIcons(disableIcons: boolean): IGrowlProvider; + /** + * Set reversing order of displaying new messages. + * @param reverseOrder + */ + globalReversedOrder(reverseOrder: boolean): IGrowlProvider; + /** + * Set default setting for displaying message disappear countdown. + * @param disableCountDown + */ + globalDisableCountDown(disableCountDown: boolean): IGrowlProvider; + /** + * Set default allowance for inline messages. + * @param inline + */ + globalInlineMessages(inline: boolean): IGrowlProvider; + /** + * Set default message position. + * @param position + */ + globalPosition(position: string): IGrowlProvider; + /** + * Enable/disable displaying only unique messages. + * @param onlyUniqueMessages + */ + onlyUniqueMessages(onlyUniqueMessages: boolean): IGrowlProvider; + + /** + * Set key where messages are stored (for http interceptor). + * @param messageVariableKey + */ + messagesKey(messageKey: string): IGrowlProvider; + /** + * Set key where message text is stored (for http interceptor). + * @param messageVariableKey + */ + messageTextKey(messageTextKey: string): IGrowlProvider; + /** + * Set key where title of message is stored (for http interceptor). + * @param messageVariableKey + */ + messageTitleKey(messageTitleKey: string): IGrowlProvider; + /** + * Set key where severity of message is stored (for http interceptor). + * @param messageVariableKey + */ + messageSeverityKey(messageSeverityKey: string): IGrowlProvider; + /** + * Set key where variables for message are stored (for http interceptor). + * @param messageVariableKey + */ + messageVariableKey(messageVariableKey: string): IGrowlProvider; + } + + /** + * Growl service. + */ + interface IGrowlService { + /** + * Show warning message. + * @param message text to display (or code for angular-translate) + */ + warning(message: string): IGrowlMessage; + /** + * Show warning message. + * @param message text to display (or code for angular-translate) + * @param config additional message configuration + */ + warning(message: string, config: IGrowlMessageConfig): IGrowlMessage; + + /** + * Show error message. + * @param message text to display (or code for angular-translate) + */ + error(message: string): IGrowlMessage; + /** + * Show error message. + * @param message text to display (or code for angular-translate) + * @param config additional message configuration + */ + error(message: string, config: IGrowlMessageConfig): IGrowlMessage; + + /** + * Show information message. + * @param message text to display (or code for angular-translate) + */ + info(message: string): IGrowlMessage; + /** + * Show information message. + * @param message text to display (or code for angular-translate) + * @param config additional message configuration + */ + info(message: string, config: IGrowlMessageConfig): IGrowlMessage; + + /** + * Show success message. + * @param message text to display (or code for angular-translate) + * @param config additional message configuration + */ + success(message: string): IGrowlMessage; + /** + * Show success message. + * @param message text to display (or code for angular-translate) + */ + success(message: string, config: IGrowlMessageConfig): IGrowlMessage; + + /** + * Show message (generic). + * @param message text to display (or code for angular-translate) + */ + general(message: string): IGrowlMessage; + /** + * Show message (generic). + * @param message text to display (or code for angular-translate) + * @param config additional message configuration + */ + general(message: string, config: IGrowlMessageConfig): IGrowlMessage; + /** + * Show message (generic). + * @param message text to display (or code for angular-translate) + * @param config additional message configuration + * @param severity message severity (error, warning, success, info). + */ + general(message: string, config: IGrowlMessageConfig, severity: string): IGrowlMessage; + + /** + * Get current setting for displaying only unique messages. + */ + onlyUnique(): boolean; + /** + * Get current setting for reversing messages order. + */ + reverseOrder(): boolean; + /** + * Get current allowance for inline messages. + */ + inlineMessages(): boolean; + /** + * Get current messages position. + */ + position(): string; + } + + /** + * GrowlMessages service. + */ + interface IGrowlMessagesService { + /** + * Initialize a directive + * We look at the preloaded directive and use this else we + * create a new blank object + * @param referenceId + * @param limitMessages + */ + initDirective(referenceId: number, limitMessages: number): ng.IDirective; + + /** + * Get current messages + */ + getAllMessages(referenceId?: number): IGrowlMessage[]; + + /** + * Destroy all messages + */ + destroyAllMessages(referenceId?: number): void; + + /** + * Add a message + */ + addMessage(message: IGrowlMessage): IGrowlMessage; + + /** + * Delete a message + */ + deleteMessage(message: IGrowlMessage): void; + + } +} diff --git a/angular-httpi/angular-httpi-tests.ts b/angular-httpi/angular-httpi-tests.ts new file mode 100644 index 0000000000..47ac25228c --- /dev/null +++ b/angular-httpi/angular-httpi-tests.ts @@ -0,0 +1,64 @@ +/// + +(function() { + 'use strict'; + var app = angular.module("Demo", ["httpi"]); + // -------------------------------------------------- // + // -------------------------------------------------- // + // I control the main demo. + app.controller( + "DemoController", + function($scope: ng.IScope, httpi: Httpi.HttpiFactory) { + + console.warn("None of the API endpoints exist - they will all throw 404."); + // NOTE: The (.|.) notation will be stripped out automatically; it's only + // here to improve readability of the "happy paths" for interpolation + // labels. The following urls are pre-processed to be identical: + // -- + // api/friends/( :listCommand | :id/:itemCommand ) + // api/friends/:listCommand:id/:itemCommand + var resource = httpi.resource("api/friends/( :listCommand | :id/:itemCommand )"); + // Clear list of friends - matching listCommand. + resource.post({ + data: { + listCommand: "reset" + } + }); + // Create a new friend - no matching URL parameters. + resource.post({ + data: { + name: "Tricia" + } + }); + // Get a given friend - ID matching. + resource.get({ + data: { + id: 4 + } + }); + // Make best friend - ID, itemCommand matching. + resource.post({ + data: { + id: 4, + itemCommand: "make-best-friend" + } + }); + // Get gets friends - no matching URL parameters. + resource.get({ + params: { + limit: "besties" + } + }); + // Get a friend as a JSONP request. + // -- + // NOTE: The "resource" will auto-inject the "JSON_CALLBACK" marker that + // AngularJS will automatically replace with an internal callback name. + resource.jsonp({ + data: { + id: 43 + } + }); + } + ); + +})(); \ No newline at end of file diff --git a/angular-httpi/angular-httpi.d.ts b/angular-httpi/angular-httpi.d.ts new file mode 100644 index 0000000000..eb4a16106b --- /dev/null +++ b/angular-httpi/angular-httpi.d.ts @@ -0,0 +1,42 @@ +// Type definitions for angular-httpi +// Project: https://github.com/bennadel/httpi +// Definitions by: Andrew Camilleri +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module Httpi { + export interface HttpiPayload extends ng.IRequestShortcutConfig { + method?: string; + url?: string; + params?: {}; + data?: {}; + keepTrailingSlash?: boolean; + } + + export interface HttpiFactory { + + (config: HttpiPayload): ng.IHttpPromise<{}>; + + resource(url: string): HttpiResource; + } + + export class HttpiResource { + + constructor(http: ng.IHttpService, url: string); + + delete(config: HttpiPayload): ng.IHttpPromise; + + get(config: HttpiPayload): ng.IHttpPromise; + + head(config: HttpiPayload): ng.IHttpPromise; + + jsonp(config: HttpiPayload): ng.IHttpPromise; + + post(config: HttpiPayload): ng.IHttpPromise; + + put(config: HttpiPayload): ng.IHttpPromise; + + setKeepTrailingSlash(newKeepTrailingSlash: boolean): HttpiResource; + } +} \ No newline at end of file diff --git a/angular-jwt/angular-jwt-tests.ts b/angular-jwt/angular-jwt-tests.ts new file mode 100644 index 0000000000..7f66f26114 --- /dev/null +++ b/angular-jwt/angular-jwt-tests.ts @@ -0,0 +1,17 @@ +/// +/// + +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; +} diff --git a/angular-jwt/angular-jwt.d.ts b/angular-jwt/angular-jwt.d.ts new file mode 100644 index 0000000000..620fcc8e4c --- /dev/null +++ b/angular-jwt/angular-jwt.d.ts @@ -0,0 +1,30 @@ +// Type definitions for angular-jwt 0.0.8 +// Project: https://github.com/auth0/angular-jwt +// Definitions by: Reto Rezzonico +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +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(...params : any[]): string; + } +} diff --git a/angular-loading-bar/angular-loading-bar-tests.ts b/angular-loading-bar/angular-loading-bar-tests.ts new file mode 100644 index 0000000000..b7ca2894ea --- /dev/null +++ b/angular-loading-bar/angular-loading-bar-tests.ts @@ -0,0 +1,15 @@ +/// + +var app = angular.module('testModule', ['angular-loading-bar']); + +class TestController { + + constructor($http: ng.IHttpService) { + + $http.get("http://xyz.com", { ignoreLoadingBar: true }) + + } + +} + +app.controller('TestController', TestController); diff --git a/angular-loading-bar/angular-loading-bar.d.ts b/angular-loading-bar/angular-loading-bar.d.ts new file mode 100644 index 0000000000..b1a8cd55df --- /dev/null +++ b/angular-loading-bar/angular-loading-bar.d.ts @@ -0,0 +1,18 @@ +// Type definitions for angular-loading-bar +// Project: https://github.com/chieffancypants/angular-loading-bar +// Definitions by: Stephen Lautier +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + + +declare module angular { + + interface IRequestShortcutConfig { + /** + * Indicates that the loading bar should be hidden. + */ + ignoreLoadingBar?: boolean; + } + +} \ No newline at end of file diff --git a/angular-local-storage/angular-local-storage-tests.ts b/angular-local-storage/angular-local-storage-tests.ts index cf61d20c94..230a32dce1 100644 --- a/angular-local-storage/angular-local-storage-tests.ts +++ b/angular-local-storage/angular-local-storage-tests.ts @@ -13,7 +13,7 @@ interface TestScope extends ng.IScope { } export class TestController { - constructor($scope: TestScope, localStorageService: ng.local.storage.ILocalStorageService) { + 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(key); }; // remove diff --git a/angular-local-storage/angular-local-storage.d.ts b/angular-local-storage/angular-local-storage.d.ts index d40630a2a6..ae027527a4 100644 --- a/angular-local-storage/angular-local-storage.d.ts +++ b/angular-local-storage/angular-local-storage.d.ts @@ -6,7 +6,7 @@ /// 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 { + 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(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(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 diff --git a/angular-localForage/angular-localForage-tests.ts b/angular-localForage/angular-localForage-tests.ts new file mode 100644 index 0000000000..3ea776ebf8 --- /dev/null +++ b/angular-localForage/angular-localForage-tests.ts @@ -0,0 +1,141 @@ +/// +/// + +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 = ["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) { +}); + +$localForage.bind($rootScope, 'key').then(function(data) { +}); + +$localForage.bind($rootScope, {key: 'key'}).then(function(data) { +}); + +$localForage.bind($rootScope, {key: 'key', defaultValue: 'defaultValue'}).then(function(data) { +}); + +$localForage.bind($rootScope, {key: 'key', scopeKey: 'scopeKey'}).then(function(data) { +}); + +$localForage.bind($rootScope, {key: 'key', name: 'name'}).then(function(data) { +}); diff --git a/angular-localForage/angular-localForage.d.ts b/angular-localForage/angular-localForage.d.ts new file mode 100644 index 0000000000..d9c9ad5adf --- /dev/null +++ b/angular-localForage/angular-localForage.d.ts @@ -0,0 +1,63 @@ +// Type definitions for angular-localForage 1.2.2 +// Project: https://github.com/ocombe/angular-localForage +// Definitions by: Stefan Steinhart +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +/// + +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 { + driver(): LocalForageDriver; + setDriver(name: string | string[]): angular.IPromise; + + setItem(key:string, value:any):angular.IPromise; + setItem(keys:Array, values:Array):angular.IPromise; + + getItem(key:string):angular.IPromise; + getItem(keys:Array):angular.IPromise>; + + removeItem(key:string | Array):angular.IPromise; + + pull(key:string):angular.IPromise; + pull(keys:Array):angular.IPromise>; + + clear():angular.IPromise; + + key(n:number):angular.IPromise; + + keys():angular.IPromise; + + length():angular.IPromise; + + iterate(iteratorCallback:(value:string | number, key:string)=>T):angular.IPromise; + + bind($scope:ng.IScope, key:string):angular.IPromise; + + bind($scope:ng.IScope, config:{ + key:string; + defaultValue?:any; + scopeKey?:string; + name?:string; + }):angular.IPromise; + + unbind($scope:ng.IScope, key:string, scopeKey?:string):void; + + createInstance(config:LocalForageConfig):ILocalForageService; + instance(name:string):ILocalForageService; + } +} diff --git a/angular-material/angular-material-0.8.3.d.ts b/angular-material/angular-material-0.8.3.d.ts new file mode 100644 index 0000000000..1e3eda18af --- /dev/null +++ b/angular-material/angular-material-0.8.3.d.ts @@ -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 +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +declare module angular.material { + + interface MDBottomSheetOptions { + templateUrl?: string; + template?: string; + controller?: any; + locals?: {[index: string]: any}; + targetEvent?: any; + resolve?: {[index: string]: angular.IPromise} + controllerAs?: string; + parent?: Element; + disableParentScroll?: boolean; + } + + interface MDBottomSheetService { + show(options: MDBottomSheetOptions): angular.IPromise; + hide(response?: any): void; + cancel(response?: any): void; + } + + interface MDPresetDialog { + title(title: string): T; + content(content: string): T; + ok(content: string): T; + theme(theme: string): T; + } + + interface MDAlertDialog extends MDPresetDialog { + } + + interface MDConfirmDialog extends MDPresetDialog { + 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} + controllerAs?: string; + parent?: Element; + onComplete?: Function; + } + + interface MDDialogService { + show(dialog: MDDialogOptions|MDPresetDialog): angular.IPromise; + confirm(): MDConfirmDialog; + alert(): MDAlertDialog; + hide(response?: any): void; + cancel(response?: any): void; + } + + interface MDIcon { + (path: string): angular.IPromise; + } + + 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 { + 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 { + } + + interface MDToastOptions { + templateUrl?: string; + template?: string; + hideDelay?: number; + position?: string; + controller?: any; + locals?: {[index: string]: any}; + bindToController?: boolean; + resolve?: {[index: string]: angular.IPromise} + controllerAs?: string; + parent?: Element; + } + + interface MDToastService { + show(optionsOrPreset: MDToastOptions|MDToastPreset): angular.IPromise; + showSimple(): angular.IPromise; + simple(): MDSimpleToastPreset; + build(): MDToastPreset; + 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; + } +} diff --git a/angular-material/angular-material-0.9.0.d.ts b/angular-material/angular-material-0.9.0.d.ts new file mode 100644 index 0000000000..1383b0beb5 --- /dev/null +++ b/angular-material/angular-material-0.9.0.d.ts @@ -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 +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +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} + controllerAs?: string; + parent?: string|Element|JQuery; // default: root node + disableParentScroll?: boolean; // default: true + } + + interface MDBottomSheetService { + show(options: MDBottomSheetOptions): angular.IPromise; + hide(response?: any): void; + cancel(response?: any): void; + } + + interface MDPresetDialog { + title(title: string): T; + content(content: string): T; + ok(ok: string): T; + theme(theme: string): T; + } + + interface MDAlertDialog extends MDPresetDialog { + } + + interface MDConfirmDialog extends MDPresetDialog { + 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} + controllerAs?: string; + parent?: string|Element|JQuery; // default: root node + onComplete?: Function; + } + + interface MDDialogService { + show(dialog: MDDialogOptions|MDAlertDialog|MDConfirmDialog): angular.IPromise; + confirm(): MDConfirmDialog; + alert(): MDAlertDialog; + hide(response?: any): void; + cancel(response?: any): void; + } + + interface MDIcon { + (id: string): angular.IPromise; // 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; + open(): angular.IPromise; + close(): angular.IPromise; + isOpen(): boolean; + isLockedOpen(): boolean; + } + + interface MDSidenavService { + (component: string): MDSidenavObject; + } + + interface MDToastPreset { + 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 { + } + + 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} + controllerAs?: string; + parent?: string|Element|JQuery; // default: root node + } + + interface MDToastService { + show(optionsOrPreset: MDToastOptions|MDToastPreset): angular.IPromise; + showSimple(): angular.IPromise; + simple(): MDSimpleToastPreset; + build(): MDToastPreset; + 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|string[]; + contrastLightColors?: string|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; + } +} diff --git a/angular-material/angular-material-tests.ts b/angular-material/angular-material-tests.ts index ae091c8057..3c70dd27e8 100644 --- a/angular-material/angular-material-tests.ts +++ b/angular-material/angular-material-tests.ts @@ -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 neonRed @@ -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: 'Hello!' @@ -37,17 +37,23 @@ 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: 'Hello!' }); }; $scope['alertDialog'] = () => { - $mdDialog.show($mdDialog.alert().content('Alert!')); + $mdDialog.show($mdDialog.alert().textContent('Alert!')); + }; + $scope['alertDialog'] = () => { + $mdDialog.show($mdDialog.alert().htmlContent('Alert!')); }; $scope['confirmDialog'] = () => { - $mdDialog.show($mdDialog.confirm().content('Confirm!')); + $mdDialog.show($mdDialog.confirm().textContent('Confirm!')); + }; + $scope['confirmDialog'] = () => { + $mdDialog.show($mdDialog.confirm().htmlContent('Confirm!')); }; $scope['hideDialog'] = $mdDialog.hide.bind($mdDialog, 'hide'); $scope['cancelDialog'] = $mdDialog.cancel.bind($mdDialog, 'cancel'); @@ -55,8 +61,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 +75,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 +86,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 +95,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) => { - $scope['openToast'] = () => $mdToast.show($mdToast.simple().content('Hello!')); -}); \ No newline at end of file +myApp.controller('ToastController', ($scope: ng.IScope, $mdToast: ng.material.IToastService) => { + $scope['openToast'] = () => $mdToast.show($mdToast.simple().textContent('Hello!')); +}); diff --git a/angular-material/angular-material.d.ts b/angular-material/angular-material.d.ts index cf7a20d79e..43e0b9f53b 100644 --- a/angular-material/angular-material.d.ts +++ b/angular-material/angular-material.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Angular Material 0.8.3+ (ng.material module) +// Type definitions for Angular Material 1.0.0-rc5+ (angular.material module) // Project: https://github.com/angular/material // Definitions by: Matt Traynham // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -6,126 +6,155 @@ /// 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; - resolve?: {[index: string]: ng.IPromise} + targetEvent?: MouseEvent; + resolve?: {[index: string]: angular.IPromise} controllerAs?: string; - parent?: Element; - disableParentScroll?: boolean; + parent?: string|Element|JQuery; // default: root node + disableParentScroll?: boolean; // default: true } - interface MDBottomSheetService { - show(options: MDBottomSheetOptions): ng.IPromise; + interface IBottomSheetService { + show(options: IBottomSheetOptions): angular.IPromise; hide(response?: any): void; cancel(response?: any): void; } - interface MDPresetDialog { + interface IPresetDialog { title(title: string): T; - content(content: string): T; - ok(content: string): T; + textContent(textContent: string): T; + htmlContent(htmlContent: 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}): 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 { + interface IAlertDialog extends IPresetDialog { } - interface MDConfirmDialog extends MDPresetDialog { - cancel(reason?: string): MDConfirmDialog; + interface IConfirmDialog extends IPresetDialog { + 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; - resolve?: {[index: string]: ng.IPromise} + bindToController?: boolean; // default: false + resolve?: {[index: string]: angular.IPromise} controllerAs?: string; - parent?: Element; + parent?: string|Element|JQuery; // default: root node onComplete?: Function; } - interface MDDialogService { - show(dialog: MDDialogOptions|MDPresetDialog): ng.IPromise; - confirm(): MDConfirmDialog; - alert(): MDAlertDialog; + interface IDialogService { + show(dialog: IDialogOptions|IAlertDialog|IConfirmDialog): angular.IPromise; + confirm(): IConfirmDialog; + alert(): IAlertDialog; hide(response?: any): void; cancel(response?: any): void; } - interface MDIcon { - (path: string): ng.IPromise; + interface IIcon { + (id: string): angular.IPromise; // 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; + open(): angular.IPromise; + close(): angular.IPromise; isOpen(): boolean; isLockedOpen(): boolean; } - interface MDSidenavService { - (component: string): MDSidenavObject; + interface ISidenavService { + (component: string): ISidenavObject; } - interface MDToastPreset { - content(content: string): T; + interface IToastPreset { + textContent(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; + parent(parent?: string|Element|JQuery): T; // default: root node } - interface MDSimpleToastPreset extends MDToastPreset { + interface ISimpleToastPreset extends IToastPreset { } - 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; - resolve?: {[index: string]: ng.IPromise} + bindToController?: boolean; // default: false + resolve?: {[index: string]: angular.IPromise} controllerAs?: string; - parent?: Element; + parent?: string|Element|JQuery; // default: root node } - interface MDToastService { - show(optionsOrPreset: MDToastOptions|MDToastPreset): ng.IPromise; - showSimple(): ng.IPromise; - simple(): MDSimpleToastPreset; - build(): MDToastPreset; + interface IToastService { + show(optionsOrPreset: IToastOptions|IToastPreset): angular.IPromise; + showSimple(content: string): angular.IPromise; + simple(): ISimpleToastPreset; + build(): IToastPreset; updateContent(): void; hide(response?: any): void; cancel(response?: any): void; } - interface MDPalette { + interface IPalette { 0?: string; 50?: string; 100?: string; @@ -142,30 +171,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,23 +202,39 @@ 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; } + + interface IDateLocaleProvider { + months: string[]; + shortMonths: string[]; + days: string[]; + shortDays: string[]; + dates: string[]; + firstDayOfWeek: number; + parseDate(dateString: string): Date; + formatDate(date: Date): string; + monthHeaderFormatter(date: Date): string; + weekNumberFormatter(weekNumber: number): string; + msgCalendar: string; + msgOpenCalendar: string; + } } diff --git a/angular-meteor/angular-meteor-tests.ts b/angular-meteor/angular-meteor-tests.ts new file mode 100644 index 0000000000..9ce0a33e90 --- /dev/null +++ b/angular-meteor/angular-meteor-tests.ts @@ -0,0 +1,255 @@ +/// + +interface ITodo { + _id?: string; + name: string; + public?: boolean; + sticky?: boolean; +} + +interface TodoAngularMeteorObject extends ITodo, angular.meteor.AngularMeteorObject {} + +interface CustomScope extends angular.meteor.IScope { + sticky: boolean; + + todos: angular.meteor.AngularMeteorCollection; + stickyTodos: angular.meteor.AngularMeteorCollection; + notAutoTodos: angular.meteor.AngularMeteorCollection; + + 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('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(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 = $meteor.object(Todos, 'TodoID', false); + $scope.todoSubscribed = $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('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'); +}]); diff --git a/angular-meteor/angular-meteor.d.ts b/angular-meteor/angular-meteor.d.ts new file mode 100644 index 0000000000..b3f520ac5b --- /dev/null +++ b/angular-meteor/angular-meteor.d.ts @@ -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 +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +/// + +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 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(collection: Mongo.Collection|ReactiveResult|Function|(()=>T), autoClientSave?: boolean): AngularMeteorCollection; + + /** + * 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(collection: Mongo.Collection|ReactiveResult|Function|(()=>T), autoClientSave: boolean, updateCollection: Mongo.Collection): AngularMeteorCollection2; + + /** + * 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(collection: Mongo.Collection, selector: Mongo.Selector|Mongo.ObjectID|string, autoClientSave?: boolean): AngularMeteorObject; + + /** + * 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; + + /** + * 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(name: string, ...methodArguments: any[]): angular.IPromise; + + // 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; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * Request a forgot password email. + * + * @param options.email - The email address to send a password reset link. + */ + forgotPassword(options: {email: string}): angular.IPromise; + + /** + * 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; + + /** + * 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; + + 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; + + /** + * 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; + + // <- 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(collectionName: string): Mongo.Collection; + + // <- $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; + + // <- $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 together with T and cast it, like this: + * + * interface TodoAngularMeteorObject extends ITodo, AngularMeteorObject { } + * var todo = $meteor.object(TodoCollection, 'TodoID'); + */ + interface AngularMeteorObject { + /** + * @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; + + /** + * 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; + } + + /** + * An object that connects a Meteor Collection to an AngularJS scope variable + */ + interface AngularMeteorCollection extends AngularMeteorCollection2 { } + + /** + * An object that connects a Meteor Collection to an AngularJS scope variable, + * but can use a differen type for updates. + */ + interface AngularMeteorCollection2 extends Array { + /** + * @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; + } + + interface ILoginWithExternalService { + (options: Meteor.LoginWithExternalServiceOptions): angular.IPromise; + } + + interface ReactiveResult { } +} diff --git a/angular-modal/angular-modal-tests.ts b/angular-modal/angular-modal-tests.ts new file mode 100644 index 0000000000..cbb090cee9 --- /dev/null +++ b/angular-modal/angular-modal-tests.ts @@ -0,0 +1,104 @@ +/// +/// +/// + +var btfModal: angularModal.AngularModalFactory; + +// Using template URL +function withTemplateUrl() { + btfModal({ + controller: 'SomeController', + controllerAs: 'vm', + templateUrl: 'some-template.html' + }); +} + +// Using template +function withTemplate() { + btfModal({ + controller: 'SomeController', + controllerAs: 'vm', + template: '
' + }); +} + +// Using controller function +function withControllerAsFunction() { + btfModal({ + controller: function () {}, + template: '
' + }) +} + +// Using constructor function +function withControllerClass() { + class TestController { + constructor(dependency1:any, dependency2:any) {} + } + btfModal({ + controller: TestController, + template: '
' + }); +} + +// With container as selector +function withContainerAsString() { + btfModal({ + template: '
', + container: '.container' + }); +} + +// With container as jQuery element +function withContainerAsJquery() { + var container: JQuery = $('body'); + btfModal({ + template: '
', + container: container + }); +} + +// With container as DOM Element +function withContainerAsDom() { + var container: Element = document.getElementById('container'); + btfModal({ + template: '
', + container: container + }); +} + +// With container as DOM Element Array +function withContainerAsDomArray() { + var container: Element[] = [document.getElementById('container'), document.getElementById('container2')]; + btfModal({ + template: '
', + container: container + }); +} + +// With container as function +function withContainerAsFunction() { + btfModal({ + template: '
', + container: function() {} + }); +} + +// With container as array +function withContainerAsArray() { + btfModal({ + template: '
', + container: ['1', 2] + }); +} + +// Calling return values +function callingValues() { + var modal: angularModal.AngularModal = btfModal({ + template: '
' + }); + modal.activate().then(() => {}, () => {}); + modal.deactivate().then(() => {}, () => {}); + var isActive: boolean = modal.active(); +} + diff --git a/angular-modal/angular-modal.d.ts b/angular-modal/angular-modal.d.ts new file mode 100644 index 0000000000..0effea95cc --- /dev/null +++ b/angular-modal/angular-modal.d.ts @@ -0,0 +1,38 @@ +// Type definitions for angular-modal 0.5.0 +// Project: https://github.com/btford/angular-modal +// Definitions by: Paul Lessing +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// + +declare module angularModal { + + type AngularModalControllerDefinition = (new (...args: any[]) => any) | Function | string; // Possible arguments to IControllerService + + type AngularModalJQuerySelector = string | Element | Element[] | JQuery | Function | any[] | {}; // Possible arguments to IAugmentedJQueryStatic + + interface AngularModalSettings { + controller?: AngularModalControllerDefinition; + controllerAs?: string; + container?: AngularModalJQuerySelector; + } + + export interface AngularModalSettingsWithTemplate extends AngularModalSettings { + template: any; + } + + export interface AngularModalSettingsWithTemplateUrl extends AngularModalSettings { + templateUrl: string; + } + + export interface AngularModal { + activate(): angular.IPromise; + deactivate(): angular.IPromise; + active(): boolean; + } + + export interface AngularModalFactory { + (settings: AngularModalSettingsWithTemplate | AngularModalSettingsWithTemplateUrl): AngularModal; + } +} diff --git a/angular-notifications/angular-notifications-tests.ts b/angular-notifications/angular-notifications-tests.ts new file mode 100644 index 0000000000..1632ff1e7d --- /dev/null +++ b/angular-notifications/angular-notifications-tests.ts @@ -0,0 +1,12 @@ +/// + +var myapp = angular.module("myapp", ["notifications"]); + +myapp.controller("MyController", ["$scope", "notifications", + function ($scope:ng.IScope, notifications:angular.notifications.INotificationFactory) { // <-- Inject notifications + + var userData = {'some': 'data', 'optional': true}; + notifications.info("Something happened", "here is the content of what happened", userData); + + } +]); diff --git a/angular-notifications/angular-notifications.d.ts b/angular-notifications/angular-notifications.d.ts new file mode 100644 index 0000000000..49883efb3e --- /dev/null +++ b/angular-notifications/angular-notifications.d.ts @@ -0,0 +1,82 @@ +// Type definitions for angular-notifications +// Project: https://github.com/DerekRies/angular-notifications +// Definitions by: Tomasz Ducin +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module angular.notifications { + + interface IAnimation { + duration: number; + enabled: boolean; + } + + interface ISettings { + info: IAnimation; + warning: IAnimation; + error: IAnimation; + success: IAnimation; + progress: IAnimation; + custom: IAnimation; + details: boolean; + localStorage: boolean; + html5Mode: boolean; + html5DefaultIcon: string; + } + + interface INotification { + type: string; + image: string; + icon: string; + title: string; + content: string; + timestamp: string; + userData: string; + } + + interface INotificationFactory extends angular.IModule { + + /* ========== SETTINGS RELATED METHODS =============*/ + + disableHtml5Mode(): void; + disableType(notificationType: string): void; + enableHtml5Mode(): void; + enableType(notificationType: string): void; + getSettings(): ISettings; + toggleType(notificationType: string): void; + toggleHtml5Mode(): void; + requestHtml5ModePermissions(): boolean; + + /* ============ QUERYING RELATED METHODS ============*/ + + getAll(): Array; + getQueue(): Array; + + /* ============== NOTIFICATION METHODS ==============*/ + + info(title: string): INotification; + info(title: string, content: string): INotification; + info(title: string, content: string, userData: any): INotification; + error(title: string): INotification; + error(title: string, content: string): INotification; + error(title: string, content: string, userData: any): INotification; + success(title: string): INotification; + success(title: string, content: string): INotification; + success(title: string, content: string, userData: any): INotification; + warning(title: string): INotification; + warning(title: string, content: string): INotification; + warning(title: string, content: string, userData: any): INotification; + awesomeNotify(type: string, icon: string, title: string, content: string, userData: any): INotification; + notify(image: string, title: string, content: string, userData: any): INotification; + makeNotification(type: string, image: string, icon: string, title: string, content: string, userData: any): INotification; + + /* ============ PERSISTENCE METHODS ============ */ + + save(): void; + restore(): void; + clear(): void; + } + +} + diff --git a/angular-notify/angular-notify.d.ts b/angular-notify/angular-notify.d.ts index 7e55dc654a..f97c94e7ac 100644 --- a/angular-notify/angular-notify.d.ts +++ b/angular-notify/angular-notify.d.ts @@ -1,4 +1,4 @@ -// Type definitions for angular-notify 2.0.2 +// Type definitions for angular-notify 2.5.0 // Project: https://github.com/cgross/angular-notify // Definitions by: Suwato // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -51,6 +51,11 @@ declare module angular.cgNotify { * Optional. Currently center and right are the only acceptable values. */ position? : string; + + /** + * Optional. The duration (in milliseconds) of the message. A duration of 0 will prevent the message from closing automatically. + */ + duration? : number; /** * Optional. Element that contains each notification. Defaults to document.body. @@ -94,6 +99,11 @@ declare module angular.cgNotify { * The default element that contains each notification. Defaults to document.body. */ container? : any; + + /** + * The maximum number of total notifications that can be visible at one time. Older notifications will be closed when the maximum is reached. + */ + maximumOpen? : number; }):void; /** diff --git a/angular-odata-resources/angular-odata-resources-tests.ts b/angular-odata-resources/angular-odata-resources-tests.ts new file mode 100644 index 0000000000..23286adc03 --- /dev/null +++ b/angular-odata-resources/angular-odata-resources-tests.ts @@ -0,0 +1,208 @@ +/// + +interface IMyResource extends OData.IResource { }; +interface IMyResourceClass extends OData.IResourceClass { }; + +/////////////////////////////////////// +// 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; + +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) { }); + +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; +var arrayPromise: angular.IPromise; + +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) { }); + +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('test'); +resourceClass = resourceService('test'); +resourceClass = resourceService('test'); + +/////////////////////////////////////// +// IModule +/////////////////////////////////////// +var mod: ng.IModule; +var resourceServiceFactoryFunction: OData.IResourceServiceFactoryFunction; +var resourceService: OData.IResourceService; + +resourceClass = resourceServiceFactoryFunction(resourceService); + +resourceServiceFactoryFunction = function(resourceService: OData.IResourceService) { return resourceClass; }; +mod = mod.factory('factory name', resourceServiceFactoryFunction); + +/////////////////////////////////////// +// IResource +/////////////////////////////////////// + + +/////////////////////////////////////// +// IResourceServiceProvider +/////////////////////////////////////// +var resourceServiceProvider: OData.IResourceServiceProvider; +resourceServiceProvider.defaults.stripTrailingSlashes = false; + + + +/////////////////////////////////////// +// OData +/////////////////////////////////////// + +interface User extends OData.IResource { + name: string; +} + +var resourceService: OData.IResourceService; +var odataResourceClass = resourceService("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; +users[0].$update; + +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)); + + +users = odataResourceClass.odata() + .withInlineCount() + .query(); + + +var countResult = odataResourceClass.odata().count(); +var total = countResult.result; + + + + +var usersSelect1 = odataResourceClass.odata() + .select('name', 'user'); + + +var usersSelect2 = odataResourceClass.odata() + .select(['name', 'user']); \ No newline at end of file diff --git a/angular-odata-resources/angular-odata-resources.d.ts b/angular-odata-resources/angular-odata-resources.d.ts new file mode 100644 index 0000000000..65e7d26e25 --- /dev/null +++ b/angular-odata-resources/angular-odata-resources.d.ts @@ -0,0 +1,326 @@ +// Type definitions for OData Angular Resources +// Project: https://github.com/devnixs/ODataAngularResources +// Definitions by: Raphael ATALLAH +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +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; + }; + isodatav4?: boolean; + } + + + /////////////////////////////////////////////////////////////////////////// + // 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>; + (url: string, paramDefaults?: any, + /** example: {update: { method: 'PUT' }, delete: deleteDescriptor } + where deleteDescriptor : IActionDescriptor */ + actions?: any, options?: IResourceOptions): U; + (url: string, paramDefaults?: any, + /** example: {update: { method: 'PUT' }, delete: deleteDescriptor } + where deleteDescriptor : IActionDescriptor */ + actions?: any, options?: IResourceOptions): IResourceClass; + } + + // 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 { + new(dataOrParams? : any) : IResource; + get(): IResource; + get(params: Object): IResource; + get(success: Function, error?: Function): IResource; + get(params: Object, success: Function, error?: Function): IResource; + get(params: Object, data: Object, success?: Function, error?: Function): IResource; + + query(): IResourceArray; + query(params: Object): IResourceArray; + query(success: Function, error?: Function): IResourceArray; + query(params: Object, success: Function, error?: Function): IResourceArray; + query(params: Object, data: Object, success?: Function, error?: Function): IResourceArray; + + save(): IResource; + save(data: Object): IResource; + save(success: Function, error?: Function): IResource; + save(data: Object, success: Function, error?: Function): IResource; + save(params: Object, data: Object, success?: Function, error?: Function): IResource; + + update(): IResource; + update(data: Object): IResource; + update(success: Function, error?: Function): IResource; + update(data: Object, success: Function, error?: Function): IResource; + update(params: Object, data: Object, success?: Function, error?: Function): IResource; + + remove(): IResource; + remove(params: Object): IResource; + remove(success: Function, error?: Function): IResource; + remove(params: Object, success: Function, error?: Function): IResource; + remove(params: Object, data: Object, success?: Function, error?: Function): IResource; + + delete(): IResource; + delete(params: Object): IResource; + delete(success: Function, error?: Function): IResource; + delete(params: Object, success: Function, error?: Function): IResource; + delete(params: Object, data: Object, success?: Function, error?: Function): IResource; + + odata(): OData.Provider; + } + + // 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 { + $get(): angular.IPromise; + $get(params?: Object, success?: Function, error?: Function): angular.IPromise; + $get(success: Function, error?: Function): angular.IPromise; + + $query(): angular.IPromise>; + $query(params?: Object, success?: Function, error?: Function): angular.IPromise>; + $query(success: Function, error?: Function): angular.IPromise>; + + $save(): angular.IPromise; + $save(params?: Object, success?: Function, error?: Function): angular.IPromise; + $save(success: Function, error?: Function): angular.IPromise; + + $update(): angular.IPromise; + $update(params?: Object, success?: Function, error?: Function): angular.IPromise; + $update(success: Function, error?: Function): angular.IPromise; + + $remove(): angular.IPromise; + $remove(params?: Object, success?: Function, error?: Function): angular.IPromise; + $remove(success: Function, error?: Function): angular.IPromise; + + $delete(): angular.IPromise; + $delete(params?: Object, success?: Function, error?: Function): angular.IPromise; + $delete(success: Function, error?: Function): angular.IPromise; + + /** the promise of the original server interaction that created this instance. **/ + $promise: angular.IPromise; + $resolved: boolean; + } + + /** + * Really just a regular Array object with $promise and $resolve attached to it + */ + interface IResourceArray extends Array { + /** the promise of the original server interaction that created this collection. **/ + $promise: angular.IPromise>; + $resolved: boolean; + } + + /** when creating a resource factory via IModule.factory */ + interface IResourceServiceFactoryFunction { + ($resource: OData.IResourceService): IResourceClass; + >($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; + 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 (callback: ProviderCallback): Provider; + } + interface ProviderCallback { + (queryString: string, success: () => any, error: () => any): T[]; + (queryString: string, success: () => any, error: () => any, isSingleElement?: boolean, forceSingleElement?: boolean): T; + } + + interface ICountResult{ + result: number; + $promise: angular.IPromise; + } + + class Provider { + private callback; + private filters; + private sortOrders; + private takeAmount; + private skipAmount; + private expandables; + constructor(callback: ProviderCallback); + filter(operand1: any, operand2?: any, operand3?: any): Provider; + orderBy(arg1: string, arg2?: string): Provider; + take(amount: number): Provider; + skip(amount: number): Provider; + private execute(); + query(success?: ((p:T[])=>void), error?: (()=>void)): T[]; + single(success?: ((p:T)=>void), error?: (()=>void)): T; + get(key: any, success?: ((p:T)=>void), error?: (()=>void)): T; + expand(...params: string[]): Provider; + expand(params: string[]): Provider; + select(...params: string[]): Provider; + select(params: string[]): Provider; + count(success?: (result: ICountResult) => any, error?: () => any):ICountResult; + withInlineCount(): Provider; + } + + 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); + } + + + +} diff --git a/angular-protractor/angular-protractor-tests.ts b/angular-protractor/angular-protractor-tests.ts index b8b9585f47..45a5d7edc4 100644 --- a/angular-protractor/angular-protractor-tests.ts +++ b/angular-protractor/angular-protractor-tests.ts @@ -374,7 +374,7 @@ function TestElementArrayFinder() { var b: boolean = elementArrayFinder.isPending(); var locator: webdriver.Locator = elementArrayFinder.locator(); - var findersArray: protractor.ElementFinder[] = elementArrayFinder.asElementFinders_(); + var findersArrayPromise: protractor.promise.Promise = elementArrayFinder.asElementFinders_(); var driverElementArray: webdriver.WebElement[] = elementArrayFinder.getWebElements(); var elementFinder: protractor.ElementFinder = elementArrayFinder.get(42); diff --git a/angular-protractor/angular-protractor.d.ts b/angular-protractor/angular-protractor.d.ts index 11e9d3268b..ff83242381 100644 --- a/angular-protractor/angular-protractor.d.ts +++ b/angular-protractor/angular-protractor.d.ts @@ -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.)} + * @param {function(number, ElementFinder, number, Array.)} * 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(reduceFn: (acc: T, element: ElementFinder, index: number, arr: ElementFinder[]) => webdriver.promise.Promise, initialValue: T): webdriver.promise.Promise; reduce(reduceFn: (acc: T, element: ElementFinder, index: number, arr: ElementFinder[]) => T, initialValue: T): webdriver.promise.Promise; @@ -924,10 +924,10 @@ declare module protractor { /** * Represents the ElementArrayFinder as an array of ElementFinders. * - * @return {Array.} Return a promise, which resolves to a list + * @return {Array.} Return a promise, which resolves to a list * of ElementFinders specified by the locator. */ - asElementFinders_(): ElementFinder[]; + asElementFinders_(): webdriver.promise.Promise; /** * Create a shallow copy of ElementArrayFinder. @@ -1221,13 +1221,28 @@ declare module protractor { interface LocatorWithColumn extends webdriver.Locator { column(index: number): webdriver.Locator; + column(name: string): webdriver.Locator; } interface RepeaterLocator extends LocatorWithColumn { row(index: number): LocatorWithColumn; } - interface IProtractorLocatorStrategy extends webdriver.ILocatorStrategy { + interface IProtractorLocatorStrategy { + /** + * webdriver's By is an enum of locator functions, so we must set it to + * a prototype before inheriting from it. + */ + className: typeof webdriver.By.className; + css: typeof webdriver.By.css; + id: typeof webdriver.By.id; + linkText: typeof webdriver.By.linkText; + js: typeof webdriver.By.js; + name: typeof webdriver.By.name; + partialLinkText: typeof webdriver.By.partialLinkText; + tagName: typeof webdriver.By.tagName; + xpath: typeof webdriver.By.xpath; + /** * Add a locator to this instance of ProtractorBy. This locator can then be * used with element(by.locatorName(args)). @@ -1299,7 +1314,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}} */ diff --git a/angular-signalr-hub/angular-signalr-hub-tests.ts b/angular-signalr-hub/angular-signalr-hub-tests.ts new file mode 100644 index 0000000000..b46ff63ac7 --- /dev/null +++ b/angular-signalr-hub/angular-signalr-hub-tests.ts @@ -0,0 +1,77 @@ +/// +/// + +angular + .module('app', ['SignalR']) + .factory('Employees', ngSignalrTest.EmployeesFactory); + +module ngSignalrTest { + export class EmployeesFactory { + static $inject = ['$rootScope', 'Hub', '$timeout']; + private hub: ngSignalr.Hub; + public all: Array; + + constructor($rootScope: ng.IRootScopeService, Hub: ngSignalr.HubFactory, $timeout: ng.ITimeoutService) { + // declaring the hub connection + this.hub = new Hub('employee', { + // client-side methods + listeners: { + 'lockEmployee': (id: number) => { + var employee = this.find(id); + employee.Locked = true; + $rootScope.$apply(); + }, + 'unlockEmployee': (id: number) => { + var employee = this.find(id); + employee.Locked = false; + $rootScope.$apply(); + } + }, + + // server-side methods + methods: ['lock', 'unlock'], + + // query params sent on initial connection + queryParams:{ + 'token': 'exampletoken' + }, + + // handle connection error + errorHandler: (message: string) => { + console.error(message); + }, + + stateChanged: (state: SignalRStateChange) => { + // your code here + } + }); + } + + private find(id: number) { + for (var i = 0; i < this.all.length; i++) { + if (this.all[i].Id === id) return this.all[i]; + } + + return null; + } + + public edit = (employee: Employee) => { + employee.Edit = true; + this.hub.invoke('lock', employee.Id); + }; + + public done = (employee: Employee) => { + employee.Edit = false; + this.hub.invoke('unlock', employee.Id); + } + } + + interface Employee { + Id: number; + Name: string; + Email: string; + Salary: number; + Edit: boolean; + Locked: boolean; + } +} \ No newline at end of file diff --git a/angular-signalr-hub/angular-signalr-hub.d.ts b/angular-signalr-hub/angular-signalr-hub.d.ts new file mode 100644 index 0000000000..3027941061 --- /dev/null +++ b/angular-signalr-hub/angular-signalr-hub.d.ts @@ -0,0 +1,73 @@ +// Type definitions for angular-signalr-hub v1.5.0 +// Project: https://github.com/JustMaier/angular-signalr-hub +// Definitions by: Adam Santaniello +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module ngSignalr { + interface HubFactory { + /** + * Creates a new Hub connection + */ + new(hubName: string, options: HubOptions) : Hub + } + + class Hub { + hubName: string; + connection: SignalR; + proxy: HubProxy; + + on(event: string, fn: (...args: any[]) => void): void; + invoke(method: string, ...args: any[]): JQueryDeferred; + disconnect(): void; + connect(): JQueryPromise; + } + + interface HubOptions { + /** + * Collection of client side callbacks + */ + listeners?: { [index: string] : (...args: any[]) => void }; + + /** + * String array of server side methods which the client can call + */ + methods?: Array; + + /** + * Sets the root path for the SignalR web service + */ + rootPath?: string; + + /** + * Object representing additional query params to be sent on connection + */ + queryParams?: { [index: string] : string }; + + /** + * Function to handle hub connection errors + */ + errorHandler?: (error: string) => void; + + /** + * Enable/disable logging + */ + logging?: boolean; + + /** + * Use a shared global connection or create a new one just for this hub, defaults to true + */ + useSharedConnection?: boolean; + + /** + * Sets transport method (e.g 'longPolling' or ['webSockets', 'longPolling'] ) + */ + transport?: any; + + /** + * Function to handle hub connection state changed event + */ + stateChanged?: (state: SignalRStateChange) => void; + } +} diff --git a/angular-storage/angular-storage-tests.ts b/angular-storage/angular-storage-tests.ts new file mode 100644 index 0000000000..1455bbd643 --- /dev/null +++ b/angular-storage/angular-storage-tests.ts @@ -0,0 +1,43 @@ +/// +/// + +// 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)); +});; + diff --git a/angular-storage/angular-storage.d.ts b/angular-storage/angular-storage.d.ts new file mode 100644 index 0000000000..3e442e6693 --- /dev/null +++ b/angular-storage/angular-storage.d.ts @@ -0,0 +1,53 @@ +// Type definitions for angular-storage v0.0.11 +// Project: https://github.com/auth0/angular-storage +// Definitions by: Matthew DeKrey +// 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; + } +} \ No newline at end of file diff --git a/angular-toasty/angular-toasty-tests.ts b/angular-toasty/angular-toasty-tests.ts new file mode 100644 index 0000000000..017d821720 --- /dev/null +++ b/angular-toasty/angular-toasty-tests.ts @@ -0,0 +1,76 @@ +/// + +interface AngularToastyTestControllerScope extends ng.IScope { + button:string; + options:toasty.IToastyConfig; + runToasts(): void; + runQuickToasts(): void; + newToast(): void; + clearToasts(): void; +} + +class AngularToastyTestController { + + static $inject = ['$scope', 'toasty']; + + constructor($scope:AngularToastyTestControllerScope, toasty:toasty.IToastyService) { + + var options: toasty.IToastyConfig = { + title: 'Toast It!', + msg: 'Mmmm, tasties...', + showClose: true, + clickToClose: false, + timeout: 5000, + sound: true, + html: false, + shake: false, + theme: 'bootstrap', + onAdd: function () { + console.log('Toasty ' + this.id + ' has been added!', this); + }, + onRemove: function () { + console.log('Toasty ' + this.id + ' has been removed!', this); + }, + onClick: function () { + console.log('Toasty ' + this.id + ' has been clicked!', this); + } + }; + + $scope.runToasts = function () { + toasty(options); + toasty.default(options); + toasty.info(options); + toasty.success(options); + toasty.wait(options); + toasty.error(options); + toasty.warning(options); + }; + + $scope.runQuickToasts = function () { + var title = 'Toast it!' + toasty(title); + toasty.default(title); + toasty.info(title); + toasty.success(title); + toasty.wait(title); + toasty.error(title); + toasty.warning(title); + }; + + $scope.clearToasts = function () { + toasty.clear(); + }; + } +}; + +angular + .module('main', ['angular-toasty']) + .config(['toastyConfigProvider', (toastyConfigProvider:toasty.IToastyConfigProvider) => { + toastyConfigProvider.setConfig({ + title: 'global', + limit: 10, + sound: false, + shake: true + }); + }]) + .controller('MainController', AngularToastyTestController); diff --git a/angular-toasty/angular-toasty.d.ts b/angular-toasty/angular-toasty.d.ts new file mode 100644 index 0000000000..c4e3923898 --- /dev/null +++ b/angular-toasty/angular-toasty.d.ts @@ -0,0 +1,251 @@ +// Type definitions for Angular Toasty v1.0.2 +// Project: https://github.com/invertase/angular-toasty +// Definitions by: Dominik Muench +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module toasty { + + interface IToastyService { + /** + * Create a toast with the given options and type. + * @param options + * @param type + */ + (options: IToastyConfig, type?: string): void; + + /** + * Create a default "quick toast" with the given title. + * @param title + */ + (title: string|number): void; + + /** + * Create a default toast with the given options. + * @param options + */ + default(options: IToastyConfig): void; + + /** + * Create a default "quick toast" with the given title. + * @param title + */ + default(title: string|number): void; + + /** + * Create an info toast with the given options. + * @param options + */ + info(options: IToastyConfig): void; + + /** + * Create an info "quick toast" with the given title. + * @param title + */ + info(title: string|number): void; + + /** + * Create a wait toast with the given options. + * @param options + */ + wait(options: IToastyConfig): void; + + /** + * Create a wait "quick toast" with the given title. + * @param title + */ + wait(title: string|number): void; + + /** + * Create a success toast with the given options. + * @param options + */ + success(options: IToastyConfig): void; + + /** + * Create a success "quick toast" with the given title. + * @param title + */ + success(title: string|number): void; + + /** + * Create an error toast with the given options. + * @param options + */ + error(options: IToastyConfig): void; + + /** + * Create an error "quick toast" with the given title. + * @param title + */ + error(title: string|number): void; + + /** + * Create a warning toast with the given options. + * @param options + */ + warning(options: IToastyConfig): void; + + /** + * Create a warning "quick toast" with the given title. + * @param title + */ + warning(title: string|number): void; + + /** + * Clear toast(s). + * @param id Optional ID to clear a specific toast. + */ + clear(id?: number): void; + + /** + * Get the global config. + */ + getGlobalConfig(): IGlobalConfig; + + } + + interface IToastyConfig { + /** + * The toast's title. + */ + title: string; + + /** + * The toast's message. + */ + msg?: string; + + /** + * Whether to show the 'X' icon to close the toast. + */ + showClose?: boolean; + + /** + * Whether clicking the toast closes it. + */ + clickToClose?: boolean; + + /** + * How long (in milliseconds) the toast shows before it's removed. Set to false to disable. + */ + timeout?: number; + + /** + * Whether to play a sound when a toast is added. + */ + sound?: boolean; + + /** + * Whether HTML is allowed in toasts. + */ + html?: boolean; + + /** + * Whether to shake the toasts. + */ + shake?: boolean; + + /** + * What theme to use. + * - 'default' + * - 'material' + * - 'bootstrap' + */ + theme?: string; + + /** + * The toast's type: + * - 'default' + * - 'info' + * - 'success' + * - 'wait' + * - 'error' + * - 'warning' + */ + type?: string; + + /** + * Add event handler. + */ + onAdd?: Function; + + /** + * Remove event handler. + */ + onRemove?: Function; + + /** + * Click event handler. + */ + onClick?: Function; + } + + interface IGlobalConfig { + + /** + * Maximum number of toasts to show at once. + */ + limit?: number; + + /** + * The toast's title. + */ + title?: string; + + /** + * The toast's message. + */ + msg?: string; + + /** + * Whether to show the 'X' icon to close the toast. + */ + showClose?: boolean; + + /** + * Whether clicking the toast closes it. + */ + clickToClose?: boolean; + + /** + * The window position where the toast pops up. + * + */ + position?: string; + + /** + * How long (in miliseconds) the toast shows before it's removed. Set to false to disable. + */ + timeout?: number|boolean; + + /** + * Whether to play a sound when a toast is added. + */ + sound?: boolean; + + /** + * Whether HTML is allowed in toast. + */ + html?: boolean; + + /** + * Whether to shake the toast. + */ + shake?: boolean; + + /** + * What theme to use. + * - 'default' + * - 'material' + * - 'bootstrap' + */ + theme?: string; + } + + interface IToastyConfigProvider { + setConfig(override: IGlobalConfig): void; + $get(): IGlobalConfig; + } +} diff --git a/angular-translate/angular-translate-tests.ts b/angular-translate/angular-translate-tests.ts index 559555418b..c60247f427 100644 --- a/angular-translate/angular-translate-tests.ts +++ b/angular-translate/angular-translate-tests.ts @@ -2,7 +2,15 @@ var app = angular.module('at', ['pascalprecht.translate']); -app.config(($translateProvider: ng.translate.ITranslateProvider) => { +app.factory('customLoader', ($q:angular.IQService) => { + return (options:any) => { + var dfd:angular.IDeferred = $q.defer(); + dfd.resolve('whatever you wanted to translate, I simply know nothing about the language with the key ' + options.key); + return dfd.promise; + } +}); + +app.config(($translateProvider: angular.translate.ITranslateProvider) => { $translateProvider.translations('en', { TITLE: 'Hello', FOO: 'This is a paragraph.', @@ -16,13 +24,15 @@ app.config(($translateProvider: ng.translate.ITranslateProvider) => { BUTTON_LANG_DE: 'deutsch' }); $translateProvider.preferredLanguage('en'); + + $translateProvider.useLoader('customLoader'); }); 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); }; diff --git a/angular-translate/angular-translate.d.ts b/angular-translate/angular-translate.d.ts index c972c927de..e4f69c688b 100644 --- a/angular-translate/angular-translate.d.ts +++ b/angular-translate/angular-translate.d.ts @@ -5,16 +5,15 @@ /// +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; + [key: string]: any; } interface ILanguageKeyAlias { @@ -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 { + addPart(name : string, priority? : number) : T; + deletePart(name : string) : T; + isPartAvailable(name : string) : boolean; + } + + interface ITranslatePartialLoaderService extends IPartialLoader { + getRegisteredParts() : Array; + isPartLoaded(name : string, lang : string) : boolean; + } + + interface ITranslatePartialLoaderProvider extends angular.IServiceProvider, IPartialLoader { + setPart(lang : string, part : string, table : ITranslationTable) : ITranslatePartialLoaderProvider; + } + interface ITranslateService { - (translationId: string, interpolateParams?: any, interpolationId?: string): ng.IPromise; - (translationId: string[], interpolateParams?: any, interpolationId?: string): ng.IPromise<{ [key: string]: string }>; + (translationId: string, interpolateParams?: any, interpolationId?: string): angular.IPromise; + (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; + refresh(langKey?: string): angular.IPromise; storage(): IStorage; storageKey(): string; use(): string; - use(key: string): ng.IPromise; + use(key: string): angular.IPromise; 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,8 +92,8 @@ 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; - useLoader(loaderFactory: string, options: any): ITranslateProvider; + useStaticFilesLoader(options: IStaticFilesLoaderOptions): ITranslateProvider; + useLoader(loaderFactory: string, options?: any): ITranslateProvider; useLocalStorage(): ITranslateProvider; useCookieStorage(): ITranslateProvider; useStorage(storageFactory: any): ITranslateProvider; diff --git a/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts b/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts index 608591b581..7851d2da37 100644 --- a/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts +++ b/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts @@ -7,6 +7,7 @@ testApp.config(( $buttonConfig: ng.ui.bootstrap.IButtonConfig, $datepickerConfig: ng.ui.bootstrap.IDatepickerConfig, $datepickerPopupConfig: ng.ui.bootstrap.IDatepickerPopupConfig, + $modalProvider: ng.ui.bootstrap.IModalProvider, $paginationConfig: ng.ui.bootstrap.IPaginationConfig, $pagerConfig: ng.ui.bootstrap.IPagerConfig, $progressConfig: ng.ui.bootstrap.IProgressConfig, @@ -30,19 +31,25 @@ testApp.config(( /** * $datepickerConfig tests */ - $datepickerConfig.dayFormat = 'd'; - $datepickerConfig.dayHeaderFormat = 'E'; - $datepickerConfig.dayTitleFormat = 'dd-MM-yyyy'; + $datepickerConfig.datepickerMode = 'month'; + $datepickerConfig.formatDay = 'd'; + $datepickerConfig.formatDayHeader = 'E'; + $datepickerConfig.formatDayTitle = 'dd-MM-yyyy'; + $datepickerConfig.formatMonth = 'M'; + $datepickerConfig.formatMonthTitle = 'yy'; + $datepickerConfig.formatYear = 'y'; $datepickerConfig.maxDate = '1389586124979'; + $datepickerConfig.maxMode = 'month'; $datepickerConfig.minDate = '1389586124979'; - $datepickerConfig.monthFormat = 'M'; - $datepickerConfig.monthTitleFormat = 'yy'; + $datepickerConfig.minMode = 'month'; + $datepickerConfig.shortcutPropagation = true; $datepickerConfig.showWeeks = false; $datepickerConfig.startingDay = 1; - $datepickerConfig.yearFormat = 'y'; $datepickerConfig.yearRange = 10; + + /** * $datepickerPopupConfig tests */ @@ -51,9 +58,18 @@ testApp.config(( $datepickerPopupConfig.clearText = 'Reset Selection'; $datepickerPopupConfig.closeOnDateSelection = false; $datepickerPopupConfig.closeText = 'Finished'; - $datepickerPopupConfig.dateFormat = 'dd-MM-yyyy'; + $datepickerPopupConfig.datepickerPopup = 'dd-MM-yyyy'; + $datepickerPopupConfig.datepickerPopupTemplateUrl = 'template.html'; + $datepickerPopupConfig.datepickerTemplateUrl = 'template.html'; + $datepickerPopupConfig.html5Types.date = 'MM-dd-yyyy'; + $datepickerPopupConfig.onOpenFocus = false; $datepickerPopupConfig.showButtonBar = false; - $datepickerPopupConfig.toggleWeeksText = 'Show Weeks'; + + + /** + * $modalProvider tests + */ + $modalProvider.options.animation = false; /** @@ -64,9 +80,13 @@ testApp.config(( $paginationConfig.firstText = 'First Page'; $paginationConfig.itemsPerPage = 25; $paginationConfig.lastText = 'Last Page'; + $paginationConfig.maxSize = 13; + $paginationConfig.numPages = 13; $paginationConfig.nextText = 'Next Page'; $paginationConfig.previousText = 'Previous Page'; $paginationConfig.rotate = false; + $paginationConfig.templateUrl = 'template.html'; + $paginationConfig.totalItems = 13; /** @@ -91,6 +111,7 @@ testApp.config(( $ratingConfig.max = 10; $ratingConfig.stateOff = 'rating-state-off'; $ratingConfig.stateOn = 'rating-state-on'; + $ratingConfig.titles = ['1', '2', '3', '4', '5']; /** @@ -102,6 +123,8 @@ testApp.config(( $timepickerConfig.mousewheel = false; $timepickerConfig.readonlyInput = true; $timepickerConfig.showMeridian = false; + $timepickerConfig.arrowkeys = false; + $timepickerConfig.showSpinners = false; /** * $tooltipProvider tests @@ -110,7 +133,9 @@ testApp.config(( placement: 'bottom', animation: false, popupDelay: 1000, - appendtoBody: true + appendToBody: true, + trigger: 'mouseenter hover', + useContentExp: true, }); $tooltipProvider.setTriggers({ 'customOpenTrigger': 'customCloseTrigger' @@ -129,9 +154,14 @@ testApp.controller('TestCtrl', ( * test the $modal service */ var modalInstance = $modal.open({ + animation: false, backdrop: 'static', + backdropClass: 'modal-backdrop-test', + bindToController: true, controller: 'ModalTestCtrl', + controllerAs: 'vm', keyboard: true, + openedClass: 'modal-open my-modal', resolve: { items: ()=> { return [1, 2, 3, 4, 5]; @@ -147,12 +177,23 @@ testApp.controller('TestCtrl', ( $log.log('modal opened'); }); + modalInstance.rendered.then(() => { + $log.log('modal rendered'); + }); + modalInstance.result.then((closeResult:any)=> { $log.log('modal closed', closeResult); }, (dismissResult:any)=> { $log.log('modal dismissed', dismissResult); }); + $modal.open({ + backdrop: 'static' + }); + + $modal.open({ + templateUrl: () => '/templates/modal.html' + }); /** * test the $modalStack service @@ -226,4 +267,4 @@ interface IModalTestCtrlScope { close(): void; dismiss(): void; -} \ No newline at end of file +} diff --git a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts index c9bf91c016..8ebfdb6c24 100644 --- a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts +++ b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts @@ -1,10 +1,13 @@ -// Type definitions for Angular UI Bootstrap 0.11.0 +// Type definitions for Angular UI Bootstrap 0.13.3 // Project: https://github.com/angular-ui/bootstrap // Definitions by: Brian Surowiec // Definitions: https://github.com/borisyankov/DefinitelyTyped /// +// Support for AMD require +declare module 'angular-bootstrap' {} + declare module angular.ui.bootstrap { interface IAccordionConfig { @@ -36,42 +39,63 @@ declare module angular.ui.bootstrap { * * @default 'dd' */ - dayFormat?: string; + formatDay?: string; /** * Format of month in year. * * @default 'MMM' */ - monthFormat?: string; + formatMonth?: string; /** * Format of year in year range. * * @default 'yyyy' */ - yearFormat?: string; + formatYear?: string; /** * Format of day in week header. * * @default 'EEE' */ - dayHeaderFormat?: string; + formatDayHeader?: string; /** * Format of title when selecting day. * * @default 'MMM yyyy' */ - dayTitleFormat?: string; + formatDayTitle?: string; /** * Format of title when selecting month. * * @default 'yyyy' */ - monthTitleFormat?: string; + formatMonthTitle?: string; + + /** + * Current mode of the datepicker (day|month|year). Can be used to initialize datepicker to specific mode. + * + * @default 'day' + */ + datepickerMode?: string; + + /** + * Set a lower limit for mode. + * + * @default 'day' + */ + minMode?: string; + + /** + * Set an upper limit for mode. + * + * @default 'year' + */ + maxMode?: string; /** * Whether to display week numbers. @@ -107,6 +131,13 @@ declare module angular.ui.bootstrap { * @default null */ maxDate?: any; + + /** + * An option to disable or enable shortcut's event propagation + * + * @default false + */ + shortcutPropagation?: boolean; } interface IDatepickerPopupConfig { @@ -115,7 +146,30 @@ declare module angular.ui.bootstrap { * * @default 'yyyy-MM-dd' */ - dateFormat?: string; + datepickerPopup?: string; + + /** + * Allows overriding of default template of the popup. + * + * @default 'template/datepicker/popup.html' + */ + datepickerPopupTemplateUrl?: string; + + /** + * Allows overriding of default template of the datepicker used in popup. + * + * @default 'template/datepicker/popup.html' + */ + datepickerTemplateUrl?: string; + + /** + * Allows overriding of the default format for html5 date inputs. + */ + html5Types?: { + date?: string; + 'datetime-local'?: string; + month?: string; + }; /** * The text to display for the current day button. @@ -124,13 +178,6 @@ declare module angular.ui.bootstrap { */ currentText?: string; - /** - * The text to display for the toggling week numbers button. - * - * @default 'Weeks' - */ - toggleWeeksText?: string; - /** * The text to display for the clear button. * @@ -165,9 +212,23 @@ declare module angular.ui.bootstrap { * @default true */ showButtonBar?: boolean; + + /** + * Whether to focus the datepicker popup upon opening. + * + * @default true + */ + onOpenFocus?: boolean; } + interface IModalProvider { + /** + * Default options all modals will use. + */ + options: IModalSettings; + } + interface IModalService { /** * @param {IModalSettings} options @@ -178,47 +239,52 @@ declare module angular.ui.bootstrap { interface IModalServiceInstance { /** - * a method that can be used to close a modal, passing a result + * A method that can be used to close a modal, passing a result. If `preventDefault` is called on the `modal.closing` event then the modal will remain open. */ close(result?: any): void; /** - * a method that can be used to dismiss a modal, passing a reason + * A method that can be used to dismiss a modal, passing a reason. If `preventDefault` is called on the `modal.closing` event then the modal will remain open. */ dismiss(reason?: any): void; /** - * a promise that is resolved when a modal is closed and rejected when a modal is dismissed + * A promise that is resolved when a modal is closed and rejected when a modal is dismissed. */ - result: ng.IPromise; + result: angular.IPromise; /** - * a promise that is resolved when a modal gets opened after downloading content's template and resolving all variables + * A promise that is resolved when a modal gets opened after downloading content's template and resolving all variables. */ - opened: ng.IPromise; + opened: angular.IPromise; + + /** + * A promise that is resolved when a modal is rendered. + */ + rendered: angular.IPromise; } - interface IModalScope extends ng.IScope { + interface IModalScope extends angular.IScope { /** - * Those methods make it easy to close a modal window without a need to create a dedicated controller + * Dismiss the dialog without assigning a value to the promise output. If `preventDefault` is called on the `modal.closing` event then the modal will remain open. + * + * @returns true if the modal was closed; otherwise false */ + $dismiss(reason?: any): boolean; /** - * Dismiss the dialog without assigning a value to the promise output + * Close the dialog resolving the promise to the given value. If `preventDefault` is called on the `modal.closing` event then the modal will remain open. + * + * @returns true if the modal was closed; otherwise false */ - $dismiss(reason?: any): void; - - /** - * Close the dialog resolving the promise to the given value - */ - $close(result?: any): void; + $close(result?: any): boolean; } interface IModalSettings { /** * a path to a template representing modal's content */ - templateUrl?: string; + templateUrl?: string | (() => string); /** * inline template representing the modal's content @@ -229,7 +295,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,11 +303,31 @@ 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; + + /** + * When used with controllerAs and set to true, it will bind the controller properties onto the $scope directly. + * + * @default false + */ + bindToController?: boolean; + /** * members that will be resolved and passed to the controller as locals; it is equivalent of the `resolve` property for AngularJS routes */ resolve?: any; + /** + * Set to false to disable animations on new modal/backdrop. Does not toggle animations for modals/backdrops that are already displayed. + * + * @default true + */ + animation?: boolean; + /** * controls the presence of a backdrop * Allowed values: @@ -251,20 +337,27 @@ declare module angular.ui.bootstrap { * * @default true */ - backdrop?: any; + backdrop?: boolean | string; /** - * indicates whether the dialog should be closable by hitting the ESC key, defaults to true + * indicates whether the dialog should be closable by hitting the ESC key + * + * @default true */ keyboard?: boolean; + /** + * 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 */ windowClass?: string; /** - * optional size of modal window. Allowed values: 'sm' (small) or 'lg' (large). Requires Bootstrap 3.1.0 or later + * Optional suffix of modal window class. The value used is appended to the `modal-` class, i.e. a value of `sm` gives `modal-sm`. */ size?: string; @@ -272,6 +365,13 @@ declare module angular.ui.bootstrap { * a path to a template overriding modal's window template */ windowTemplateUrl?: string; + + /** + * The class added to the body element when the modal is opened. + * + * @default 'model-open' + */ + openedClass?: string; } interface IModalStackService { @@ -308,11 +408,6 @@ declare module angular.ui.bootstrap { interface IPaginationConfig { - /** - * Current page number. First page is 1. - */ - page?: number; - /** * Total number of items in all pages. */ @@ -346,13 +441,6 @@ declare module angular.ui.bootstrap { */ rotate?: boolean; - /** - * An optional expression called when a page is selected having the page number as argument. - * - * @default null - */ - onSelectPage?(page: number): void; - /** * Whether to display Previous / Next buttons. * @@ -394,6 +482,13 @@ declare module angular.ui.bootstrap { * @default 'Last' */ lastText?: string; + + /** + * Override the template for the component with a custom provided template. + * + * @default 'template/pagination/pagination.html' + */ + templateUrl?: string; } interface IPagerConfig { @@ -404,16 +499,6 @@ declare module angular.ui.bootstrap { */ align?: boolean; - /** - * Current page number. First page is 1. - */ - page?: number; - - /** - * Total number of items in all pages. - */ - totalItems?: number; - /** * Maximum number of items per page. A value less than one indicates all items on one page. * @@ -421,20 +506,6 @@ declare module angular.ui.bootstrap { */ itemsPerPage?: number; - /** - * An optional expression assigned the total number of pages to display. - * - * @default angular.noop - */ - numPages?: number; - - /** - * An optional expression called when a page is selected having the page number as argument. - * - * @default null - */ - onSelectPage?(page: number): void; - /** * Text for Previous button. * @@ -509,6 +580,13 @@ declare module angular.ui.bootstrap { * @default: null */ stateOff?: string; + + /** + * An array of strings defining titles for all icons. + * + * @default: ["one", "two", "three", "four", "five"] + */ + titles?: Array; } @@ -554,6 +632,20 @@ declare module angular.ui.bootstrap { * @default true */ mousewheel?: boolean; + + /** + * Whether the user can use up/down arrowkeys inside the hours & minutes input to increase or decrease it's values. + * + * @default true + */ + arrowkeys?: boolean; + + /** + * Shows spinner arrows above and below the inputs. + * + * @default true + */ + showSpinners?: boolean; } @@ -566,7 +658,7 @@ declare module angular.ui.bootstrap { placement?: string; /** - * Should it fade in and out? + * Should the modal fade in and out? * * @default true */ @@ -584,7 +676,21 @@ declare module angular.ui.bootstrap { * * @default false */ - appendtoBody?: boolean; + appendToBody?: boolean; + + /** + * What should trigger a show of the tooltip? Supports a space separated list of event names. + * + * @default 'mouseenter' for tooltip, 'click' for popover + */ + trigger?: string; + + /** + * Should an expression on the scope be used to load the content? + * + * @default false + */ + useContentExp?: boolean; } interface ITooltipProvider { @@ -600,6 +706,9 @@ declare module angular.ui.bootstrap { } + /** + * WARNING: $transition is now deprecated. Use $animate from ngAnimate instead. + */ interface ITransitionService { /** * The browser specific animation event name. @@ -623,7 +732,7 @@ declare module angular.ui.bootstrap { * * @return A promise that is resolved when the transition finishes. */ - (element: ng.IAugmentedJQuery, trigger: any, options?: ITransitionServiceOptions): ng.IPromise; + (element: angular.IAugmentedJQuery, trigger: any, options?: ITransitionServiceOptions): angular.IPromise; } interface ITransitionServiceOptions { diff --git a/angular-ui-router/angular-ui-router-tests.ts b/angular-ui-router/angular-ui-router-tests.ts index c31bb16889..3211faee5c 100644 --- a/angular-ui-router/angular-ui-router-tests.ts +++ b/angular-ui-router/angular-ui-router-tests.ts @@ -14,12 +14,28 @@ myApp.config(( var matcher: ng.ui.IUrlMatcher = $urlMatcherFactory.compile("/foo/:bar?param1"); + $urlMatcherFactory.caseInsensitive(false); + var isCaseInsensitive = $urlMatcherFactory.caseInsensitive(); + + $urlMatcherFactory.defaultSquashPolicy("nosquash"); + + $urlMatcherFactory.strictMode(true); + var isStrictMode = $urlMatcherFactory.strictMode(); + $urlMatcherFactory.type("myType2", { encode: function (item: any) { return item; }, decode: function (item: any) { return item; }, is: function (item: any) { return true; } }); + $urlMatcherFactory.type("fullType", { + decode: (val) => parseInt(val, 10), + encode: (val) => val && val.toString(), + equals: (a, b) => this.is(a) && a === b, + is: (val) => angular.isNumber(val) && isFinite(val) && val % 1 === 0, + pattern: /\d+/ + }); + var obj: Object = matcher.exec('/user/bob', { x:'1', q:'hello' }); var concat: ng.ui.IUrlMatcher = matcher.concat('/test'); var str: string = matcher.format({ id:'bob', q:'yes' }); @@ -50,10 +66,17 @@ myApp.config(( .state('state1.list', { url: "/list", templateUrl: "partials/state1.list.html", - controller: function ($scope: MyAppScope) { + controller: function ($scope: MyAppScope) { $scope.items = ["A", "List", "Of", "Items"]; } }) + .state('state1.list', { + url: "/list", + templateUrl: "partials/state1.list.html", + controller: ['$scope', function ($scope: MyAppScope) { + $scope.items = ["A", "List", "Of", "Items"]; + }] + }) .state('state2', { url: "/state2", templateUrl: "partials/state2.html" @@ -61,10 +84,26 @@ myApp.config(( .state('state2.list', { url: "/list", templateUrl: "partials/state2.list.html", - controller: function ($scope: MyAppScope) { + controller: function ($scope: MyAppScope) { $scope.things = ["A", "Set", "Of", "Things"]; } - }).state('index', { + }) + .state('list', { + parent: 'state3', + url: "/list", + templateUrl: "partials/state3.list.html", + controller: function ($scope: MyAppScope) { + $scope.things = ["A", "Set", "Of", "Things"]; + } + }) + .state('state4', { + url: "/state4", + templateUrl: function($stateParams: ng.ui.IStateParamsService){ + //Logic could go here based on $stateParams + return "partials/state4.html"; + } + }) + .state('index', { url: "", views: { "viewA": { template: "index.viewA" }, @@ -126,7 +165,9 @@ class UrlLocatorTestService implements IUrlLocatorTestService { private stateServiceTest() { this.$state.go("myState"); + this.$state.go(this.$state.current); this.$state.transitionTo("myState"); + this.$state.transitionTo(this.$state.current); if (this.$state.includes("myState") === true) { // } @@ -139,6 +180,24 @@ class UrlLocatorTestService implements IUrlLocatorTestService { this.$state.get("myState"); this.$state.get(); this.$state.reload(); + + // http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.$state#properties + if (this.$state.transition) { + var transitionPromise: ng.IPromise<{}> = this.$state.transition; + transitionPromise.then(() => { + // transition success + }, () => { + // transition failure + }).catch(() => { + // transition failure + }).finally(() => { + // transition ended (success or failure) + }); + } + + // Accesses the currently resolved values for the current state + // http://stackoverflow.com/questions/28026620/is-there-a-way-to-access-resolved-state-dependencies-besides-injecting-them-into/28027023#28027023 + var resolvedValues = this.$state.$current.locals.globals; } } @@ -157,3 +216,35 @@ module UiViewScrollProviderTests { $uiViewScrollProvider.useAnchorScroll(); }]); } + +interface ITestUserService { + isLoggedIn: () => boolean; + handleLogin: () => ng.IPromise<{}>; +} + +module UrlRouterProviderTests { + var app = angular.module("urlRouterProviderTests", ["ui.router"]); + + app.config(($urlRouterProvider: ng.ui.IUrlRouterProvider) => { + // Prevent $urlRouter from automatically intercepting URL changes; + // this allows you to configure custom behavior in between + // location changes and route synchronization: + $urlRouterProvider.deferIntercept(); + }).run(($rootScope: ng.IRootScopeService, $urlRouter: ng.ui.IUrlRouterService, UserService: ITestUserService) => { + $rootScope.$on('$locationChangeSuccess', e => { + // UserService is an example service for managing user state + if (UserService.isLoggedIn()) return; + + // Prevent $urlRouter's default handler from firing + e.preventDefault(); + + UserService.handleLogin().then(() => { + // Once the user has logged in, sync the current URL to the router: + $urlRouter.sync(); + }); + }); + + // Configures $urlRouter's listener *after* your custom listener + $urlRouter.listen(); + }); +} diff --git a/angular-ui-router/angular-ui-router.d.ts b/angular-ui-router/angular-ui-router.d.ts index 0cf796832f..014baf5ac4 100644 --- a/angular-ui-router/angular-ui-router.d.ts +++ b/angular-ui-router/angular-ui-router.d.ts @@ -5,6 +5,12 @@ /// +// Support for AMD require +declare module 'angular-ui-router' { + var _: string; + export = _; +} + declare module angular.ui { interface IState { @@ -16,25 +22,32 @@ declare module angular.ui { /** * String URL path to template file OR Function, returns URL path string */ - templateUrl?: string | {(): string}; + templateUrl?: string | {(params: IStateParamsService): string}; /** * Function, returns HTML content string */ - templateProvider?: Function; + templateProvider?: Function | Array; /** - * A controller paired to the state. Function OR name as String + * A controller paired to the state. Function, annotated array or name as String */ - controller?: Function | string; + controller?: Function|string|Array; controllerAs?: string; /** * Function (injectable), returns the actual controller function or string. */ - controllerProvider?: Function; - resolve?: {}; + controllerProvider?: Function|Array; + + /** + * Specifies the parent state of this state + */ + parent?: string | IState; + + + resolve?: { [name:string]: any }; /** * 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. */ @@ -42,27 +55,35 @@ declare module angular.ui { /** * Use the views property to set up multiple views. If you don't need multiple views within a single state this property is not needed. Tip: remember that often nested views are more useful and powerful than multiple sibling views. */ - views?: {}; + views?: { [name:string]: IState }; 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 explicitly annotate this function, because it won't be automatically annotated by your build tools. */ - onEnter?: Function; + onEnter?: Function|Array; /** * 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 explicitly annotate this function, because it won't be automatically annotated by your build tools. */ - onExit?: Function; + onExit?: Function|Array; /** * Arbitrary data object, useful for custom configuration. */ data?: any; + /** - * Boolean (default true). If false will not retrigger the same state just because a search/query parameter has changed. Useful for when you'd like to modify $location.search() without triggering a reload. + * Boolean (default true). If false will not re-trigger the same state just because a search/query parameter has changed. Useful for when you'd like to modify $location.search() without triggering a reload. */ reloadOnSearch?: boolean; + + /** + * Boolean (default true). If false will reload state on everytransitions. Useful for when you'd like to restore all data to its initial state. + */ + cache?: boolean; } - interface IStateProvider extends 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; @@ -76,12 +97,73 @@ declare module angular.ui { } interface IUrlMatcherFactory { + /** + * Creates a UrlMatcher for the specified pattern. + * + * @param pattern {string} The URL pattern. + * + * @returns {IUrlMatcher} The UrlMatcher. + */ compile(pattern: string): IUrlMatcher; + /** + * Returns true if the specified object is a UrlMatcher, or false otherwise. + * + * @param o {any} The object to perform the type check against. + * + * @returns {boolean} Returns true if the object matches the IUrlMatcher interface, by implementing all the same methods. + */ isMatcher(o: any): boolean; - type(name: string, definition: any, definitionFn?: any): any; + /** + * Returns a type definition for the specified name + * + * @param name {string} The type definition name + * + * @returns {IType} The type definition + */ + type(name: string): IType; + /** + * Registers a custom Type object that can be used to generate URLs with typed parameters. + * + * @param {IType} definition The type definition. + * @param {any[]} inlineAnnotedDefinitionFn A function that is injected before the app runtime starts. The result of this function is merged into the existing definition. + * + * @returns {IUrlMatcherFactory} Returns $urlMatcherFactoryProvider. + */ + type(name: string, definition: IType, inlineAnnotedDefinitionFn?: any[]): IUrlMatcherFactory; + /** + * Registers a custom Type object that can be used to generate URLs with typed parameters. + * + * @param {IType} definition The type definition. + * @param {any[]} inlineAnnotedDefinitionFn A function that is injected before the app runtime starts. The result of this function is merged into the existing definition. + * + * @returns {IUrlMatcherFactory} Returns $urlMatcherFactoryProvider. + */ + type(name: string, definition: IType, definitionFn?: (...args:any[]) => IType): IUrlMatcherFactory; + /** + * Defines whether URL matching should be case sensitive (the default behavior), or not. + * + * @param value {boolean} false to match URL in a case sensitive manner; otherwise true; + * + * @returns {boolean} the current value of caseInsensitive + */ + caseInsensitive(value?: boolean): boolean; + /** + * Sets the default behavior when generating or matching URLs with default parameter values + * + * @param value {string} A string that defines the default parameter URL squashing behavior. nosquash: When generating an href with a default parameter value, do not squash the parameter value from the URL slash: When generating an href with a default parameter value, squash (remove) the parameter value, and, if the parameter is surrounded by slashes, squash (remove) one slash from the URL any other string, e.g. "~": When generating an href with a default parameter value, squash (remove) the parameter value from the URL and replace it with this string. + */ + defaultSquashPolicy(value: string): void; + /** + * Defines whether URLs should match trailing slashes, or not (the default behavior). + * + * @param value {boolean} false to match trailing slashes in URLs, otherwise true. + * + * @returns {boolean} the current value of strictMode + */ + strictMode(value?: boolean): boolean; } - interface IUrlRouterProvider extends IServiceProvider { + interface IUrlRouterProvider extends angular.IServiceProvider { when(whenPath: RegExp, handler: Function): IUrlRouterProvider; when(whenPath: RegExp, handler: any[]): IUrlRouterProvider; when(whenPath: RegExp, toPath: string): IUrlRouterProvider; @@ -96,6 +178,14 @@ declare module angular.ui { otherwise(path: string): IUrlRouterProvider; rule(handler: Function): IUrlRouterProvider; rule(handler: any[]): IUrlRouterProvider; + /** + * Disables (or enables) deferring location change interception. + * + * If you wish to customize the behavior of syncing the URL (for example, if you wish to defer a transition but maintain the current URL), call this method at configuration time. Then, at run time, call $urlRouter.listen() after you have configured your own $locationChangeSuccess event handler. + * + * @param {boolean} defer Indicates whether to defer location change interception. Passing no parameter is equivalent to true. + */ + deferIntercept(defer?: boolean): void; } interface IStateOptions { @@ -143,9 +233,12 @@ declare module angular.ui { * * @param options Options object. */ - go(to: string, params?: {}, options?: IStateOptions): IPromise; - transitionTo(state: string, params?: {}, updateLocation?: boolean): void; - transitionTo(state: string, params?: {}, options?: IStateOptions): void; + go(to: string, params?: {}, options?: IStateOptions): angular.IPromise; + go(to: IState, params?: {}, options?: IStateOptions): angular.IPromise; + transitionTo(state: string, params?: {}, updateLocation?: boolean): angular.IPromise; + transitionTo(state: IState, params?: {}, updateLocation?: boolean): angular.IPromise; + transitionTo(state: string, params?: {}, options?: IStateOptions): angular.IPromise; + transitionTo(state: IState, params?: {}, options?: IStateOptions): angular.IPromise; includes(state: string, params?: {}): boolean; is(state:string, params?: {}): boolean; is(state: IState, params?: {}): boolean; @@ -153,9 +246,25 @@ declare module angular.ui { href(state: string, params?: {}, options?: IHrefOptions): string; get(state: string): IState; get(): IState[]; + /** A reference to the state's config object. However you passed it in. Useful for accessing custom data. */ current: IState; + /** A param object, e.g. {sectionId: section.id)}, that you'd like to test against the current active state. */ params: IStateParamsService; - reload(): void; + reload(): angular.IPromise; + + /** Currently pending transition. A promise that'll resolve or reject. */ + transition: angular.IPromise<{}>; + + $current: IResolvedState; + } + + interface IResolvedState { + locals: { + /** + * Currently resolved "resolve" values from the current state + */ + globals: { [key: string]: any; }; + }; } interface IStateParamsService { @@ -174,6 +283,7 @@ declare module angular.ui { * */ sync(): void; + listen(): void; } interface IUiViewScrollProvider { @@ -183,4 +293,47 @@ declare module angular.ui { */ useAnchorScroll(): void; } + + interface IType { + /** + * Converts a parameter value (from URL string or transition param) to a custom/native value. + * + * @param val {string} The URL parameter value to decode. + * @param key {string} The name of the parameter in which val is stored. Can be used for meta-programming of Type objects. + * + * @returns {any} Returns a custom representation of the URL parameter value. + */ + decode(val: string, key: string): any; + /** + * Encodes a custom/native type value to a string that can be embedded in a URL. Note that the return value does not need to be URL-safe (i.e. passed through encodeURIComponent()), it only needs to be a representation of val that has been coerced to a string. + * + * @param val {any} The value to encode. + * @param key {string} The name of the parameter in which val is stored. Can be used for meta-programming of Type objects. + * + * @returns {string} Returns a string representation of val that can be encoded in a URL. + */ + encode(val: any, key: string): string; + /** + * Determines whether two decoded values are equivalent. + * + * @param a {any} A value to compare against. + * @param b {any} A value to compare against. + * + * @returns {boolean} Returns true if the values are equivalent/equal, otherwise false. + */ + equals? (a: any, b: any): boolean; + /** + * Detects whether a value is of a particular type. Accepts a native (decoded) value and determines whether it matches the current Type object. + * + * @param val {any} The value to check. + * @param key {any} Optional. If the type check is happening in the context of a specific UrlMatcher object, this is the name of the parameter in which val is stored. Can be used for meta-programming of Type objects. + * + * @returns {boolean} Returns true if the value matches the type, otherwise false. + */ + is(val: any, key: string): boolean; + /** + * The regular expression pattern used to match values of this type when coming from a substring of a URL. + */ + pattern?: RegExp; + } } diff --git a/angular-ui-scroll/angular-ui-scroll-tests.ts b/angular-ui-scroll/angular-ui-scroll-tests.ts new file mode 100644 index 0000000000..1a85dd6b58 --- /dev/null +++ b/angular-ui-scroll/angular-ui-scroll-tests.ts @@ -0,0 +1,93 @@ +/// +var myApp = angular.module('application', ['ui.scroll', 'ui.scroll.jqlite']); + +module application { + interface IItem { + id: number; + content: string; + } + + class DatasourceTest implements ng.ui.IScrollDatasource { + get(index: number, count: number, success: (results: IItem[]) => void): void { + var ret = new Array(); + for (var i=0; i < count; i++) { + ret.push({id: i, content: 'item ' + i.toString()}); + } + success(ret); + } + } + + function factory(): any { + return DatasourceTest; + } + + myApp.factory('DatasourceTest', factory); + + // demo/examples/adapter + myApp.controller('mainController', ['$scope', 'DatasourceTest', function($scope: ng.IScope, datasource: DatasourceTest) { + var firstListAdapter: ng.ui.IScrollAdapter, secondListAdapter: ng.ui.IScrollAdapter; + $scope['datasource'] = datasource; + + $scope['updateList1'] = (): void => { + firstListAdapter.applyUpdates( (item: IItem, scope: ng.IRepeatScope) => { + return item.content += ' *'; + }) + }; + + $scope['removeFromList1'] = (): void => { + firstListAdapter.applyUpdates( (item: IItem, scope: ng.IRepeatScope) => { + if (scope.$index % 2 === 0) { + return [] + } + }) + }; + + var idList1: number = 1000; + $scope['addToList1'] = (): void => { + firstListAdapter.applyUpdates((item: IItem, scope: ng.IRepeatScope) => { + var newItem: IItem; + newItem = void 0; + if (scope.$index === 2) { + newItem = { + id: idList1, + content: 'a new one #' + idList1 + }; + idList1++; + return [item, newItem]; + } + }); + }; + + $scope['updateList2'] = (): void => { + secondListAdapter.applyUpdates((item: IItem, scope: ng.IRepeatScope) => { + return item.content += ' *'; + }); + }; + + $scope['removeFromList2'] = (): void => { + secondListAdapter.applyUpdates((item: IItem, scope: ng.IRepeatScope) => { + if (scope.$index % 2 !== 0) { + return []; + } + }); + }; + + var idList2: number = 2000; + $scope['addToList2'] = (): void => { + secondListAdapter.applyUpdates((item: IItem, scope: ng.IRepeatScope) => { + var newItem: IItem; + newItem = void 0; + if (scope.$index === 4) { + newItem = { + id: idList2, + content: 'a new one #' + idList1 + }; + idList2++; + return [item, newItem]; + } + }); + }; + + }]); +} + diff --git a/angular-ui-scroll/angular-ui-scroll.d.ts b/angular-ui-scroll/angular-ui-scroll.d.ts new file mode 100644 index 0000000000..08ed233c09 --- /dev/null +++ b/angular-ui-scroll/angular-ui-scroll.d.ts @@ -0,0 +1,85 @@ +// Type definitions for Angular JS 1.3.1+ (ui.scroll module) +// Project: https://github.com/angular-ui/ui-scroll +// Definitions by: Mark Nadig +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module angular.ui { + interface IScrollDatasource { + /** + * The datasource object implements methods and properties to be used by the directive to access the data + * + * @param index indicates the first data row requested + * + * @param count indicates number of data rows requested + * + * @param success function to call when the data are retrieved. The implementation of the service has to call + * this function when the data are retrieved and pass it an array of the items retrieved. If no items are + * retrieved, an empty array has to be passed. + * + * Important: Make sure to respect the index and count parameters of the request. The array passed to the + * success method should have exactly count elements unless it hit eof/bof + */ + get(index: number, count: number, success: (results: Array) => any): void; + } + + interface IScrollAdapter { + /** + * a boolean value indicating whether there are any pending load requests. + */ + isLoading: boolean; + /** + * a reference to the item currently in the topmost visible position. + */ + topVisible: any; + /** + * a reference to the DOM element currently in the topmost visible position. + */ + topVisibleElement: ng.IAugmentedJQueryStatic; + /** + * a reference to the scope created for the item currently in the topmost visible position. + */ + topVisibleScope: ng.IRepeatScope; + /** + * calling this method reinitializes and reloads the scroller content. + */ + reload(): void; + /** + * Replaces the item in the buffer at the given index with the new items. + * + * @param index provides position of the item to be affected in the dataset (not in the buffer). If the item with + * the given index currently is not in the buffer no updates will be applied. $index property of the item $scope + * can be used to access the index value for a given item + * + * @param newItems is an array of items to replace the affected item. If the array is empty ([]) the item will + * be deleted, otherwise the items in the array replace the item. If the newItem array contains the old item, + * the old item stays in place. + */ + applyUpdates(index: number, newItems: any[]): void; + /** + * Replaces the item in the buffer at the given index with the new items. + * + * @param updater is a function to be applied to every item currently in the buffer. The function will receive + * 3 parameters: item, scope, and element. Here item is the item to be affected, scope is the item $scope, and + * element is the html element for the item. The return value of the function should be an array of items. + * Similarly to the newItem parameter (see above), if the array is empty([]), the item is deleted, otherwise + * the item is replaced by the items in the array. If the return value is not an array, the item remains + * unaffected, unless some updates were made to the item in the updater function. This can be thought of as + * in place update. + */ + applyUpdates(updater: (item: any, scope: ng.IRepeatScope) => any): void; + /** + * Adds new items after the last item in the buffer + * + * @param newItems provides an array of items to be appended. + */ + append(newItems: any[]): void; + /** + * Adds new items before the first item in the buffer + * + * @param newItems provides an array of items to be prepended. + */ + prepend(newItems: any[]): void; + } +} diff --git a/angular-ui-tree/angular-ui-tree-tests.ts b/angular-ui-tree/angular-ui-tree-tests.ts new file mode 100644 index 0000000000..e66408814e --- /dev/null +++ b/angular-ui-tree/angular-ui-tree-tests.ts @@ -0,0 +1,13 @@ +/// + +var treeNode: AngularUITree.ITreeNode = { + id: 0, + nodes: [], + title: "test" +}; + +var treeNode2: AngularUITree.ITreeNode = { + id: "0", + nodes: [treeNode], + title: "test2" +}; diff --git a/angular-ui-tree/angular-ui-tree.d.ts b/angular-ui-tree/angular-ui-tree.d.ts new file mode 100644 index 0000000000..1017ac11cd --- /dev/null +++ b/angular-ui-tree/angular-ui-tree.d.ts @@ -0,0 +1,15 @@ +// Type definitions for angular-ui-tree v2.8.0 +// Project: https://github.com/angular-ui-tree/angular-ui-tree +// Definitions by: Calvin Fernandez +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module AngularUITree { + /** + * Node in list + */ + interface ITreeNode { + id: number | string; + nodes: ITreeNode[]; + title: string; + } +} diff --git a/angular-wizard/angular-wizard-tests.ts b/angular-wizard/angular-wizard-tests.ts new file mode 100644 index 0000000000..61ad7a4843 --- /dev/null +++ b/angular-wizard/angular-wizard-tests.ts @@ -0,0 +1,218 @@ +/// +/// + +/// + +// 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('' + + ' ' + + '

This is the first step

' + + '

Here you can use whatever you want. You can use other directives, binding, etc.

' + + ' ' + + '
' + + ' ' + + '

Continuing

' + + '

You have continued here!

' + + ' ' + + '
' + + ' ' + + '

Even more steps!!

' + + ' ' + + '
' + + '
'); + 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(); + }); +}); + diff --git a/angular-wizard/angular-wizard.d.ts b/angular-wizard/angular-wizard.d.ts new file mode 100644 index 0000000000..f079a46c24 --- /dev/null +++ b/angular-wizard/angular-wizard.d.ts @@ -0,0 +1,21 @@ +// Type definitions for Angular Wizard 0.4.2 +// Project: https://github.com/mgonto/angular-wizard +// Definitions by: Marko Jurisic +// 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; + } +} diff --git a/angular.throttle/angular.throttle-tests.ts b/angular.throttle/angular.throttle-tests.ts new file mode 100644 index 0000000000..2234adbc37 --- /dev/null +++ b/angular.throttle/angular.throttle-tests.ts @@ -0,0 +1,8 @@ +/// +/// + +var throttledFn = angular.throttle(function (someArg:any) { + return someArg; +}, 100); + +var result = throttledFn(10); diff --git a/angular.throttle/angular.throttle.d.ts b/angular.throttle/angular.throttle.d.ts new file mode 100644 index 0000000000..0a3033e67a --- /dev/null +++ b/angular.throttle/angular.throttle.d.ts @@ -0,0 +1,12 @@ +// Type definitions for angular.throttle +// Project: https://github.com/BaggersIO/angular.throttle +// Definitions by: Stefan Steinhart +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module angular { + interface IAngularStatic { + throttle:( fn:Function, throttle:number, options?:{leading?:boolean; trailing?:boolean;} ) => Function; + } +} diff --git a/angular2/angular2-2.0.0-alpha.26.d.ts b/angular2/angular2-2.0.0-alpha.26.d.ts new file mode 100644 index 0000000000..a527b13cab --- /dev/null +++ b/angular2/angular2-2.0.0-alpha.26.d.ts @@ -0,0 +1,4624 @@ +// Type definitions for Angular v2.0.0-alpha.26 +// Project: http://angular.io/ +// Definitions by: angular team +// 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. +// *********************************************************** + +// Angular depends transitively on these libraries. +// If you don't have them installed you can run +// $ tsd query es6-promise rx rx-lite --action install --save +/// +/// + +interface List extends Array {} +interface Map {} +interface StringMap {} +interface Type {} + +declare module "angular2/angular2" { + type SetterFn = typeof Function; + type int = number; + + // See https://github.com/Microsoft/TypeScript/issues/1168 + class BaseException /* extends Error */ { + message: any; + stack: any; + toString(): string; + } +} + + +declare module "angular2/angular2" { + class AbstractChangeDetector extends ChangeDetector { + addChild(cd: ChangeDetector): any; + addShadowDomChild(cd: ChangeDetector): any; + callOnAllChangesDone(): any; + checkNoChanges(): any; + detectChanges(): any; + detectChangesInRecords(throwOnChange: boolean): any; + lightDomChildren: List; + markAsCheckOnce(): any; + markPathToRootAsCheckOnce(): any; + mode: string; + parent: ChangeDetector; + ref: ChangeDetectorRef; + remove(): any; + removeChild(cd: ChangeDetector): any; + removeShadowDomChild(cd: ChangeDetector): any; + shadowDomChildren: List; + } + + class ProtoRecord { + args: List; + bindingRecord: BindingRecord; + contextIndex: number; + directiveIndex: DirectiveIndex; + expressionAsString: string; + fixedArgs: List; + funcOrValue: any; + isLifeCycleRecord(): boolean; + isPipeRecord(): boolean; + isPureFunction(): boolean; + lastInBinding: boolean; + lastInDirective: boolean; + mode: number; + name: string; + selfIndex: number; + } + + class LifecycleEvent { + name: string; + } + + interface FormDirective { + addControl(dir: ControlDirective): void; + addControlGroup(dir: ControlGroupDirective): void; + getControl(dir: ControlDirective): Control; + removeControl(dir: ControlDirective): void; + removeControlGroup(dir: ControlGroupDirective): void; + updateModel(dir: ControlDirective, value: any): void; + } + + + /** + * A directive that contains a group of [ControlDirective]. + * + * @exportedAs angular2/forms + */ + class ControlContainerDirective { + formDirective: FormDirective; + name: string; + path: List; + } + + + /** + * A marker annotation that marks a class as available to `Injector` for creation. Used by tooling + * for generating constructor stubs. + * + * ``` + * class NeedsService { + * constructor(svc:UsefulService) {} + * } + * + * @Injectable + * class UsefulService {} + * ``` + * @exportedAs angular2/di_annotations + */ + class Injectable { + } + + + /** + * Injectable Objects that contains a live list of child directives in the light Dom of a directive. + * The directives are kept in depth-first pre-order traversal of the DOM. + * + * In the future this class will implement an Observable interface. + * For now it uses a plain list of observable callbacks. + * + * @exportedAs angular2/view + */ + class BaseQueryList { + add(obj: any): any; + fireCallbacks(): any; + onChange(callback: any): any; + removeCallback(callback: any): any; + reset(newList: any): any; + } + + class AppProtoView { + bindElement(parent: ElementBinder, distanceToParent: int, protoElementInjector: ProtoElementInjector, componentDirective?: DirectiveBinding): ElementBinder; + + /** + * Adds an event binding for the last created ElementBinder via bindElement. + * + * If the directive index is a positive integer, the event is evaluated in the context of + * the given directive. + * + * If the directive index is -1, the event is evaluated in the context of the enclosing view. + * + * @param {string} eventName + * @param {AST} expression + * @param {int} directiveIndex The directive index in the binder or -1 when the event is not bound + * to a directive + */ + bindEvent(eventBindings: List, boundElementIndex: number, directiveIndex?: int): void; + elementBinders: List; + protoChangeDetector: ProtoChangeDetector; + protoLocals: Map; + render: RenderProtoViewRef; + variableBindings: Map; + } + + + /** + * Const of making objects: http://jsperf.com/instantiate-size-of-object + */ + class AppView implements ChangeDispatcher, EventDispatcher { + callAction(elementIndex: number, actionExpression: string, action: Object): any; + changeDetector: ChangeDetector; + componentChildViews: List; + + /** + * The context against which data-binding expressions in this view are evaluated against. + * This is always a component instance. + */ + context: any; + dispatchEvent(elementIndex: number, eventName: string, locals: Map): boolean; + elementInjectors: List; + freeHostViews: List; + getDetectorFor(directive: DirectiveIndex): any; + getDirectiveFor(directive: DirectiveIndex): any; + hydrated(): boolean; + init(changeDetector: ChangeDetector, elementInjectors: List, rootElementInjectors: List, preBuiltObjects: List, componentChildViews: List): any; + + /** + * Variables, local to this view, that can be used in binding expressions (in addition to the + * context). This is used for thing like `
  • `, where "player" and "item" are locals, respectively. + */ + locals: Locals; + notifyOnBinding(b: BindingRecord, currentValue: any): void; + preBuiltObjects: List; + proto: AppProtoView; + render: RenderViewRef; + renderer: Renderer; + rootElementInjectors: List; + setLocal(contextName: string, value: any): void; + + /** + * Triggers the event handlers for the element and the directives. + * + * This method is intended to be called from directive EventEmitters. + * + * @param {string} eventName + * @param {*} eventObj + * @param {int} binderIndex + */ + triggerEventHandlers(eventName: string, eventObj: any, binderIndex: int): void; + viewContainers: List; + } + + class AppViewContainer { + freeViews: List; + views: List; + } + + class Visibility extends DependencyAnnotation { + crossComponentBoundaries: boolean; + depth: number; + includeSelf: boolean; + } + + + /** + * Entry point for creating, moving views in the view hierarchy and destroying views. + * This manager contains all recursion and delegates to helper methods + * in AppViewManagerUtils and the Renderer, so unit tests get simpler. + */ + class AppViewManager { + attachViewInContainer(viewContainerLocation: ElementRef, atIndex: number, viewRef: ViewRef): ViewRef; + createDynamicComponentView(hostLocation: ElementRef, componentProtoViewRef: ProtoViewRef, componentBinding: Binding, injector: Injector): ViewRef; + createFreeEmbeddedView(location: ElementRef, protoViewRef: ProtoViewRef, injector?: Injector): ViewRef; + createFreeHostView(parentComponentLocation: ElementRef, hostProtoViewRef: ProtoViewRef, injector: Injector): ViewRef; + createRootHostView(hostProtoViewRef: ProtoViewRef, overrideSelector: string, injector: Injector): ViewRef; + createViewInContainer(viewContainerLocation: ElementRef, atIndex: number, protoViewRef: ProtoViewRef, context?: ElementRef, injector?: Injector): ViewRef; + destroyFreeEmbeddedView(location: ElementRef, viewRef: ViewRef): any; + destroyFreeHostView(parentComponentLocation: ElementRef, hostViewRef: ViewRef): any; + destroyRootHostView(hostViewRef: ViewRef): any; + destroyViewInContainer(viewContainerLocation: ElementRef, atIndex: number): any; + detachViewInContainer(viewContainerLocation: ElementRef, atIndex: number): ViewRef; + getComponent(hostLocation: ElementRef): any; + getComponentView(hostLocation: ElementRef): ViewRef; + getViewContainer(location: ElementRef): ViewContainerRef; + } + + class Observable { + observer(generator: any): Object; + } + + + /** + * Use Rx.Observable but provides an adapter to make it work as specified here: + * https://github.com/jhusain/observable-spec + * + * Once a reference implementation of the spec is available, switch to it. + */ + class EventEmitter extends Observable { + next(value: any): any; + observer(generator: any): any; + return(value: any): any; + throw(error: any): any; + toRx(): Rx.Observable; + } + + class DomRenderer extends Renderer { + attachComponentView(hostViewRef: RenderViewRef, elementIndex: number, componentViewRef: RenderViewRef): any; + attachViewInContainer(parentViewRef: RenderViewRef, boundElementIndex: number, atIndex: number, viewRef: RenderViewRef): any; + callAction(viewRef: RenderViewRef, elementIndex: number, actionExpression: string, actionArgs: any): void; + createRootHostView(hostProtoViewRef: RenderProtoViewRef, hostElementSelector: string): RenderViewRef; + createView(protoViewRef: RenderProtoViewRef): RenderViewRef; + dehydrateView(viewRef: RenderViewRef): any; + destroyView(view: RenderViewRef): any; + detachComponentView(hostViewRef: RenderViewRef, boundElementIndex: number, componentViewRef: RenderViewRef): any; + detachFreeView(viewRef: RenderViewRef): any; + detachViewInContainer(parentViewRef: RenderViewRef, boundElementIndex: number, atIndex: number, viewRef: RenderViewRef): any; + getRootNodes(viewRef: RenderViewRef): List; + hydrateView(viewRef: RenderViewRef): any; + setComponentViewRootNodes(componentViewRef: RenderViewRef, rootNodes: List): any; + setElementProperty(viewRef: RenderViewRef, elementIndex: number, propertyName: string, propertyValue: any): void; + setEventDispatcher(viewRef: RenderViewRef, dispatcher: any): void; + setText(viewRef: RenderViewRef, textNodeIndex: number, text: string): void; + } + + var DOCUMENT_TOKEN: any; + + class ASTWithSource extends AST { + assign(context: any, locals: any, value: any): any; + ast: AST; + eval(context: any, locals: any): any; + isAssignable: boolean; + location: string; + source: string; + toString(): string; + visit(visitor: any): any; + } + + class AST { + assign(context: any, locals: any, value: any): any; + eval(context: any, locals: any): any; + isAssignable: boolean; + toString(): string; + visit(visitor: any): any; + } + + class AstTransformer { + visitAccessMember(ast: AccessMember): any; + visitAll(asts: List): any; + visitBinary(ast: Binary): any; + visitConditional(ast: Conditional): any; + visitFunctionCall(ast: FunctionCall): any; + visitImplicitReceiver(ast: ImplicitReceiver): any; + visitInterpolation(ast: Interpolation): any; + visitKeyedAccess(ast: KeyedAccess): any; + visitLiteralArray(ast: LiteralArray): any; + visitLiteralMap(ast: LiteralMap): any; + visitLiteralPrimitive(ast: LiteralPrimitive): any; + visitMethodCall(ast: MethodCall): any; + visitPipe(ast: Pipe): any; + visitPrefixNot(ast: PrefixNot): any; + visitSafeAccessMember(ast: SafeAccessMember): any; + visitSafeMethodCall(ast: SafeMethodCall): any; + } + + class AccessMember extends AST { + assign(context: any, locals: any, value: any): any; + eval(context: any, locals: any): any; + getter: Function; + isAssignable: boolean; + name: string; + receiver: AST; + setter: Function; + visit(visitor: any): any; + } + + class LiteralArray extends AST { + eval(context: any, locals: any): any; + expressions: List; + visit(visitor: any): any; + } + + class ImplicitReceiver extends AST { + eval(context: any, locals: any): any; + visit(visitor: any): any; + } + + class Lexer { + tokenize(text: string): List; + } + + class Parser { + addPipes(bindingAst: ASTWithSource, pipes: List): ASTWithSource; + parseAction(input: string, location: any): ASTWithSource; + parseBinding(input: string, location: any): ASTWithSource; + parseInterpolation(input: string, location: any): ASTWithSource; + parseTemplateBindings(input: string, location: any): List; + wrapLiteralPrimitive(input: string, location: any): ASTWithSource; + } + + class Locals { + clearValues(): void; + contains(name: string): boolean; + current: Map; + get(name: string): any; + parent: Locals; + set(name: string, value: any): void; + } + + class ExpressionChangedAfterItHasBeenChecked extends BaseException { + message: string; + toString(): string; + } + + class ChangeDetectionError extends BaseException { + location: string; + message: string; + originalException: any; + toString(): string; + } + + class ProtoChangeDetector { + instantiate(dispatcher: any): ChangeDetector; + } + + class ChangeDispatcher { + notifyOnBinding(bindingRecord: BindingRecord, value: any): any; + } + + class ChangeDetector { + addChild(cd: ChangeDetector): any; + addShadowDomChild(cd: ChangeDetector): any; + checkNoChanges(): any; + dehydrate(): any; + detectChanges(): any; + hydrate(context: any, locals: Locals, directives: any): any; + markPathToRootAsCheckOnce(): any; + mode: string; + parent: ChangeDetector; + remove(): any; + removeChild(cd: ChangeDetector): any; + removeShadowDomChild(cd: ChangeDetector): any; + } + + + /** + * Interface used by Angular to control the change detection strategy for an application. + * + * Angular implements the following change detection strategies by default: + * + * - DynamicChangeDetection: slower, but does not require `eval()`. + * - JitChangeDetection: faster, but requires `eval()`. + * + * In JavaScript, you should always use `JitChangeDetection`, unless you are in an environment that + * has + * [CSP](https://developer.mozilla.org/en-US/docs/Web/Security/CSP), such as a Chrome Extension. + * + * In Dart, use `DynamicChangeDetection` during development. The Angular transformer generates an + * analog to the + * `JitChangeDetection` strategy at compile time. + * + * + * See: DynamicChangeDetection, JitChangeDetection + * + * # Example + * ```javascript + * bootstrap(MyApp, [bind(ChangeDetection).toClass(DynamicChangeDetection)]); + * ``` + * @exportedAs angular2/change_detection + */ + class ChangeDetection { + createProtoChangeDetector(definition: ChangeDetectorDefinition): ProtoChangeDetector; + } + + class ChangeDetectorDefinition { + bindingRecords: List; + directiveRecords: List; + id: string; + strategy: string; + variableNames: List; + } + + + /** + * CHECK_ONCE means that after calling detectChanges the mode of the change detector + * will become CHECKED. + */ + var CHECK_ONCE: any; + + + /** + * CHECK_ALWAYS means that after calling detectChanges the mode of the change detector + * will remain CHECK_ALWAYS. + */ + var CHECK_ALWAYS: any; + + + /** + * DETACHED means that the change detector sub tree is not a part of the main tree and + * should be skipped. + */ + var DETACHED: any; + + + /** + * CHECKED means that the change detector should be skipped until its mode changes to + * CHECK_ONCE or CHECK_ALWAYS. + */ + var CHECKED: any; + + + /** + * ON_PUSH means that the change detector's mode will be set to CHECK_ONCE during hydration. + */ + var ON_PUSH: any; + + + /** + * DEFAULT means that the change detector's mode will be set to CHECK_ALWAYS during hydration. + */ + var DEFAULT: any; + + class DynamicProtoChangeDetector extends ProtoChangeDetector { + definition: ChangeDetectorDefinition; + instantiate(dispatcher: any): any; + } + + class JitProtoChangeDetector extends ProtoChangeDetector { + definition: ChangeDetectorDefinition; + instantiate(dispatcher: any): any; + } + + class BindingRecord { + ast: AST; + callOnChange(): any; + directiveRecord: DirectiveRecord; + elementIndex: number; + implicitReceiver: any; + isDirective(): any; + isDirectiveLifecycle(): any; + isElement(): any; + isOnPushChangeDetection(): any; + isTextNode(): any; + lifecycleEvent: string; + mode: string; + propertyName: string; + setter: SetterFn; + } + + class DirectiveIndex { + directiveIndex: number; + elementIndex: number; + name: any; + } + + class DirectiveRecord { + callOnAllChangesDone: boolean; + callOnChange: boolean; + callOnCheck: boolean; + callOnInit: boolean; + changeDetection: string; + directiveIndex: DirectiveIndex; + isOnPushChangeDetection(): boolean; + } + + class DynamicChangeDetector extends AbstractChangeDetector { + alreadyChecked: boolean; + callOnAllChangesDone(): any; + changeControlStrategy: string; + changes: List; + dehydrate(): any; + detectChangesInRecords(throwOnChange: boolean): any; + directiveRecords: List; + directives: any; + dispatcher: any; + hydrate(context: any, locals: any, directives: any): any; + hydrated(): boolean; + locals: any; + pipeRegistry: PipeRegistry; + pipes: List; + prevContexts: List; + protos: List; + values: List; + } + + + /** + * Controls change detection. + * + * ChangeDetectorRef allows requesting checks for detectors that rely on observables. It + * also allows detaching and + * attaching change detector subtrees. + * + * @exportedAs angular2/change_detection + */ + class ChangeDetectorRef { + + /** + * Detaches the change detector from the change detector tree. + * + * The detached change detector will not be checked until it is reattached. + */ + detach(): any; + + /** + * Reattach the change detector to the change detector tree. + * + * This also requests a check of this change detector. This reattached change detector will be + * checked during the + * next change detection run. + */ + reattach(): any; + + /** + * Request to check all ON_PUSH ancestors. + */ + requestCheck(): any; + } + + class PipeRegistry { + config: any; + get(type: string, obj: any, cdRef: ChangeDetectorRef): Pipe; + } + + var uninitialized: any; + + + /** + * Indicates that the result of a Pipe transformation has changed even though the reference + * has not changed. + * + * The wrapped value will be unwrapped by change detection, and the unwrapped value will be stored. + * + * @exportedAs angular2/pipes + */ + class WrappedValue { + wrapped: any; + } + + + /** + * An interface for extending the list of pipes known to Angular. + * + * If you are writing a custom Pipe, you must extend this interface. + * + * #Example + * + * ``` + * class DoublePipe extends Pipe { + * supports(obj) { + * return true; + * } + * + * transform(value) { + * return `${value}${value}`; + * } + * } + * ``` + * + * @exportedAs angular2/pipes + */ + class Pipe { + onDestroy(): any; + supports(obj: any): boolean; + transform(value: any): any; + } + + class PipeFactory { + create(cdRef: any): Pipe; + supports(obs: any): boolean; + } + + + /** + * @exportedAs angular2/pipes + */ + class NullPipe extends Pipe { + called: boolean; + supports(obj: any): any; + transform(value: any): any; + } + + + /** + * @exportedAs angular2/pipes + */ + class NullPipeFactory extends PipeFactory { + create(cdRef: any): Pipe; + supports(obj: any): boolean; + } + + var defaultPipes: any; + + + /** + * Implements change detection that does not require `eval()`. + * + * This is slower than JitChangeDetection. + * + * @exportedAs angular2/change_detection + */ + class DynamicChangeDetection extends ChangeDetection { + createProtoChangeDetector(definition: ChangeDetectorDefinition): ProtoChangeDetector; + registry: PipeRegistry; + } + + + /** + * Implements faster change detection, by generating source code. + * + * This requires `eval()`. For change detection that does not require `eval()`, see + * DynamicChangeDetection. + * + * @exportedAs angular2/change_detection + */ + class JitChangeDetection extends ChangeDetection { + createProtoChangeDetector(definition: ChangeDetectorDefinition): ProtoChangeDetector; + registry: PipeRegistry; + } + + + /** + * Implements change detection using a map of pregenerated proto detectors. + * + * @exportedAs angular2/change_detection + */ + class PreGeneratedChangeDetection extends ChangeDetection { + createProtoChangeDetector(definition: ChangeDetectorDefinition): ProtoChangeDetector; + registry: PipeRegistry; + } + + var preGeneratedProtoDetectors: any; + + var defaultPipeRegistry : PipeRegistry ; + + + /** + * @exportedAs angular2/view + */ + class ViewRef { + render: RenderViewRef; + setLocal(contextName: string, value: any): void; + } + + + /** + * @exportedAs angular2/view + */ + class ProtoViewRef { + } + + + /** + * @exportedAs angular2/core + */ + class ViewContainerRef { + clear(): void; + create(protoViewRef?: ProtoViewRef, atIndex?: number, context?: ElementRef, injector?: Injector): ViewRef; + + /** + * The method can be used together with insert to implement a view move, i.e. + * moving the dom nodes while the directives in the view stay intact. + */ + detach(atIndex?: number): ViewRef; + element: ElementRef; + get(index: number): ViewRef; + indexOf(viewRef: ViewRef): any; + insert(viewRef: ViewRef, atIndex?: number): ViewRef; + length: any; + remove(atIndex?: number): void; + viewManager: AppViewManager; + } + + + /** + * @exportedAs angular2/view + */ + class ElementRef { + boundElementIndex: number; + + /** + * Exposes the underlying DOM element. + * (DEPRECATED way of accessing the DOM, replacement coming) + */ + domElement: any; + + /** + * Gets an attribute from the underlying DOM element. + * (DEPRECATED way of accessing the DOM, replacement coming) + */ + getAttribute(name: string): string; + parentView: ViewRef; + } + + interface _NgZone_initCallbacks { + /** + * called before code executes in the inner zone for each VM turn + */ + onTurnStart?: /*() => void*/ Function; + /** + * called at the end of a VM turn if code has executed in the inner + * zone + */ + onTurnDone?: /*() => void*/ Function; + /** + * called when an exception is thrown by a macro or + * micro task + */ + onErrorHandler?: /*(error, stack) => void*/ Function; + } + + /** + * A wrapper around zones that lets you schedule tasks after it has executed a task. + * + * The wrapper maintains an "inner" and an "mount" `Zone`. The application code will executes + * in the "inner" zone unless `runOutsideAngular` is explicitely called. + * + * A typical application will create a singleton `NgZone`. The outer `Zone` is a fork of the root + * `Zone`. The default `onTurnDone` runs the Angular change detection. + * + * @exportedAs angular2/core + */ + class NgZone { + + /** + * Initializes the zone hooks. + */ + initCallbacks(arg?: _NgZone_initCallbacks): any; + + /** + * Runs `fn` in the inner zone and returns whatever it returns. + * + * In a typical app where the inner zone is the Angular zone, this allows one to make use of the + * Angular's auto digest mechanism. + * + * ``` + * var zone: NgZone = [ref to the application zone]; + * + * zone.run(() => { + * // the change detection will run after this function and the microtasks it enqueues have + * executed. + * }); + * ``` + */ + run(fn: any): any; + + /** + * Runs `fn` in the outer zone and returns whatever it returns. + * + * In a typical app where the inner zone is the Angular zone, this allows one to escape Angular's + * auto-digest mechanism. + * + * ``` + * var zone: NgZone = [ref to the application zone]; + * + * zone.runOusideAngular(() => { + * element.onClick(() => { + * // Clicking on the element would not trigger the change detection + * }); + * }); + * ``` + */ + runOutsideAngular(fn: any): any; + } + + + /** + * Specifies that an injector should retrieve a dependency from its element. + * + * ## Example + * + * Here is a simple directive that retrieves a dependency from its element. + * + * ``` + * @Directive({ + * selector: '[dependency]', + * properties: [ + * 'id: dependency' + * ] + * }) + * class Dependency { + * id:string; + * } + * + * + * @Directive({ + * selector: '[my-directive]' + * }) + * class Dependency { + * constructor(@Self() dependency:Dependency) { + * expect(dependency.id).toEqual(1); + * }; + * } + * ``` + * + * We use this with the following HTML template: + * + * ``` + *
    + * ``` + * + * @exportedAs angular2/annotations + */ + class SelfAnnotation extends Visibility { + } + + + /** + * Specifies that an injector should retrieve a dependency from any ancestor element within the same + * shadow boundary. + * + * An ancestor is any element between the parent element and shadow root. + * + * + * ## Example + * + * Here is a simple directive that retrieves a dependency from an ancestor element. + * + * ``` + * @Directive({ + * selector: '[dependency]', + * properties: [ + * 'id: dependency' + * ] + * }) + * class Dependency { + * id:string; + * } + * + * + * @Directive({ + * selector: '[my-directive]' + * }) + * class Dependency { + * constructor(@Ancestor() dependency:Dependency) { + * expect(dependency.id).toEqual(2); + * }; + * } + * ``` + * + * We use this with the following HTML template: + * + * ``` + *
    + *
    + *
    + *
    + *
    + *
    + *
    + * ``` + * + * The `@Ancestor()` annotation in our constructor forces the injector to retrieve the dependency + * from the + * nearest ancestor element: + * - The current element `dependency="3"` is skipped because it is not an ancestor. + * - Next parent has no directives `
    ` + * - Next parent has the `Dependency` directive and so the dependency is satisfied. + * + * Angular injects `dependency=2`. + * + * @exportedAs angular2/annotations + */ + class AncestorAnnotation extends Visibility { + } + + + /** + * Specifies that an injector should retrieve a dependency from the direct parent. + * + * ## Example + * + * Here is a simple directive that retrieves a dependency from its parent element. + * + * ``` + * @Directive({ + * selector: '[dependency]', + * properties: [ + * 'id: dependency' + * ] + * }) + * class Dependency { + * id:string; + * } + * + * + * @Directive({ + * selector: '[my-directive]' + * }) + * class Dependency { + * constructor(@Parent() dependency:Dependency) { + * expect(dependency.id).toEqual(1); + * }; + * } + * ``` + * + * We use this with the following HTML template: + * + * ``` + *
    + *
    + *
    + * ``` + * The `@Parent()` annotation in our constructor forces the injector to retrieve the dependency from + * the + * parent element (even thought the current element could resolve it): Angular injects + * `dependency=1`. + * + * @exportedAs angular2/annotations + */ + class ParentAnnotation extends Visibility { + } + + + /** + * Specifies that an injector should retrieve a dependency from any ancestor element. + * + * An ancestor is any element between the parent element and shadow root. + * + * + * ## Example + * + * Here is a simple directive that retrieves a dependency from an ancestor element. + * + * ``` + * @Directive({ + * selector: '[dependency]', + * properties: [ + * 'id: dependency' + * ] + * }) + * class Dependency { + * id:string; + * } + * + * + * @Directive({ + * selector: '[my-directive]' + * }) + * class Dependency { + * constructor(@Unbounded() dependency:Dependency) { + * expect(dependency.id).toEqual(2); + * }; + * } + * ``` + * + * @exportedAs angular2/annotations + */ + class UnboundedAnnotation extends Visibility { + } + + /** + * Declares the available HTML templates for an application. + * + * Each angular component requires a single `@Component` and at least one `@View` annotation. The + * `@View` annotation specifies the HTML template to use, and lists the directives that are active + * within the template. + * + * When a component is instantiated, the template is loaded into the component's shadow root, and + * the expressions and statements in the template are evaluated against the component. + * + * For details on the `@Component` annotation, see {@link Component}. + * + * ## Example + * + * ``` + * @Component({ + * selector: 'greet' + * }) + * @View({ + * template: 'Hello {{name}}!', + * directives: [GreetUser, Bold] + * }) + * class Greet { + * name: string; + * + * constructor() { + * this.name = 'World'; + * } + * } + * ``` + */ + function View(arg: _ViewArg): (target: any) => any; + interface _ViewArg { + /** + * Specifies a template URL for an angular component. + * + * NOTE: either `templateUrl` or `template` should be used, but not both. + */ + templateUrl?: string; + + /** + * Specifies an inline template for an angular component. + * + * NOTE: either `templateUrl` or `template` should be used, but not both. + */ + template?: string; + + /** + * Specifies a list of directives that can be used within a template. + * + * Directives must be listed explicitly to provide proper component encapsulation. + * + * ## Example + * + * ```javascript + * @Component({ + * selector: 'my-component' + * }) + * @View({ + * directives: [For] + * template: ' + *
      + *
    • {{item}}
    • + *
    ' + * }) + * class MyComponent { + * } + * ``` + */ + // TODO(tbosch): use Type | Binding | List when Dart supports union types, + // as otherwise we would need to import Binding type and Dart would warn + // for an unused import. + directives?: List>; + + /** + * Specify a custom renderer for this View. + * If this is set, neither `template`, `templateURL` nor `directives` are used. + */ + renderer?: string; + } + + class ViewAnnotation { + } + + + /** + * Bootstrapping for Angular applications. + * + * You instantiate an Angular application by explicitly specifying a component to use as the root + * component for your + * application via the `bootstrap()` method. + * + * ## Simple Example + * + * Assuming this `index.html`: + * + * ```html + * + * + * + * loading... + * + * + * ``` + * + * An application is bootstrapped inside an existing browser DOM, typically `index.html`. Unlike + * Angular 1, Angular 2 + * does not compile/process bindings in `index.html`. This is mainly for security reasons, as well + * as architectural + * changes in Angular 2. This means that `index.html` can safely be processed using server-side + * technologies such as + * bindings. Bindings can thus use double-curly `{{ syntax }}` without collision from Angular 2 + * component double-curly + * `{{ syntax }}`. + * + * We can use this script code: + * + * ``` + * @Component({ + * selector: 'my-app' + * }) + * @View({ + * template: 'Hello {{ name }}!' + * }) + * class MyApp { + * name:string; + * + * constructor() { + * this.name = 'World'; + * } + * } + * + * main() { + * return bootstrap(MyApp); + * } + * ``` + * + * When the app developer invokes `bootstrap()` with the root component `MyApp` as its argument, + * Angular performs the + * following tasks: + * + * 1. It uses the component's `selector` property to locate the DOM element which needs to be + * upgraded into + * the angular component. + * 2. It creates a new child injector (from the platform injector) and configures the injector with + * the component's + * `appInjector`. Optionally, you can also override the injector configuration for an app by + * invoking + * `bootstrap` with the `componentInjectableBindings` argument. + * 3. It creates a new `Zone` and connects it to the angular application's change detection domain + * instance. + * 4. It creates a shadow DOM on the selected component's host element and loads the template into + * it. + * 5. It instantiates the specified component. + * 6. Finally, Angular performs change detection to apply the initial data bindings for the + * application. + * + * + * ## Instantiating Multiple Applications on a Single Page + * + * There are two ways to do this. + * + * + * ### Isolated Applications + * + * Angular creates a new application each time that the `bootstrap()` method is invoked. When + * multiple applications + * are created for a page, Angular treats each application as independent within an isolated change + * detection and + * `Zone` domain. If you need to share data between applications, use the strategy described in the + * next + * section, "Applications That Share Change Detection." + * + * + * ### Applications That Share Change Detection + * + * If you need to bootstrap multiple applications that share common data, the applications must + * share a common + * change detection and zone. To do that, create a meta-component that lists the application + * components in its template. + * By only invoking the `bootstrap()` method once, with the meta-component as its argument, you + * ensure that only a + * single change detection zone is created and therefore data can be shared across the applications. + * + * + * ## Platform Injector + * + * When working within a browser window, there are many singleton resources: cookies, title, + * location, and others. + * Angular services that represent these resources must likewise be shared across all Angular + * applications that + * occupy the same browser window. For this reason, Angular creates exactly one global platform + * injector which stores + * all shared services, and each angular application injector has the platform injector as its + * parent. + * + * Each application has its own private injector as well. When there are multiple applications on a + * page, Angular treats + * each application injector's services as private to that application. + * + * + * # API + * - `appComponentType`: The root component which should act as the application. This is a reference + * to a `Type` + * which is annotated with `@Component(...)`. + * - `componentInjectableBindings`: An additional set of bindings that can be added to `appInjector` + * for the + * Component to override default injection behavior. + * - `errorReporter`: `function(exception:any, stackTrace:string)` a default error reporter for + * unhandled exceptions. + * + * Returns a `Promise` with the application`s private Injector. + * + * @exportedAs angular2/core + */ + function bootstrap(appComponentType: Type, componentInjectableBindings?: List>, errorReporter?: Function) : Promise ; + + class ApplicationRef { + dispose(): any; + hostComponent: any; + hostComponentType: any; + injector: any; + } + + var appComponentRefToken : OpaqueToken ; + + var appComponentTypeToken : OpaqueToken ; + + + /** + * Specifies that a QueryList should be injected. + * + * See QueryList for usage and example. + * + * @exportedAs angular2/annotations + */ + class QueryAnnotation extends DependencyAnnotation { + directive: any; + } + + + /** + * Specifies that a constant attribute value should be injected. + * + * The directive can inject constant string literals of host element attributes. + * + * ## Example + * + * Suppose we have an `` element and want to know its `type`. + * + * ```html + * + * ``` + * + * A decorator can inject string literal `text` like so: + * + * ```javascript + * @Directive({ + * selector: `input' + * }) + * class InputDirective { + * constructor(@Attribute('type') type) { + * // type would be `text` in this example + * } + * } + * ``` + * + * @exportedAs angular2/annotations + */ + class AttributeAnnotation extends DependencyAnnotation { + attributeName: string; + token: any; + } + + + /** + * Cache that stores the AppProtoView of the template of a component. + * Used to prevent duplicate work and resolve cyclic dependencies. + */ + class CompilerCache { + clear(): void; + get(component: Type): AppProtoView; + set(component: Type, protoView: AppProtoView): void; + } + + + /** + * @exportedAs angular2/view + */ + class Compiler { + compile(component: Type): Promise; + compileInHost(componentTypeOrBinding: Type | Binding): Promise; + } + + + /** + * Defines lifecycle method [onChange] called after all of component's bound + * properties are updated. + */ + interface OnChange { + onChange(changes: StringMap): void; + } + + + /** + * Defines lifecycle method [onDestroy] called when a directive is being destroyed. + */ + interface OnDestroy { + onDestroy(): void; + } + + + /** + * Defines lifecycle method [onCheck] called when a directive is being checked. + */ + interface OnCheck { + onCheck(): void; + } + + + /** + * Defines lifecycle method [onInit] called when a directive is being checked the first time. + */ + interface OnInit { + onInit(): void; + } + + + /** + * Defines lifecycle method [onAllChangesDone ] called when the bindings of all its children have + * been changed. + */ + interface OnAllChangesDone { + onAllChangesDone(): void; + } + + + /** + * An iterable live list of components in the Light DOM. + * + * Injectable Objects that contains a live list of child directives in the light DOM of a directive. + * The directives are kept in depth-first pre-order traversal of the DOM. + * + * The `QueryList` is iterable, therefore it can be used in both javascript code with `for..of` loop + * as well as in + * template with `*ng-for="of"` directive. + * + * NOTE: In the future this class will implement an `Observable` interface. For now it uses a plain + * list of observable + * callbacks. + * + * # Example: + * + * Assume that `` component would like to get a list its children which are `` + * components as shown in this + * example: + * + * ```html + * + * ... + * {{o.text}} + * + * ``` + * + * In the above example the list of `` elements needs to get a list of `` elements so + * that it could render + * tabs with the correct titles and in the correct order. + * + * A possible solution would be for a `` to inject `` component and then register itself + * with `` + * component's on `hydrate` and deregister on `dehydrate` event. While a reasonable approach, this + * would only work + * partialy since `*ng-for` could rearange the list of `` components which would not be + * reported to `` + * component and thus the list of `` componets would be out of sync with respect to the list + * of `` elements. + * + * A preferred solution is to inject a `QueryList` which is a live list of directives in the + * component`s light DOM. + * + * ```javascript + * @Component({ + * selector: 'tabs' + * }) + * @View({ + * template: ` + *
      + *
    • {{pane.title}}
    • + *
    + * + * ` + * }) + * class Tabs { + * panes: QueryList + * + * constructor(@Query(Pane) panes:QueryList) { + * this.panes = panes; + * } + * } + * + * @Component({ + * selector: 'pane', + * properties: ['title'] + * }) + * @View(...) + * class Pane { + * title:string; + * } + * ``` + * + * @exportedAs angular2/view + */ + class QueryList extends BaseQueryList { + onChange(callback: any): any; + removeCallback(callback: any): any; + } + + class DirectiveResolver { + resolve(type: Type): DirectiveAnnotation; + } + + + /** + * @exportedAs angular2/view + */ + class ComponentRef { + dispose: Function; + hostView: ViewRef; + instance: any; + location: ElementRef; + } + + + /** + * Service for dynamically loading a Component into an arbitrary position in the internal Angular + * application tree. + * + * @exportedAs angular2/view + */ + class DynamicComponentLoader { + + /** + * Loads a root component that is placed at the first element that matches the + * component's selector. + * The loaded component receives injection normally as a hosted view. + */ + loadAsRoot(typeOrBinding: any, overrideSelector?: any, injector?: Injector): Promise; + + /** + * Loads a component into the location given by the provided ElementRef. The loaded component + * receives injection as if it in the place of the provided ElementRef. + */ + loadIntoExistingLocation(typeOrBinding: any, location: ElementRef, injector?: Injector): Promise; + + /** + * Loads a component into a free host view that is not yet attached to + * a parent on the render side, although it is attached to a parent in the injector hierarchy. + * The loaded component receives injection normally as a hosted view. + */ + loadIntoNewLocation(typeOrBinding: any, parentComponentLocation: ElementRef, injector?: Injector): Promise; + + /** + * Loads a component next to the provided ElementRef. The loaded component receives + * injection normally as a hosted view. + */ + loadNextToExistingLocation(typeOrBinding: any, location: ElementRef, injector?: Injector): Promise; + } + + /** + * Declare reusable UI building blocks for an application. + * + * Each Angular component requires a single `@Component` and at least one `@View` annotation. The + * `@Component` + * annotation specifies when a component is instantiated, and which properties and hostListeners it + * binds to. + * + * When a component is instantiated, Angular + * - creates a shadow DOM for the component. + * - loads the selected template into the shadow DOM. + * - creates a child {@link Injector} which is configured with the `appInjector` for the + * {@link Component}. + * + * All template expressions and statements are then evaluated against the component instance. + * + * For details on the `@View` annotation, see {@link View}. + * + * ## Example + * + * ``` + * @Component({ + * selector: 'greet' + * }) + * @View({ + * template: 'Hello {{name}}!' + * }) + * class Greet { + * name: string; + * + * constructor() { + * this.name = 'World'; + * } + * } + * ``` + * + * + * Dynamically loading a component at runtime: + * + * Regular Angular components are statically resolved. Dynamic components allows to resolve a + * component at runtime + * instead by providing a placeholder into which a regular Angular component can be dynamically + * loaded. Once loaded, + * the dynamically-loaded component becomes permanent and cannot be changed. + * Dynamic components are declared just like components, but without a `@View` annotation. + * + * + * ## Example + * + * Here we have `DynamicComp` which acts as the placeholder for `HelloCmp`. At runtime, the dynamic + * component + * `DynamicComp` requests loading of the `HelloCmp` component. + * + * There is nothing special about `HelloCmp`, which is a regular Angular component. It can also be + * used in other static + * locations. + * + * ``` + * @Component({ + * selector: 'dynamic-comp' + * }) + * class DynamicComp { + * helloCmp:HelloCmp; + * constructor(loader:DynamicComponentLoader, location:ElementRef) { + * loader.load(HelloCmp, location).then((helloCmp) => { + * this.helloCmp = helloCmp; + * }); + * } + * } + * + * @Component({ + * selector: 'hello-cmp' + * }) + * @View({ + * template: "{{greeting}}" + * }) + * class HelloCmp { + * greeting:string; + * constructor() { + * this.greeting = "hello"; + * } + * } + * ``` + */ + function Component(arg: _ComponentArg): (target: any) => any; + interface _ComponentArg { + /** + * Defines the used change detection strategy. + * + * When a component is instantiated, Angular creates a change detector, which is responsible for + * propagating + * the component's bindings. + * + * The `changeDetection` property defines, whether the change detection will be checked every time + * or only when the component + * tells it to do so. + */ + changeDetection?: string; + + /** + * Defines the set of injectable objects that are visible to a Component and its children. + * + * The `appInjector` defined in the Component annotation allow you to configure a set of bindings + * for the component's + * injector. + * + * When a component is instantiated, Angular creates a new child Injector, which is configured + * with the bindings in + * the Component `appInjector` annotation. The injectable objects then become available for + * injection to the component + * itself and any of the directives in the component's template, i.e. they are not available to + * the directives which + * are children in the component's light DOM. + * + * + * The syntax for configuring the `appInjector` injectable is identical to {@link Injector} + * injectable configuration. + * See {@link Injector} for additional detail. + * + * + * ## Simple Example + * + * Here is an example of a class that can be injected: + * + * ``` + * class Greeter { + * greet(name:string) { + * return 'Hello ' + name + '!'; + * } + * } + * + * @Component({ + * selector: 'greet', + * appInjector: [ + * Greeter + * ] + * }) + * @View({ + * template: `{{greeter.greet('world')}}!`, + * directives: [Child] + * }) + * class HelloWorld { + * greeter:Greeter; + * + * constructor(greeter:Greeter) { + * this.greeter = greeter; + * } + * } + * ``` + */ + appInjector?: List; + + /** + * Defines the set of injectable objects that are visible to its view dom children. + * + * ## Simple Example + * + * Here is an example of a class that can be injected: + * + * ``` + * class Greeter { + * greet(name:string) { + * return 'Hello ' + name + '!'; + * } + * } + * + * @Directive({ + * selector: 'needs-greeter' + * }) + * class NeedsGreeter { + * greeter:Greeter; + * + * constructor(greeter:Greeter) { + * this.greeter = greeter; + * } + * } + * + * @Component({ + * selector: 'greet', + * viewInjector: [ + * Greeter + * ] + * }) + * @View({ + * template: ``, + * directives: [NeedsGreeter] + * }) + * class HelloWorld { + * } + * + * ``` + */ + viewInjector?: List; + + selector?: string; + properties?: List; + events?: List; + hostListeners?: StringMap; + hostProperties?: StringMap; + hostAttributes?: StringMap; + hostActions?: StringMap; + exportAs?: string; + lifecycle?: List; + hostInjector?: List; + compileChildren?: boolean; + } + + class ComponentAnnotation extends DirectiveAnnotation { + } + + /** + * Directives allow you to attach behavior to elements in the DOM. + * + * Directives with an embedded view are called Components. + * + * A directive consists of a single directive annotation and a controller class. When the + * directive's `selector` matches + * elements in the DOM, the following steps occur: + * + * 1. For each directive, the `ElementInjector` attempts to resolve the directive's constructor + * arguments. + * 2. Angular instantiates directives for each matched element using `ElementInjector` in a + * depth-first order, + * as declared in the HTML. + * + * ## Understanding How Injection Works + * + * There are three stages of injection resolution. + * - *Pre-existing Injectors*: + * - The terminal Injector cannot resolve dependencies. It either throws an error or, if + * the dependency was + * specified as `@Optional`, returns `null`. + * - The platform injector resolves browser singleton resources, such as: cookies, title, + * location, and others. + * - *Component Injectors*: Each component instance has its own Injector, and they follow + * the same parent-child hierarchy + * as the component instances in the DOM. + * - *Element Injectors*: Each component instance has a Shadow DOM. Within the Shadow DOM each + * element has an `ElementInjector` + * which follow the same parent-child hierarchy as the DOM elements themselves. + * + * When a template is instantiated, it also must instantiate the corresponding directives in a + * depth-first order. The + * current `ElementInjector` resolves the constructor dependencies for each directive. + * + * Angular then resolves dependencies as follows, according to the order in which they appear in the + * View: + * + * 1. Dependencies on the current element + * 2. Dependencies on element injectors and their parents until it encounters a Shadow DOM boundary + * 3. Dependencies on component injectors and their parents until it encounters the root component + * 4. Dependencies on pre-existing injectors + * + * + * The `ElementInjector` can inject other directives, element-specific special objects, or it can + * delegate to the parent + * injector. + * + * To inject other directives, declare the constructor parameter as: + * - `directive:DirectiveType`: a directive on the current element only + * - `@Ancestor() directive:DirectiveType`: any directive that matches the type between the current + * element and the + * Shadow DOM root. Current element is not included in the resolution, therefore even if it could + * resolve it, it will + * be ignored. + * - `@Parent() directive:DirectiveType`: any directive that matches the type on a direct parent + * element only. + * - `@Query(DirectiveType) query:QueryList`: A live collection of direct child + * directives. + * - `@QueryDescendants(DirectiveType) query:QueryList`: A live collection of any + * child directives. + * + * To inject element-specific special objects, declare the constructor parameter as: + * - `element: ElementRef` to obtain a reference to logical element in the view. + * - `viewContainer: ViewContainerRef` to control child template instantiation, for + * Directive directives only + * - `bindingPropagation: BindingPropagation` to control change detection in a more granular way. + * + * ## Example + * + * The following example demonstrates how dependency injection resolves constructor arguments in + * practice. + * + * + * Assume this HTML template: + * + * ``` + *
    + *
    + *
    + *
    + *
    + *
    + *
    + *
    + *
    + *
    + * ``` + * + * With the following `dependency` decorator and `SomeService` injectable class. + * + * ``` + * @Injectable() + * class SomeService { + * } + * + * @Directive({ + * selector: '[dependency]', + * properties: [ + * 'id: dependency' + * ] + * }) + * class Dependency { + * id:string; + * } + * ``` + * + * Let's step through the different ways in which `MyDirective` could be declared... + * + * + * ### No injection + * + * Here the constructor is declared with no arguments, therefore nothing is injected into + * `MyDirective`. + * + * ``` + * @Directive({ selector: '[my-directive]' }) + * class MyDirective { + * constructor() { + * } + * } + * ``` + * + * This directive would be instantiated with no dependencies. + * + * + * ### Component-level injection + * + * Directives can inject any injectable instance from the closest component injector or any of its + * parents. + * + * Here, the constructor declares a parameter, `someService`, and injects the `SomeService` type + * from the parent + * component's injector. + * ``` + * @Directive({ selector: '[my-directive]' }) + * class MyDirective { + * constructor(someService: SomeService) { + * } + * } + * ``` + * + * This directive would be instantiated with a dependency on `SomeService`. + * + * + * ### Injecting a directive from the current element + * + * Directives can inject other directives declared on the current element. + * + * ``` + * @Directive({ selector: '[my-directive]' }) + * class MyDirective { + * constructor(dependency: Dependency) { + * expect(dependency.id).toEqual(3); + * } + * } + * ``` + * This directive would be instantiated with `Dependency` declared at the same element, in this case + * `dependency="3"`. + * + * + * ### Injecting a directive from a direct parent element + * + * Directives can inject other directives declared on a direct parent element. By definition, a + * directive with a + * `@Parent` annotation does not attempt to resolve dependencies for the current element, even if + * this would satisfy + * the dependency. + * + * ``` + * @Directive({ selector: '[my-directive]' }) + * class MyDirective { + * constructor(@Parent() dependency: Dependency) { + * expect(dependency.id).toEqual(2); + * } + * } + * ``` + * This directive would be instantiated with `Dependency` declared at the parent element, in this + * case `dependency="2"`. + * + * + * ### Injecting a directive from any ancestor elements + * + * Directives can inject other directives declared on any ancestor element (in the current Shadow + * DOM), i.e. on the + * parent element and its parents. By definition, a directive with an `@Ancestor` annotation does + * not attempt to + * resolve dependencies for the current element, even if this would satisfy the dependency. + * + * ``` + * @Directive({ selector: '[my-directive]' }) + * class MyDirective { + * constructor(@Ancestor() dependency: Dependency) { + * expect(dependency.id).toEqual(2); + * } + * } + * ``` + * + * Unlike the `@Parent` which only checks the parent, `@Ancestor` checks the parent, as well as its + * parents recursively. If `dependency="2"` didn't exist on the direct parent, this injection would + * have returned + * `dependency="1"`. + * + * + * ### Injecting a live collection of direct child directives + * + * + * A directive can also query for other child directives. Since parent directives are instantiated + * before child directives, a directive can't simply inject the list of child directives. Instead, + * the directive injects a QueryList, which updates its contents as children are added, + * removed, or moved by a directive that uses a ViewContainerRef such as a `ng-for`, an + * `ng-if`, or an `ng-switch`. + * + * ``` + * @Directive({ selector: '[my-directive]' }) + * class MyDirective { + * constructor(@Query(Dependency) dependencies:QueryList) { + * } + * } + * ``` + * + * This directive would be instantiated with a QueryList which contains `Dependency` 4 and + * 6. Here, `Dependency` 5 would not be included, because it is not a direct child. + * + * ### Injecting a live collection of descendant directives + * + * Note: This is will be implemented in later release. () + * + * Similar to `@Query` above, but also includes the children of the child elements. + * + * ``` + * @Directive({ selector: '[my-directive]' }) + * class MyDirective { + * constructor(@QueryDescendents(Dependency) dependencies:QueryList) { + * } + * } + * ``` + * + * This directive would be instantiated with a Query which would contain `Dependency` 4, 5 and 6. + * + * ### Optional injection + * + * The normal behavior of directives is to return an error when a specified dependency cannot be + * resolved. If you + * would like to inject `null` on unresolved dependency instead, you can annotate that dependency + * with `@Optional()`. + * This explicitly permits the author of a template to treat some of the surrounding directives as + * optional. + * + * ``` + * @Directive({ selector: '[my-directive]' }) + * class MyDirective { + * constructor(@Optional() dependency:Dependency) { + * } + * } + * ``` + * + * This directive would be instantiated with a `Dependency` directive found on the current element. + * If none can be + * found, the injector supplies `null` instead of throwing an error. + * + * ## Example + * + * Here we use a decorator directive to simply define basic tool-tip behavior. + * + * ``` + * @Directive({ + * selector: '[tooltip]', + * properties: [ + * 'text: tooltip' + * ], + * hostListeners: { + * 'onmouseenter': 'onMouseEnter()', + * 'onmouseleave': 'onMouseLeave()' + * } + * }) + * class Tooltip{ + * text:string; + * overlay:Overlay; // NOT YET IMPLEMENTED + * overlayManager:OverlayManager; // NOT YET IMPLEMENTED + * + * constructor(overlayManager:OverlayManager) { + * this.overlay = overlay; + * } + * + * onMouseEnter() { + * // exact signature to be determined + * this.overlay = this.overlayManager.open(text, ...); + * } + * + * onMouseLeave() { + * this.overlay.close(); + * this.overlay = null; + * } + * } + * ``` + * In our HTML template, we can then add this behavior to a `
    ` or any other element with the + * `tooltip` selector, + * like so: + * + * ``` + *
    + * ``` + * + * Directives can also control the instantiation, destruction, and positioning of inline template + * elements: + * + * A directive uses a ViewContainerRef to instantiate, insert, move, and destroy views at + * runtime. + * The ViewContainerRef is created as a result of `