Merge pull request #3 from DefinitelyTyped/master

Merged to main repository.
This commit is contained in:
Giedrius Grabauskas committed 2015-11-24 13:48:19 +02:00
commit c953bcda0f
177 files changed
+43367 -7318

No files matched your search

+178 -45
View File
@@ -8,6 +8,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -15,10 +16,12 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](amplifyjs/amplifyjs.d.ts) [AmplifyJs](http://amplifyjs.com) by [Jonas Eriksson](https://github.com/joeriks)
* [:link:](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:](amqplib/amqplib.d.ts) [amqplib 0.3.x](https://github.com/squaremo/amqp.node) by [Michael Nahkies](https://github.com/mnahkies)
* [: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.3](http://janstevens.github.io/angular-growl-2) by [Tadeusz Hucal](https://github.com/mkp05)
* [: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), [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)
@@ -35,20 +38,20 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](angular2/router.d.ts) [Angular v2.0.0-39](http://angular.io) by [angular team](https://github.com/angular)
* [:link:](angular2/angular2.d.ts) [Angular v2.0.0-39](http://angular.io) by [angular team](https://github.com/angular)
* [:link:](angular2/http.d.ts) [Angular v2.0.0-local_sha.7d5c3eb](http://angular.io) by [angular team](https://github.com/angular)
* [:link:](angular2/test_lib.d.ts) [Angular v2.0.0-local_sha.7d5c3eb](http://angular.io) by [angular team](https://github.com/angular)
* [: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)
@@ -69,6 +72,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](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)
@@ -79,11 +84,13 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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), [Arseniy Maximov](https://github.com/kern0)
* [: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)
@@ -91,14 +98,15 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](atom-keymap/atom-keymap.d.ts) [atom-keymap](https://github.com/atom/atom-keymap) by [Vadim Macagon](https://github.com/enlight)
* [:link:](atpl/atpl.d.ts) [atpl](https://github.com/soywiz/atpl.js) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](auth0/auth0.d.ts) [Auth0.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
* [:link:](auth0.lock/auth0.lock.d.ts) [Auth0Widget.js](http://auth0.com) by [Robert McLaws](https://github.com/advancedrei)
* [: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)
@@ -107,15 +115,18 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -123,21 +134,26 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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), [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-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:](box2d/box2dweb.d.ts) [bootstrap.timepicker](http://code.google.com/p/box2dweb) by [jbaldwin](https://github.com/jbaldwin)
* [:link:](bootstrap.timepicker/bootstrap.timepicker.d.ts) [bootstrap.timepicker](https://github.com/jdewit/bootstrap-timepicker) by [derikwhittaker](https://github.com/derikwhittaker)
* [:link:](box2d/box2dweb.d.ts) [bootstrap.timepicker](http://code.google.com/p/box2dweb) by [jbaldwin](https://github.com/jbaldwin)
* [:link:](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)
@@ -148,6 +164,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -172,7 +190,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](chosen/chosen.jquery.d.ts) [Chosen.JQuery](http://harvesthq.github.com/chosen) by [Boris Yankov](https://github.com/borisyankov)
* [:link:](chroma-js/chroma-js.d.ts) [Chroma.js](https://github.com/gka/chroma.js) by [Sebastian Brückner](https://github.com/invliD)
* [:link:](chrome/chrome-cast.d.ts) [Chrome Cast application development](https://developers.google.com/cast) by [Thomas Stig Jacobsen](https://github.com/eXeDK)
* [:link:](chrome/chrome.d.ts) [Chrome extension development](http://developer.chrome.com/extensions) by [Matthew Kimber](https://github.com/matthewkimber), [otiai10](https://github.com/otiai10)
* [:link:](chrome/chrome.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)
@@ -180,8 +198,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](codemirror/codemirror-matchbrackets.d.ts) [CodeMirror](https://github.com/marijnh/CodeMirror) by [Sixin Li](https://github.com/sixinli)
* [: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)
@@ -192,7 +211,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -214,12 +235,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -238,12 +261,15 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -252,11 +278,13 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](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)
@@ -276,7 +304,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](easy-api-request/easy-api-request.d.ts) [easy-api-request](https://github.com/DeadAlready/easy-api-request) by [Karl Düüna](https://github.com/DeadAlready)
* [:link:](easy-jsend/easy-jsend.d.ts) [easy-jsend](https://github.com/DeadAlready/easy-jsend) by [Karl Düüna](https://github.com/DeadAlready)
* [:link:](easy-session/easy-session.d.ts) [easy-session](https://github.com/DeadAlready/node-easy-session) by [Karl Düüna](https://github.com/DeadAlready)
* [:link:](easy-table/easy-table.d.ts) [easy-table](https://github.com/eldargab/easy-table) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](easy-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)
@@ -287,6 +315,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -315,6 +345,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -337,26 +368,31 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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/2015May/index.html) by [Artifact Health](www.artifacthealth.com)
* [: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), [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)
@@ -391,12 +427,40 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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 [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 [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:](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)
@@ -410,15 +474,16 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](graphviz/graphviz.d.ts) [Graphviz](git://github.com/glejeune/node-graphviz.git) by [Matt Frantz](https://github.com/mhfrantz)
* [: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)
@@ -428,7 +493,6 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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-rev/gulp-rev.d.ts) [gulp-csso](https://github.com/sindresorhus/gulp-rev) 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)
@@ -453,6 +517,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -481,7 +546,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -489,11 +555,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](statuses/statuses.d.ts) [http-errors](https://github.com/jshttp/statuses) 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)
@@ -513,10 +579,13 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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), [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)
@@ -607,7 +676,9 @@ 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)
@@ -616,7 +687,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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), [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)
@@ -631,8 +704,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](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-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)
@@ -651,6 +724,7 @@ 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)
@@ -665,7 +739,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](jssha/jssha.d.ts) [jsSHA](https://github.com/Caligatio/jsSHA) by [David Li](https://github.com/randombk)
* [:link:](jstorage/jstorage.d.ts) [jStorage](http://www.jstorage.info) by [Danil Flores](https://github.com/dflor003)
* [:link:](jstree/jstree.d.ts) [jsTree](http://www.jstree.com) by [Adam Pluciński](https://github.com/adaskothebeast)
* [:link:](jsuri/jsuri.d.ts) [jsUri](https://github.com/derek-watson/jsUri) by [Chris Charabaruk](http://github.com/coldacid)
* [:link:](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)
@@ -679,6 +754,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -709,6 +785,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -718,9 +795,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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), [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)
@@ -729,7 +808,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](log4js/log4js.d.ts) [log4js](https://github.com/nomiddlename/log4js-node) by [Kentaro Okuno](http://github.com/armorik83)
* [:link:](logg/logg.d.ts) [logg](https://github.com/dpup/node-logg) by [Bret Little](https://github.com/blittle)
* [:link:](loggly/loggly.d.ts) [loggly](https://github.com/nodejitsu/node-loggly) by [Ray Martone](https://github.com/rmartone)
* [:link:](loglevel/loglevel.d.ts) [loglevel](https://github.com/pimterry/loglevel) by [Stefan Profanter](https://github.com/Pro)
* [:link:](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:](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)
@@ -760,12 +839,14 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
* [: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)
@@ -790,6 +871,7 @@ 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)
@@ -800,8 +882,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](mobile-detect/mobile-detect.d.ts) [mobile-detect](http://hgoebl.github.io/mobile-detect.js) by [Martin McWhorter](https://github.com/martinmcwhorter)
* [:link:](mobservable/mobservable.d.ts) [mobservable](https://mweststrate.github.io/mobservable) by [Michel Weststrate](https://github.com/mweststrate)
* [: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)
@@ -809,8 +891,8 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](mockery/mockery.d.ts) [mockery](https://github.com/mfncooper/mockery) by [jt000](https://github.com/jt000)
* [:link:](modernizr/modernizr.d.ts) [Modernizr](http://modernizr.com) by [Boris Yankov](https://github.com/borisyankov), [Theodore Brown](https://github.com/theodorejb)
* [:link:](moment-timezone/moment-timezone.d.ts) [moment-timezone.js](http://momentjs.com/timezone) by [Michel Salib](https://github.com/michelsalib)
* [:link:](moment/moment-node.d.ts) [Moment.js](https://github.com/timrwood/moment) by [Michael Lakerveld](https://github.com/Lakerfield), [Aaron King](https://github.com/kingdango), [Hiroki Horiuchi](https://github.com/horiuchi), [Dick van den Brink](https://github.com/DickvdBrink), [Adi Dahiya](https://github.com/adidahiya), [Matt Brooks](https://github.com/EnableSoftware)
* [: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)
@@ -822,6 +904,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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 [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)
@@ -842,6 +925,19 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -855,6 +951,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -881,17 +978,18 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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-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-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:](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 [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)
@@ -920,10 +1018,12 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](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)
@@ -941,9 +1041,9 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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-twitter/passport-twitter.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
* [:link:](passport-google-oauth/passport-google-oauth.d.ts) [passport-facebook](https://github.com/jaredhanson/passport-facebook) by [James Roland Cabresos](https://github.com/staticfunction)
* [:link:](passport-facebook/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)
@@ -970,15 +1070,17 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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 [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](https://github.com/GoodBoyDigital/pixi.js) by [clark-stevenson](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:](polyline/polyline.d.ts) [Polyline](https://github.com/mapbox/polyline) by [Arseniy Maximov](https://github.com/Kern0)
@@ -1021,14 +1123,30 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](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)
@@ -1043,9 +1161,10 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
* [: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)
@@ -1057,10 +1176,12 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -1088,6 +1209,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -1102,11 +1224,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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:](on-headers/on-headers.d.ts) [serve-favicon](https://github.com/jshttp/on-headers) by [John Jeffery](https://github.com/jjeffery)
* [:link:](serve-favicon/serve-favicon.d.ts) [serve-favicon](https://github.com/expressjs/serve-favicon) by [Uros Smolnik](https://github.com/urossmolnik)
* [:link:](on-headers/on-headers.d.ts) [serve-favicon](https://github.com/jshttp/on-headers) by [John Jeffery](https://github.com/jjeffery)
* [:link:](serve-static/serve-static.d.ts) [serve-static](https://github.com/expressjs/serve-static) by [Uros Smolnik](https://github.com/urossmolnik)
* [:link:](sharedworker/SharedWorker.d.ts) [SharedWorker](http://www.w3.org/TR/workers) by [Toshiya Nakakura](https://github.com/nakakura)
* [:link:](sharepoint/SharePoint.d.ts) [SharePoint 2010 and 2013](http://sptypescript.codeplex.com) by [Stanislav Vyshchepan](http://blog.gandjustas.ru), [Andrey Markeev](http://markeev.com)
* [: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)
@@ -1119,7 +1241,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](simple-cw-node/simple-cw-node.d.ts) [simple-cw-node](https://github.com/astronaughts/simple-cw-node) by [vvakame](https://github.com/vvakame)
* [:link:](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/simplestorage.js.d.ts) [simpleStorage](https://github.com/andris9/simpleStorage) by [Áxel Costas Pena](https://github.com/axelcostaspena)
* [: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), [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)
@@ -1140,6 +1262,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -1160,6 +1283,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -1175,6 +1299,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -1202,16 +1327,19 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -1222,7 +1350,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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 r71](http://mrdoob.github.com/three.js) by [Kon](http://phyzkit.net), [Satoru Kimura](https://github.com/gyohk)
* [: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)
@@ -1254,14 +1382,15 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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-deferred/typescript-deferred.d.ts) [typescript-deferred](https://github.com/DirtyHairy/typescript-deferred) by [Christian Speckner](https://github.com/DirtyHairy)
* [:link:](typescript-services/typescriptServices.d.ts) [TypeScript-Services](https://www.npmjs.org/package/typescript-services) by [Basarat Ali Syed](http://github.com/basarat)
* [:link:](unity-webapi/unity-webapi.d.ts) [Ubuntu Unity Web API](https://launchpad.net/libunity-webapps) by [John Vrbanac](jhttps://github.com/jmvrbanac)
* [:link:](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:](umbraco/umbraco-resources.d.ts) [Umbraco](https://github.com/umbraco) by [DeCareSystemsIreland](https://github.com/DeCareSystemsIreland)
* [: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)
@@ -1282,6 +1411,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -1299,6 +1429,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -1307,7 +1438,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](webmidi/webmidi.d.ts) [Web MIDI API](http://www.w3.org/TR/webmidi) by [Toshiya Nakakura](https://github.com/nakakura)
* [:link:](webspeechapi/webspeechapi.d.ts) [Web Speech API](https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html) by [SaschaNaz](https://github.com/saschanaz)
* [:link:](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)
* [: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)
@@ -1336,7 +1467,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
@@ -1348,10 +1479,12 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [: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)
+17 -1
View File
@@ -9,6 +9,11 @@ declare module 'AngularFormly' {
export = AngularFormly;
}
declare module 'angular-formly' {
var angularFormlyDefaultExport: string;
export = angularFormlyDefaultExport;
}
declare module AngularFormly {
@@ -301,6 +306,17 @@ declare module AngularFormly {
};
/**
* 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
@@ -572,4 +588,4 @@ declare module AngularFormly {
messages: { [key: string]: ($viewValue: any, $modelValue: any, scope: ITemplateScope) => string };
}
}
}
@@ -0,0 +1,56 @@
/// <reference path="angular-google-analytics.d.ts" />
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+?$/);
}
+173
View File
@@ -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 <https://github.com/cyrilschumacher>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts" />
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<Object>): 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<string>} domains The domains.
* @return {angular.google.analytics.IAnalyticsProvider} The object instance.
*/
setCrossLinkDomains(domains: Array<string>): 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;
}
}
+23 -15
View File
@@ -8,25 +8,27 @@ app.config((growlProvider:angular.growl.IGrowlProvider, $httpProvider:angular.IH
error: 4000
};
growlProvider.globalTimeToLive(ttl);
growlProvider.globalTimeToLive(5000);
growlProvider.globalDisableCloseButton(true);
growlProvider.globalDisableIcons(true);
growlProvider.globalReversedOrder(false);
growlProvider.globalDisableCountDown(true);
growlProvider.messageVariableKey("someKey");
growlProvider.globalInlineMessages(false);
growlProvider.globalPosition("top-center");
growlProvider.messagesKey("someKey");
growlProvider.messageTextKey("someKey");
growlProvider.messageTitleKey("someKey");
growlProvider.messageSeverityKey("someKey");
growlProvider.onlyUniqueMessages(false);
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) => {
app.controller("Ctrl", ($scope:angular.IScope,
growl:angular.growl.IGrowlService,
growlMessages:angular.growl.IGrowlMessagesService) => {
var config:angular.growl.IGrowlMessageConfig = {
ttl: 5000,
disableCountDown: true,
@@ -50,4 +52,10 @@ app.controller("Ctrl", ($scope:angular.IScope, growl:angular.growl.IGrowlService
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]);
});
+50 -15
View File
@@ -1,4 +1,4 @@
// Type definitions for Angular Growl 2 v.0.7.3
// Type definitions for Angular Growl 2 v.0.7.5
// Project: http://janstevens.github.io/angular-growl-2
// Definitions by: Tadeusz Hucal <https://github.com/mkp05>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -54,73 +54,73 @@ declare module angular.growl {
* Set default TTL settings.
* @param ttl configuration of TTL for different type of message
*/
globalTimeToLive(ttl: IGrowlTTLConfig): void;
globalTimeToLive(ttl: IGrowlTTLConfig): IGrowlProvider;
/**
* Set default TTL settings.
* @param ttl ttl in milliseconds
*/
globalTimeToLive(ttl: number): void;
globalTimeToLive(ttl: number): IGrowlProvider;
/**
* Set default setting for disabling close button.
* @param disableCloseButton
*/
globalDisableCloseButton(disableCloseButton: boolean): void;
globalDisableCloseButton(disableCloseButton: boolean): IGrowlProvider;
/**
* Set default setting for disabling icons.
* @param disableIcons
*/
globalDisableIcons(disableIcons: boolean): void;
globalDisableIcons(disableIcons: boolean): IGrowlProvider;
/**
* Set reversing order of displaying new messages.
* @param reverseOrder
*/
globalReversedOrder(reverseOrder: boolean): void
globalReversedOrder(reverseOrder: boolean): IGrowlProvider;
/**
* Set default setting for displaying message disappear countdown.
* @param disableCountDown
*/
globalDisableCountDown(disableCountDown: boolean): void;
globalDisableCountDown(disableCountDown: boolean): IGrowlProvider;
/**
* Set default allowance for inline messages.
* @param inline
*/
globalInlineMessages(inline: boolean): void;
globalInlineMessages(inline: boolean): IGrowlProvider;
/**
* Set default message position.
* @param position
*/
globalPosition(position: string): void;
globalPosition(position: string): IGrowlProvider;
/**
* Enable/disable displaying only unique messages.
* @param onlyUniqueMessages
*/
onlyUniqueMessages(onlyUniqueMessages: boolean): void;
onlyUniqueMessages(onlyUniqueMessages: boolean): IGrowlProvider;
/**
* Set key where messages are stored (for http interceptor).
* @param messageVariableKey
*/
messagesKey(messageKey: string): void;
messagesKey(messageKey: string): IGrowlProvider;
/**
* Set key where message text is stored (for http interceptor).
* @param messageVariableKey
*/
messageTextKey(messageTextKey: string): void;
messageTextKey(messageTextKey: string): IGrowlProvider;
/**
* Set key where title of message is stored (for http interceptor).
* @param messageVariableKey
*/
messageTitleKey(messageTitleKey: string): void;
messageTitleKey(messageTitleKey: string): IGrowlProvider;
/**
* Set key where severity of message is stored (for http interceptor).
* @param messageVariableKey
*/
messageSeverityKey(messageSeverityKey: string): void;
messageSeverityKey(messageSeverityKey: string): IGrowlProvider;
/**
* Set key where variables for message are stored (for http interceptor).
* @param messageVariableKey
*/
messageVariableKey(messageVariableKey: string): void;
messageVariableKey(messageVariableKey: string): IGrowlProvider;
}
/**
@@ -211,4 +211,39 @@ declare module angular.growl {
*/
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;
}
}
+8 -2
View File
@@ -44,10 +44,16 @@ myApp.controller('DialogController', ($scope: ng.IScope, $mdDialog: ng.material.
});
};
$scope['alertDialog'] = () => {
$mdDialog.show($mdDialog.alert().content('Alert!'));
$mdDialog.show($mdDialog.alert().textContent('Alert!'));
};
$scope['alertDialog'] = () => {
$mdDialog.show($mdDialog.alert().htmlContent('<span>Alert!</span>'));
};
$scope['confirmDialog'] = () => {
$mdDialog.show($mdDialog.confirm().content('Confirm!'));
$mdDialog.show($mdDialog.confirm().textContent('Confirm!'));
};
$scope['confirmDialog'] = () => {
$mdDialog.show($mdDialog.confirm().htmlContent('<span>Confirm!</span>'));
};
$scope['hideDialog'] = $mdDialog.hide.bind($mdDialog, 'hide');
$scope['cancelDialog'] = $mdDialog.cancel.bind($mdDialog, 'cancel');
+2 -1
View File
@@ -28,7 +28,8 @@ declare module angular.material {
interface IPresetDialog<T> {
title(title: string): T;
content(content: string): T;
textContent(textContent: string): T;
htmlContent(htmlContent: string): T;
ok(ok: string): T;
theme(theme: string): T;
templateUrl(templateUrl?: string): T;
+104
View File
@@ -0,0 +1,104 @@
/// <reference path="../jquery/jquery.d.ts" />
/// <reference path="../angularjs/angular.d.ts" />
/// <reference path="angular-modal.d.ts" />
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: '<div></div>'
});
}
// Using controller function
function withControllerAsFunction() {
btfModal({
controller: function () {},
template: '<div></div>'
})
}
// Using constructor function
function withControllerClass() {
class TestController {
constructor(dependency1:any, dependency2:any) {}
}
btfModal({
controller: TestController,
template: '<div></div>'
});
}
// With container as selector
function withContainerAsString() {
btfModal({
template: '<div></div>',
container: '.container'
});
}
// With container as jQuery element
function withContainerAsJquery() {
var container: JQuery = $('body');
btfModal({
template: '<div></div>',
container: container
});
}
// With container as DOM Element
function withContainerAsDom() {
var container: Element = document.getElementById('container');
btfModal({
template: '<div></div>',
container: container
});
}
// With container as DOM Element Array
function withContainerAsDomArray() {
var container: Element[] = [document.getElementById('container'), document.getElementById('container2')];
btfModal({
template: '<div></div>',
container: container
});
}
// With container as function
function withContainerAsFunction() {
btfModal({
template: '<div></div>',
container: function() {}
});
}
// With container as array
function withContainerAsArray() {
btfModal({
template: '<div></div>',
container: ['1', 2]
});
}
// Calling return values
function callingValues() {
var modal: angularModal.AngularModal = btfModal({
template: '<div></div>'
});
modal.activate().then(() => {}, () => {});
modal.deactivate().then(() => {}, () => {});
var isActive: boolean = modal.active();
}
+38
View File
@@ -0,0 +1,38 @@
// Type definitions for angular-modal 0.5.0
// Project: https://github.com/btford/angular-modal
// Definitions by: Paul Lessing <https://github.com/paullessing>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />
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<void>;
deactivate(): angular.IPromise<void>;
active(): boolean;
}
export interface AngularModalFactory {
(settings: AngularModalSettingsWithTemplate | AngularModalSettingsWithTemplateUrl): AngularModal;
}
}
+2 -1
View File
@@ -774,7 +774,7 @@ declare module angular {
* @param reverse Reverse the order of the array.
* @return Reverse the order of the array.
*/
<T>(array: T[], expression: string|string[]|((value: T) => any)|((value: T) => any)[], reverse?: boolean): T[];
<T>(array: T[], expression: string|((value: T) => any)|(((value: T) => any)|string)[], reverse?: boolean): T[];
}
/**
@@ -1660,6 +1660,7 @@ declare module angular {
restrict?: string;
scope?: any;
template?: any;
templateNamespace?: string;
templateUrl?: any;
terminal?: boolean;
transclude?: any;
+3 -2
View File
@@ -16,12 +16,13 @@
/// <reference path="../node/node.d.ts" />
declare module "archiver" {
import * as FS from 'fs';
import * as STREAM from 'stream';
interface nameInterface {
name?: string;
}
interface Archiver {
interface Archiver extends STREAM.Transform {
pipe(writeStream: FS.WriteStream): void;
append(readStream: FS.ReadStream, name: nameInterface): void;
finalize(): void;
@@ -38,4 +39,4 @@ declare module "archiver" {
}
export = archiver;
}
}
+306
View File
@@ -0,0 +1,306 @@
/// <reference path="argparse.d.ts" />
// near copy of each of the tests from https://github.com/nodeca/argparse/tree/master/examples
import {ArgumentParser, RawDescriptionHelpFormatter} from 'argparse';
var args: any;
var simpleExample = new ArgumentParser({
version: '0.0.1',
addHelp: true,
description: 'Argparse example',
});
simpleExample.addArgument(
['-f', '--foo'],
{
help: 'foo bar',
}
);
simpleExample.addArgument(
['-b', '--bar'],
{
help: 'bar foo',
}
);
simpleExample.printHelp();
console.log('-----------');
args = simpleExample.parseArgs('-f 1 -b2'.split(' '));
console.dir(args);
console.log('-----------');
args = simpleExample.parseArgs('-f=3 --bar=4'.split(' '));
console.dir(args);
console.log('-----------');
args = simpleExample.parseArgs('--foo 5 --bar 6'.split(' '));
console.dir(args);
console.log('-----------');
var choicesExample = new ArgumentParser({
version: '0.0.1',
addHelp: true,
description: 'Argparse examples: choice'
});
choicesExample.addArgument(['foo'], { choices: 'abc' });
choicesExample.printHelp();
console.log('-----------');
args = choicesExample.parseArgs(['c']);
console.dir(args);
console.log('-----------');
// choicesExample.parseArgs(['X']);
// console.dir(args);
var constantExample = new ArgumentParser({
version: '0.0.1',
addHelp: true,
description: 'Argparse examples: constant'
});
constantExample.addArgument(
['-a'],
{
action: 'storeConst',
dest: 'answer',
help: 'store constant',
constant: 42
}
);
constantExample.addArgument(
['--str'],
{
action: 'appendConst',
dest: 'types',
help: 'append constant "str" to types',
constant: 'str'
}
);
constantExample.addArgument(
['--int'],
{
action: 'appendConst',
dest: 'types',
help: 'append constant "int" to types',
constant: 'int'
}
);
constantExample.addArgument(
['--true'],
{
action: 'storeTrue',
help: 'store true constant'
}
);
constantExample.addArgument(
['--false'],
{
action: 'storeFalse',
help: 'store false constant'
}
);
constantExample.printHelp();
console.log('-----------');
args = constantExample.parseArgs('-a --str --int --true'.split(' '));
console.dir(args);
var nargsExample = new ArgumentParser({
version: '0.0.1',
addHelp: true,
description: 'Argparse examples: nargs'
});
nargsExample.addArgument(
['-f', '--foo'],
{
help: 'foo bar',
nargs: 1
}
);
nargsExample.addArgument(
['-b', '--bar'],
{
help: 'bar foo',
nargs: '*'
}
);
nargsExample.printHelp();
console.log('-----------');
args = nargsExample.parseArgs('--foo a --bar c d'.split(' '));
console.dir(args);
console.log('-----------');
args = nargsExample.parseArgs('--bar b c f --foo a'.split(' '));
console.dir(args);
var parent_parser = new ArgumentParser({ addHelp: false });
// note addHelp:false to prevent duplication of the -h option
parent_parser.addArgument(
['--parent'],
{ type: 'int', help: 'parent' }
);
var foo_parser = new ArgumentParser({
parents: [parent_parser],
description: 'child1'
});
foo_parser.addArgument(['foo']);
args = foo_parser.parseArgs(['--parent', '2', 'XXX']);
console.log(args);
var bar_parser = new ArgumentParser({
parents: [parent_parser],
description: 'child2'
});
bar_parser.addArgument(['--bar']);
args = bar_parser.parseArgs(['--bar', 'YYY']);
console.log(args);
var prefixCharsExample = new ArgumentParser({
version: '0.0.1',
addHelp: true,
description: 'Argparse examples: prefix_chars',
prefixChars: '-+'
});
prefixCharsExample.addArgument(['+f', '++foo']);
prefixCharsExample.addArgument(['++bar'], { action: 'storeTrue' });
prefixCharsExample.printHelp();
console.log('-----------');
args = prefixCharsExample.parseArgs(['+f', '1']);
console.dir(args);
args = prefixCharsExample.parseArgs(['++bar']);
console.dir(args);
args = prefixCharsExample.parseArgs(['++foo', '2', '++bar']);
console.dir(args);
var subparserExample = new ArgumentParser({
version: '0.0.1',
addHelp: true,
description: 'Argparse examples: sub-commands'
});
var subparsers = subparserExample.addSubparsers({
title: 'subcommands',
dest: "subcommand_name"
});
var bar = subparsers.addParser('c1', { addHelp: true, help: 'c1 help' });
bar.addArgument(
['-f', '--foo'],
{
action: 'store',
help: 'foo3 bar3'
}
);
var bar = subparsers.addParser(
'c2',
{ aliases: ['co'], addHelp: true, help: 'c2 help' }
);
bar.addArgument(
['-b', '--bar'],
{
action: 'store',
type: 'int',
help: 'foo3 bar3'
}
);
subparserExample.printHelp();
console.log('-----------');
args = subparserExample.parseArgs('c1 -f 2'.split(' '));
console.dir(args);
console.log('-----------');
args = subparserExample.parseArgs('c2 -b 1'.split(' '));
console.dir(args);
console.log('-----------');
args = subparserExample.parseArgs('co -b 1'.split(' '));
console.dir(args);
console.log('-----------');
subparserExample.parseArgs(['c1', '-h']);
var functionExample = new ArgumentParser({ description: 'Process some integers.' });
function sum(arr: number[]) {
return arr.reduce(function(a, b) {
return a + b;
}, 0);
}
function max(arr: number[]) {
return Math.max.apply(Math, arr);
}
functionExample.addArgument(['integers'], {
metavar: 'N',
type: 'int',
nargs: '+',
help: 'an integer for the accumulator'
});
functionExample.addArgument(['--sum'], {
dest: 'accumulate',
action: 'storeConst',
constant: sum,
defaultValue: max,
help: 'sum the integers (default: find the max)'
});
args = functionExample.parseArgs('--sum 1 2 -1'.split(' '));
console.log(args.accumulate(args.integers));
var formatterExample = new ArgumentParser({
prog: 'PROG',
formatterClass: RawDescriptionHelpFormatter,
description: 'Keep the formatting\n' +
' exactly as it is written\n' +
'\n' +
'here\n'
});
formatterExample.addArgument(['--foo'], {
help: ' foo help should not\n' +
' retain this odd formatting'
});
formatterExample.addArgument(['spam'], {
'help': 'spam help'
});
var group = formatterExample.addArgumentGroup({
title: 'title',
description: ' This text\n' +
' should be indented\n' +
' exactly like it is here\n'
});
group.addArgument(['--bar'], {
help: 'bar help'
});
formatterExample.printHelp();
+90
View File
@@ -0,0 +1,90 @@
// Type definitions for argparse v1.0.3
// Project: https://github.com/nodeca/argparse
// Definitions by: Andrew Schurman <http://github.com/arcticwaters>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "argparse" {
export class ArgumentParser extends ArgumentGroup {
constructor(options? : ArgumentParserOptions);
addSubparsers(options? : SubparserOptions) : SubParser;
parseArgs(args? : string[], ns? : Namespace|Object) : any;
printUsage() : void;
printHelp() : void;
formatUsage() : string;
formatHelp() : string;
parseKnownArgs(args? : string[], ns? : Namespace|Object) : any[];
convertArgLineToArg(argLine : string) : string[];
exit(status : number, message : string) : void;
error(err : string|Error) : void;
}
interface Namespace {}
class SubParser {
addParser(name : string, options? : SubArgumentParserOptions) : ArgumentParser;
}
class ArgumentGroup {
addArgument(args : string[], options? : ArgumentOptions) : void;
addArgumentGroup(options? : ArgumentGroupOptions) : ArgumentGroup;
addMutuallyExclusiveGroup(options? : {required : boolean}) : ArgumentGroup;
setDefaults(options? : {}) : void;
getDefault(dest : string) : any;
}
interface SubparserOptions {
title? : string;
description? : string;
prog? : string;
parserClass? : {new() : any};
action? : string;
dest? : string;
help? : string;
metavar? : string;
}
interface SubArgumentParserOptions extends ArgumentParserOptions {
aliases? : string[];
help? : string;
}
interface ArgumentParserOptions {
description? : string;
epilog? : string;
addHelp? : boolean;
argumentDefault? : any;
parents? : ArgumentParser[];
prefixChars? : string;
formatterClass? : {new() : HelpFormatter|ArgumentDefaultsHelpFormatter|RawDescriptionHelpFormatter|RawTextHelpFormatter};
prog? : string;
usage? : string;
version? : string;
}
interface ArgumentGroupOptions {
prefixChars? : string;
argumentDefault? : any;
title? : string;
description? : string;
}
export class HelpFormatter {}
export class ArgumentDefaultsHelpFormatter {}
export class RawDescriptionHelpFormatter {}
export class RawTextHelpFormatter {}
interface ArgumentOptions {
action? : string;
optionStrings? : string[];
dest? : string;
nargs? : string|number;
constant? : any;
defaultValue? : any;
type? : string|Function;
choices? : string|string[];
required? : boolean;
help? : string;
metavar? : string;
}
}
+248
View File
@@ -0,0 +1,248 @@
/// <reference path="bignum.d.ts" />
var bignum = require('bignum');
// Test constructors.
var instance = bignum(16);
bignum('16');
bignum(instance);
// Test `toNumber` function.
instance.toNumber();
bignum.toNumber(4);
bignum.toNumber('4');
bignum.toNumber(bignum(4));
// Test `toBuffer` function.
instance.toBuffer();
bignum.toBuffer(4);
bignum.toBuffer('4');
bignum.toBuffer(bignum(4));
// Test `add` function.
instance.add(4);
instance.add('4');
instance.add(bignum(4));
bignum.add(instance, 4);
bignum.add(instance, '4');
bignum.add(instance, bignum(4));
// Test `sub` function.
instance.sub(4);
instance.sub('4');
instance.sub(bignum(4));
bignum.sub(instance, 4);
bignum.sub(instance, '4');
bignum.sub(instance, bignum(4));
// Test `mul` function.
instance.mul(4);
instance.mul('4');
instance.mul(bignum(4));
bignum.mul(instance, 4);
bignum.mul(instance, '4');
bignum.mul(instance, bignum(4));
// Test `div` function.
instance.div(4);
instance.div('4');
instance.div(bignum(4));
bignum.div(instance, 4);
bignum.div(instance, '4');
bignum.div(instance, bignum(4));
// Test `abs` function.
instance.abs();
bignum.abs(instance);
// Test `neg` function.
instance.neg();
bignum.neg(instance);
// Test `cmp` function.
instance.cmp(4);
instance.cmp('4');
instance.cmp(bignum(4));
bignum.cmp(instance, 4);
bignum.cmp(instance, '4');
bignum.cmp(instance, bignum(4));
// Test `gt` function.
instance.gt(4);
instance.gt('4');
instance.gt(bignum(4));
bignum.gt(instance, 4);
bignum.gt(instance, '4');
bignum.gt(instance, bignum(4));
// Test `ge` function.
instance.ge(4);
instance.ge('4');
instance.ge(bignum(4));
bignum.ge(instance, 4);
bignum.ge(instance, '4');
bignum.ge(instance, bignum(4));
// Test `eq` function.
instance.eq(4);
instance.eq('4');
instance.eq(bignum(4));
bignum.eq(instance, 4);
bignum.eq(instance, '4');
bignum.eq(instance, bignum(4));
// Test `lt` function.
instance.lt(4);
instance.lt('4');
instance.lt(bignum(4));
bignum.lt(instance, 4);
bignum.lt(instance, '4');
bignum.lt(instance, bignum(4));
// Test `le` function.
instance.le(4);
instance.le('4');
instance.le(bignum(4));
bignum.le(instance, 4);
bignum.le(instance, '4');
bignum.le(instance, bignum(4));
// Test `and` function.
instance.and(4);
instance.and('4');
instance.and(bignum(4));
bignum.and(instance, 4);
bignum.and(instance, '4');
bignum.and(instance, bignum(4));
// Test `or` function.
instance.or(4);
instance.or('4');
instance.or(bignum(4));
bignum.or(instance, 4);
bignum.or(instance, '4');
bignum.or(instance, bignum(4));
// Test `xor` function.
instance.xor(4);
instance.xor('4');
instance.xor(bignum(4));
bignum.xor(instance, 4);
bignum.xor(instance, '4');
bignum.xor(instance, bignum(4));
// Test `mod` function.
instance.mod(4);
instance.mod('4');
instance.mod(bignum(4));
bignum.mod(instance, 4);
bignum.mod(instance, '4');
bignum.mod(instance, bignum(4));
// Test `pow` function.
instance.pow(4);
instance.pow('4');
instance.pow(bignum(4));
bignum.pow(instance, 4);
bignum.pow(instance, '4');
bignum.pow(instance, bignum(4));
// Test `powm` function.
instance.powm(4, 4);
instance.powm('4', 4);
instance.powm(bignum(4), 4);
bignum.powm(instance, 4, 4);
bignum.powm(instance, '4', 4);
bignum.powm(instance, bignum(4), 4);
instance.powm(4, '4');
instance.powm('4', '4');
instance.powm(bignum(4), '4');
bignum.powm(instance, 4, '4');
bignum.powm(instance, '4', '4');
bignum.powm(instance, bignum(4), '4');
instance.powm(4, bignum(4));
instance.powm('4', bignum(4));
instance.powm(bignum(4), bignum(4));
bignum.powm(instance, 4, bignum(4));
bignum.powm(instance, '4', bignum(4));
bignum.powm(instance, bignum(4), bignum(4));
// Test `invertm` function.
instance.invertm(4);
instance.invertm('4');
instance.invertm(bignum(4));
bignum.invertm(instance, 4);
bignum.invertm(instance, '4');
bignum.invertm(instance, bignum(4));
// Test `rand` function.
instance.rand();
instance.rand(20);
instance.rand('20');
instance.rand(bignum(20));
bignum.rand(instance);
bignum.rand(instance, 20);
bignum.rand(instance, '20');
bignum.rand(instance, bignum(20));
// Test `probPrime` function.
instance.probPrime();
bignum.probPrime(instance);
// Test `shiftLeft` function.
instance.shiftLeft(4);
instance.shiftLeft('4');
instance.shiftLeft(bignum(4));
bignum.shiftLeft(instance, 4);
bignum.shiftLeft(instance, '4');
bignum.shiftLeft(instance, bignum(4));
// Test `shiftRight` function.
instance.shiftRight(4);
instance.shiftRight('4');
instance.shiftRight(bignum(4));
bignum.shiftRight(instance, 4);
bignum.shiftRight(instance, '4');
bignum.shiftRight(instance, bignum(4));
// Test `gcd` function.
instance.gcd(bignum(4));
bignum.gcd(instance, bignum(4));
// Test `jacobi` function.
instance.jacobi(bignum(17));
bignum.jacobi(instance, bignum(17));
// Test `bitLength` function.
instance.bitLength();
bignum.bitLength(instance);
+269
View File
@@ -0,0 +1,269 @@
// Type definitions for BigNum
// Project: https://github.com/justmoon/node-BigNum
// Definitions by: Pat Smuk <https://github.com/Patman64>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare class BigNum {
/** Create a new BigNum from n. */
constructor(n: number|BigNum);
/** Create a new BigNum from n and a base. */
constructor(n: string, base?: number);
/**
* Create a new BigNum from a Buffer.
*
* The default options are: {endian: 'big', size: 1}.
*/
static fromBuffer(buffer: Buffer, options?: BigNum.BufferOptions): BigNum;
/**
* Generate a probable prime of length bits.
*
* If safe is true, it will be a "safe" prime of the form p=2p'+1 where p' is also prime.
*/
static prime(bits: number, safe?: boolean): BigNum;
/** Return true if num is identified as a BigNum instance. Otherwise, return false. */
static isBigNum(num: any): boolean;
/** Print out the BigNum instance in the requested base as a string. Default: base 10 */
toString(base?: number): string;
/**
* Turn a BigNum into a Number.
*
* If the BigNum is too big you'll lose precision or you'll get ±Infinity.
*/
toNumber(): number;
/**
* Return a new Buffer with the data from the BigNum.
*
* The default options are: {endian: 'big', size: 1}.
*/
toBuffer(options?: BigNum.BufferOptions): Buffer;
/** Return a new BigNum containing the instance value plus n. */
add(n: BigNum.BigNumCompatible): BigNum;
/** Return a new BigNum containing the instance value minus n. */
sub(n: BigNum.BigNumCompatible): BigNum;
/** Return a new BigNum containing the instance value multiplied by n. */
mul(n: BigNum.BigNumCompatible): BigNum;
/** Return a new BigNum containing the instance value integrally divided by n. */
div(n: BigNum.BigNumCompatible): BigNum;
/** Return a new BigNum with the absolute value of the instance. */
abs(): BigNum;
/** Return a new BigNum with the negative of the instance value. */
neg(): BigNum;
/**
* Compare the instance value to n.
*
* Return a positive integer if > n, a negative integer if < n, and 0 if == n.
*/
cmp(n: BigNum.BigNumCompatible): number;
/** Return a boolean: whether the instance value is greater than n (> n). */
gt(n: BigNum.BigNumCompatible): boolean;
/** Return a boolean: whether the instance value is greater than or equal to n (>= n). */
ge(n: BigNum.BigNumCompatible): boolean;
/** Return a boolean: whether the instance value is equal to n (== n). */
eq(n: BigNum.BigNumCompatible): boolean;
/** Return a boolean: whether the instance value is less than n (< n). */
lt(n: BigNum.BigNumCompatible): boolean;
/** Return a boolean: whether the instance value is less than or equal to n (<= n). */
le(n: BigNum.BigNumCompatible): boolean;
/** Return a new BigNum with the instance value bitwise AND (&)-ed with n. */
and(n: BigNum.BigNumCompatible): BigNum;
/** Return a new BigNum with the instance value bitwise inclusive-OR (|)-ed with n. */
or(n: BigNum.BigNumCompatible): BigNum;
/** Return a new BigNum with the instance value bitwise exclusive-OR (^)-ed with n. */
xor(n: BigNum.BigNumCompatible): BigNum;
/** Return a new BigNum with the instance value modulo n. */
mod(n: BigNum.BigNumCompatible): BigNum;
/** Return a new BigNum with the instance value raised to the nth power. */
pow(n: BigNum.BigNumCompatible): BigNum;
/** Return a new BigNum with the instance value raised to the nth power modulo m. */
powm(n: BigNum.BigNumCompatible, m: BigNum.BigNumCompatible): BigNum;
/** Compute the multiplicative inverse modulo m. */
invertm(m: BigNum.BigNumCompatible): BigNum;
/**
* If upperBound is supplied, return a random BigNum between the instance value and upperBound - 1, inclusive.
* Otherwise, return a random BigNum between 0 and the instance value - 1, inclusive.
*/
rand(upperBound?: BigNum.BigNumCompatible): BigNum;
/**
* Return whether the BigNum is:
* - certainly prime (true)
* - probably prime ('maybe')
* - certainly composite (false)
*/
probPrime(): boolean | string;
/** Return a new BigNum that is the 2^n multiple. Equivalent of the << operator. */
shiftLeft(n: BigNum.BigNumCompatible): BigNum;
/** Return a new BigNum of the value integer divided by 2^n. Equivalent of the >> operator. */
shiftRight(n: BigNum.BigNumCompatible): BigNum;
/** Return the greatest common divisor of the current BigNum with n as a new BigNum. */
gcd(n: BigNum): BigNum;
/**
* Return the Jacobi symbol (or Legendre symbol if n is prime) of the current BigNum (= a) over n.
* Note that n must be odd and >= 3. 0 <= a < n.
*
* Returns -1 or 1 as an int (NOT a BigNum). Throws an error on failure.
*/
jacobi(n: BigNum): number;
/** Return the number of bits used to represent the current BigNum. */
bitLength(): number;
}
declare namespace BigNum {
/** Anything that can be converted to BigNum. */
type BigNumCompatible = BigNum | number | string;
export interface BufferOptions {
/** Can be either 'big' or 'little'. Also accepts 1 for big and -1 for little. Doesn't matter when size = 1. */
endian: string | number;
/** Number of bytes per word, or 'auto' to flip entire Buffer. */
size: number | string;
}
/**
* Turn a BigNum into a Number.
*
* If the BigNum is too big you'll lose precision or you'll get ±Infinity.
*/
export function toNumber(n: BigNumCompatible): number;
/**
* Return a new Buffer with the data from the BigNum.
*
* The default options are: {endian: 'big', size: 1}.
*/
export function toBuffer(n: BigNumCompatible, options?: BufferOptions): Buffer;
/** Return a new BigNum containing the instance value plus n. */
export function add(left: BigNumCompatible, right: BigNumCompatible): BigNum;
/** Return a new BigNum containing the instance value minus n. */
export function sub(left: BigNumCompatible, right: BigNumCompatible): BigNum;
/** Return a new BigNum containing the instance value multiplied by n. */
export function mul(left: BigNumCompatible, right: BigNumCompatible): BigNum;
/** Return a new BigNum containing the instance value integrally divided by n. */
export function div(dividend: BigNumCompatible, divisor: BigNumCompatible): BigNum;
/** Return a new BigNum with the absolute value of the instance. */
export function abs(n: BigNumCompatible): BigNum;
/** Return a new BigNum with the negative of the instance value. */
export function neg(n: BigNumCompatible): BigNum;
/**
* Compare the instance value to n.
*
* Return a positive integer if > n, a negative integer if < n, and 0 if == n.
*/
export function cmp(left: BigNumCompatible, right: BigNumCompatible): number;
/** Return a boolean: whether the instance value is greater than n (> n). */
export function gt(left: BigNumCompatible, right: BigNumCompatible): boolean;
/** Return a boolean: whether the instance value is greater than or equal to n (>= n). */
export function ge(left: BigNumCompatible, right: BigNumCompatible): boolean;
/** Return a boolean: whether the instance value is equal to n (== n). */
export function eq(left: BigNumCompatible, right: BigNumCompatible): boolean;
/** Return a boolean: whether the instance value is less than n (< n). */
export function lt(left: BigNumCompatible, right: BigNumCompatible): boolean;
/** Return a boolean: whether the instance value is less than or equal to n (<= n). */
export function le(left: BigNumCompatible, right: BigNumCompatible): boolean;
/** Return a new BigNum with the instance value bitwise AND (&)-ed with n. */
export function and(left: BigNumCompatible, right: BigNumCompatible): BigNum;
/** Return a new BigNum with the instance value bitwise inclusive-OR (|)-ed with n. */
export function or(left: BigNumCompatible, right: BigNumCompatible): BigNum;
/** Return a new BigNum with the instance value bitwise exclusive-OR (^)-ed with n. */
export function xor(left: BigNumCompatible, right: BigNumCompatible): BigNum;
/** Return a new BigNum with the instance value modulo n. */
export function mod(left: BigNumCompatible, right: BigNumCompatible): BigNum;
/** Return a new BigNum with the instance value raised to the nth power. */
export function pow(base: BigNumCompatible, exponent: BigNumCompatible): BigNum;
/** Return a new BigNum with the instance value raised to the nth power modulo m. */
export function powm(base: BigNumCompatible, exponent: BigNumCompatible, m: BigNumCompatible): BigNum;
/** Compute the multiplicative inverse modulo m. */
export function invertm(n: BigNumCompatible, m: BigNumCompatible): BigNum;
/**
* If upperBound is supplied, return a random BigNum between the instance value and upperBound - 1, inclusive.
* Otherwise, return a random BigNum between 0 and the instance value - 1, inclusive.
*/
export function rand(n: BigNumCompatible, upperBound?: BigNumCompatible): BigNum;
/**
* Return whether the BigNum is:
* - certainly prime (true)
* - probably prime ('maybe')
* - certainly composite (false)
*/
export function probPrime(n: BigNumCompatible): boolean | string;
/** Return a new BigNum that is the 2^bits multiple. Equivalent of the << operator. */
export function shiftLeft(n: BigNumCompatible, bits: BigNumCompatible): BigNum;
/** Return a new BigNum of the value integer divided by 2^bits. Equivalent of the >> operator. */
export function shiftRight(n: BigNumCompatible, bits: BigNumCompatible): BigNum;
/** Return the greatest common divisor of the current BigNum with n as a new BigNum. */
export function gcd(left: BigNumCompatible, right: BigNum): BigNum;
/**
* Return the Jacobi symbol (or Legendre symbol if n is prime) of the current BigNum (= a) over n.
* Note that n must be odd and >= 3. 0 <= a < n.
*
* Returns -1 or 1 as an int (NOT a BigNum). Throws an error on failure.
*/
export function jacobi(a: BigNumCompatible, n: BigNum): number;
/** Return the number of bits used to represent the current BigNum. */
export function bitLength(n: BigNumCompatible): number;
}
declare module "bignum" {
export = BigNum;
}
+88 -10
View File
@@ -80,6 +80,7 @@ var voidProm: Promise<void>;
var fooProm: Promise<Foo>;
var barProm: Promise<Bar>;
var fooOrBarProm: Promise<Foo|Bar>;
var bazProm: Promise<Baz>;
// - - - - - - - - - - - - - - - - -
@@ -150,6 +151,7 @@ var BlueBird: typeof Promise;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
var nodeCallbackFunc = (callback: (err: any, result: string) => void) => {}
var nodeCallbackFuncErrorOnly = (callback: (err: any) => void) => {}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -225,6 +227,21 @@ barProm = fooProm.then((value: Foo) => {
}, (reason: any) => {
return bar;
});
barProm = fooProm.then((value: Foo) => {
return bar;
}, (reason: any) => {
return barProm;
});
barProm = fooProm.then((value: Foo) => {
return bar;
}, (reason: any) => {
return;
});
barProm = fooProm.then((value: Foo) => {
return bar;
}, (reason: any) => {
return voidProm;
});
barProm = fooProm.then((value: Foo) => {
return bar;
});
@@ -236,36 +253,96 @@ barProm = barProm.then((value: Bar) => {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
barProm = fooProm.catch((reason: any) => {
fooProm = fooProm.catch((reason: any) => {
return;
});
fooProm = fooProm.caught((reason: any) => {
return;
});
fooProm = fooProm.catch((error: any) => {
return true;
}, (reason: any) => {
return;
});
fooProm = fooProm.caught((error: any) => {
return true;
}, (reason: any) => {
return;
});
fooProm = fooProm.catch((reason: any) => {
return voidProm;
});
fooProm = fooProm.caught((reason: any) => {
return voidProm;
});
fooProm = fooProm.catch((error: any) => {
return true;
}, (reason: any) => {
return voidProm;
});
fooProm = fooProm.caught((error: any) => {
return true;
}, (reason: any) => {
return voidProm;
});
fooProm = fooProm.catch((reason: any) => {
//handle multiple valid return types simultaneously
if (true) {
return;
} else if (false) {
return voidProm;
} else if (foo) {
return foo;
}
});
fooOrBarProm = fooProm.catch((reason: any) => {
return bar;
});
barProm = fooProm.caught((reason: any) => {
fooOrBarProm = fooProm.caught((reason: any) => {
return bar;
});
barProm = fooProm.catch((reason: any) => {
return bar;
fooOrBarProm = fooProm.catch((error: any) => {
return true;
}, (reason: any) => {
return bar;
});
barProm = fooProm.caught((reason: any) => {
return bar;
fooOrBarProm = fooProm.caught((error: any) => {
return true;
}, (reason: any) => {
return bar;
});
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
barProm = fooProm.catch(Error, (reason: any) => {
fooProm = fooProm.catch(Error, (reason: any) => {
return;
});
fooProm = fooProm.catch(Promise.CancellationError, (reason: any) => {
return;
});
fooProm = fooProm.caught(Error, (reason: any) => {
return;
});
fooProm = fooProm.caught(Promise.CancellationError, (reason: any) => {
return;
});
fooOrBarProm = fooProm.catch(Error, (reason: any) => {
return bar;
});
barProm = fooProm.catch(Promise.CancellationError, (reason: any) => {
fooOrBarProm = fooProm.catch(Promise.CancellationError, (reason: any) => {
return bar;
});
barProm = fooProm.caught(Error, (reason: any) => {
fooOrBarProm = fooProm.caught(Error, (reason: any) => {
return bar;
});
barProm = fooProm.caught(Promise.CancellationError, (reason: any) => {
fooOrBarProm = fooProm.caught(Promise.CancellationError, (reason: any) => {
return bar;
});
@@ -678,6 +755,7 @@ func = Promise.promisify(f, obj);
obj = Promise.promisifyAll(obj);
anyProm = Promise.fromNode(callback => nodeCallbackFunc(callback));
anyProm = Promise.fromNode(callback => nodeCallbackFuncErrorOnly(callback));
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+19 -18
View File
@@ -25,19 +25,19 @@ declare class Promise<R> implements Promise.Thenable<R>, Promise.Inspection<R> {
/**
* Promises/A+ `.then()` with progress handler. Returns a new promise chained from this promise. The new promise will be rejected or resolved dedefer on the passed `fulfilledHandler`, `rejectedHandler` and the state of this promise.
*/
then<U>(onFulfill: (value: R) => U|Promise.Thenable<U>, onReject: (error: any) => Promise.Thenable<U>, onProgress?: (note: any) => any): Promise<U>;
then<U>(onFulfill: (value: R) => U|Promise.Thenable<U>, onReject?: (error: any) => U, onProgress?: (note: any) => any): Promise<U>;
then<U>(onFulfill: (value: R) => U|Promise.Thenable<U>, onReject?: (error: any) => U|Promise.Thenable<U>, onProgress?: (note: any) => any): Promise<U>;
then<U>(onFulfill: (value: R) => U|Promise.Thenable<U>, onReject?: (error: any) => void|Promise.Thenable<void>, onProgress?: (note: any) => any): Promise<U>;
/**
* This is a catch-all exception handler, shortcut for calling `.then(null, handler)` on this promise. Any exception happening in a `.then`-chain will propagate to nearest `.catch` handler.
*
* Alias `.caught();` for compatibility with earlier ECMAScript version.
*/
catch<U>(onReject?: (error: any) => Promise.Thenable<U>): Promise<U>;
caught<U>(onReject?: (error: any) => Promise.Thenable<U>): Promise<U>;
catch(onReject?: (error: any) => R|Promise.Thenable<R>|void|Promise.Thenable<void>): Promise<R>;
caught(onReject?: (error: any) => R|Promise.Thenable<R>|void|Promise.Thenable<void>): Promise<R>;
catch<U>(onReject?: (error: any) => U): Promise<U>;
caught<U>(onReject?: (error: any) => U): Promise<U>;
catch<U>(onReject?: (error: any) => U|Promise.Thenable<U>): Promise<U|R>;
caught<U>(onReject?: (error: any) => U|Promise.Thenable<U>): Promise<U|R>;
/**
* This extends `.catch` to work more like catch-clauses in languages like Java or C#. Instead of manually checking `instanceof` or `.name === "SomeError"`, you may specify a number of error constructors which are eligible for this catch handler. The catch handler that is first met that has eligible constructors specified, is the one that will be called.
@@ -46,17 +46,18 @@ declare class Promise<R> implements Promise.Thenable<R>, Promise.Inspection<R> {
*
* Alias `.caught();` for compatibility with earlier ECMAScript version.
*/
catch<U>(predicate: (error: any) => boolean, onReject: (error: any) => Promise.Thenable<U>): Promise<U>;
caught<U>(predicate: (error: any) => boolean, onReject: (error: any) => Promise.Thenable<U>): Promise<U>;
catch(predicate: (error: any) => boolean, onReject: (error: any) => R|Promise.Thenable<R>|void|Promise.Thenable<void>): Promise<R>;
caught(predicate: (error: any) => boolean, onReject: (error: any) => R|Promise.Thenable<R>|void|Promise.Thenable<void>): Promise<R>;
catch<U>(predicate: (error: any) => boolean, onReject: (error: any) => U): Promise<U>;
caught<U>(predicate: (error: any) => boolean, onReject: (error: any) => U): Promise<U>;
catch<U>(predicate: (error: any) => boolean, onReject: (error: any) => U|Promise.Thenable<U>): Promise<U|R>;
caught<U>(predicate: (error: any) => boolean, onReject: (error: any) => U|Promise.Thenable<U>): Promise<U|R>;
catch<U>(ErrorClass: Function, onReject: (error: any) => Promise.Thenable<U>): Promise<U>;
caught<U>(ErrorClass: Function, onReject: (error: any) => Promise.Thenable<U>): Promise<U>;
catch(ErrorClass: Function, onReject: (error: any) => R|Promise.Thenable<R>|void|Promise.Thenable<void>): Promise<R>;
caught(ErrorClass: Function, onReject: (error: any) => R|Promise.Thenable<R>|void|Promise.Thenable<void>): Promise<R>;
catch<U>(ErrorClass: Function, onReject: (error: any) => U|Promise.Thenable<U>): Promise<U|R>;
caught<U>(ErrorClass: Function, onReject: (error: any) => U|Promise.Thenable<U>): Promise<U|R>;
catch<U>(ErrorClass: Function, onReject: (error: any) => U): Promise<U>;
caught<U>(ErrorClass: Function, onReject: (error: any) => U): Promise<U>;
/**
* Like `.catch` but instead of catching all types of exceptions, it only catches those that don't originate from thrown errors but rather from explicit rejections.
@@ -426,7 +427,7 @@ declare class Promise<R> implements Promise.Thenable<R>, Promise.Inspection<R> {
/**
* Returns a promise that is resolved by a node style callback function.
*/
static fromNode(resolver: (callback: (err: any, result: any) => void) => void): Promise<any>;
static fromNode(resolver: (callback: (err: any, result?: any) => void) => void): Promise<any>;
/**
* Returns a function that can use `yield` to run asynchronous code synchronously. This feature requires the support of generators which are drafted in the next version of the language. Node version greater than `0.11.2` is required and needs to be executed with the `--harmony-generators` (or `--harmony`) command-line switch.
@@ -671,8 +672,8 @@ declare module Promise {
export function OperationalError(): OperationalError;
export interface Thenable<R> {
then<U>(onFulfilled: (value: R) => U|Thenable<U>, onRejected: (error: any) => Thenable<U>): Thenable<U>;
then<U>(onFulfilled: (value: R) => U|Thenable<U>, onRejected?: (error: any) => U): Thenable<U>;
then<U>(onFulfilled: (value: R) => U|Thenable<U>, onRejected?: (error: any) => U|Thenable<U>): Thenable<U>;
then<U>(onFulfilled: (value: R) => U|Thenable<U>, onRejected?: (error: any) => void|Thenable<void>): Thenable<U>;
}
export interface Resolver<R> {
+100
View File
@@ -0,0 +1,100 @@
/// <reference path="bookshelf.d.ts" />
/// <reference path="../knex/knex.d.ts" />
import * as Knex from 'knex';
import * as Bookshelf from 'bookshelf';
var knex = Knex({
client: 'sqlite3',
connection: {
filename: ':memory:',
},
});
// Examples
var bookshelf = Bookshelf(knex);
class User extends bookshelf.Model<User> {
get tableName() { return 'users'; }
messages() : Bookshelf.Collection<Posts> {
return this.hasMany(Posts);
}
}
class Posts extends bookshelf.Model<Posts> {
get tableName() { return 'messages'; }
tags() : Bookshelf.Collection<Tag> {
return this.belongsToMany(Tag);
}
}
class Tag extends bookshelf.Model<Tag> {
get tableName() { return 'tags'; }
}
new User({}).where('id', 1).fetch({withRelated: ['posts.tags']})
.then(user => {
console.log(user.related('posts').toJSON());
}).catch(err => {
console.error(err);
});
// Associations
class Book extends bookshelf.Model<Book> {
get tableName() { return 'books'; }
summary() {
return this.hasOne(Summary);
}
pages() {
return this.hasMany(Pages);
}
authors() {
return this.belongsToMany(Author);
}
}
class Summary extends bookshelf.Model<Summary> {
get tableName() { return 'summaries'; }
book() : Book {
return this.belongsTo(Book);
}
}
class Pages extends bookshelf.Model<Pages> {
get tableName() { return 'pages'; }
book() {
return this.belongsTo(Book);
}
}
class Author extends bookshelf.Model<Author> {
get tableName() { return 'author'; }
books() {
return this.belongsToMany(Book);
}
}
class Site extends bookshelf.Model<Site> {
get tableName() { return 'sites'; }
photo() {
return this.morphOne(Photo, 'imageable');
}
}
class Post extends bookshelf.Model<Post> {
get tableName() { return 'posts'; }
photos() {
return this.morphMany(Photo, 'imageable');
}
}
class Photo extends bookshelf.Model<Photo> {
get tableName() { return 'photos'; }
imageable() {
return this.morphTo('imageable', Site, Post);
}
}
+1
View File
@@ -0,0 +1 @@
--noImplicitAny --module commonjs --target es5
+313
View File
@@ -0,0 +1,313 @@
// Type definitions for bookshelfjs v0.8.2
// Project: http://bookshelfjs.org/
// Definitions by: Andrew Schurman <http://github.com/arcticwaters>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../bluebird/bluebird.d.ts" />
/// <reference path="../lodash/lodash.d.ts" />
/// <reference path="../knex/knex.d.ts" />
declare module 'bookshelf' {
import knex = require('knex');
import Promise = require('bluebird');
import Lodash = require('lodash');
interface Bookshelf extends Bookshelf.Events<any> {
VERSION : string;
knex : knex;
Model : typeof Bookshelf.Model;
Collection : typeof Bookshelf.Collection;
transaction<T>(callback : (transaction : knex.Transaction) => T) : Promise<T>;
}
function Bookshelf(knex : knex) : Bookshelf;
namespace Bookshelf {
abstract class Events<T> {
on(event? : string, callback? : EventFunction<T>, context? : any) : void;
off(event? : string) : void;
trigger(event? : string, ...args : any[]) : void;
triggerThen(name : string, ...args : any[]) : Promise<any>;
once(event : string, callback : EventFunction<T>, context? : any) : void;
}
interface IModelBase {
/** Should be declared as a getter instead of a plain property. */
hasTimestamps? : boolean|string[];
/** Should be declared as a getter instead of a plain property. Should be required, but cannot have abstract properties yet. */
tableName? : string;
}
abstract class ModelBase<T extends Model<any>> extends Events<T|Collection<T>> implements IModelBase {
/** If overriding, must use a getter instead of a plain property. */
idAttribute : string;
constructor(attributes? : any, options? : ModelOptions);
clear() : T;
clone() : T;
escape(attribute : string) : string;
format(attributes : any) : any;
get(attribute : string) : any;
has(attribute : string) : boolean;
hasChanged(attribute? : string) : boolean;
isNew() : boolean;
parse(response : any) : any;
previousAttributes() : any;
previous(attribute : string) : any;
related<R extends Model<any>>(relation : string) : R | Collection<R>;
serialize(options? : SerializeOptions) : any;
set(attribute?: {[key : string] : any}, options? : SetOptions) : T;
set(attribute : string, value? : any, options? : SetOptions) : T;
timestamp(options? : TimestampOptions) : any;
toJSON(options? : SerializeOptions) : any;
unset(attribute : string) : T;
// lodash methods
invert<R extends {}>() : R;
keys() : string[];
omit<R extends {}>(predicate? : Lodash.ObjectIterator<any, boolean>, thisArg? : any) : R;
omit<R extends {}>(...attributes : string[]) : R;
pairs() : any[][];
pick<R extends {}>(predicate? : Lodash.ObjectIterator<any, boolean>, thisArg? : any) : R;
pick<R extends {}>(...attributes : string[]) : R;
values() : any[];
}
class Model<T extends Model<any>> extends ModelBase<T> {
static collection<T extends Model<any>>(models? : T[], options? : CollectionOptions<T>) : Collection<T>;
static count(column? : string, options? : SyncOptions) : Promise<number>;
/** @deprecated use Typescript classes */
static extend<T extends Model<any>>(prototypeProperties? : any, classProperties? : any) : Function; // should return a type
static fetchAll<T extends Model<any>>() : Promise<Collection<T>>;
/** @deprecated should use `new` objects instead. */
static forge<T>(attributes? : any, options? : ModelOptions) : T;
belongsTo<R extends Model<any>>(target : {new(...args : any[]) : R}, foreignKey? : string) : R;
belongsToMany<R extends Model<any>>(target : {new(...args : any[]) : R}, table? : string, foreignKey? : string, otherKey? : string) : Collection<R>;
count(column? : string, options? : SyncOptions) : Promise<number>;
destroy(options : SyncOptions) : void;
fetch(options? : FetchOptions) : Promise<T>;
fetchAll(options? : FetchAllOptions) : Promise<Collection<T>>;
hasMany<R extends Model<any>>(target : {new(...args : any[]) : R}, foreignKey? : string) : Collection<R>;
hasOne<R extends Model<any>>(target : {new(...args : any[]) : R}, foreignKey? : string) : R;
load(relations : string|string[], options? : LoadOptions) : Promise<T>;
morphMany<R extends Model<any>>(target : {new(...args : any[]) : R}, name? : string, columnNames? : string[], morphValue? : string) : Collection<R>;
morphOne<R extends Model<any>>(target : {new(...args : any[]) : R}, name? : string, columnNames? : string[], morphValue? : string) : R;
morphTo(name : string, columnNames? : string[], ...target : typeof Model[]) : T;
morphTo(name : string, ...target : typeof Model[]) : T;
query(...query : string[]) : T;
query(query : {[key : string] : any}) : T;
query(callback : (qb : knex.QueryBuilder) => void) : T;
query() : knex.QueryBuilder;
refresh(options? : FetchOptions) : Promise<T>;
resetQuery() : T;
save(key? : string, val? : string, options? : SaveOptions) : Promise<T>;
save(attrs? : {[key : string] : any}, options? : SaveOptions) : Promise<T>;
through<R extends Model<any>>(interim : typeof Model, throughForeignKey? : string, otherKey? : string) : R | Collection<R>;
where(properties : {[key : string] : any}) : T;
where(key : string, operatorOrValue : string|number|boolean, valueIfOperator? : string|number|boolean) : T;
}
abstract class CollectionBase<T extends Model<any>> extends Events<T> {
add(models : T[]|{[key : string] : any}[], options? : CollectionAddOptions) : Collection<T>;
at(index : number) : T;
clone() : Collection<T>;
fetch(options? : CollectionFetchOptions) : Promise<Collection<T>>;
findWhere(match : {[key : string] : any}) : T;
get(id : any) : T;
invokeThen(name : string, ...args : any[]) : Promise<any>;
parse(response : any) : any;
pluck(attribute : string) : any[];
pop() : void;
push(model : any) : Collection<T>;
reduceThen<R>(iterator : (prev : R, cur : T, idx : number, array : T[]) => R, initialValue : R, context : any) : Promise<R>;
remove(model : T, options? : EventOptions) : T;
remove(model : T[], options? : EventOptions) : T[];
reset(model : any[], options? : CollectionAddOptions) : T[];
serialize(options? : SerializeOptions) : any;
set(models : T[]|{[key : string] : any}[], options? : CollectionSetOptions) : Collection<T>;
shift(options? : EventOptions) : void;
slice(begin? : number, end? : number) : void;
toJSON(options? : SerializeOptions) : any;
unshift(model : any, options? : CollectionAddOptions) : void;
where(match : {[key : string] : any}, firstOnly : boolean) : T|Collection<T>;
// lodash methods
all(predicate? : Lodash.ListIterator<T, boolean>|Lodash.DictionaryIterator<T, boolean>|string, thisArg? : any) : boolean;
all<R extends {}>(predicate? : R) : boolean;
any(predicate? : Lodash.ListIterator<T, boolean>|Lodash.DictionaryIterator<T, boolean>|string, thisArg? : any) : boolean;
any<R extends {}>(predicate? : R) : boolean;
chain() : Lodash.LoDashExplicitObjectWrapper<T>;
collect(predicate? : Lodash.ListIterator<T, boolean>|Lodash.DictionaryIterator<T, boolean>|string, thisArg? : any) : T[];
collect<R extends {}>(predicate? : R) : T[];
contains(value : any, fromIndex? : number) : boolean;
countBy(predicate? : Lodash.ListIterator<T, boolean>|Lodash.DictionaryIterator<T, boolean>|string, thisArg? : any) : Lodash.Dictionary<number>;
countBy<R extends {}>(predicate? : R) : Lodash.Dictionary<number>;
detect(predicate? : Lodash.ListIterator<T, boolean>|Lodash.DictionaryIterator<T, boolean>|string, thisArg? : any) : T;
detect<R extends {}>(predicate? : R) : T;
difference(...values : T[]) : T[];
drop(n? : number) : T[];
each(callback? : Lodash.ListIterator<T, void>, thisArg? : any) : Lodash.List<T>;
each(callback? : Lodash.DictionaryIterator<T, void>, thisArg? : any) : Lodash.Dictionary<T>;
each(callback? : Lodash.ObjectIterator<T, void>, thisArg? : any) : T;
every(predicate? : Lodash.ListIterator<T, boolean>|Lodash.DictionaryIterator<T, boolean>|string, thisArg? : any) : boolean;
every<R extends {}>(predicate? : R) : boolean;
filter(predicate? : Lodash.ListIterator<T, boolean>|Lodash.DictionaryIterator<T, boolean>|string, thisArg? : any) : T[];
filter<R extends {}>(predicate? : R) : T[];
find(predicate? : Lodash.ListIterator<T, boolean>|Lodash.DictionaryIterator<T, boolean>|string, thisArg? : any) : T;
find<R extends {}>(predicate? : R) : T;
first() : T;
foldl<R>(callback? : Lodash.MemoIterator<T, R>, accumulator? : R, thisArg? : any) : R;
foldr<R>(callback? : Lodash.MemoIterator<T, R>, accumulator? : R, thisArg? : any) : R;
forEach(callback? : Lodash.ListIterator<T, void>, thisArg? : any) : Lodash.List<T>;
forEach(callback? : Lodash.DictionaryIterator<T, void>, thisArg? : any) : Lodash.Dictionary<T>;
forEach(callback? : Lodash.ObjectIterator<T, void>, thisArg? : any) : T;
groupBy(predicate? : Lodash.ListIterator<T, boolean>|Lodash.DictionaryIterator<T, boolean>|string, thisArg? : any) : Lodash.Dictionary<T[]>;
groupBy<R extends {}>(predicate? : R) : Lodash.Dictionary<T[]>;
head() : T;
include(value : any, fromIndex? : number) : boolean;
indexOf(value : any, fromIndex? : number) : number;
initial() : T[];
inject<R>(callback? : Lodash.MemoIterator<T, R>, accumulator? : R, thisArg? : any) : R;
invoke(methodName : string|Function, ...args : any[]) : any;
isEmpty() : boolean;
keys() : string[];
last() : T;
lastIndexOf(value : any, fromIndex? : number) : number;
map(predicate? : Lodash.ListIterator<T, boolean>|Lodash.DictionaryIterator<T, boolean>|string, thisArg? : any) : T[];
map<R extends {}>(predicate? : R) : T[];
max(predicate? : Lodash.ListIterator<T, boolean>|string, thisArg? : any) : T;
max<R extends {}>(predicate? : R) : T;
min(predicate? : Lodash.ListIterator<T, boolean>|string, thisArg? : any) : T;
min<R extends {}>(predicate? : R) : T;
reduce<R>(callback? : Lodash.MemoIterator<T, R>, accumulator? : R, thisArg? : any) : R;
reduceRight<R>(callback? : Lodash.MemoIterator<T, R>, accumulator? : R, thisArg? : any) : R;
reject(predicate? : Lodash.ListIterator<T, boolean>|Lodash.DictionaryIterator<T, boolean>|string, thisArg? : any) : T[];
reject<R extends {}>(predicate? : R) : T[];
rest() : T[];
select(predicate? : Lodash.ListIterator<T, boolean>|Lodash.DictionaryIterator<T, boolean>|string, thisArg? : any) : T[];
select<R extends {}>(predicate? : R) : T[];
shuffle() : T[];
size() : number;
some(predicate? : Lodash.ListIterator<T, boolean>|Lodash.DictionaryIterator<T, boolean>|string, thisArg? : any) : boolean;
some<R extends {}>(predicate? : R) : boolean;
sortBy(predicate? : Lodash.ListIterator<T, boolean>|Lodash.DictionaryIterator<T, boolean>|string, thisArg? : any) : T[];
sortBy<R extends {}>(predicate? : R) : T[];
tail() : T[];
take(n? : number) : T[];
toArray() : T[];
without(...values : any[]) : T[];
}
class Collection<T extends Model<any>> extends CollectionBase<T> {
/** @deprecated use Typescript classes */
static extend<T>(prototypeProperties? : any, classProperties? : any) : Function;
/** @deprecated should use `new` objects instead. */
static forge<T>(attributes? : any, options? : ModelOptions) : T;
attach(ids : any[], options? : SyncOptions) : Promise<Collection<T>>;
count(column? : string, options? : SyncOptions) : Promise<number>;
create(model : {[key : string] : any}, options? : CollectionCreateOptions) : Promise<T>;
detach(ids : any[], options? : SyncOptions) : Promise<any>;
fetchOne(options? : CollectionFetchOneOptions) : Promise<T>;
load(relations : string|string[], options? : SyncOptions) : Promise<Collection<T>>;
query(...query : string[]) : Collection<T>;
query(query : {[key : string] : any}) : Collection<T>;
query(callback : (qb : knex.QueryBuilder) => void) : Collection<T>;
query() : knex.QueryBuilder;
resetQuery() : Collection<T>;
through<R extends Model<any>>(interim : typeof Model, throughForeignKey? : string, otherKey? : string) : R | Collection<R>;
updatePivot(attributes : any, options? : PivotOptions) : Promise<number>;
withPivot(columns : string[]) : Collection<T>;
}
interface ModelOptions {
tableName? : string;
hasTimestamps? : boolean;
parse? : boolean;
}
interface LoadOptions extends SyncOptions {
withRelated: string|any|any[];
}
interface FetchOptions extends SyncOptions {
require? : boolean;
columns? : string|string[];
withRelated? : string|any|any[];
}
interface FetchAllOptions extends SyncOptions {
require? : boolean;
}
interface SaveOptions extends SyncOptions {
method? : string;
defaults? : string;
patch? : boolean;
require? : boolean;
}
interface SerializeOptions {
shallow? : boolean;
omitPivot? : boolean;
}
interface SetOptions {
unset? : boolean;
}
interface TimestampOptions {
method? : string;
}
interface SyncOptions {
transacting? : knex.Transaction;
debug? : boolean;
}
interface CollectionOptions<T> {
comparator? : boolean|string|((a : T, b : T) => number);
}
interface CollectionAddOptions extends EventOptions {
at? : number;
merge? : boolean;
}
interface CollectionFetchOptions {
require? : boolean;
withRelated? : string|string[];
}
interface CollectionFetchOneOptions {
require? : boolean;
columns? : string|string[];
}
interface CollectionSetOptions extends EventOptions {
add? : boolean;
remove? : boolean;
merge?: boolean;
}
interface PivotOptions {
query? : Function|any;
require? : boolean;
}
interface EventOptions {
silent? : boolean;
}
interface EventFunction<T> {
(model: T, attrs: any, options: any) : Promise<any>|void;
}
interface CollectionCreateOptions extends ModelOptions, SyncOptions, CollectionAddOptions, SaveOptions {}
}
export = Bookshelf;
}
+61
View File
@@ -0,0 +1,61 @@
/// <reference path="boolify-string.d.ts" />
import boolifyString = require('boolify-string');
console.log(boolifyString('true')); // #=> true
console.log(boolifyString('TRUE')); // #=> true
console.log(boolifyString('True')); // #=> true
console.log(boolifyString('false')); // #=> false
console.log(boolifyString('{}')); // #=> true
console.log(boolifyString('foo')); // #=> true
console.log(boolifyString('')); // #=> false
console.log(boolifyString('1')); // #=> true
console.log(boolifyString('-1')); // #=> true
console.log(boolifyString('0')); // #=> false
console.log(boolifyString('[]')); // #=> true
console.log(boolifyString('undefined')); // #=> false
console.log(boolifyString('null')); // #=> false
// primitive values as is
console.log(boolifyString(true)); // #=> true
console.log(boolifyString(false)); // #=> false
console.log(boolifyString({})); // #=> true
console.log(boolifyString(1)); // #=> true
console.log(boolifyString(-1)); // #=> true
console.log(boolifyString(0)); // #=> false
console.log(boolifyString([])); // #=> true
console.log(boolifyString(undefined)); // #=> false
console.log(boolifyString(null)); // #=> false
// string constructor
console.log(boolifyString(new String('true'))); // #=> true
console.log(boolifyString(new String('false'))); // #=> false
// YAML's specification
// http://yaml.org/type/bool.html
// y|Y|yes|Yes|YES|n|N|no|No|NO
// |true|True|TRUE|false|False|FALSE
// |on|On|ON|off|Off|OFF
console.log(boolifyString('y')); // #=> true
console.log(boolifyString('Y')); // #=> true
console.log(boolifyString('yes')); // #=> true
console.log(boolifyString('Yes')); // #=> true
console.log(boolifyString('YES')); // #=> true
console.log(boolifyString('n')); // #=> false
console.log(boolifyString('N')); // #=> false
console.log(boolifyString('no')); // #=> false
console.log(boolifyString('No')); // #=> false
console.log(boolifyString('NO')); // #=> false
console.log(boolifyString('true')); // #=> true
console.log(boolifyString('True')); // #=> true
console.log(boolifyString('TRUE')); // #=> true
console.log(boolifyString('false')); // #=> false
console.log(boolifyString('False')); // #=> false
console.log(boolifyString('FALSE')); // #=> false
console.log(boolifyString('on')); // #=> true
console.log(boolifyString('On')); // #=> true
console.log(boolifyString('ON')); // #=> true
console.log(boolifyString('off')); // #=> false
console.log(boolifyString('Off')); // #=> false
console.log(boolifyString('OFF')); // #=> false
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for boolify-string
// Project: https://github.com/sanemat/node-boolify-string
// Definitions by: Tobias Henöckl <http://www.sisyphus.de/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "boolify-string" {
function boolifyString(obj: any): boolean;
export = boolifyString;
}
Vendored
+4
View File
@@ -1067,3 +1067,7 @@ declare module c3 {
export function generate(config: ChartConfiguration): ChartAPI;
}
declare module "c3" {
export = c3;
}
+2
View File
@@ -35,3 +35,5 @@ b = changeCase.isLower(s);
b = changeCase.isLowerCase(s);
s = changeCase.ucFirst(s);
s = changeCase.upperCaseFirst(s);
s = changeCase.lcFirst(s);
s = changeCase.lowerCaseFirst(s);
+2
View File
@@ -34,4 +34,6 @@ declare module "change-case" {
function isLowerCase(s: string): boolean;
function ucFirst(s: string): string;
function upperCaseFirst(s: string): string;
function lcFirst(s: string): string;
function lowerCaseFirst(s: string): string;
}
+23 -14
View File
@@ -74,6 +74,7 @@ declare module CKEDITOR {
function appendTo(element: string, config?: config, data?: string): editor;
function appendTo(element: HTMLTextAreaElement, config?: config, data?: string): editor;
function domReady(): void;
function dialogCommand(dialogName: string): void;
function editorConfig(config: config): void;
function getCss(): string;
function getTemplate(name: string): template;
@@ -556,29 +557,34 @@ declare module CKEDITOR {
groups?: string[];
}
// Currently very incomplete. See here for all options that should be included:
// http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-fileTools_defaultFileName
interface config {
allowedContent?: string | boolean;
colorButton_enableMore?: boolean;
colorButton_colors?: string;
contentsCss?: string | string[];
contentsLangDirection?: string;
customConfig?: string;
extraPlugins?: string;
font_names?: string;
font_defaultLabel?: string;
fontSize_sizes?: string;
fontSize_defaultLabel?: string;
height?: string | number;
language?: string;
on?: any;
plugins?: string;
startupFocus?: boolean;
startupMode?: string;
removeButtons?: string;
removePlugins?: string;
toolbar?: any;
toolbarGroups?: toolbarGroups[];
skin?: string;
language?: string;
plugins?: string;
font_names?: string;
font_defaultLabel?: string;
fontSize_sizes?: string;
fontSize_defaultLabel?: string;
colorButton_enableMore?: boolean;
colorButton_colors?: string;
startupFocus?: boolean;
on?: any;
extraPlugins?: string;
height?: string | number;
toolbarLocation?: string;
readOnly?: boolean;
customConfig?: string;
skin?: string;
width?: string | number;
}
@@ -745,6 +751,7 @@ declare module CKEDITOR {
beforeInit?(editor: editor): any;
init?(editor: editor): any;
onLoad?(): any;
icons?: string;
}
function add(name: string, definition?: IPluginDefinition): void;
@@ -933,6 +940,8 @@ declare module CKEDITOR {
interface button extends uiElement {
disabled?: boolean;
label?: string;
command?: string;
toolbar?: string;
}
+6 -5
View File
@@ -3,13 +3,14 @@
// Definitions by: Markus Wagner <https://github.com/Ritzlgrmft/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />
/// <reference path="../q/Q.d.ts" />
interface Cordova {
getAppVersion: {
getAppName: () => Q.IPromise<string>;
getPackageName: () => Q.IPromise<string>;
getVersionCode: () => Q.IPromise<string>;
getVersionNumber: () => Q.IPromise<string>;
getAppVersion: {
getAppName: () => Q.IPromise<string> | JQueryPromise<string>;
getPackageName: () => Q.IPromise<string> | JQueryPromise<string>;
getVersionCode: () => Q.IPromise<string> | JQueryPromise<string>;
getVersionNumber: () => Q.IPromise<string> | JQueryPromise<string>;
};
}
+198 -198
View File
@@ -2251,782 +2251,782 @@ declare module "core-js/web/immediate" {
declare module "core-js/web/timers" {
export = core;
}
declare module "core-js/libary" {
declare module "core-js/library" {
export = core;
}
declare module "core-js/libary/shim" {
declare module "core-js/library/shim" {
export = core;
}
declare module "core-js/libary/core" {
declare module "core-js/library/core" {
export = core;
}
declare module "core-js/libary/core/$for" {
declare module "core-js/library/core/$for" {
import $for = core.$for;
export = $for;
}
declare module "core-js/libary/core/_" {
declare module "core-js/library/core/_" {
var _: typeof core._;
export = _;
}
declare module "core-js/libary/core/array" {
declare module "core-js/library/core/array" {
var Array: typeof core.Array;
export = Array;
}
declare module "core-js/libary/core/date" {
declare module "core-js/library/core/date" {
var Date: typeof core.Date;
export = Date;
}
declare module "core-js/libary/core/delay" {
declare module "core-js/library/core/delay" {
var delay: typeof core.delay;
export = delay;
}
declare module "core-js/libary/core/dict" {
declare module "core-js/library/core/dict" {
var Dict: typeof core.Dict;
export = Dict;
}
declare module "core-js/libary/core/function" {
declare module "core-js/library/core/function" {
var Function: typeof core.Function;
export = Function;
}
declare module "core-js/libary/core/global" {
declare module "core-js/library/core/global" {
var global: typeof core.global;
export = global;
}
declare module "core-js/libary/core/log" {
declare module "core-js/library/core/log" {
var log: typeof core.log;
export = log;
}
declare module "core-js/libary/core/number" {
declare module "core-js/library/core/number" {
var Number: typeof core.Number;
export = Number;
}
declare module "core-js/libary/core/object" {
declare module "core-js/library/core/object" {
var Object: typeof core.Object;
export = Object;
}
declare module "core-js/libary/core/string" {
declare module "core-js/library/core/string" {
var String: typeof core.String;
export = String;
}
declare module "core-js/libary/fn/$for" {
declare module "core-js/library/fn/$for" {
import $for = core.$for;
export = $for;
}
declare module "core-js/libary/fn/_" {
declare module "core-js/library/fn/_" {
var _: typeof core._;
export = _;
}
declare module "core-js/libary/fn/clear-immediate" {
declare module "core-js/library/fn/clear-immediate" {
var clearImmediate: typeof core.clearImmediate;
export = clearImmediate;
}
declare module "core-js/libary/fn/delay" {
declare module "core-js/library/fn/delay" {
var delay: typeof core.delay;
export = delay;
}
declare module "core-js/libary/fn/dict" {
declare module "core-js/library/fn/dict" {
var Dict: typeof core.Dict;
export = Dict;
}
declare module "core-js/libary/fn/get-iterator" {
declare module "core-js/library/fn/get-iterator" {
var getIterator: typeof core.getIterator;
export = getIterator;
}
declare module "core-js/libary/fn/global" {
declare module "core-js/library/fn/global" {
var global: typeof core.global;
export = global;
}
declare module "core-js/libary/fn/is-iterable" {
declare module "core-js/library/fn/is-iterable" {
var isIterable: typeof core.isIterable;
export = isIterable;
}
declare module "core-js/libary/fn/log" {
declare module "core-js/library/fn/log" {
var log: typeof core.log;
export = log;
}
declare module "core-js/libary/fn/map" {
declare module "core-js/library/fn/map" {
var Map: typeof core.Map;
export = Map;
}
declare module "core-js/libary/fn/promise" {
declare module "core-js/library/fn/promise" {
var Promise: typeof core.Promise;
export = Promise;
}
declare module "core-js/libary/fn/set" {
declare module "core-js/library/fn/set" {
var Set: typeof core.Set;
export = Set;
}
declare module "core-js/libary/fn/set-immediate" {
declare module "core-js/library/fn/set-immediate" {
var setImmediate: typeof core.setImmediate;
export = setImmediate;
}
declare module "core-js/libary/fn/set-interval" {
declare module "core-js/library/fn/set-interval" {
var setInterval: typeof core.setInterval;
export = setInterval;
}
declare module "core-js/libary/fn/set-timeout" {
declare module "core-js/library/fn/set-timeout" {
var setTimeout: typeof core.setTimeout;
export = setTimeout;
}
declare module "core-js/libary/fn/weak-map" {
declare module "core-js/library/fn/weak-map" {
var WeakMap: typeof core.WeakMap;
export = WeakMap;
}
declare module "core-js/libary/fn/weak-set" {
declare module "core-js/library/fn/weak-set" {
var WeakSet: typeof core.WeakSet;
export = WeakSet;
}
declare module "core-js/libary/fn/array" {
declare module "core-js/library/fn/array" {
var Array: typeof core.Array;
export = Array;
}
declare module "core-js/libary/fn/array/concat" {
declare module "core-js/library/fn/array/concat" {
var concat: typeof core.Array.concat;
export = concat;
}
declare module "core-js/libary/fn/array/copy-within" {
declare module "core-js/library/fn/array/copy-within" {
var copyWithin: typeof core.Array.copyWithin;
export = copyWithin;
}
declare module "core-js/libary/fn/array/entries" {
declare module "core-js/library/fn/array/entries" {
var entries: typeof core.Array.entries;
export = entries;
}
declare module "core-js/libary/fn/array/every" {
declare module "core-js/library/fn/array/every" {
var every: typeof core.Array.every;
export = every;
}
declare module "core-js/libary/fn/array/fill" {
declare module "core-js/library/fn/array/fill" {
var fill: typeof core.Array.fill;
export = fill;
}
declare module "core-js/libary/fn/array/filter" {
declare module "core-js/library/fn/array/filter" {
var filter: typeof core.Array.filter;
export = filter;
}
declare module "core-js/libary/fn/array/find" {
declare module "core-js/library/fn/array/find" {
var find: typeof core.Array.find;
export = find;
}
declare module "core-js/libary/fn/array/find-index" {
declare module "core-js/library/fn/array/find-index" {
var findIndex: typeof core.Array.findIndex;
export = findIndex;
}
declare module "core-js/libary/fn/array/for-each" {
declare module "core-js/library/fn/array/for-each" {
var forEach: typeof core.Array.forEach;
export = forEach;
}
declare module "core-js/libary/fn/array/from" {
declare module "core-js/library/fn/array/from" {
var from: typeof core.Array.from;
export = from;
}
declare module "core-js/libary/fn/array/includes" {
declare module "core-js/library/fn/array/includes" {
var includes: typeof core.Array.includes;
export = includes;
}
declare module "core-js/libary/fn/array/index-of" {
declare module "core-js/library/fn/array/index-of" {
var indexOf: typeof core.Array.indexOf;
export = indexOf;
}
declare module "core-js/libary/fn/array/join" {
declare module "core-js/library/fn/array/join" {
var join: typeof core.Array.join;
export = join;
}
declare module "core-js/libary/fn/array/keys" {
declare module "core-js/library/fn/array/keys" {
var keys: typeof core.Array.keys;
export = keys;
}
declare module "core-js/libary/fn/array/last-index-of" {
declare module "core-js/library/fn/array/last-index-of" {
var lastIndexOf: typeof core.Array.lastIndexOf;
export = lastIndexOf;
}
declare module "core-js/libary/fn/array/map" {
declare module "core-js/library/fn/array/map" {
var map: typeof core.Array.map;
export = map;
}
declare module "core-js/libary/fn/array/of" {
declare module "core-js/library/fn/array/of" {
var of: typeof core.Array.of;
export = of;
}
declare module "core-js/libary/fn/array/pop" {
declare module "core-js/library/fn/array/pop" {
var pop: typeof core.Array.pop;
export = pop;
}
declare module "core-js/libary/fn/array/push" {
declare module "core-js/library/fn/array/push" {
var push: typeof core.Array.push;
export = push;
}
declare module "core-js/libary/fn/array/reduce" {
declare module "core-js/library/fn/array/reduce" {
var reduce: typeof core.Array.reduce;
export = reduce;
}
declare module "core-js/libary/fn/array/reduce-right" {
declare module "core-js/library/fn/array/reduce-right" {
var reduceRight: typeof core.Array.reduceRight;
export = reduceRight;
}
declare module "core-js/libary/fn/array/reverse" {
declare module "core-js/library/fn/array/reverse" {
var reverse: typeof core.Array.reverse;
export = reverse;
}
declare module "core-js/libary/fn/array/shift" {
declare module "core-js/library/fn/array/shift" {
var shift: typeof core.Array.shift;
export = shift;
}
declare module "core-js/libary/fn/array/slice" {
declare module "core-js/library/fn/array/slice" {
var slice: typeof core.Array.slice;
export = slice;
}
declare module "core-js/libary/fn/array/some" {
declare module "core-js/library/fn/array/some" {
var some: typeof core.Array.some;
export = some;
}
declare module "core-js/libary/fn/array/sort" {
declare module "core-js/library/fn/array/sort" {
var sort: typeof core.Array.sort;
export = sort;
}
declare module "core-js/libary/fn/array/splice" {
declare module "core-js/library/fn/array/splice" {
var splice: typeof core.Array.splice;
export = splice;
}
declare module "core-js/libary/fn/array/turn" {
declare module "core-js/library/fn/array/turn" {
var turn: typeof core.Array.turn;
export = turn;
}
declare module "core-js/libary/fn/array/unshift" {
declare module "core-js/library/fn/array/unshift" {
var unshift: typeof core.Array.unshift;
export = unshift;
}
declare module "core-js/libary/fn/array/values" {
declare module "core-js/library/fn/array/values" {
var values: typeof core.Array.values;
export = values;
}
declare module "core-js/libary/fn/date" {
declare module "core-js/library/fn/date" {
var Date: typeof core.Date;
export = Date;
}
declare module "core-js/libary/fn/date/add-locale" {
declare module "core-js/library/fn/date/add-locale" {
var addLocale: typeof core.addLocale;
export = addLocale;
}
declare module "core-js/libary/fn/date/format" {
declare module "core-js/library/fn/date/format" {
var format: typeof core.Date.format;
export = format;
}
declare module "core-js/libary/fn/date/formatUTC" {
declare module "core-js/library/fn/date/formatUTC" {
var formatUTC: typeof core.Date.formatUTC;
export = formatUTC;
}
declare module "core-js/libary/fn/function" {
declare module "core-js/library/fn/function" {
var Function: typeof core.Function;
export = Function;
}
declare module "core-js/libary/fn/function/has-instance" {
declare module "core-js/library/fn/function/has-instance" {
var hasInstance: (value: any) => boolean;
export = hasInstance;
}
declare module "core-js/libary/fn/function/name" {
declare module "core-js/library/fn/function/name" {
}
declare module "core-js/libary/fn/function/part" {
declare module "core-js/library/fn/function/part" {
var part: typeof core.Function.part;
export = part;
}
declare module "core-js/libary/fn/math" {
declare module "core-js/library/fn/math" {
var Math: typeof core.Math;
export = Math;
}
declare module "core-js/libary/fn/math/acosh" {
declare module "core-js/library/fn/math/acosh" {
var acosh: typeof core.Math.acosh;
export = acosh;
}
declare module "core-js/libary/fn/math/asinh" {
declare module "core-js/library/fn/math/asinh" {
var asinh: typeof core.Math.asinh;
export = asinh;
}
declare module "core-js/libary/fn/math/atanh" {
declare module "core-js/library/fn/math/atanh" {
var atanh: typeof core.Math.atanh;
export = atanh;
}
declare module "core-js/libary/fn/math/cbrt" {
declare module "core-js/library/fn/math/cbrt" {
var cbrt: typeof core.Math.cbrt;
export = cbrt;
}
declare module "core-js/libary/fn/math/clz32" {
declare module "core-js/library/fn/math/clz32" {
var clz32: typeof core.Math.clz32;
export = clz32;
}
declare module "core-js/libary/fn/math/cosh" {
declare module "core-js/library/fn/math/cosh" {
var cosh: typeof core.Math.cosh;
export = cosh;
}
declare module "core-js/libary/fn/math/expm1" {
declare module "core-js/library/fn/math/expm1" {
var expm1: typeof core.Math.expm1;
export = expm1;
}
declare module "core-js/libary/fn/math/fround" {
declare module "core-js/library/fn/math/fround" {
var fround: typeof core.Math.fround;
export = fround;
}
declare module "core-js/libary/fn/math/hypot" {
declare module "core-js/library/fn/math/hypot" {
var hypot: typeof core.Math.hypot;
export = hypot;
}
declare module "core-js/libary/fn/math/imul" {
declare module "core-js/library/fn/math/imul" {
var imul: typeof core.Math.imul;
export = imul;
}
declare module "core-js/libary/fn/math/log10" {
declare module "core-js/library/fn/math/log10" {
var log10: typeof core.Math.log10;
export = log10;
}
declare module "core-js/libary/fn/math/log1p" {
declare module "core-js/library/fn/math/log1p" {
var log1p: typeof core.Math.log1p;
export = log1p;
}
declare module "core-js/libary/fn/math/log2" {
declare module "core-js/library/fn/math/log2" {
var log2: typeof core.Math.log2;
export = log2;
}
declare module "core-js/libary/fn/math/sign" {
declare module "core-js/library/fn/math/sign" {
var sign: typeof core.Math.sign;
export = sign;
}
declare module "core-js/libary/fn/math/sinh" {
declare module "core-js/library/fn/math/sinh" {
var sinh: typeof core.Math.sinh;
export = sinh;
}
declare module "core-js/libary/fn/math/tanh" {
declare module "core-js/library/fn/math/tanh" {
var tanh: typeof core.Math.tanh;
export = tanh;
}
declare module "core-js/libary/fn/math/trunc" {
declare module "core-js/library/fn/math/trunc" {
var trunc: typeof core.Math.trunc;
export = trunc;
}
declare module "core-js/libary/fn/number" {
declare module "core-js/library/fn/number" {
var Number: typeof core.Number;
export = Number;
}
declare module "core-js/libary/fn/number/epsilon" {
declare module "core-js/library/fn/number/epsilon" {
var EPSILON: typeof core.Number.EPSILON;
export = EPSILON;
}
declare module "core-js/libary/fn/number/is-finite" {
declare module "core-js/library/fn/number/is-finite" {
var isFinite: typeof core.Number.isFinite;
export = isFinite;
}
declare module "core-js/libary/fn/number/is-integer" {
declare module "core-js/library/fn/number/is-integer" {
var isInteger: typeof core.Number.isInteger;
export = isInteger;
}
declare module "core-js/libary/fn/number/is-nan" {
declare module "core-js/library/fn/number/is-nan" {
var isNaN: typeof core.Number.isNaN;
export = isNaN;
}
declare module "core-js/libary/fn/number/is-safe-integer" {
declare module "core-js/library/fn/number/is-safe-integer" {
var isSafeInteger: typeof core.Number.isSafeInteger;
export = isSafeInteger;
}
declare module "core-js/libary/fn/number/max-safe-integer" {
declare module "core-js/library/fn/number/max-safe-integer" {
var MAX_SAFE_INTEGER: typeof core.Number.MAX_SAFE_INTEGER;
export = MAX_SAFE_INTEGER;
}
declare module "core-js/libary/fn/number/min-safe-interger" {
declare module "core-js/library/fn/number/min-safe-interger" {
var MIN_SAFE_INTEGER: typeof core.Number.MIN_SAFE_INTEGER;
export = MIN_SAFE_INTEGER;
}
declare module "core-js/libary/fn/number/parse-float" {
declare module "core-js/library/fn/number/parse-float" {
var parseFloat: typeof core.Number.parseFloat;
export = parseFloat;
}
declare module "core-js/libary/fn/number/parse-int" {
declare module "core-js/library/fn/number/parse-int" {
var parseInt: typeof core.Number.parseInt;
export = parseInt;
}
declare module "core-js/libary/fn/number/random" {
declare module "core-js/library/fn/number/random" {
var random: typeof core.Number.random;
export = random;
}
declare module "core-js/libary/fn/object" {
declare module "core-js/library/fn/object" {
var Object: typeof core.Object;
export = Object;
}
declare module "core-js/libary/fn/object/assign" {
declare module "core-js/library/fn/object/assign" {
var assign: typeof core.Object.assign;
export = assign;
}
declare module "core-js/libary/fn/object/classof" {
declare module "core-js/library/fn/object/classof" {
var classof: typeof core.Object.classof;
export = classof;
}
declare module "core-js/libary/fn/object/create" {
declare module "core-js/library/fn/object/create" {
var create: typeof core.Object.create;
export = create;
}
declare module "core-js/libary/fn/object/define" {
declare module "core-js/library/fn/object/define" {
var define: typeof core.Object.define;
export = define;
}
declare module "core-js/libary/fn/object/define-properties" {
declare module "core-js/library/fn/object/define-properties" {
var defineProperties: typeof core.Object.defineProperties;
export = defineProperties;
}
declare module "core-js/libary/fn/object/define-property" {
declare module "core-js/library/fn/object/define-property" {
var defineProperty: typeof core.Object.defineProperty;
export = defineProperty;
}
declare module "core-js/libary/fn/object/entries" {
declare module "core-js/library/fn/object/entries" {
var entries: typeof core.Object.entries;
export = entries;
}
declare module "core-js/libary/fn/object/freeze" {
declare module "core-js/library/fn/object/freeze" {
var freeze: typeof core.Object.freeze;
export = freeze;
}
declare module "core-js/libary/fn/object/get-own-property-descriptor" {
declare module "core-js/library/fn/object/get-own-property-descriptor" {
var getOwnPropertyDescriptor: typeof core.Object.getOwnPropertyDescriptor;
export = getOwnPropertyDescriptor;
}
declare module "core-js/libary/fn/object/get-own-property-descriptors" {
declare module "core-js/library/fn/object/get-own-property-descriptors" {
var getOwnPropertyDescriptors: typeof core.Object.getOwnPropertyDescriptors;
export = getOwnPropertyDescriptors;
}
declare module "core-js/libary/fn/object/get-own-property-names" {
declare module "core-js/library/fn/object/get-own-property-names" {
var getOwnPropertyNames: typeof core.Object.getOwnPropertyNames;
export = getOwnPropertyNames;
}
declare module "core-js/libary/fn/object/get-own-property-symbols" {
declare module "core-js/library/fn/object/get-own-property-symbols" {
var getOwnPropertySymbols: typeof core.Object.getOwnPropertySymbols;
export = getOwnPropertySymbols;
}
declare module "core-js/libary/fn/object/get-prototype-of" {
declare module "core-js/library/fn/object/get-prototype-of" {
var getPrototypeOf: typeof core.Object.getPrototypeOf;
export = getPrototypeOf;
}
declare module "core-js/libary/fn/object/is" {
declare module "core-js/library/fn/object/is" {
var is: typeof core.Object.is;
export = is;
}
declare module "core-js/libary/fn/object/is-extensible" {
declare module "core-js/library/fn/object/is-extensible" {
var isExtensible: typeof core.Object.isExtensible;
export = isExtensible;
}
declare module "core-js/libary/fn/object/is-frozen" {
declare module "core-js/library/fn/object/is-frozen" {
var isFrozen: typeof core.Object.isFrozen;
export = isFrozen;
}
declare module "core-js/libary/fn/object/is-object" {
declare module "core-js/library/fn/object/is-object" {
var isObject: typeof core.Object.isObject;
export = isObject;
}
declare module "core-js/libary/fn/object/is-sealed" {
declare module "core-js/library/fn/object/is-sealed" {
var isSealed: typeof core.Object.isSealed;
export = isSealed;
}
declare module "core-js/libary/fn/object/keys" {
declare module "core-js/library/fn/object/keys" {
var keys: typeof core.Object.keys;
export = keys;
}
declare module "core-js/libary/fn/object/make" {
declare module "core-js/library/fn/object/make" {
var make: typeof core.Object.make;
export = make;
}
declare module "core-js/libary/fn/object/prevent-extensions" {
declare module "core-js/library/fn/object/prevent-extensions" {
var preventExtensions: typeof core.Object.preventExtensions;
export = preventExtensions;
}
declare module "core-js/libary/fn/object/seal" {
declare module "core-js/library/fn/object/seal" {
var seal: typeof core.Object.seal;
export = seal;
}
declare module "core-js/libary/fn/object/set-prototype-of" {
declare module "core-js/library/fn/object/set-prototype-of" {
var setPrototypeOf: typeof core.Object.setPrototypeOf;
export = setPrototypeOf;
}
declare module "core-js/libary/fn/object/values" {
declare module "core-js/library/fn/object/values" {
var values: typeof core.Object.values;
export = values;
}
declare module "core-js/libary/fn/reflect" {
declare module "core-js/library/fn/reflect" {
var Reflect: typeof core.Reflect;
export = Reflect;
}
declare module "core-js/libary/fn/reflect/apply" {
declare module "core-js/library/fn/reflect/apply" {
var apply: typeof core.Reflect.apply;
export = apply;
}
declare module "core-js/libary/fn/reflect/construct" {
declare module "core-js/library/fn/reflect/construct" {
var construct: typeof core.Reflect.construct;
export = construct;
}
declare module "core-js/libary/fn/reflect/define-property" {
declare module "core-js/library/fn/reflect/define-property" {
var defineProperty: typeof core.Reflect.defineProperty;
export = defineProperty;
}
declare module "core-js/libary/fn/reflect/delete-property" {
declare module "core-js/library/fn/reflect/delete-property" {
var deleteProperty: typeof core.Reflect.deleteProperty;
export = deleteProperty;
}
declare module "core-js/libary/fn/reflect/enumerate" {
declare module "core-js/library/fn/reflect/enumerate" {
var enumerate: typeof core.Reflect.enumerate;
export = enumerate;
}
declare module "core-js/libary/fn/reflect/get" {
declare module "core-js/library/fn/reflect/get" {
var get: typeof core.Reflect.get;
export = get;
}
declare module "core-js/libary/fn/reflect/get-own-property-descriptor" {
declare module "core-js/library/fn/reflect/get-own-property-descriptor" {
var getOwnPropertyDescriptor: typeof core.Reflect.getOwnPropertyDescriptor;
export = getOwnPropertyDescriptor;
}
declare module "core-js/libary/fn/reflect/get-prototype-of" {
declare module "core-js/library/fn/reflect/get-prototype-of" {
var getPrototypeOf: typeof core.Reflect.getPrototypeOf;
export = getPrototypeOf;
}
declare module "core-js/libary/fn/reflect/has" {
declare module "core-js/library/fn/reflect/has" {
var has: typeof core.Reflect.has;
export = has;
}
declare module "core-js/libary/fn/reflect/is-extensible" {
declare module "core-js/library/fn/reflect/is-extensible" {
var isExtensible: typeof core.Reflect.isExtensible;
export = isExtensible;
}
declare module "core-js/libary/fn/reflect/own-keys" {
declare module "core-js/library/fn/reflect/own-keys" {
var ownKeys: typeof core.Reflect.ownKeys;
export = ownKeys;
}
declare module "core-js/libary/fn/reflect/prevent-extensions" {
declare module "core-js/library/fn/reflect/prevent-extensions" {
var preventExtensions: typeof core.Reflect.preventExtensions;
export = preventExtensions;
}
declare module "core-js/libary/fn/reflect/set" {
declare module "core-js/library/fn/reflect/set" {
var set: typeof core.Reflect.set;
export = set;
}
declare module "core-js/libary/fn/reflect/set-prototype-of" {
declare module "core-js/library/fn/reflect/set-prototype-of" {
var setPrototypeOf: typeof core.Reflect.setPrototypeOf;
export = setPrototypeOf;
}
declare module "core-js/libary/fn/regexp" {
declare module "core-js/library/fn/regexp" {
var RegExp: typeof core.RegExp;
export = RegExp;
}
declare module "core-js/libary/fn/regexp/escape" {
declare module "core-js/library/fn/regexp/escape" {
var escape: typeof core.RegExp.escape;
export = escape;
}
declare module "core-js/libary/fn/string" {
declare module "core-js/library/fn/string" {
var String: typeof core.String;
export = String;
}
declare module "core-js/libary/fn/string/at" {
declare module "core-js/library/fn/string/at" {
var at: typeof core.String.at;
export = at;
}
declare module "core-js/libary/fn/string/code-point-at" {
declare module "core-js/library/fn/string/code-point-at" {
var codePointAt: typeof core.String.codePointAt;
export = codePointAt;
}
declare module "core-js/libary/fn/string/ends-with" {
declare module "core-js/library/fn/string/ends-with" {
var endsWith: typeof core.String.endsWith;
export = endsWith;
}
declare module "core-js/libary/fn/string/escape-html" {
declare module "core-js/library/fn/string/escape-html" {
var escapeHTML: typeof core.String.escapeHTML;
export = escapeHTML;
}
declare module "core-js/libary/fn/string/from-code-point" {
declare module "core-js/library/fn/string/from-code-point" {
var fromCodePoint: typeof core.String.fromCodePoint;
export = fromCodePoint;
}
declare module "core-js/libary/fn/string/includes" {
declare module "core-js/library/fn/string/includes" {
var includes: typeof core.String.includes;
export = includes;
}
declare module "core-js/libary/fn/string/lpad" {
declare module "core-js/library/fn/string/lpad" {
var lpad: typeof core.String.lpad;
export = lpad;
}
declare module "core-js/libary/fn/string/raw" {
declare module "core-js/library/fn/string/raw" {
var raw: typeof core.String.raw;
export = raw;
}
declare module "core-js/libary/fn/string/repeat" {
declare module "core-js/library/fn/string/repeat" {
var repeat: typeof core.String.repeat;
export = repeat;
}
declare module "core-js/libary/fn/string/rpad" {
declare module "core-js/library/fn/string/rpad" {
var rpad: typeof core.String.rpad;
export = rpad;
}
declare module "core-js/libary/fn/string/starts-with" {
declare module "core-js/library/fn/string/starts-with" {
var startsWith: typeof core.String.startsWith;
export = startsWith;
}
declare module "core-js/libary/fn/string/unescape-html" {
declare module "core-js/library/fn/string/unescape-html" {
var unescapeHTML: typeof core.String.unescapeHTML;
export = unescapeHTML;
}
declare module "core-js/libary/fn/symbol" {
declare module "core-js/library/fn/symbol" {
var Symbol: typeof core.Symbol;
export = Symbol;
}
declare module "core-js/libary/fn/symbol/for" {
declare module "core-js/library/fn/symbol/for" {
var _for: typeof core.Symbol.for;
export = _for;
}
declare module "core-js/libary/fn/symbol/has-instance" {
declare module "core-js/library/fn/symbol/has-instance" {
var hasInstance: typeof core.Symbol.hasInstance;
export = hasInstance;
}
declare module "core-js/libary/fn/symbol/is-concat-spreadable" {
declare module "core-js/library/fn/symbol/is-concat-spreadable" {
var isConcatSpreadable: typeof core.Symbol.isConcatSpreadable;
export = isConcatSpreadable;
}
declare module "core-js/libary/fn/symbol/iterator" {
declare module "core-js/library/fn/symbol/iterator" {
var iterator: typeof core.Symbol.iterator;
export = iterator;
}
declare module "core-js/libary/fn/symbol/key-for" {
declare module "core-js/library/fn/symbol/key-for" {
var keyFor: typeof core.Symbol.keyFor;
export = keyFor;
}
declare module "core-js/libary/fn/symbol/match" {
declare module "core-js/library/fn/symbol/match" {
var match: typeof core.Symbol.match;
export = match;
}
declare module "core-js/libary/fn/symbol/replace" {
declare module "core-js/library/fn/symbol/replace" {
var replace: typeof core.Symbol.replace;
export = replace;
}
declare module "core-js/libary/fn/symbol/search" {
declare module "core-js/library/fn/symbol/search" {
var search: typeof core.Symbol.search;
export = search;
}
declare module "core-js/libary/fn/symbol/species" {
declare module "core-js/library/fn/symbol/species" {
var species: typeof core.Symbol.species;
export = species;
}
declare module "core-js/libary/fn/symbol/split" {
declare module "core-js/library/fn/symbol/split" {
var split: typeof core.Symbol.split;
export = split;
}
declare module "core-js/libary/fn/symbol/to-primitive" {
declare module "core-js/library/fn/symbol/to-primitive" {
var toPrimitive: typeof core.Symbol.toPrimitive;
export = toPrimitive;
}
declare module "core-js/libary/fn/symbol/to-string-tag" {
declare module "core-js/library/fn/symbol/to-string-tag" {
var toStringTag: typeof core.Symbol.toStringTag;
export = toStringTag;
}
declare module "core-js/libary/fn/symbol/unscopables" {
declare module "core-js/library/fn/symbol/unscopables" {
var unscopables: typeof core.Symbol.unscopables;
export = unscopables;
}
declare module "core-js/libary/es5" {
declare module "core-js/library/es5" {
export = core;
}
declare module "core-js/libary/es6" {
declare module "core-js/library/es6" {
export = core;
}
declare module "core-js/libary/es6/array" {
declare module "core-js/library/es6/array" {
var Array: typeof core.Array;
export = Array;
}
declare module "core-js/libary/es6/function" {
declare module "core-js/library/es6/function" {
var Function: typeof core.Function;
export = Function;
}
declare module "core-js/libary/es6/map" {
declare module "core-js/library/es6/map" {
var Map: typeof core.Map;
export = Map;
}
declare module "core-js/libary/es6/math" {
declare module "core-js/library/es6/math" {
var Math: typeof core.Math;
export = Math;
}
declare module "core-js/libary/es6/number" {
declare module "core-js/library/es6/number" {
var Number: typeof core.Number;
export = Number;
}
declare module "core-js/libary/es6/object" {
declare module "core-js/library/es6/object" {
var Object: typeof core.Object;
export = Object;
}
declare module "core-js/libary/es6/promise" {
declare module "core-js/library/es6/promise" {
var Promise: typeof core.Promise;
export = Promise;
}
declare module "core-js/libary/es6/reflect" {
declare module "core-js/library/es6/reflect" {
var Reflect: typeof core.Reflect;
export = Reflect;
}
declare module "core-js/libary/es6/regexp" {
declare module "core-js/library/es6/regexp" {
var RegExp: typeof core.RegExp;
export = RegExp;
}
declare module "core-js/libary/es6/set" {
declare module "core-js/library/es6/set" {
var Set: typeof core.Set;
export = Set;
}
declare module "core-js/libary/es6/string" {
declare module "core-js/library/es6/string" {
var String: typeof core.String;
export = String;
}
declare module "core-js/libary/es6/symbol" {
declare module "core-js/library/es6/symbol" {
var Symbol: typeof core.Symbol;
export = Symbol;
}
declare module "core-js/libary/es6/weak-map" {
declare module "core-js/library/es6/weak-map" {
var WeakMap: typeof core.WeakMap;
export = WeakMap;
}
declare module "core-js/libary/es6/weak-set" {
declare module "core-js/library/es6/weak-set" {
var WeakSet: typeof core.WeakSet;
export = WeakSet;
}
declare module "core-js/libary/es7" {
declare module "core-js/library/es7" {
export = core;
}
declare module "core-js/libary/es7/array" {
declare module "core-js/library/es7/array" {
var Array: typeof core.Array;
export = Array;
}
declare module "core-js/libary/es7/map" {
declare module "core-js/library/es7/map" {
var Map: typeof core.Map;
export = Map;
}
declare module "core-js/libary/es7/object" {
declare module "core-js/library/es7/object" {
var Object: typeof core.Object;
export = Object;
}
declare module "core-js/libary/es7/regexp" {
declare module "core-js/library/es7/regexp" {
var RegExp: typeof core.RegExp;
export = RegExp;
}
declare module "core-js/libary/es7/set" {
declare module "core-js/library/es7/set" {
var Set: typeof core.Set;
export = Set;
}
declare module "core-js/libary/es7/string" {
declare module "core-js/library/es7/string" {
var String: typeof core.String;
export = String;
}
declare module "core-js/libary/js" {
declare module "core-js/library/js" {
export = core;
}
declare module "core-js/libary/js/array" {
declare module "core-js/library/js/array" {
var Array: typeof core.Array;
export = Array;
}
declare module "core-js/libary/web" {
declare module "core-js/library/web" {
export = core;
}
declare module "core-js/libary/web/dom" {
declare module "core-js/library/web/dom" {
export = core;
}
declare module "core-js/libary/web/immediate" {
declare module "core-js/library/web/immediate" {
export = core;
}
declare module "core-js/libary/web/timers" {
declare module "core-js/library/web/timers" {
export = core;
}
+62
View File
@@ -0,0 +1,62 @@
/// <reference path="./css.d.ts" />
import css = require("css");
// Check that user can parse, modify and persist CSS content
var parserOptions: css.ParserOptions;
parserOptions = {
silent: true,
source: "test.css"
};
var stylesheet = css.parse("body { font-size: 12px; }", parserOptions);
var comment: css.Comment;
comment = {
type: "comment",
comment: "Hello World"
};
stylesheet.stylesheet.rules.push(comment);
var stringifyOptions: css.StringifyOptions;
stringifyOptions = {
indent: " "
};
var content = css.stringify(stylesheet, stringifyOptions);
// Create new stylesheet and save it
var bgDeclaration: css.Declaration = {
type: "declaration",
property: "background",
value: "#eee"
};
var colorDeclaration: css.Declaration = {
type: "declaration",
property: "color",
value: "#888"
};
var ruleComment: css.Comment = {
type: "comment",
comment: "New CSS AST Tree Rule"
};
var bodyRule: css.Rule = {
type: "rule",
selectors: ["body"],
declarations: [ruleComment, bgDeclaration, colorDeclaration]
};
var newStylesheet: css.Stylesheet = {
type: "stylesheet",
stylesheet: {
rules: [bodyRule]
}
};
content = css.stringify(newStylesheet);
+258
View File
@@ -0,0 +1,258 @@
// Type definitions for css
// Project: https://github.com/reworkcss/css
// Definitions by: Ilya Verbitskiy <https://github.com/ilich>
// Definitions: https://github.com/ilich/DefinitelyTyped
/**
* CSS parser / stringifier for Node.js
*/
declare module "css" {
/**
* css.parse options
*/
interface ParserOptions {
/** Silently fail on parse errors */
silent?: boolean;
/** The path to the file containing css. Makes errors and source maps more helpful, by letting them know where code comes from. */
source?: string;
}
/**
* css.stringify options
*/
interface StringifyOptions {
/** The string used to indent the output. Defaults to two spaces. */
indent?: string;
/** Omit comments and extraneous whitespace. */
compress?: boolean;
/** Return a sourcemap along with the CSS output.
* Using the source option of css.parse is strongly recommended
* when creating a source map. Specify sourcemap: 'generator'
* to return the SourceMapGenerator object instead of serializing the source map.
*/
sourcemap?: string;
/** (enabled by default, specify false to disable)
* Reads any source maps referenced by the input files
* when generating the output source map. When enabled,
* file system access may be required for reading the referenced source maps.
*/
inputSourcemaps?: boolean;
}
/**
* Error thrown during parsing.
*/
interface ParserError {
/** The full error message with the source position. */
message?: string;
/** The error message without position. */
reason?: string;
/** The value of options.source if passed to css.parse. Otherwise undefined. */
filename?: string;
line?: number;
column?: number;
/** The portion of code that couldn't be parsed. */
source?: string;
}
// ---------------------------------------------------------------------------------
// AST Tree
// ---------------------------------------------------------------------------------
/**
* Information about a position in the code.
* The line and column numbers are 1-based: The first line is 1 and the first column of a line is 1 (not 0).
*/
interface Position {
line?: number;
column?: number;
}
/**
* Base AST Tree Node.
*/
interface Node {
/** The possible values are the ones listed in the Types section on https://github.com/reworkcss/css page. */
type?: string;
/** A reference to the parent node, or null if the node has no parent. */
parent?: Node;
/** Information about the position in the source string that corresponds to the node. */
position?: {
start?: Position;
end?: Position;
/** The value of options.source if passed to css.parse. Otherwise undefined. */
source?: string;
/** The full source string passed to css.parse. */
content?: string;
};
}
interface Rule extends Node {
/** The list of selectors of the rule, split on commas. Each selector is trimmed from whitespace and comments. */
selectors?: Array<string>;
/** Array of nodes with the types declaration and comment. */
declarations?: Array<Declaration|Comment>;
}
interface Declaration extends Node {
/** The property name, trimmed from whitespace and comments. May not be empty. */
property?: string;
/** The value of the property, trimmed from whitespace and comments. Empty values are allowed. */
value?: string;
}
/**
* A rule-level or declaration-level comment. Comments inside selectors, properties and values etc. are lost.
*/
interface Comment extends Node {
comment?: string;
}
/**
* The @charset at-rule.
*/
interface Charset {
/** The part following @charset. */
charset?: string;
}
/**
* The @custom-media at-rule
*/
interface CustomMedia {
/** The ---prefixed name. */
name?: string;
/** The part following the name. */
media?: string;
}
/**
* The @document at-rule.
*/
interface Document {
/** The part following @document. */
document?: string;
/** The vendor prefix in @document, or undefined if there is none. */
vendor?: string;
/** Array of nodes with the types rule, comment and any of the at-rule types. */
rules?: Array<Rule|Comment|AtRule>;
}
/**
* The @font-face at-rule.
*/
interface FontFace {
/** Array of nodes with the types declaration and comment. */
declarations?: Array<Declaration|Comment>;
}
/**
* The @host at-rule.
*/
interface Host {
/** Array of nodes with the types rule, comment and any of the at-rule types. */
rules?: Array<Rule|Comment|AtRule>;
}
/**
* The @import at-rule.
*/
interface Import {
/** The part following @import. */
import?: string;
}
/**
* The @keyframes at-rule.
*/
interface KeyFrames {
/** The name of the keyframes rule. */
name?: string;
/** The vendor prefix in @keyframes, or undefined if there is none. */
vendor?: string;
/** Array of nodes with the types keyframe and comment. */
keyframes?: Array<KeyFrame|Comment>;
}
interface KeyFrame {
/** The list of "selectors" of the keyframe rule, split on commas. Each “selector” is trimmed from whitespace. */
values?: Array<string>;
/** Array of nodes with the types declaration and comment. */
declarations?: Array<Declaration|Comment>;
}
/**
* The @media at-rule.
*/
interface Media {
/** The part following @media. */
media?: string;
/** Array of nodes with the types rule, comment and any of the at-rule types. */
rules?: Array<Rule|Comment|AtRule>;
}
/**
* The @namespace at-rule.
*/
interface Namespace {
/** The part following @namespace. */
namespace?: string;
}
/**
* The @page at-rule.
*/
interface Page {
/** The list of selectors of the rule, split on commas. Each selector is trimmed from whitespace and comments. */
selectors?: Array<string>;
/** Array of nodes with the types declaration and comment. */
declarations?: Array<Declaration|Comment>;
}
/**
* The @supports at-rule.
*/
interface Supports {
/** The part following @supports. */
supports?: string;
/** Array of nodes with the types rule, comment and any of the at-rule types. */
rules?: Array<Rule|Comment|AtRule>;
}
/** All at-rules. */
type AtRule = Charset|CustomMedia|Document|FontFace|Host|Import|KeyFrames|Media|Namespace|Page|Supports;
/**
* The root node returned by css.parse.
*/
interface Stylesheet extends Node {
stylesheet?: {
/** Array of nodes with the types rule, comment and any of the at-rule types. */
rules?: Array<Rule|Comment|AtRule>;
/** Array of Errors. Errors collected during parsing when option silent is true. */
parsingErrors?: Array<ParserError>
};
}
// ---------------------------------------------------------------------------------
/**
* Accepts a CSS string and returns an AST object.
*
* @param {string} code - CSS code.
* @param {ParserOptions} options - CSS parser options.
* @return {Stylesheet} AST object built using provides CSS code.
*/
function parse(code: string, options?: ParserOptions): Stylesheet;
/**
* Accepts an AST object (as css.parse produces) and returns a CSS string.
*
* @param {Stylesheet} stylesheet - AST tree.
* @param {StringifyOptions} options - AST tree to string serializaiton options.
* @return {string} CSS code.
*/
function stringify(stylesheet: Stylesheet, options?: StringifyOptions): string;
}
Vendored
+7 -7
View File
@@ -2697,24 +2697,24 @@ declare module d3 {
response(): (request: XMLHttpRequest) => any;
response(value: (request: XMLHttpRequest) => any): DsvXhr<T>;
get(callback?: (err: any, data: T) => void): DsvXhr<T>;
post(data?: any, callback?: (err: any, data: T) => void): DsvXhr<T>;
post(callback: (err: any, data: T) => void): DsvXhr<T>;
get(callback?: (err: XMLHttpRequest, data: T[]) => void): DsvXhr<T>;
post(data?: any, callback?: (err: XMLHttpRequest, data: T[]) => void): DsvXhr<T>;
post(callback: (err: XMLHttpRequest, data: T[]) => void): DsvXhr<T>;
send(method: string, data?: any, callback?: (err: any, data: T) => void): DsvXhr<T>;
send(method: string, callback: (err: any, data: T) => void): DsvXhr<T>;
send(method: string, data?: any, callback?: (err: XMLHttpRequest, data: T[]) => void): DsvXhr<T>;
send(method: string, callback: (err: XMLHttpRequest, data: T[]) => void): DsvXhr<T>;
abort(): DsvXhr<T>;
on(type: "beforesend"): (request: XMLHttpRequest) => void;
on(type: "progress"): (request: XMLHttpRequest) => void;
on(type: "load"): (response: T) => void;
on(type: "load"): (response: T[]) => void;
on(type: "error"): (err: any) => void;
on(type: string): (...args: any[]) => void;
on(type: "beforesend", listener: (request: XMLHttpRequest) => void): DsvXhr<T>;
on(type: "progress", listener: (request: XMLHttpRequest) => void): DsvXhr<T>;
on(type: "load", listener: (response: T) => void): DsvXhr<T>;
on(type: "load", listener: (response: T[]) => void): DsvXhr<T>;
on(type: "error", listener: (err: any) => void): DsvXhr<T>;
on(type: string, listener: (...args: any[]) => void): DsvXhr<T>;
}
+6572
View File
File diff suppressed because it is too large. Load diff
+47 -39
View File
@@ -1,4 +1,4 @@
// Type definitions for DevExtreme 15.1.7
// Type definitions for DevExtreme 15.1.8
// Project: http://js.devexpress.com/
// Definitions by: DevExpress Inc. <http://devexpress.com/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -35,7 +35,7 @@ declare module DevExpress {
brokenRules: any[];
validators: IValidator[];
}
export interface GroupConfig extends EventsMixin<GroupConfig> {
export interface GroupConfig extends EventsMixin<GroupConfig> {
group: any;
validators: IValidator[];
validate(): ValidationGroupValidationResult;
@@ -56,7 +56,7 @@ declare module DevExpress {
/** Validates the rules that are defined within the dxValidator objects that are registered for the specified ViewModel. */
export function validateModel(model: Object): ValidationGroupValidationResult;
/** Registers all the dxValidator objects by which the fields of the specified ViewModel are extended. */
export function registerModelForValidation(model: Object): void;
export function registerModelForValidation(model: Object) : void;
}
export var hardwareBackButton: JQueryCallback;
/** Processes the hardware back button click. */
@@ -223,10 +223,14 @@ declare module DevExpress {
endUpdate(): void;
/** Returns an instance of this component class. */
instance(): Component;
/** Sets one or more options of this component. */
option(options: Object): void;
/** Returns the configuration options of this component. */
option(): Object;
option(): {
[optionKey: string]: any;
};
/** Sets one or more options of this component. */
option(options: {
[optionKey: string]: any;
}): void;
/** Gets the value of the specified configuration option of this component. */
option(optionName: string): any;
/** Sets a value to the specified configuration option of this component. */
@@ -1384,11 +1388,11 @@ declare module DevExpress.ui {
};
/** A handler for the click event. */
onClick?: any;
clickAction?: any;
clickAction?: any;
/** Specifies whether or not map widget controls are available. */
controls?: boolean;
/** Specifies the height of the widget. */
height?: number;
height?: any;
/** A key used to authenticate the application within the required map provider. */
key?: {
/** A key used to authenticate the application within the "Bing" map provider. */
@@ -1400,31 +1404,31 @@ declare module DevExpress.ui {
}
/** A handler for the markerAdded event. */
onMarkerAdded?: Function;
markerAddedAction?: Function;
markerAddedAction?: Function;
/** A URL pointing to the custom icon to be used for map markers. */
markerIconSrc?: string;
/** A handler for the markerRemoved event. */
onMarkerRemoved?: Function;
markerRemovedAction?: Function;
markerRemovedAction?: Function;
/** An array of markers displayed on a map. */
markers?: Array<any>;
/** The name of the current map data provider. */
provider?: string;
/** A handler for the ready event. */
onReady?: Function;
readyAction?: Function;
readyAction?: Function;
/** A handler for the routeAdded event. */
onRouteAdded?: Function;
routeAddedAction?: Function;
routeAddedAction?: Function;
/** A handler for the routeRemoved event. */
onRouteRemoved?: Function;
routeRemovedAction?: Function;
routeRemovedAction?: Function;
/** An array of routes shown on the map. */
routes?: Array<any>;
/** The type of a map to display. */
type?: string;
/** Specifies the width of the widget. */
width?: number;
width?: any;
/** The zoom level of the map. */
zoom?: number;
}
@@ -1435,7 +1439,7 @@ declare module DevExpress.ui {
/** Adds a marker to the map. */
addMarker(markerOptions: Object): JQueryPromise<Object>;
/** Adds a route to the map. */
addRoute(options: Object): JQueryPromise<Object>;
addRoute(routeOptions: Object): JQueryPromise<Object>;
/** Removes a marker from the map. */
removeMarker(marker: Object): JQueryPromise<void>;
/** Removes a route from the map. */
@@ -1787,7 +1791,7 @@ declare module DevExpress.ui {
interval?: number;
/** Specifies the maximum zoom level of a calendar, which is used to pick the date. */
maxZoomLevel?: string;
/** Specifies the minimal zoom level of a calendar, which is used to pick the date. */
/** Specifies the minimal zoom level of a calendar, which is used to pick the date. */
minZoomLevel?: string;
/** Specifies the type of date/time picker. */
pickerType?: string;
@@ -1825,8 +1829,8 @@ declare module DevExpress.ui {
maxZoomLevel?: string;
/** Specifies the minimum zoom level of the calendar. */
minZoomLevel?: string;
/** The template to be used for rendering calendar cells. */
cellTemplate?: any;
/** The template to be used for rendering calendar cells. */
cellTemplate?: any;
}
/** A calendar widget. */
export class dxCalendar extends Editor {
@@ -1976,6 +1980,8 @@ declare module DevExpress.ui {
onProgress?: Function;
/** A handler for the uploadError event. */
onUploadError?: Function;
/** A handler for the valueChanged event. */
onValueChanged?: Function;
}
/** A widget used to select and upload a file or multiple files. */
export class dxFileUploader extends Editor {
@@ -2145,6 +2151,11 @@ interface JQuery {
dxSelectBox(options: string): any;
dxSelectBox(options: string, ...params: any[]): any;
dxSelectBox(options: DevExpress.ui.dxSelectBoxOptions): JQuery;
dxTagBox(): JQuery;
dxTagBox(options: "instance"): DevExpress.ui.dxTagBox;
dxTagBox(options: string): any;
dxTagBox(options: string, ...params: any[]): any;
dxTagBox(options: DevExpress.ui.dxTagBoxOptions): JQuery;
dxScrollView(): JQuery;
dxScrollView(options: "instance"): DevExpress.ui.dxScrollView;
dxScrollView(options: string): any;
@@ -3036,9 +3047,6 @@ declare module DevExpress.ui {
showInColumnChooser?: boolean;
/** Specifies the identifier of the column. */
name?: string;
// NOTE https://github.com/borisyankov/DefinitelyTyped/pull/5590
text?: string;
value?: any;
}
export interface dxDataGridOptions extends WidgetOptions {
/** Specifies whether the outer borders of the grid are visible or not. */
@@ -4291,16 +4299,16 @@ declare module DevExpress.viz.core {
}) => void;
/** A handler for the incidentOccurred event. */
onIncidentOccurred?: (
component: BaseWidget,
element: Element,
target: {
id: string;
type: string;
args: any;
text: string;
widget: string;
version: string;
}
component: BaseWidget,
element: Element,
target: {
id: string;
type: string;
args: any;
text: string;
widget: string;
version: string;
}
) => void;
/** Notifies a widget that it is embedded into an HTML page that uses a path modifier. */
pathModified?: boolean;
@@ -5194,9 +5202,9 @@ declare module DevExpress.viz.charts {
export interface BaseChartOptions<TPoint> extends viz.core.BaseWidgetOptions {
/** Specifies adaptive layout options. */
adaptiveLayout?: {
/** Specifies the width of the widget container that is small enough for the layout to begin adapting. */
/** Specifies the width of the widget that is small enough for the layout to begin adapting. */
width?: number;
/** Specifies the height of the widget container that is small enough for the layout to begin adapting. */
/** Specifies the height of the widget that is small enough for the layout to begin adapting. */
height?: number;
/** Specifies whether or not point labels can be hidden when the layout is adapting. */
keepLabels?: boolean;
@@ -6049,8 +6057,8 @@ declare module DevExpress.viz.rangeSelector {
useTicksAutoArrangement?: boolean;
/** Specifies the type of values on the scale. */
valueType?: string;
/** Specifies the order of arguments on a discrete scale. */
categories?: Array<any>;
/** Specifies the order of arguments on a discrete scale. */
categories?: Array<any>;
};
/** Specifies the range to be selected when displaying the dxRangeSelector. */
selectedRange?: {
@@ -6351,9 +6359,9 @@ declare module DevExpress.viz.map {
centerChanged?: (center: Array<number>) => void;
/** A handler for the centerChanged event. */
onCenterChanged?: (e: {
center: Array<number>;
component: dxVectorMap;
element: Element;
center: Array<number>;
component: dxVectorMap;
element: Element;
}) => void;
/** A handler for the tooltipShown event. */
onTooltipShown?: (e: {
@@ -6569,4 +6577,4 @@ interface JQuery {
dxSparkline(options?: DevExpress.viz.sparklines.dxSparklineOptions): JQuery;
dxSparkline(methodName: string, ...params: any[]): any;
dxSparkline(methodName: "instance"): DevExpress.viz.sparklines.dxSparkline;
}
}
+995 -995
View File
File diff suppressed because it is too large. Load diff
+642 -642
View File
File diff suppressed because it is too large. Load diff
+2
View File
@@ -11,6 +11,8 @@ function ModuleTest(): void {
var myTypedArray = new Uint8Array(10);
var buf = Module._malloc(myTypedArray.length*myTypedArray.BYTES_PER_ELEMENT);
Module.setValue(buf, 10, 'i32');
var x = Module.getValue(buf, 'i32') + 123;
Module.HEAPU8.set(myTypedArray, buf);
Module.ccall('my_function', 'number', ['number'], [buf]);
Module._free(buf);
+2 -2
View File
@@ -22,8 +22,8 @@ declare module Module {
function ccall(ident: string, returnType: string, argTypes: string[], args: any[]): any;
function cwrap(ident: string, returnType: string, argTypes: string[]): any;
function setValue(ptr: number, value: any, type: string, noSafe: boolean): void;
function getValue(ptr: number, type: string, noSafe: boolean): any;
function setValue(ptr: number, value: any, type: string, noSafe?: boolean): void;
function getValue(ptr: number, type: string, noSafe?: boolean): number;
var ALLOC_NORMAL: number;
var ALLOC_STACK: number;
+10
View File
@@ -5,3 +5,13 @@ import errorhandler = require('errorhandler');
var app = express();
app.use(errorhandler());
app.use(errorhandler({ log: true }));
app.use(errorhandler({ log: (err, str, req, res) => {
const { message, name, stack } = err;
const messageIsStr = message === str;
const requestWasFresh = req && req.fresh;
const responseContentType = res && res.contentType
}}))
+22 -2
View File
@@ -7,6 +7,26 @@
declare module "errorhandler" {
import express = require('express');
function e(options?: {log?: any}): express.ErrorRequestHandler;
export = e;
function errorHandler(options?: errorHandler.Options): express.ErrorRequestHandler;
namespace errorHandler {
interface LoggingCallback {
(err: Error, str: string, req: express.Request, res: express.Response): void;
}
interface Options {
/**
* Defaults to true.
*
* Possible values:
* true : Log errors using console.error(str).
* false : Only send the error back in the response.
* A function : pass the error to a function for handling.
*/
log: boolean | LoggingCallback;
}
}
export = errorHandler;
}
+1 -1
View File
@@ -12,7 +12,7 @@ declare class Promise<R> implements Thenable<R> {
/**
* If you call resolve in the body of the callback passed to the constructor,
* your promise is fulfilled with result object passed to resolve.
* If you call reject your promise is rejected with the object passed to resolve.
* If you call reject your promise is rejected with the object passed to reject.
* For consistency and debugging (eg stack traces), obj should be an instanceof Error.
* Any errors thrown in the constructor callback will be implicitly passed to reject().
*/
+1
View File
@@ -110,6 +110,7 @@ declare module "express" {
use(path: string[], handler: ErrorRequestHandler): T;
use(path: RegExp, ...handler: RequestHandler[]): T;
use(path: RegExp, handler: ErrorRequestHandler): T;
use(path:string, router:Router): T;
}
export function Router(options?: any): Router;
+5 -1
View File
@@ -149,13 +149,17 @@ interface FBSDKCanvas{
stopTimer(handler?: (fbResponseObject : Object) => any) : void;
}
interface FBResponseObject {
error: any;
}
interface FBSDK{
/* This method is used to initialize and setup the SDK. */
init(fbInitObject : FBInitParams) : void;
/* This method lets you make calls to the Graph API. */
api(path : string, method : string, callback : (fbResponseObject : Object) => any) : Object;
api(path : string, params : Object, callback : (fbResponseObject : Object) => any) : Object;
api(path : string, params : Object, callback : (fbResponseObject : FBResponseObject) => any) : Object;
api(path : string, method : string, params : Object, callback : (fbResponseObject : Object) => any) : Object;
/* This method is used to trigger different forms of Facebook created UI dialogs. */
+9
View File
@@ -0,0 +1,9 @@
// Copied from https://github.com/sindresorhus/file-url/blob/14c7a69ae3798f50b3a4a21823c86e10b38160fe/readme.md
/// <reference path="file-url.d.ts" />
fileUrl('unicorn.jpg');
//=> 'file:///Users/sindresorhus/dev/file-url/unicorn.jpg'
fileUrl('/Users/pony/pics/unicorn.jpg');
//=> 'file:///Users/pony/pics/unicorn.jpg'
+16
View File
@@ -0,0 +1,16 @@
// Type definitions for file-url v1.0.1
// Project: https://github.com/sindresorhus/file-url
// Definitions by: MEDIA CHECK s.r.o. <http://www.mediacheck.cz/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Convert a path to a file URL.
*/
declare function fileUrl(path:string):string;
/**
* Convert a path to a file URL.
*/
declare module "file-url" {
export = fileUrl;
}
@@ -0,0 +1,26 @@
/// <reference path="flux-standard-action.d.ts" />
//import action = require('flux-standard-action');
import { isError, isFSA, Action, ErrorAction } from 'flux-standard-action';
interface TextPayload {
text: string;
}
var sample1: Action<TextPayload> = {
type: 'ADD_TODO',
payload: {
text: 'Do something.'
}
};
var sample2: ErrorAction = {
type: 'ADD_TODO',
payload: new Error(),
error: true
};
var result1: boolean = isError(sample1);
var result2: boolean = isFSA(sample1);
var result3: boolean = isError(sample2);
var result4: boolean = isFSA(sample2);
+31
View File
@@ -0,0 +1,31 @@
// Type definitions for flux-standard-action 0.5.0
// Project: https://github.com/acdlite/flux-standard-action
// Definitions by: Qubo <https://github.com/tkqubo>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "flux-standard-action" {
export interface ErrorAction extends Action<Error> {
error: boolean;
}
export interface Action<T> {
type: string;
payload?: T;
error?: boolean;
}
// Usage: var action: Action<sring> & AnyMeta;
export interface AnyMeta {
meta: any
}
// Usage: var action: Action<sring> & TypedMeta<string>;
export interface TypedMeta<T> {
meta: T
}
export function isFSA(action: any): boolean;
export function isError(action: any): boolean;
}
+4
View File
@@ -0,0 +1,4 @@
/// <reference path="form-serializer.d.ts" />
$("#form").serializeObject();
$("#form").serializeJSON();
+42
View File
@@ -0,0 +1,42 @@
// Type definitions for jquery.serialize-object 2.5.0
// Project: https://github.com/macek/jquery-serialize-object
// Definitions by: Florian Wagner <https://github.com/flqw>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>
declare module FormSerializer {
interface FormSerializerPatterns {
validate: RegExp;
key: RegExp;
push: RegExp;
fixed: RegExp;
named: RegExp;
}
export var patterns: FormSerializerPatterns;
}
declare module "jquery-serialize-object" {
export = FormSerializer;
}
declare module "form-serializer" {
export = FormSerializer;
}
interface JQuery {
/**
* Serializes the selected form into a JavaScript object.
*/
serializeObject(): Object;
/**
* Serializes the selected form into JSON.
*/
serializeJSON(): string;
}
+13
View File
@@ -0,0 +1,13 @@
License Notices:
The API definitions and documents are from Google Apps Script reference site [1].
The document comments are reproduced from work created and shared by Google [2]
and used according to terms described in the Creative Commons 3.0 Attribution License [3].
The code samples in the documents and the test code are licensed under the Apache 2.0 License [4].
[1] https://developers.google.com/apps-script/
[2] https://developers.google.com/readme/policies/
[3] http://creativecommons.org/licenses/by/3.0/
[4] http://www.apache.org/licenses/LICENSE-2.0
@@ -0,0 +1,27 @@
/// <reference path="google-apps-script.document.d.ts" />
/// <reference path="google-apps-script.gmail.d.ts" />
// from https://developers.google.com/apps-script/overview
function createAndSendDocument() {
// Create a new Google Doc named 'Hello, world!'
var doc = DocumentApp.create('Hello, world!');
// Access the body of the document, then add a paragraph.
doc.getBody().appendParagraph('This document was created by Google Apps Script.');
// Get the URL of the document.
var url = doc.getUrl();
// Get the email address of the active user - that's you.
var email = Session.getActiveUser().getEmail();
// Get the name of the document to use as an email subject line.
var subject = doc.getName();
// Append a new string to the "url" variable to use as an email body.
var body = 'Link to your doc: ' + url;
// Send yourself an email with a link to the document.
GmailApp.sendEmail(email, subject, body);
}
+283
View File
@@ -0,0 +1,283 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
declare module GoogleAppsScript {
export module Base {
/**
* A data interchange object for Apps Script services.
*/
export interface Blob {
copyBlob(): Blob;
getAs(contentType: string): Blob;
getBytes(): Byte[];
getContentType(): string;
getDataAsString(): string;
getDataAsString(charset: string): string;
getName(): string;
isGoogleType(): boolean;
setBytes(data: Byte[]): Blob;
setContentType(contentType: string): Blob;
setContentTypeFromExtension(): Blob;
setDataFromString(string: string): Blob;
setDataFromString(string: string, charset: string): Blob;
setName(name: string): Blob;
getAllBlobs(): Blob[];
}
/**
* Interface for objects that can export their data as a Blob.
* Implementing classes
*
* NameBrief description
*
* AttachmentA Sites Attachment such as a file attached to a page.
*
* BlobA data interchange object for Apps Script services.
*
* ChartA Chart object, which can be embedded into documents, UI elements, or used as a static image.
*
* DocumentA document, containing rich text and elements such as tables and lists.
*
* EmbeddedChartRepresents a chart that has been embedded into a Spreadsheet.
*
* FileA file in Google Drive.
*
* GmailAttachmentAn attachment from Gmail.
*
* HTTPResponseThis class allows users to access specific information on HTTP responses.
*
* HtmlOutputAn HtmlOutput object that can be served from a script.
*
* InlineImageAn element representing an embedded image.
*
* JdbcBlobA JDBC Blob.
*
* JdbcClobA JDBC Clob.
*
* SpreadsheetThis class allows users to access and modify Google Sheets files.
*
* StaticMapAllows for the creation and decoration of static map images.
*/
export interface BlobSource {
getAs(contentType: string): Blob;
getBlob(): Blob;
}
/**
* This class provides access to Google Apps specific dialog boxes.
*
* The methods in this class are only available for use in the context of a Google Spreadsheet.
* See also
*
* ButtonSet
*/
export interface Browser {
Buttons: ButtonSet
inputBox(prompt: string): string;
inputBox(prompt: string, buttons: ButtonSet): string;
inputBox(title: string, prompt: string, buttons: ButtonSet): string;
msgBox(prompt: string): string;
msgBox(prompt: string, buttons: ButtonSet): string;
msgBox(title: string, prompt: string, buttons: ButtonSet): string;
}
/**
* An enum representing predetermined, localized dialog buttons returned by an
* alert or PromptResponse.getSelectedButton() to
* indicate which button in a dialog the user clicked. These values cannot be set; to add buttons to
* an alert or
* prompt, use ButtonSet instead.
*
* // Display a dialog box with a message and "Yes" and "No" buttons.
* var ui = DocumentApp.getUi();
* var response = ui.alert('Are you sure you want to continue?', ui.ButtonSet.YES_NO);
*
* // Process the user's response.
* if (response == ui.Button.YES) {
* Logger.log('The user clicked "Yes."');
* } else {
* Logger.log('The user clicked "No" or the dialog\'s close button.');
* }
*/
export enum Button { CLOSE, OK, CANCEL, YES, NO }
/**
* An enum representing predetermined, localized sets of one or more dialog buttons that can be
* added to an alert or a
* prompt. To determine which button the user
* clicked, use Button.
*
* // Display a dialog box with a message and "Yes" and "No" buttons.
* var ui = DocumentApp.getUi();
* var response = ui.alert('Are you sure you want to continue?', ui.ButtonSet.YES_NO);
*
* // Process the user's response.
* if (response == ui.Button.YES) {
* Logger.log('The user clicked "Yes."');
* } else {
* Logger.log('The user clicked "No" or the dialog\'s close button.');
* }
*/
export enum ButtonSet { OK, OK_CANCEL, YES_NO, YES_NO_CANCEL }
/**
* This class allows the developer to write out text to the debugging logs.
*/
export interface Logger {
clear(): void;
getLog(): string;
log(data: Object): Logger;
log(format: string, ...values: Object[]): Logger;
}
/**
* A custom menu in an instance of the user interface for a Google App. A script can only interact
* with the UI for the current instance of an open document or form, and only if the script is
* container-bound to the document or form. For more
* information, see the guide to menus.
*
* // Add a custom menu to the active spreadsheet, including a separator and a sub-menu.
* function onOpen(e) {
* SpreadsheetApp.getUi()
* .createMenu('My Menu')
* .addItem('My Menu Item', 'myFunction')
* .addSeparator()
* .addSubMenu(SpreadsheetApp.getUi().createMenu('My Submenu')
* .addItem('One Submenu Item', 'mySecondFunction')
* .addItem('Another Submenu Item', 'myThirdFunction'))
* .addToUi();
* }
*/
export interface Menu {
addItem(caption: string, functionName: string): Menu;
addSeparator(): Menu;
addSubMenu(menu: Menu): Menu;
addToUi(): void;
}
/**
* An enumeration that provides access to MIME-type declarations without typing the strings
* explicitly. Any method that expects a MIME type rendered as a string (for example,
* 'image/png') will also accept one of the values below, so long as the method
* supports the underlying MIME type.
*
* // Use MimeType enum to log the name of every Google Doc in the user's Drive.
* var docs = DriveApp.getFilesByType(MimeType.GOOGLE_DOCS);
* while (docs.hasNext()) {
* var doc = docs.next();
* Logger.log(doc.getName())
* }
*
* // Use plain string to log the size of every PNG in the user's Drive.
* var pngs = DriveApp.getFilesByType('image/png');
* while (pngs.hasNext()) {
* var png = pngs.next();
* Logger.log(png.getSize());
* }
*/
export enum MimeType { GOOGLE_APPS_SCRIPT, GOOGLE_DRAWINGS, GOOGLE_DOCS, GOOGLE_FORMS, GOOGLE_SHEETS, GOOGLE_SLIDES, FOLDER, BMP, GIF, JPEG, PNG, SVG, PDF, CSS, CSV, HTML, JAVASCRIPT, PLAIN_TEXT, RTF, OPENDOCUMENT_GRAPHICS, OPENDOCUMENT_PRESENTATION, OPENDOCUMENT_SPREADSHEET, OPENDOCUMENT_TEXT, MICROSOFT_EXCEL, MICROSOFT_EXCEL_LEGACY, MICROSOFT_POWERPOINT, MICROSOFT_POWERPOINT_LEGACY, MICROSOFT_WORD, MICROSOFT_WORD_LEGACY, ZIP }
/**
* An enum representing the months of the year.
*/
export enum Month { JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER }
/**
* A response to a prompt dialog displayed in the
* user-interface environment for a Google App. The response contains any text the user entered in
* the dialog's input field and indicates which button the user clicked to dismiss the dialog.
*
* // Display a dialog box with a title, message, input field, and "Yes" and "No" buttons. The
* // user can also close the dialog by clicking the close button in its title bar.
* var ui = DocumentApp.getUi();
* var response = ui.prompt('Getting to know you', 'May I know your name?', ui.ButtonSet.YES_NO);
*
* // Process the user's response.
* if (response.getSelectedButton() == ui.Button.YES) {
* Logger.log('The user\'s name is %s.', response.getResponseText());
* } else if (response.getSelectedButton() == ui.Button.NO) {
* Logger.log('The user didn\'t want to provide a name.');
* } else {
* Logger.log('The user clicked the close button in the dialog\'s title bar.');
* }
*/
export interface PromptResponse {
getResponseText(): string;
getSelectedButton(): Button;
}
/**
* The Session class provides access to session information, such as the user's email address (in
* some circumstances) and language setting.
*/
export interface Session {
getActiveUser(): User;
getActiveUserLocale(): string;
getEffectiveUser(): User;
getScriptTimeZone(): string;
getTimeZone(): string;
getUser(): User;
}
/**
* An instance of the user-interface environment for a Google App that allows the script to add
* features like menus, dialogs, and sidebars. A script can only interact with the UI for the
* current instance of an open editor, and only if the script is
* container-bound to the editor.
*
* // Display a dialog box with a title, message, input field, and "Yes" and "No" buttons. The
* // user can also close the dialog by clicking the close button in its title bar.
* var ui = SpreadsheetApp.getUi();
* var response = ui.prompt('Getting to know you', 'May I know your name?', ui.ButtonSet.YES_NO);
*
* // Process the user's response.
* if (response.getSelectedButton() == ui.Button.YES) {
* Logger.log('The user\'s name is %s.', response.getResponseText());
* } else if (response.getSelectedButton() == ui.Button.NO) {
* Logger.log('The user didn\'t want to provide a name.');
* } else {
* Logger.log('The user clicked the close button in the dialog\'s title bar.');
* }
*/
export interface Ui {
Button: Button
ButtonSet: ButtonSet
alert(prompt: string): Button;
alert(prompt: string, buttons: ButtonSet): Button;
alert(title: string, prompt: string, buttons: ButtonSet): Button;
createAddonMenu(): Menu;
createMenu(caption: string): Menu;
prompt(prompt: string): PromptResponse;
prompt(prompt: string, buttons: ButtonSet): PromptResponse;
prompt(title: string, prompt: string, buttons: ButtonSet): PromptResponse;
showModalDialog(userInterface: Object, title: string): void;
showModelessDialog(userInterface: Object, title: string): void;
showSidebar(userInterface: Object): void;
showDialog(userInterface: Object): void;
}
/**
* Representation of a user, suitable for scripting.
*/
export interface User {
getEmail(): string;
getUserLoginId(): string;
}
/**
* An enum representing the days of the week.
*/
export enum Weekday { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY }
}
}
declare var Browser: GoogleAppsScript.Base.Browser;
declare var Logger: GoogleAppsScript.Base.Logger;
// conflicts with MimeType in lib.d.ts
// declare var MimeType: GoogleAppsScript.Base.MimeType;
declare var Session: GoogleAppsScript.Base.Session;
+57
View File
@@ -0,0 +1,57 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
declare module GoogleAppsScript {
export module Cache {
/**
* A reference to a particular cache.
*
* This class allows you to insert, retrieve, and remove items from a cache. This can be
* particularly useful when you want frequent access to an expensive or slow resource. For
* example, say you have an RSS feed at example.com that takes 20 seconds to fetch, but you want
* to speed up access on an average request.
*
* function getRssFeed() {
* var cache = CacheService.getPublicCache();
* var cached = cache.get("rss-feed-contents");
* if (cached != null) {
* return cached;
* }
* var result = UrlFetchApp.fetch("http://example.com/my-slow-rss-feed.xml"); // takes 20 seconds
* var contents = result.getContentText();
* cache.put("rss-feed-contents", contents, 1500); // cache for 25 minutes
* return contents;
* }
*/
export interface Cache {
get(key: string): string;
getAll(keys: String[]): Object;
put(key: string, value: string): void;
put(key: string, value: string, expirationInSeconds: Integer): void;
putAll(values: Object): void;
putAll(values: Object, expirationInSeconds: Integer): void;
remove(key: string): void;
removeAll(keys: String[]): void;
}
/**
* CacheService allows you to access a cache for short term storage of data.
*
* This class lets you get a specific cache instance. Public caches are for things that are not
* dependent on which user is accessing your script. Private caches are for things which are
* user-specific, like settings or recent activity.
*/
export interface CacheService {
getDocumentCache(): Cache;
getScriptCache(): Cache;
getUserCache(): Cache;
}
}
}
declare var CacheService: GoogleAppsScript.Cache.CacheService;
+294
View File
@@ -0,0 +1,294 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
/// <reference path="google-apps-script.base.d.ts" />
declare module GoogleAppsScript {
export module Calendar {
/**
* Represents a calendar that the user owns or is subscribed to.
*/
export interface Calendar {
createAllDayEvent(title: string, date: Date): CalendarEvent;
createAllDayEvent(title: string, date: Date, options: Object): CalendarEvent;
createAllDayEventSeries(title: string, startDate: Date, recurrence: EventRecurrence): CalendarEventSeries;
createAllDayEventSeries(title: string, startDate: Date, recurrence: EventRecurrence, options: Object): CalendarEventSeries;
createEvent(title: string, startTime: Date, endTime: Date): CalendarEvent;
createEvent(title: string, startTime: Date, endTime: Date, options: Object): CalendarEvent;
createEventFromDescription(description: string): CalendarEvent;
createEventSeries(title: string, startTime: Date, endTime: Date, recurrence: EventRecurrence): CalendarEventSeries;
createEventSeries(title: string, startTime: Date, endTime: Date, recurrence: EventRecurrence, options: Object): CalendarEventSeries;
deleteCalendar(): void;
getColor(): string;
getDescription(): string;
getEventSeriesById(iCalId: string): CalendarEventSeries;
getEvents(startTime: Date, endTime: Date): CalendarEvent[];
getEvents(startTime: Date, endTime: Date, options: Object): CalendarEvent[];
getEventsForDay(date: Date): CalendarEvent[];
getEventsForDay(date: Date, options: Object): CalendarEvent[];
getId(): string;
getName(): string;
getTimeZone(): string;
isHidden(): boolean;
isMyPrimaryCalendar(): boolean;
isOwnedByMe(): boolean;
isSelected(): boolean;
setColor(color: string): Calendar;
setDescription(description: string): Calendar;
setHidden(hidden: boolean): Calendar;
setName(name: string): Calendar;
setSelected(selected: boolean): Calendar;
setTimeZone(timeZone: string): Calendar;
unsubscribeFromCalendar(): void;
}
/**
* Allows a script to read and update the user's Google Calendar. This class provides direct
* access to the user's default calendar, as well as the ability to retrieve additional calendars
* that the user owns or is subscribed to.
*/
export interface CalendarApp {
Color: Color
GuestStatus: GuestStatus
Month: Base.Month
Visibility: Visibility
Weekday: Base.Weekday
createAllDayEvent(title: string, date: Date): CalendarEvent;
createAllDayEvent(title: string, date: Date, options: Object): CalendarEvent;
createAllDayEventSeries(title: string, startDate: Date, recurrence: EventRecurrence): CalendarEventSeries;
createAllDayEventSeries(title: string, startDate: Date, recurrence: EventRecurrence, options: Object): CalendarEventSeries;
createCalendar(name: string): Calendar;
createCalendar(name: string, options: Object): Calendar;
createEvent(title: string, startTime: Date, endTime: Date): CalendarEvent;
createEvent(title: string, startTime: Date, endTime: Date, options: Object): CalendarEvent;
createEventFromDescription(description: string): CalendarEvent;
createEventSeries(title: string, startTime: Date, endTime: Date, recurrence: EventRecurrence): CalendarEventSeries;
createEventSeries(title: string, startTime: Date, endTime: Date, recurrence: EventRecurrence, options: Object): CalendarEventSeries;
getAllCalendars(): Calendar[];
getAllOwnedCalendars(): Calendar[];
getCalendarById(id: string): Calendar;
getCalendarsByName(name: string): Calendar[];
getColor(): string;
getDefaultCalendar(): Calendar;
getDescription(): string;
getEventSeriesById(iCalId: string): CalendarEventSeries;
getEvents(startTime: Date, endTime: Date): CalendarEvent[];
getEvents(startTime: Date, endTime: Date, options: Object): CalendarEvent[];
getEventsForDay(date: Date): CalendarEvent[];
getEventsForDay(date: Date, options: Object): CalendarEvent[];
getId(): string;
getName(): string;
getOwnedCalendarById(id: string): Calendar;
getOwnedCalendarsByName(name: string): Calendar[];
getTimeZone(): string;
isHidden(): boolean;
isMyPrimaryCalendar(): boolean;
isOwnedByMe(): boolean;
isSelected(): boolean;
newRecurrence(): EventRecurrence;
setColor(color: string): Calendar;
setDescription(description: string): Calendar;
setHidden(hidden: boolean): Calendar;
setName(name: string): Calendar;
setSelected(selected: boolean): Calendar;
setTimeZone(timeZone: string): Calendar;
subscribeToCalendar(id: string): Calendar;
subscribeToCalendar(id: string, options: Object): Calendar;
}
/**
* Represents a single calendar event.
*/
export interface CalendarEvent {
addEmailReminder(minutesBefore: Integer): CalendarEvent;
addGuest(email: string): CalendarEvent;
addPopupReminder(minutesBefore: Integer): CalendarEvent;
addSmsReminder(minutesBefore: Integer): CalendarEvent;
anyoneCanAddSelf(): boolean;
deleteEvent(): void;
deleteTag(key: string): CalendarEvent;
getAllDayEndDate(): Date;
getAllDayStartDate(): Date;
getAllTagKeys(): String[];
getCreators(): String[];
getDateCreated(): Date;
getDescription(): string;
getEmailReminders(): Integer[];
getEndTime(): Date;
getEventSeries(): CalendarEventSeries;
getGuestByEmail(email: string): EventGuest;
getGuestList(): EventGuest[];
getGuestList(includeOwner: boolean): EventGuest[];
getId(): string;
getLastUpdated(): Date;
getLocation(): string;
getMyStatus(): GuestStatus;
getOriginalCalendarId(): string;
getPopupReminders(): Integer[];
getSmsReminders(): Integer[];
getStartTime(): Date;
getTag(key: string): string;
getTitle(): string;
getVisibility(): Visibility;
guestsCanInviteOthers(): boolean;
guestsCanModify(): boolean;
guestsCanSeeGuests(): boolean;
isAllDayEvent(): boolean;
isOwnedByMe(): boolean;
isRecurringEvent(): boolean;
removeAllReminders(): CalendarEvent;
removeGuest(email: string): CalendarEvent;
resetRemindersToDefault(): CalendarEvent;
setAllDayDate(date: Date): CalendarEvent;
setAnyoneCanAddSelf(anyoneCanAddSelf: boolean): CalendarEvent;
setDescription(description: string): CalendarEvent;
setGuestsCanInviteOthers(guestsCanInviteOthers: boolean): CalendarEvent;
setGuestsCanModify(guestsCanModify: boolean): CalendarEvent;
setGuestsCanSeeGuests(guestsCanSeeGuests: boolean): CalendarEvent;
setLocation(location: string): CalendarEvent;
setMyStatus(status: GuestStatus): CalendarEvent;
setTag(key: string, value: string): CalendarEvent;
setTime(startTime: Date, endTime: Date): CalendarEvent;
setTitle(title: string): CalendarEvent;
setVisibility(visibility: Visibility): CalendarEvent;
}
/**
* Represents a series of events (a recurring event).
*/
export interface CalendarEventSeries {
addEmailReminder(minutesBefore: Integer): CalendarEventSeries;
addGuest(email: string): CalendarEventSeries;
addPopupReminder(minutesBefore: Integer): CalendarEventSeries;
addSmsReminder(minutesBefore: Integer): CalendarEventSeries;
anyoneCanAddSelf(): boolean;
deleteEventSeries(): void;
deleteTag(key: string): CalendarEventSeries;
getAllTagKeys(): String[];
getCreators(): String[];
getDateCreated(): Date;
getDescription(): string;
getEmailReminders(): Integer[];
getGuestByEmail(email: string): EventGuest;
getGuestList(): EventGuest[];
getGuestList(includeOwner: boolean): EventGuest[];
getId(): string;
getLastUpdated(): Date;
getLocation(): string;
getMyStatus(): GuestStatus;
getOriginalCalendarId(): string;
getPopupReminders(): Integer[];
getSmsReminders(): Integer[];
getTag(key: string): string;
getTitle(): string;
getVisibility(): Visibility;
guestsCanInviteOthers(): boolean;
guestsCanModify(): boolean;
guestsCanSeeGuests(): boolean;
isOwnedByMe(): boolean;
removeAllReminders(): CalendarEventSeries;
removeGuest(email: string): CalendarEventSeries;
resetRemindersToDefault(): CalendarEventSeries;
setAnyoneCanAddSelf(anyoneCanAddSelf: boolean): CalendarEventSeries;
setDescription(description: string): CalendarEventSeries;
setGuestsCanInviteOthers(guestsCanInviteOthers: boolean): CalendarEventSeries;
setGuestsCanModify(guestsCanModify: boolean): CalendarEventSeries;
setGuestsCanSeeGuests(guestsCanSeeGuests: boolean): CalendarEventSeries;
setLocation(location: string): CalendarEventSeries;
setMyStatus(status: GuestStatus): CalendarEventSeries;
setRecurrence(recurrence: EventRecurrence, startDate: Date): CalendarEventSeries;
setRecurrence(recurrence: EventRecurrence, startTime: Date, endTime: Date): CalendarEventSeries;
setTag(key: string, value: string): CalendarEventSeries;
setTitle(title: string): CalendarEventSeries;
setVisibility(visibility: Visibility): CalendarEventSeries;
}
/**
* An enum representing the named colors available in the Calendar service.
*/
export enum Color { BLUE, BROWN, CHARCOAL, CHESTNUT, GRAY, GREEN, INDIGO, LIME, MUSTARD, OLIVE, ORANGE, PINK, PLUM, PURPLE, RED, RED_ORANGE, SEA_BLUE, SLATE, TEAL, TURQOISE, YELLOW }
/**
* Represents a guest of an event.
*/
export interface EventGuest {
getAdditionalGuests(): Integer;
getEmail(): string;
getGuestStatus(): GuestStatus;
getName(): string;
getStatus(): string;
}
/**
* Represents the recurrence settings for an event series.
*/
export interface EventRecurrence {
addDailyExclusion(): RecurrenceRule;
addDailyRule(): RecurrenceRule;
addDate(date: Date): EventRecurrence;
addDateExclusion(date: Date): EventRecurrence;
addMonthlyExclusion(): RecurrenceRule;
addMonthlyRule(): RecurrenceRule;
addWeeklyExclusion(): RecurrenceRule;
addWeeklyRule(): RecurrenceRule;
addYearlyExclusion(): RecurrenceRule;
addYearlyRule(): RecurrenceRule;
setTimeZone(timeZone: string): EventRecurrence;
}
/**
* An enum representing the statuses a guest can have for an event.
*/
export enum GuestStatus { INVITED, MAYBE, NO, OWNER, YES }
/**
* Represents a recurrence rule for an event series.
*
* Note that this class also behaves like the EventRecurrence that it belongs
* to, allowing you to chain rule creation together like so:
*
* recurrence.addDailyRule().times(3).interval(2).addWeeklyExclusion().times(2);
*
* times(times)
* interval(interval)
*/
export interface RecurrenceRule {
addDailyExclusion(): RecurrenceRule;
addDailyRule(): RecurrenceRule;
addDate(date: Date): EventRecurrence;
addDateExclusion(date: Date): EventRecurrence;
addMonthlyExclusion(): RecurrenceRule;
addMonthlyRule(): RecurrenceRule;
addWeeklyExclusion(): RecurrenceRule;
addWeeklyRule(): RecurrenceRule;
addYearlyExclusion(): RecurrenceRule;
addYearlyRule(): RecurrenceRule;
interval(interval: Integer): RecurrenceRule;
onlyInMonth(month: Base.Month): RecurrenceRule;
onlyInMonths(months: Base.Month[]): RecurrenceRule;
onlyOnMonthDay(day: Integer): RecurrenceRule;
onlyOnMonthDays(days: Integer[]): RecurrenceRule;
onlyOnWeek(week: Integer): RecurrenceRule;
onlyOnWeekday(day: Base.Weekday): RecurrenceRule;
onlyOnWeekdays(days: Base.Weekday[]): RecurrenceRule;
onlyOnWeeks(weeks: Integer[]): RecurrenceRule;
onlyOnYearDay(day: Integer): RecurrenceRule;
onlyOnYearDays(days: Integer[]): RecurrenceRule;
setTimeZone(timeZone: string): EventRecurrence;
times(times: Integer): RecurrenceRule;
until(endDate: Date): RecurrenceRule;
weekStartsOn(day: Base.Weekday): RecurrenceRule;
}
/**
* An enum representing the visibility of an event.
*/
export enum Visibility { CONFIDENTIAL, DEFAULT, PRIVATE, PUBLIC }
}
}
declare var CalendarApp: GoogleAppsScript.Calendar.CalendarApp;
+975
View File
@@ -0,0 +1,975 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
/// <reference path="google-apps-script.base.d.ts" />
/// <reference path="google-apps-script.ui.d.ts" />
declare module GoogleAppsScript {
export module Charts {
/**
* Builder for area charts. For more details, see the
* Google Charts documentation.
*
* Here is an example that shows how to build an area chart.
*
* function doGet() {
* // Create a data table with some sample data.
* var sampleData = Charts.newDataTable()
* .addColumn(Charts.ColumnType.STRING, "Month")
* .addColumn(Charts.ColumnType.NUMBER, "Dining")
* .addColumn(Charts.ColumnType.NUMBER, "Total")
* .addRow(["Jan", 60, 520])
* .addRow(["Feb", 50, 430])
* .addRow(["Mar", 53, 440])
* .addRow(["Apr", 70, 410])
* .addRow(["May", 80, 390])
* .addRow(["Jun", 60, 500])
* .addRow(["Jul", 100, 450])
* .addRow(["Aug", 140, 431])
* .addRow(["Sep", 75, 488])
* .addRow(["Oct", 70, 521])
* .addRow(["Nov", 58, 388])
* .addRow(["Dec", 63, 400])
* .build();
*
* var chart = Charts.newAreaChart()
* .setTitle('Yearly Spending')
* .setXAxisTitle('Month')
* .setYAxisTitle('Spending (USD)')
* .setDimensions(600, 500)
* .setStacked()
* .setColors(['red', 'green'])
* .setDataTable(sampleData)
* .build();
*
* return UiApp.createApplication().add(chart);
* }
*/
export interface AreaChartBuilder {
build(): Chart;
reverseCategories(): AreaChartBuilder;
setBackgroundColor(cssValue: string): AreaChartBuilder;
setColors(cssValues: String[]): AreaChartBuilder;
setDataSourceUrl(url: string): AreaChartBuilder;
setDataTable(tableBuilder: DataTableBuilder): AreaChartBuilder;
setDataTable(table: DataTableSource): AreaChartBuilder;
setDataViewDefinition(dataViewDefinition: DataViewDefinition): AreaChartBuilder;
setDimensions(width: Integer, height: Integer): AreaChartBuilder;
setLegendPosition(position: Position): AreaChartBuilder;
setLegendTextStyle(textStyle: TextStyle): AreaChartBuilder;
setOption(option: string, value: Object): AreaChartBuilder;
setPointStyle(style: PointStyle): AreaChartBuilder;
setRange(start: Number, end: Number): AreaChartBuilder;
setStacked(): AreaChartBuilder;
setTitle(chartTitle: string): AreaChartBuilder;
setTitleTextStyle(textStyle: TextStyle): AreaChartBuilder;
setXAxisTextStyle(textStyle: TextStyle): AreaChartBuilder;
setXAxisTitle(title: string): AreaChartBuilder;
setXAxisTitleTextStyle(textStyle: TextStyle): AreaChartBuilder;
setYAxisTextStyle(textStyle: TextStyle): AreaChartBuilder;
setYAxisTitle(title: string): AreaChartBuilder;
setYAxisTitleTextStyle(textStyle: TextStyle): AreaChartBuilder;
useLogScale(): AreaChartBuilder;
}
/**
* Builder for bar charts. For more details, see the
* Google Charts documentation.
*
* Here is an example that shows how to build a bar chart. The data is
*
* imported from a Google spreadsheet.
*
* function doGet() {
* // Get sample data from a spreadsheet.
* var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=B1%3AC11' +
* '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=0&headers=-1';
*
* var chartBuilder = Charts.newBarChart()
* .setTitle('Top Grossing Films in US and Canada')
* .setXAxisTitle('USD')
* .setYAxisTitle('Film')
* .setDimensions(600, 500)
* .setLegendPosition(Charts.Position.BOTTOM)
* .setDataSourceUrl(dataSourceUrl);
*
* var chart = chartBuilder.build();
* return UiApp.createApplication().add(chart);
* }
*/
export interface BarChartBuilder {
build(): Chart;
reverseCategories(): BarChartBuilder;
reverseDirection(): BarChartBuilder;
setBackgroundColor(cssValue: string): BarChartBuilder;
setColors(cssValues: String[]): BarChartBuilder;
setDataSourceUrl(url: string): BarChartBuilder;
setDataTable(tableBuilder: DataTableBuilder): BarChartBuilder;
setDataTable(table: DataTableSource): BarChartBuilder;
setDataViewDefinition(dataViewDefinition: DataViewDefinition): BarChartBuilder;
setDimensions(width: Integer, height: Integer): BarChartBuilder;
setLegendPosition(position: Position): BarChartBuilder;
setLegendTextStyle(textStyle: TextStyle): BarChartBuilder;
setOption(option: string, value: Object): BarChartBuilder;
setRange(start: Number, end: Number): BarChartBuilder;
setStacked(): BarChartBuilder;
setTitle(chartTitle: string): BarChartBuilder;
setTitleTextStyle(textStyle: TextStyle): BarChartBuilder;
setXAxisTextStyle(textStyle: TextStyle): BarChartBuilder;
setXAxisTitle(title: string): BarChartBuilder;
setXAxisTitleTextStyle(textStyle: TextStyle): BarChartBuilder;
setYAxisTextStyle(textStyle: TextStyle): BarChartBuilder;
setYAxisTitle(title: string): BarChartBuilder;
setYAxisTitleTextStyle(textStyle: TextStyle): BarChartBuilder;
useLogScale(): BarChartBuilder;
}
/**
* A builder for category filter controls.
*
* A category filter is a picker to choose one or more between a set of defined values.
* Given a column of type string, this control will filter out the rows that
* don't match any of the picked values.
*
* Here is an example that creates a table chart a binds a category filter to it. This allows the
* user to filter the data the table displays.
*
* function doGet() {
* var app = UiApp.createApplication();
* var sampleData = Charts.newDataTable()
* .addColumn(Charts.ColumnType.STRING, "Month")
* .addColumn(Charts.ColumnType.NUMBER, "Dining")
* .addColumn(Charts.ColumnType.NUMBER, "Total")
* .addRow(["Jan", 60, 520])
* .addRow(["Feb", 50, 430])
* .addRow(["Mar", 53, 440])
* .addRow(["Apr", 70, 410])
* .addRow(["May", 80, 390])
* .addRow(["Jun", 60, 500])
* .addRow(["Jul", 100, 450])
* .addRow(["Aug", 140, 431])
* .addRow(["Sep", 75, 488])
* .addRow(["Oct", 70, 521])
* .addRow(["Nov", 58, 388])
* .addRow(["Dec", 63, 400])
* .build();
*
* var chart = Charts.newTableChart()
* .setDimensions(600, 500)
* .build();
*
* var categoryFilter = Charts.newCategoryFilter()
* .setFilterColumnLabel("Month")
* .setAllowMultiple(true)
* .setSortValues(true)
* .setLabelStacking(Charts.Orientation.VERTICAL)
* .setCaption('Choose categories...')
* .build();
*
* var panel = app.createVerticalPanel().setSpacing(10);
* panel.add(categoryFilter).add(chart);
*
* var dashboard = Charts.newDashboardPanel()
* .setDataTable(sampleData)
* .bind(categoryFilter, chart)
* .build();
*
* dashboard.add(panel);
* app.add(dashboard);
* return app;
* }
*
* documentation
*/
export interface CategoryFilterBuilder {
build(): Control;
setAllowMultiple(allowMultiple: boolean): CategoryFilterBuilder;
setAllowNone(allowNone: boolean): CategoryFilterBuilder;
setAllowTyping(allowTyping: boolean): CategoryFilterBuilder;
setCaption(caption: string): CategoryFilterBuilder;
setDataTable(tableBuilder: DataTableBuilder): CategoryFilterBuilder;
setDataTable(table: DataTableSource): CategoryFilterBuilder;
setFilterColumnIndex(columnIndex: Integer): CategoryFilterBuilder;
setFilterColumnLabel(columnLabel: string): CategoryFilterBuilder;
setLabel(label: string): CategoryFilterBuilder;
setLabelSeparator(labelSeparator: string): CategoryFilterBuilder;
setLabelStacking(orientation: Orientation): CategoryFilterBuilder;
setSelectedValuesLayout(layout: PickerValuesLayout): CategoryFilterBuilder;
setSortValues(sortValues: boolean): CategoryFilterBuilder;
setValues(values: String[]): CategoryFilterBuilder;
}
/**
* A Chart object, which can be embedded into documents, UI elements, or used as a static image. For
* charts embedded in spreadsheets, see
* EmbeddedChart.
*/
export interface Chart {
getAs(contentType: string): Base.Blob;
getBlob(): Base.Blob;
getId(): string;
getOptions(): ChartOptions;
getType(): string;
setId(id: string): Chart;
}
/**
* Exposes options currently configured for a Chart, such as height, color, etc.
*
* Please see the visualization
* reference documentation for information on what options are available. Specific options for
* each chart can be found by clicking on the specific chart in the chart gallery.
*
* These options are immutable.
*/
export interface ChartOptions {
get(option: string): Object;
}
/**
* Chart types supported by the Charts service.
*/
export enum ChartType { AREA, BAR, COLUMN, LINE, PIE, SCATTER, TABLE }
/**
* Entry point for creating Charts in scripts.
*
* This example creates a basic data table, populates an area chart with the data, and adds it into
* a UiApp:
*
* function doGet() {
* var data = Charts.newDataTable()
* .addColumn(Charts.ColumnType.STRING, "Month")
* .addColumn(Charts.ColumnType.NUMBER, "In Store")
* .addColumn(Charts.ColumnType.NUMBER, "Online")
* .addRow(["January", 10, 1])
* .addRow(["February", 12, 1])
* .addRow(["March", 20, 2])
* .addRow(["April", 25, 3])
* .addRow(["May", 30, 4])
* .build();
*
* var chart = Charts.newAreaChart()
* .setDataTable(data)
* .setStacked()
* .setRange(0, 40)
* .setTitle("Sales per Month")
* .build();
*
* var uiApp = UiApp.createApplication().setTitle("My Chart");
* uiApp.add(chart);
* return uiApp;
* }
*/
export interface Charts {
ChartType: ChartType
ColumnType: ColumnType
CurveStyle: CurveStyle
MatchType: MatchType
Orientation: Orientation
PickerValuesLayout: PickerValuesLayout
PointStyle: PointStyle
Position: Position
newAreaChart(): AreaChartBuilder;
newBarChart(): BarChartBuilder;
newCategoryFilter(): CategoryFilterBuilder;
newColumnChart(): ColumnChartBuilder;
newDashboardPanel(): DashboardPanelBuilder;
newDataTable(): DataTableBuilder;
newDataViewDefinition(): DataViewDefinitionBuilder;
newLineChart(): LineChartBuilder;
newNumberRangeFilter(): NumberRangeFilterBuilder;
newPieChart(): PieChartBuilder;
newScatterChart(): ScatterChartBuilder;
newStringFilter(): StringFilterBuilder;
newTableChart(): TableChartBuilder;
newTextStyle(): TextStyleBuilder;
}
/**
* Builder for column charts. For more details, see the
* Google Charts documentation.
*
* This example shows how to create a column chart with data from a data table.
*
* function doGet() {
* var sampleData = Charts.newDataTable()
* .addColumn(Charts.ColumnType.STRING, "Year")
* .addColumn(Charts.ColumnType.NUMBER, "Sales")
* .addColumn(Charts.ColumnType.NUMBER, "Expenses")
* .addRow(["2004", 1000, 400])
* .addRow(["2005", 1170, 460])
* .addRow(["2006", 660, 1120])
* .addRow(["2007", 1030, 540])
* .addRow(["2008", 800, 600])
* .addRow(["2009", 943, 678])
* .addRow(["2010", 1020, 550])
* .addRow(["2011", 910, 700])
* .addRow(["2012", 1230, 840])
* .build();
*
* var chart = Charts.newColumnChart()
* .setTitle('Sales vs. Expenses')
* .setXAxisTitle('Year')
* .setYAxisTitle('Amount (USD)')
* .setDimensions(600, 500)
* .setDataTable(sampleData)
* .build();
*
* return UiApp.createApplication().add(chart);
* }
*/
export interface ColumnChartBuilder {
build(): Chart;
reverseCategories(): ColumnChartBuilder;
setBackgroundColor(cssValue: string): ColumnChartBuilder;
setColors(cssValues: String[]): ColumnChartBuilder;
setDataSourceUrl(url: string): ColumnChartBuilder;
setDataTable(tableBuilder: DataTableBuilder): ColumnChartBuilder;
setDataTable(table: DataTableSource): ColumnChartBuilder;
setDataViewDefinition(dataViewDefinition: DataViewDefinition): ColumnChartBuilder;
setDimensions(width: Integer, height: Integer): ColumnChartBuilder;
setLegendPosition(position: Position): ColumnChartBuilder;
setLegendTextStyle(textStyle: TextStyle): ColumnChartBuilder;
setOption(option: string, value: Object): ColumnChartBuilder;
setRange(start: Number, end: Number): ColumnChartBuilder;
setStacked(): ColumnChartBuilder;
setTitle(chartTitle: string): ColumnChartBuilder;
setTitleTextStyle(textStyle: TextStyle): ColumnChartBuilder;
setXAxisTextStyle(textStyle: TextStyle): ColumnChartBuilder;
setXAxisTitle(title: string): ColumnChartBuilder;
setXAxisTitleTextStyle(textStyle: TextStyle): ColumnChartBuilder;
setYAxisTextStyle(textStyle: TextStyle): ColumnChartBuilder;
setYAxisTitle(title: string): ColumnChartBuilder;
setYAxisTitleTextStyle(textStyle: TextStyle): ColumnChartBuilder;
useLogScale(): ColumnChartBuilder;
}
/**
* An enumeration of the valid data types for columns in a DataTable.
*/
export enum ColumnType { DATE, NUMBER, STRING }
/**
* A user interface control object, that drives the data displayed by a DashboardPanel.
*
* A control can be embedded in a UI application. Controls are user interface widgets (category
* pickers, range sliders, autocompleters, etc.) users interact with in order to drive the data
* managed by a dashboard and the charts that are part of it.
* Controls collect user input and use the information to decide which of the data the
* dashboard is managing should be made available to the charts that are part of it.
* Given a data table, a control will filter out the data that doesn't comply with the
* conditions implied by its current state, and will expose the filtered data table as
* an output.
*
* For more details, see the Gviz
*
* documentation.
*/
export interface Control {
getId(): string;
getType(): string;
setId(id: string): Control;
}
/**
* An enumeration of the styles for curves in a chart.
*/
export enum CurveStyle { NORMAL, SMOOTH }
/**
* A dashboard is a visual structure that enables the organization and management
* of multiple charts that share the same underlying data.
*
* Controls are user interface widgets (category pickers, range sliders, autocompleters, etc.)
* users interact with in order to drive the data managed by a dashboard and the charts that
* are part of it. For example, a string filter control is a simple text input field that lets
* the user filter data via string matching. Given a column and matching options, the control
* will filter out the rows that don't match the term that's in the input field.
*
* The Gviz API defines a dashboard as a set of charts and controls bound together. The
* bindings between the different components define the data flow, the state of the
* controls filters views of the data which propagate in the dashboard and are
* eventually visualized with charts. For more details, see the Gviz
*
* documentation.
*
* The dashboard panel has two purposes, one is being a container for the charts and
* controls objects that compose the dashboard, and the other is holding the data and use
* as an interface for binding controls to charts.
*
* Here's an example of creating a dashboard and showing it in a UI app:
*
* function doGet() {
* // Create a data table with some sample data.
* var data = Charts.newDataTable()
* .addColumn(Charts.ColumnType.STRING, "Name")
* .addColumn(Charts.ColumnType.NUMBER, "Age")
* .addRow(["Michael", 18])
* .addRow(["Elisa", 12])
* .addRow(["John", 20])
* .addRow(["Jessica", 25])
* .addRow(["Aaron", 14])
* .addRow(["Margareth", 19])
* .addRow(["Miranda", 22])
* .addRow(["May", 20])
* .build();
*
* var chart = Charts.newBarChart()
* .setTitle("Ages")
* .build();
*
* var control = Charts.newStringFilter()
* .setFilterColumnLabel("Name")
* .build();
*
* // Bind the control to the chart in a dashboard panel.
* var dashboard = Charts.newDashboardPanel()
* .setDataTable(data)
* .bind(control, chart)
* .build();
*
* var uiApp = UiApp.createApplication().setTitle("My Dashboard");
*
* var panel = uiApp.createHorizontalPanel()
* .setVerticalAlignment(UiApp.VerticalAlignment.MIDDLE)
* .setSpacing(50);
*
* panel.add(control);
* panel.add(chart);
* dashboard.add(panel);
* uiApp.add(dashboard);
* return uiApp;
* }
*/
export interface DashboardPanel {
add(widget: UI.Widget): DashboardPanel;
getId(): string;
getType(): string;
setId(id: string): DashboardPanel;
}
/**
* A builder for a dashboard panel object. For an example of how to use
* DashboardPanelBuilder, refer to DashboardPanel.
*
* For more details, see the Gviz
*
* documentation.
*/
export interface DashboardPanelBuilder {
bind(control: Control, chart: Chart, controls: Control[], charts: Chart[]): DashboardPanelBuilder;
bind(control: Control, chart: Chart, controls: Control[], charts: Chart[]): DashboardPanelBuilder;
build(): DashboardPanel;
setDataTable(tableBuilder: DataTableBuilder): DashboardPanelBuilder;
setDataTable(source: DataTableSource): DashboardPanelBuilder;
}
/**
* A Data Table to be used in charts. A DataTable can come from sources such as Google
* Sheets or specified data-table URLs, or can be filled in by hand. This class intentionally has no
* methods: a DataTable can be passed around, but not manipulated directly.
*/
export interface DataTable {
}
/**
* Builder of DataTable objects. Building a data table consists of first specifying its columns,
* and then adding its rows, one at a time. Example:
*
* var data = Charts.newDataTable()
* .addColumn(Charts.ColumnType.STRING, "Month")
* .addColumn(Charts.ColumnType.NUMBER, "In Store")
* .addColumn(Charts.ColumnType.NUMBER, "Online")
* .addRow(["January", 10, 1])
* .addRow(["February", 12, 1])
* .addRow(["March", 20, 2])
* .addRow(["April", 25, 3])
* .addRow(["May", 30, 4])
* .build();
*/
export interface DataTableBuilder {
addColumn(type: ColumnType, label: string): DataTableBuilder;
addRow(values: Object[]): DataTableBuilder;
build(): DataTable;
setValue(row: Integer, column: Integer, value: Object): DataTableBuilder;
}
/**
* Interface for objects that can represent their data as a DataTable.
* Implementing classes
*
* NameBrief description
*
* DataTableA Data Table to be used in charts.
*
* RangeAccess and modify spreadsheet ranges.
*/
export interface DataTableSource {
getDataTable(): DataTable;
}
/**
* A data view definition for visualizing chart data.
*
* Data view definition can be set for charts to visualize a view derived from the given data table
* and not the data table itself. For example if the view definition of a chart states that the view
* columns are [0, 3], only the first and the third columns of the data table will be taken into
* consideration when drawing the chart. See DataViewDefinitionBuilder for an example on how
* to define and use a DataViewDefinition.
*/
export interface DataViewDefinition {
}
/**
* Builder for DataViewDefinition objects.
*
* Here's an example of using the builder. The data is imported from a Google spreadsheet.
*
* function doGet() {
* // This example creates two table charts side by side. One uses a data view definition to
* // restrict the number of displayed columns.
* var app = UiApp.createApplication();
* // Get sample data from a spreadsheet.
* var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=A1%3AF' +
* '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=4&headers=-1';
*
* // Create a chart to display all of the data.
* var originalChart = Charts.newTableChart()
* .setDimensions(600, 500)
* .setDataSourceUrl(dataSourceUrl)
* .build();
*
* // Create another chart to display a subset of the data (only columns 1 and 4).
* var dataViewDefinition = Charts.newDataViewDefinition().setColumns([0, 3]);
* var limitedChart = Charts.newTableChart()
* .setDimensions(200, 500)
* .setDataSourceUrl(dataSourceUrl)
* .setDataViewDefinition(dataViewDefinition)
* .build();
*
* var panel = app.createHorizontalPanel().setSpacing(15);
* panel.add(originalChart).add(limitedChart);
* return app.add(panel);
* }
*/
export interface DataViewDefinitionBuilder {
build(): DataViewDefinition;
setColumns(columns: Object[]): DataViewDefinitionBuilder;
}
/**
* Builder for line charts. For more details, see the
* Google Charts documentation.
*
* Here is an example that shows how to build a line chart. The data is
* imported from a Google spreadsheet.
*
* function doGet() {
* // Get sample data from a spreadsheet.
* var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=A1%3AG5' +
* '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=2&headers=-1';
*
* var chartBuilder = Charts.newLineChart()
* .setTitle('Yearly Rainfall')
* .setXAxisTitle('Month')
* .setYAxisTitle('Rainfall (in)')
* .setDimensions(600, 500)
* .setCurveStyle(Charts.CurveStyle.SMOOTH)
* .setPointStyle(Charts.PointStyle.MEDIUM)
* .setDataSourceUrl(dataSourceUrl);
*
* var chart = chartBuilder.build();
* return UiApp.createApplication().add(chart);
* }
*/
export interface LineChartBuilder {
build(): Chart;
reverseCategories(): LineChartBuilder;
setBackgroundColor(cssValue: string): LineChartBuilder;
setColors(cssValues: String[]): LineChartBuilder;
setCurveStyle(style: CurveStyle): LineChartBuilder;
setDataSourceUrl(url: string): LineChartBuilder;
setDataTable(tableBuilder: DataTableBuilder): LineChartBuilder;
setDataTable(table: DataTableSource): LineChartBuilder;
setDataViewDefinition(dataViewDefinition: DataViewDefinition): LineChartBuilder;
setDimensions(width: Integer, height: Integer): LineChartBuilder;
setLegendPosition(position: Position): LineChartBuilder;
setLegendTextStyle(textStyle: TextStyle): LineChartBuilder;
setOption(option: string, value: Object): LineChartBuilder;
setPointStyle(style: PointStyle): LineChartBuilder;
setRange(start: Number, end: Number): LineChartBuilder;
setTitle(chartTitle: string): LineChartBuilder;
setTitleTextStyle(textStyle: TextStyle): LineChartBuilder;
setXAxisTextStyle(textStyle: TextStyle): LineChartBuilder;
setXAxisTitle(title: string): LineChartBuilder;
setXAxisTitleTextStyle(textStyle: TextStyle): LineChartBuilder;
setYAxisTextStyle(textStyle: TextStyle): LineChartBuilder;
setYAxisTitle(title: string): LineChartBuilder;
setYAxisTitleTextStyle(textStyle: TextStyle): LineChartBuilder;
useLogScale(): LineChartBuilder;
}
/**
* An enumeration of how a string value should be matched.
* Matching a string is a boolean operation. Given a string, a match term (string), and a match
* type, the operation will output true in the following cases:
*
* If the match type equals EXACT and the match term equals the string.
* If the match type equals PREFIX and the match term is a prefix of the string.
* If the match type equals ANY and the match term is a substring of the string.
*
* This enumeration can be used in by a string filter control to decide which rows to filter out
* of the data table. Given a column to filter on, leave only the rows that match the value
* entered in the filter input box, using one of the above matching types.
*/
export enum MatchType { EXACT, PREFIX, ANY }
/**
* A builder for number range filter controls.
*
* A number range filter is a slider with two thumbs that lets the user select ranges of
* numeric values. Given a column of type number and matching options, this control will
* filter out the rows that don't match the range that was selected.
*
* This example creates a table chart bound to a number range filter:
*
* function doGet() {
* var app = UiApp.createApplication();
* // Get sample data from a spreadsheet.
* var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=A1%3AF' +
* '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=4&headers=-1';
* var data = SpreadsheetApp.openByUrl(dataSourceUrl).getSheetByName('US_GDP').getRange("A1:F");
*
* var chart = Charts.newTableChart()
* .setDimensions(600, 500)
* .build();
*
* var numberRangeFilter = Charts.newNumberRangeFilter()
* .setFilterColumnLabel("Year")
* .setShowRangeValues(true)
* .setLabel("Restrict year range")
* .build();
*
* var panel = app.createVerticalPanel().setSpacing(10);
* panel.add(numberRangeFilter).add(chart);
*
* // Create a new dashboard panel to bind the filter and chart together.
* var dashboard = Charts.newDashboardPanel()
* .setDataTable(data)
* .bind(numberRangeFilter, chart)
* .build();
*
* dashboard.add(panel);
* app.add(dashboard);
* return app;
* }
*
* documentation
*/
export interface NumberRangeFilterBuilder {
build(): Control;
setDataTable(tableBuilder: DataTableBuilder): NumberRangeFilterBuilder;
setDataTable(table: DataTableSource): NumberRangeFilterBuilder;
setFilterColumnIndex(columnIndex: Integer): NumberRangeFilterBuilder;
setFilterColumnLabel(columnLabel: string): NumberRangeFilterBuilder;
setLabel(label: string): NumberRangeFilterBuilder;
setLabelSeparator(labelSeparator: string): NumberRangeFilterBuilder;
setLabelStacking(orientation: Orientation): NumberRangeFilterBuilder;
setMaxValue(maxValue: Integer): NumberRangeFilterBuilder;
setMinValue(minValue: Integer): NumberRangeFilterBuilder;
setOrientation(orientation: Orientation): NumberRangeFilterBuilder;
setShowRangeValues(showRangeValues: boolean): NumberRangeFilterBuilder;
setTicks(ticks: Integer): NumberRangeFilterBuilder;
}
/**
* An enumeration of the orientation of an object.
*/
export enum Orientation { HORIZONTAL, VERTICAL }
/**
* An enumeration of how to display selected values in picker widget.
*/
export enum PickerValuesLayout { ASIDE, BELOW, BELOW_WRAPPING, BELOW_STACKED }
/**
* A builder for pie charts. For more details, see the
* Google Charts documentation.
*
* Here is an example that shows how to build a pie chart. The data is
* imported from a Google spreadsheet.
*
* function doGet() {
* // Get sample data from a spreadsheet.
* var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=A1%3AB8' +
* '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=3&headers=-1';
*
* var chartBuilder = Charts.newPieChart()
* .setTitle('World Population by Continent')
* .setDimensions(600, 500)
* .set3D()
* .setDataSourceUrl(dataSourceUrl);
*
* var chart = chartBuilder.build();
* return UiApp.createApplication().add(chart);
* }
*/
export interface PieChartBuilder {
build(): Chart;
reverseCategories(): PieChartBuilder;
set3D(): PieChartBuilder;
setBackgroundColor(cssValue: string): PieChartBuilder;
setColors(cssValues: String[]): PieChartBuilder;
setDataSourceUrl(url: string): PieChartBuilder;
setDataTable(tableBuilder: DataTableBuilder): PieChartBuilder;
setDataTable(table: DataTableSource): PieChartBuilder;
setDataViewDefinition(dataViewDefinition: DataViewDefinition): PieChartBuilder;
setDimensions(width: Integer, height: Integer): PieChartBuilder;
setLegendPosition(position: Position): PieChartBuilder;
setLegendTextStyle(textStyle: TextStyle): PieChartBuilder;
setOption(option: string, value: Object): PieChartBuilder;
setTitle(chartTitle: string): PieChartBuilder;
setTitleTextStyle(textStyle: TextStyle): PieChartBuilder;
}
/**
* An enumeration of the styles of points in a line.
*/
export enum PointStyle { NONE, TINY, MEDIUM, LARGE, HUGE }
/**
* An enumeration of legend positions within a chart.
*/
export enum Position { TOP, RIGHT, BOTTOM, NONE }
/**
* Builder for scatter charts. For more details, see the
* Google Charts documentation.
*
* Here is an example that shows how to build a scatter chart. The data is
* imported from a Google spreadsheet.
*
* function doGet() {
* // Get sample data from a spreadsheet.
* var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=C1%3AD' +
* '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=4&headers=-1';
*
* var chartBuilder = Charts.newScatterChart()
* .setTitle('Adjusted GDP vs. U.S. Population')
* .setXAxisTitle('U.S. Population (millions)')
* .setYAxisTitle('Adjusted GDP ($ billions)')
* .setDimensions(600, 500)
* .setLegendPosition(Charts.Position.NONE)
* .setDataSourceUrl(dataSourceUrl);
*
* var chart = chartBuilder.build();
* return UiApp.createApplication().add(chart);
* }
*/
export interface ScatterChartBuilder {
build(): Chart;
setBackgroundColor(cssValue: string): ScatterChartBuilder;
setColors(cssValues: String[]): ScatterChartBuilder;
setDataSourceUrl(url: string): ScatterChartBuilder;
setDataTable(tableBuilder: DataTableBuilder): ScatterChartBuilder;
setDataTable(table: DataTableSource): ScatterChartBuilder;
setDataViewDefinition(dataViewDefinition: DataViewDefinition): ScatterChartBuilder;
setDimensions(width: Integer, height: Integer): ScatterChartBuilder;
setLegendPosition(position: Position): ScatterChartBuilder;
setLegendTextStyle(textStyle: TextStyle): ScatterChartBuilder;
setOption(option: string, value: Object): ScatterChartBuilder;
setPointStyle(style: PointStyle): ScatterChartBuilder;
setTitle(chartTitle: string): ScatterChartBuilder;
setTitleTextStyle(textStyle: TextStyle): ScatterChartBuilder;
setXAxisLogScale(): ScatterChartBuilder;
setXAxisRange(start: Number, end: Number): ScatterChartBuilder;
setXAxisTextStyle(textStyle: TextStyle): ScatterChartBuilder;
setXAxisTitle(title: string): ScatterChartBuilder;
setXAxisTitleTextStyle(textStyle: TextStyle): ScatterChartBuilder;
setYAxisLogScale(): ScatterChartBuilder;
setYAxisRange(start: Number, end: Number): ScatterChartBuilder;
setYAxisTextStyle(textStyle: TextStyle): ScatterChartBuilder;
setYAxisTitle(title: string): ScatterChartBuilder;
setYAxisTitleTextStyle(textStyle: TextStyle): ScatterChartBuilder;
}
/**
* A builder for string filter controls.
*
* A string filter is a simple text input field that lets the user filter data via string matching.
* Given a column of type string and matching options, this control will filter out the rows that
* don't match the term that's in the input field.
*
* This example creates a table chart and binds it to a string filter. Using the filter, it is
* possible to change the table chart to display a subset of its data.
*
* function doGet() {
* var app = UiApp.createApplication();
* var sampleData = Charts.newDataTable()
* .addColumn(Charts.ColumnType.STRING, "Month")
* .addColumn(Charts.ColumnType.NUMBER, "Dining")
* .addColumn(Charts.ColumnType.NUMBER, "Total")
* .addRow(["Jan", 60, 520])
* .addRow(["Feb", 50, 430])
* .addRow(["Mar", 53, 440])
* .addRow(["Apr", 70, 410])
* .addRow(["May", 80, 390])
* .addRow(["Jun", 60, 500])
* .addRow(["Jul", 100, 450])
* .addRow(["Aug", 140, 431])
* .addRow(["Sep", 75, 488])
* .addRow(["Oct", 70, 521])
* .addRow(["Nov", 58, 388])
* .addRow(["Dec", 63, 400])
* .build();
*
* var chart = Charts.newTableChart()
* .setDimensions(600, 500)
* .build();
*
* var stringFilter = Charts.newStringFilter()
* .setFilterColumnLabel("Month")
* .setRealtimeTrigger(true)
* .setCaseSensitive(true)
* .setLabel("Filter months shown")
* .build();
*
* var panel = app.createVerticalPanel().setSpacing(10);
* panel.add(stringFilter).add(chart);
*
* // Create a dashboard panel to bind the filter and the chart together.
* var dashboard = Charts.newDashboardPanel()
* .setDataTable(sampleData)
* .bind(stringFilter, chart)
* .build();
*
* dashboard.add(panel);
* app.add(dashboard);
* return app;
* }
*
* documentation
*/
export interface StringFilterBuilder {
build(): Control;
setCaseSensitive(caseSensitive: boolean): StringFilterBuilder;
setDataTable(tableBuilder: DataTableBuilder): StringFilterBuilder;
setDataTable(table: DataTableSource): StringFilterBuilder;
setFilterColumnIndex(columnIndex: Integer): StringFilterBuilder;
setFilterColumnLabel(columnLabel: string): StringFilterBuilder;
setLabel(label: string): StringFilterBuilder;
setLabelSeparator(labelSeparator: string): StringFilterBuilder;
setLabelStacking(orientation: Orientation): StringFilterBuilder;
setMatchType(matchType: MatchType): StringFilterBuilder;
setRealtimeTrigger(realtimeTrigger: boolean): StringFilterBuilder;
}
/**
* A builder for table charts. For more details, see the
* Google Charts documentation.
*
* Here is an example that shows how to build a table chart. The data is
* imported from a Google spreadsheet.
*
* function doGet() {
* // Get sample data from a spreadsheet.
* var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=A1%3AF' +
* '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=4&headers=-1';
*
* var chartBuilder = Charts.newTableChart()
* .setDimensions(600, 500)
* .enablePaging(20)
* .setDataSourceUrl(dataSourceUrl);
*
* var chart = chartBuilder.build();
* return UiApp.createApplication().add(chart);
* }
*/
export interface TableChartBuilder {
build(): Chart;
enablePaging(enablePaging: boolean): TableChartBuilder;
enablePaging(pageSize: Integer): TableChartBuilder;
enablePaging(pageSize: Integer, startPage: Integer): TableChartBuilder;
enableRtlTable(rtlEnabled: boolean): TableChartBuilder;
enableSorting(enableSorting: boolean): TableChartBuilder;
setDataSourceUrl(url: string): TableChartBuilder;
setDataTable(tableBuilder: DataTableBuilder): TableChartBuilder;
setDataTable(table: DataTableSource): TableChartBuilder;
setDataViewDefinition(dataViewDefinition: DataViewDefinition): TableChartBuilder;
setDimensions(width: Integer, height: Integer): TableChartBuilder;
setFirstRowNumber(number: Integer): TableChartBuilder;
setInitialSortingAscending(column: Integer): TableChartBuilder;
setInitialSortingDescending(column: Integer): TableChartBuilder;
setOption(option: string, value: Object): TableChartBuilder;
showRowNumberColumn(showRowNumber: boolean): TableChartBuilder;
useAlternatingRowStyle(alternate: boolean): TableChartBuilder;
}
/**
* A text style configuration object. Used in charts options to configure text style for
* elements that accepts it, such as title, horizontal axis, vertical axis, legend and tooltip.
*
* // This example creates a chart specifying different text styles for the title and axes.
* function doGet() {
* var sampleData = Charts.newDataTable()
* .addColumn(Charts.ColumnType.STRING, "Seasons")
* .addColumn(Charts.ColumnType.NUMBER, "Rainy Days")
* .addRow(["Winter", 5])
* .addRow(["Spring", 12])
* .addRow(["Summer", 8])
* .addRow(["Fall", 8])
* .build();
*
* var titleTextStyleBuilder = Charts.newTextStyle()
* .setColor('#0000FF').setFontSize(26).setFontName('Ariel');
* var axisTextStyleBuilder = Charts.newTextStyle()
* .setColor('#3A3A3A').setFontSize(20).setFontName('Ariel');
* var titleTextStyle = titleTextStyleBuilder.build();
* var axisTextStyle = axisTextStyleBuilder.build();
*
* var chart = Charts.newLineChart()
* .setTitleTextStyle(titleTextStyle)
* .setXAxisTitleTextStyle(axisTextStyle)
* .setYAxisTitleTextStyle(axisTextStyle)
* .setTitle('Rainy Days Per Season')
* .setXAxisTitle('Season')
* .setYAxisTitle('Number of Rainy Days')
* .setDataTable(sampleData)
* .build();
*
* return UiApp.createApplication().add(chart);
* }
*/
export interface TextStyle {
getColor(): string;
getFontName(): string;
getFontSize(): Number;
}
/**
* A builder used to create TextStyle objects. It allows configuration of the text's
* properties such as name, color, and size.
*
* The following example shows how to create a text style using the builder. For a more complete
* example, refer to the documentation for TextStyle.
*
* // Creates a new text style that uses 26-point, blue, Ariel font.
* var textStyleBuilder = Charts.newTextStyle()
* .setColor('#0000FF').setFontName('Ariel').setFontSize(26);
* var style = textStyleBuilder.build();
*/
export interface TextStyleBuilder {
build(): TextStyle;
setColor(cssValue: string): TextStyleBuilder;
setFontName(fontName: string): TextStyleBuilder;
setFontSize(fontSize: Number): TextStyleBuilder;
}
}
}
declare var Charts: GoogleAppsScript.Charts.Charts;
+299
View File
@@ -0,0 +1,299 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
/// <reference path="google-apps-script.base.d.ts" />
declare module GoogleAppsScript {
export module Contacts {
/**
* Address field in a contact.
*/
export interface AddressField {
deleteAddressField(): void;
getAddress(): string;
getLabel(): Object;
isPrimary(): boolean;
setAddress(address: string): AddressField;
setAsPrimary(): AddressField;
setLabel(field: Field): AddressField;
setLabel(label: string): AddressField;
}
/**
* Company field in a Contact.
*/
export interface CompanyField {
deleteCompanyField(): void;
getCompanyName(): string;
getJobTitle(): string;
isPrimary(): boolean;
setAsPrimary(): CompanyField;
setCompanyName(company: string): CompanyField;
setJobTitle(title: string): CompanyField;
}
/**
* A Contact contains the name, address, and various contact details of a contact.
*/
export interface Contact {
addAddress(label: Object, address: string): AddressField;
addCompany(company: string, title: string): CompanyField;
addCustomField(label: Object, content: Object): CustomField;
addDate(label: Object, month: Base.Month, day: Integer, year: Integer): DateField;
addEmail(label: Object, address: string): EmailField;
addIM(label: Object, address: string): IMField;
addPhone(label: Object, number: string): PhoneField;
addToGroup(group: ContactGroup): Contact;
addUrl(label: Object, url: string): UrlField;
deleteContact(): void;
getAddresses(): AddressField[];
getAddresses(label: Object): AddressField[];
getCompanies(): CompanyField[];
getContactGroups(): ContactGroup[];
getCustomFields(): CustomField[];
getCustomFields(label: Object): CustomField[];
getDates(): DateField[];
getDates(label: Object): DateField[];
getEmails(): EmailField[];
getEmails(label: Object): EmailField[];
getFamilyName(): string;
getFullName(): string;
getGivenName(): string;
getIMs(): IMField[];
getIMs(label: Object): IMField[];
getId(): string;
getInitials(): string;
getLastUpdated(): Date;
getMaidenName(): string;
getMiddleName(): string;
getNickname(): string;
getNotes(): string;
getPhones(): PhoneField[];
getPhones(label: Object): PhoneField[];
getPrefix(): string;
getPrimaryEmail(): string;
getShortName(): string;
getSuffix(): string;
getUrls(): UrlField[];
getUrls(label: Object): UrlField[];
removeFromGroup(group: ContactGroup): Contact;
setFamilyName(familyName: string): Contact;
setFullName(fullName: string): Contact;
setGivenName(givenName: string): Contact;
setInitials(initials: string): Contact;
setMaidenName(maidenName: string): Contact;
setMiddleName(middleName: string): Contact;
setNickname(nickname: string): Contact;
setNotes(notes: string): Contact;
setPrefix(prefix: string): Contact;
setShortName(shortName: string): Contact;
setSuffix(suffix: string): Contact;
getEmailAddresses(): String[];
getHomeAddress(): string;
getHomeFax(): string;
getHomePhone(): string;
getMobilePhone(): string;
getPager(): string;
getUserDefinedField(key: string): string;
getUserDefinedFields(): Object;
getWorkAddress(): string;
getWorkFax(): string;
getWorkPhone(): string;
setHomeAddress(addr: string): void;
setHomeFax(phone: string): void;
setHomePhone(phone: string): void;
setMobilePhone(phone: string): void;
setPager(phone: string): void;
setPrimaryEmail(primaryEmail: string): void;
setUserDefinedField(key: string, value: string): void;
setUserDefinedFields(o: Object): void;
setWorkAddress(addr: string): void;
setWorkFax(phone: string): void;
setWorkPhone(phone: string): void;
}
/**
* A ContactGroup is is a group of contacts.
*/
export interface ContactGroup {
addContact(contact: Contact): ContactGroup;
deleteGroup(): void;
getContacts(): Contact[];
getId(): string;
getName(): string;
isSystemGroup(): boolean;
removeContact(contact: Contact): ContactGroup;
setName(name: string): ContactGroup;
getGroupName(): string;
setGroupName(name: string): void;
}
/**
* This class allows users to access their own Google Contacts and create, remove, and update
* contacts listed therein.
*/
export interface ContactsApp {
ExtendedField: ExtendedField
Field: Field
Gender: Gender
Month: Base.Month
Priority: Priority
Sensitivity: Sensitivity
createContact(givenName: string, familyName: string, email: string): Contact;
createContactGroup(name: string): ContactGroup;
deleteContact(contact: Contact): void;
deleteContactGroup(group: ContactGroup): void;
getContact(emailAddress: string): Contact;
getContactById(id: string): Contact;
getContactGroup(name: string): ContactGroup;
getContactGroupById(id: string): ContactGroup;
getContactGroups(): ContactGroup[];
getContacts(): Contact[];
getContactsByAddress(query: string): Contact[];
getContactsByAddress(query: string, label: Field): Contact[];
getContactsByAddress(query: string, label: string): Contact[];
getContactsByCompany(query: string): Contact[];
getContactsByCustomField(query: Object, label: ExtendedField): Contact[];
getContactsByDate(month: Base.Month, day: Integer, label: Field): Contact[];
getContactsByDate(month: Base.Month, day: Integer, year: Integer, label: Field): Contact[];
getContactsByDate(month: Base.Month, day: Integer, year: Integer, label: string): Contact[];
getContactsByDate(month: Base.Month, day: Integer, label: string): Contact[];
getContactsByEmailAddress(query: string): Contact[];
getContactsByEmailAddress(query: string, label: Field): Contact[];
getContactsByEmailAddress(query: string, label: string): Contact[];
getContactsByGroup(group: ContactGroup): Contact[];
getContactsByIM(query: string): Contact[];
getContactsByIM(query: string, label: Field): Contact[];
getContactsByIM(query: string, label: string): Contact[];
getContactsByJobTitle(query: string): Contact[];
getContactsByName(query: string): Contact[];
getContactsByName(query: string, label: Field): Contact[];
getContactsByNotes(query: string): Contact[];
getContactsByPhone(query: string): Contact[];
getContactsByPhone(query: string, label: Field): Contact[];
getContactsByPhone(query: string, label: string): Contact[];
getContactsByUrl(query: string): Contact[];
getContactsByUrl(query: string, label: Field): Contact[];
getContactsByUrl(query: string, label: string): Contact[];
findByEmailAddress(email: string): Contact;
findContactGroup(name: string): ContactGroup;
getAllContacts(): Contact[];
}
/**
* A custom field in a Contact.
*/
export interface CustomField {
deleteCustomField(): void;
getLabel(): Object;
getValue(): Object;
setLabel(field: ExtendedField): CustomField;
setLabel(label: string): CustomField;
setValue(value: Object): CustomField;
}
/**
* A date field in a Contact.
*/
export interface DateField {
deleteDateField(): void;
getDay(): Integer;
getLabel(): Object;
getMonth(): Base.Month;
getYear(): Integer;
setDate(month: Base.Month, day: Integer): DateField;
setDate(month: Base.Month, day: Integer, year: Integer): DateField;
setLabel(label: Field): DateField;
setLabel(label: string): DateField;
}
/**
* An email field in a Contact.
*/
export interface EmailField {
deleteEmailField(): void;
getAddress(): string;
getDisplayName(): string;
getLabel(): Object;
isPrimary(): boolean;
setAddress(address: string): EmailField;
setAsPrimary(): EmailField;
setDisplayName(name: string): EmailField;
setLabel(field: Field): EmailField;
setLabel(label: string): EmailField;
}
/**
* An enum for extended contacts fields.
*/
export enum ExtendedField { HOBBY, MILEAGE, LANGUAGE, GENDER, BILLING_INFORMATION, DIRECTORY_SERVER, SENSITIVITY, PRIORITY, HOME, WORK, USER, OTHER }
/**
* An enum for contacts fields.
*/
export enum Field { FULL_NAME, GIVEN_NAME, MIDDLE_NAME, FAMILY_NAME, MAIDEN_NAME, NICKNAME, SHORT_NAME, INITIALS, PREFIX, SUFFIX, HOME_EMAIL, WORK_EMAIL, BIRTHDAY, ANNIVERSARY, HOME_ADDRESS, WORK_ADDRESS, ASSISTANT_PHONE, CALLBACK_PHONE, MAIN_PHONE, PAGER, HOME_FAX, WORK_FAX, HOME_PHONE, WORK_PHONE, MOBILE_PHONE, GOOGLE_VOICE, NOTES, GOOGLE_TALK, AIM, YAHOO, SKYPE, QQ, MSN, ICQ, JABBER, BLOG, FTP, PROFILE, HOME_PAGE, WORK_WEBSITE, HOME_WEBSITE, JOB_TITLE, COMPANY }
/**
* An enum for contact gender.
*/
export enum Gender { MALE, FEMALE }
/**
* An instant messaging field in a Contact.
*/
export interface IMField {
deleteIMField(): void;
getAddress(): string;
getLabel(): Object;
isPrimary(): boolean;
setAddress(address: string): IMField;
setAsPrimary(): IMField;
setLabel(field: Field): IMField;
setLabel(label: string): IMField;
}
/**
* A phone number field in a Contact.
*/
export interface PhoneField {
deletePhoneField(): void;
getLabel(): Object;
getPhoneNumber(): string;
isPrimary(): boolean;
setAsPrimary(): PhoneField;
setLabel(field: Field): PhoneField;
setLabel(label: string): PhoneField;
setPhoneNumber(number: string): PhoneField;
}
/**
* An enum for contact priority.
*/
export enum Priority { HIGH, LOW, NORMAL }
/**
* An enum for contact sensitivity.
*/
export enum Sensitivity { CONFIDENTIAL, NORMAL, PERSONAL, PRIVATE }
/**
* A URL field in a Contact.
*/
export interface UrlField {
deleteUrlField(): void;
getAddress(): string;
getLabel(): Object;
isPrimary(): boolean;
setAddress(address: string): UrlField;
setAsPrimary(): UrlField;
setLabel(field: Field): UrlField;
setLabel(label: string): UrlField;
}
}
}
declare var ContactsApp: GoogleAppsScript.Contacts.ContactsApp;
+59
View File
@@ -0,0 +1,59 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
declare module GoogleAppsScript {
export module Content {
/**
* Service for returning text content from a script.
*
* You can serve up text in various forms. For example, publish this script as a web app.
*
* function doGet() {
* return ContentService.createTextOutput("Hello World");
* }
*/
export interface ContentService {
MimeType: MimeType
createTextOutput(): TextOutput;
createTextOutput(content: string): TextOutput;
}
/**
* An enum for mime types that can be served from a script.
*/
export enum MimeType { ATOM, CSV, ICAL, JAVASCRIPT, JSON, RSS, TEXT, VCARD, XML }
/**
* A TextOutput object that can be served from a script.
*
* Due to security considerations, scripts cannot directly return text content to a browser.
* Instead, the browser is redirected to googleusercontent.com, which will display it without any
* further sanitization or manipulation.
*
* You can return text content like this:
*
* function doGet() {
* return ContentService.createPlainTextOutput("hello world!");
* }
*
* ContentService
*/
export interface TextOutput {
append(addedContent: string): TextOutput;
clear(): TextOutput;
downloadAsFile(filename: string): TextOutput;
getContent(): string;
getFileName(): string;
getMimeType(): MimeType;
setContent(content: string): TextOutput;
setMimeType(mimeType: MimeType): TextOutput;
}
}
}
declare var ContentService: GoogleAppsScript.Content.ContentService;
File diff suppressed because it is too large. Load diff
+266
View File
@@ -0,0 +1,266 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
/// <reference path="google-apps-script.base.d.ts" />
declare module GoogleAppsScript {
export module Drive {
/**
* An enum representing classes of users who can access a file or folder, besides any individual
* users who have been explicitly given access. These properties can be accessed from
* DriveApp.Access.
*
* // Creates a folder that anyone on the Internet can read from and write to. (Domain
* // administrators can prohibit this setting for users of Google Apps for Business, Google Apps
* // for Education, or Google Apps for Your Domain.)
* var folder = DriveApp.createFolder('Shared Folder');
* folder.setSharing(DriveApp.Access.ANYONE, DriveApp.Permission.EDIT);
*/
export enum Access { ANYONE, ANYONE_WITH_LINK, DOMAIN, DOMAIN_WITH_LINK, PRIVATE }
/**
* Allows scripts to create, find, and modify files and folders in Google Drive.
*
* // Log the name of every file in the user's Drive.
* var files = DriveApp.getFiles();
* while (files.hasNext()) {
* var file = files.next();
* Logger.log(file.getName());
* }
*/
export interface DriveApp {
Access: Access
Permission: Permission
addFile(child: File): Folder;
addFolder(child: Folder): Folder;
continueFileIterator(continuationToken: string): FileIterator;
continueFolderIterator(continuationToken: string): FolderIterator;
createFile(blob: Base.BlobSource): File;
createFile(name: string, content: string): File;
createFile(name: string, content: string, mimeType: string): File;
createFolder(name: string): Folder;
getFileById(id: string): File;
getFiles(): FileIterator;
getFilesByName(name: string): FileIterator;
getFilesByType(mimeType: string): FileIterator;
getFolderById(id: string): Folder;
getFolders(): FolderIterator;
getFoldersByName(name: string): FolderIterator;
getRootFolder(): Folder;
getStorageLimit(): Integer;
getStorageUsed(): Integer;
getTrashedFiles(): FileIterator;
getTrashedFolders(): FolderIterator;
removeFile(child: File): Folder;
removeFolder(child: Folder): Folder;
searchFiles(params: string): FileIterator;
searchFolders(params: string): FolderIterator;
}
/**
* A file in Google Drive. Files can be accessed or created from DriveApp.
*
* // Trash every untitled spreadsheet that hasn't been updated in a week.
* var files = DriveApp.getFilesByName('Untitled spreadsheet');
* while (files.hasNext()) {
* var file = files.next();
* if (new Date() - file.getLastUpdated() > 7 * 24 * 60 * 60 * 1000) {
* file.setTrashed(true);
* }
* }
*/
export interface File {
addCommenter(emailAddress: string): File;
addCommenter(user: Base.User): File;
addCommenters(emailAddresses: String[]): File;
addEditor(emailAddress: string): File;
addEditor(user: Base.User): File;
addEditors(emailAddresses: String[]): File;
addViewer(emailAddress: string): File;
addViewer(user: Base.User): File;
addViewers(emailAddresses: String[]): File;
getAccess(email: string): Permission;
getAccess(user: Base.User): Permission;
getAs(contentType: string): Base.Blob;
getBlob(): Base.Blob;
getDateCreated(): Date;
getDescription(): string;
getDownloadUrl(): string;
getEditors(): User[];
getId(): string;
getLastUpdated(): Date;
getMimeType(): string;
getName(): string;
getOwner(): User;
getParents(): FolderIterator;
getSharingAccess(): Access;
getSharingPermission(): Permission;
getSize(): Integer;
getThumbnail(): Base.Blob;
getUrl(): string;
getViewers(): User[];
isShareableByEditors(): boolean;
isStarred(): boolean;
isTrashed(): boolean;
makeCopy(): File;
makeCopy(destination: Folder): File;
makeCopy(name: string): File;
makeCopy(name: string, destination: Folder): File;
removeCommenter(emailAddress: string): File;
removeCommenter(user: Base.User): File;
removeEditor(emailAddress: string): File;
removeEditor(user: Base.User): File;
removeViewer(emailAddress: string): File;
removeViewer(user: Base.User): File;
revokePermissions(user: string): File;
revokePermissions(user: Base.User): File;
setContent(content: string): File;
setDescription(description: string): File;
setName(name: string): File;
setOwner(emailAddress: string): File;
setOwner(user: Base.User): File;
setShareableByEditors(shareable: boolean): File;
setSharing(accessType: Access, permissionType: Permission): File;
setStarred(starred: boolean): File;
setTrashed(trashed: boolean): File;
}
/**
* An iterator that allows scripts to iterate over a potentially large collection of files. File
* iterators can be acccessed from DriveApp or a Folder.
*
* // Log the name of every file in the user's Drive.
* var files = DriveApp.getFiles();
* while (files.hasNext()) {
* var file = files.next();
* Logger.log(file.getName());
* }
*/
export interface FileIterator {
getContinuationToken(): string;
hasNext(): boolean;
next(): File;
}
/**
* A folder in Google Drive. Folders can be accessed or created from DriveApp.
*
* // Log the name of every folder in the user's Drive.
* var folders = DriveApp.getFolders();
* while (folders.hasNext()) {
* var folder = folders.next();
* Logger.log(folder.getName());
* }
*/
export interface Folder {
addEditor(emailAddress: string): Folder;
addEditor(user: Base.User): Folder;
addEditors(emailAddresses: String[]): Folder;
addFile(child: File): Folder;
addFolder(child: Folder): Folder;
addViewer(emailAddress: string): Folder;
addViewer(user: Base.User): Folder;
addViewers(emailAddresses: String[]): Folder;
createFile(blob: Base.BlobSource): File;
createFile(name: string, content: string): File;
createFile(name: string, content: string, mimeType: string): File;
createFolder(name: string): Folder;
getAccess(email: string): Permission;
getAccess(user: Base.User): Permission;
getDateCreated(): Date;
getDescription(): string;
getEditors(): User[];
getFiles(): FileIterator;
getFilesByName(name: string): FileIterator;
getFilesByType(mimeType: string): FileIterator;
getFolders(): FolderIterator;
getFoldersByName(name: string): FolderIterator;
getId(): string;
getLastUpdated(): Date;
getName(): string;
getOwner(): User;
getParents(): FolderIterator;
getSharingAccess(): Access;
getSharingPermission(): Permission;
getSize(): Integer;
getUrl(): string;
getViewers(): User[];
isShareableByEditors(): boolean;
isStarred(): boolean;
isTrashed(): boolean;
removeEditor(emailAddress: string): Folder;
removeEditor(user: Base.User): Folder;
removeFile(child: File): Folder;
removeFolder(child: Folder): Folder;
removeViewer(emailAddress: string): Folder;
removeViewer(user: Base.User): Folder;
revokePermissions(user: string): Folder;
revokePermissions(user: Base.User): Folder;
searchFiles(params: string): FileIterator;
searchFolders(params: string): FolderIterator;
setDescription(description: string): Folder;
setName(name: string): Folder;
setOwner(emailAddress: string): Folder;
setOwner(user: Base.User): Folder;
setShareableByEditors(shareable: boolean): Folder;
setSharing(accessType: Access, permissionType: Permission): Folder;
setStarred(starred: boolean): Folder;
setTrashed(trashed: boolean): Folder;
}
/**
* An object that allows scripts to iterate over a potentially large collection of folders. Folder
* iterators can be acccessed from DriveApp, a File, or a Folder.
*
* // Log the name of every folder in the user's Drive.
* var folders = DriveApp.getFolders();
* while (folders.hasNext()) {
* var folder = folders.next();
* Logger.log(folder.getName());
* }
*/
export interface FolderIterator {
getContinuationToken(): string;
hasNext(): boolean;
next(): Folder;
}
/**
* An enum representing the permissions granted to users who can access a file or folder, besides
* any individual users who have been explicitly given access. These properties can be accessed from
* DriveApp.Permission.
*
* // Creates a folder that anyone on the Internet can read from and write to. (Domain
* // administrators can prohibit this setting for users of Google Apps for Business, Google Apps
* // for Education, or Google Apps for Your Domain.)
* var folder = DriveApp.createFolder('Shared Folder');
* folder.setSharing(DriveApp.Access.ANYONE, DriveApp.Permission.EDIT);
*/
export enum Permission { VIEW, EDIT, COMMENT, OWNER, NONE }
/**
* A user associated with a file in Google Drive. Users can be accessed from
* File.getEditors(), Folder.getViewers(), and other methods.
*
* // Log the email address of all users who have edit access to a file.
* var file = DriveApp.getFileById('1234567890abcdefghijklmnopqrstuvwxyz');
* var editors = file.getEditors();
* for (var i = 0; i < editors.length; i++) {
* Logger.log(editors[i].getEmail());
* }
*/
export interface User {
getDomain(): string;
getEmail(): string;
getName(): string;
getPhotoUrl(): string;
getUserLoginId(): string;
}
}
}
declare var DriveApp: GoogleAppsScript.Drive.DriveApp;
+754
View File
@@ -0,0 +1,754 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
/// <reference path="google-apps-script.base.d.ts" />
declare module GoogleAppsScript {
export module Forms {
/**
* An enum representing the supported types of image alignment. Alignment types can be accessed from
* FormApp.Alignment.
*
* // Open a form by ID and add a new image item with alignment
* var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
* var img = UrlFetchApp.fetch('https://www.google.com/images/srpr/logo4w.png');
* form.addImageItem()
* .setImage(img)
* .setAlignment(FormApp.Alignment.CENTER);
*/
export enum Alignment { LEFT, CENTER, RIGHT }
/**
* A question item that allows the respondent to select one or more checkboxes, as well as an
* optional "other" field. Items can be accessed or created from a Form.
*
* // Open a form by ID and add a new checkbox item.
* var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
* var item = form.addCheckboxItem();
* item.setTitle('What condiments would you like on your hot dog?')
* .setChoices([
* item.createChoice('Ketchup'),
* item.createChoice('Mustard'),
* item.createChoice('Relish')
* ])
* .showOtherOption(true);
*/
export interface CheckboxItem {
createChoice(value: string): Choice;
createResponse(responses: String[]): ItemResponse;
duplicate(): CheckboxItem;
getChoices(): Choice[];
getHelpText(): string;
getId(): Integer;
getIndex(): Integer;
getTitle(): string;
getType(): ItemType;
hasOtherOption(): boolean;
isRequired(): boolean;
setChoiceValues(values: String[]): CheckboxItem;
setChoices(choices: Choice[]): CheckboxItem;
setHelpText(text: string): CheckboxItem;
setRequired(enabled: boolean): CheckboxItem;
setTitle(title: string): CheckboxItem;
showOtherOption(enabled: boolean): CheckboxItem;
}
/**
* A single choice associated with a type of Item that supports choices, like
* CheckboxItem, ListItem, or MultipleChoiceItem.
*
* // Create a new form and add a multiple-choice item.
* var form = FormApp.create('Form Name');
* var item = form.addMultipleChoiceItem();
* item.setTitle('Do you prefer cats or dogs?')
* .setChoices([
* item.createChoice('Cats', FormApp.PageNavigationType.CONTINUE),
* item.createChoice('Dogs', FormApp.PageNavigationType.RESTART)
* ]);
*
* // Add another page because navigation has no effect on the last page.
* form.addPageBreakItem().setTitle('You chose well!');
*
* // Log the navigation types that each choice results in.
* var choices = item.getChoices();
* for (var i = 0; i < choices.length; i++) {
* Logger.log('If the respondent chooses "%s", the form will %s.',
* choices[i].getValue(),
* choices[i].getPageNavigationType());
* }
*/
export interface Choice {
getGotoPage(): PageBreakItem;
getPageNavigationType(): PageNavigationType;
getValue(): string;
}
/**
* A question item that allows the respondent to indicate a date. Items can be accessed or created
* from a Form.
*
* // Open a form by ID and add a new date item.
* var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
* var item = form.addDateItem();
* item.setTitle('When were you born?');
*/
export interface DateItem {
createResponse(response: Date): ItemResponse;
duplicate(): DateItem;
getHelpText(): string;
getId(): Integer;
getIndex(): Integer;
getTitle(): string;
getType(): ItemType;
includesYear(): boolean;
isRequired(): boolean;
setHelpText(text: string): DateItem;
setIncludesYear(enableYear: boolean): DateItem;
setRequired(enabled: boolean): DateItem;
setTitle(title: string): DateItem;
}
/**
* A question item that allows the respondent to indicate a date and time. Items can be accessed or
* created from a Form.
*
* // Open a form by ID and add a new date-time item.
* var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
* var item = form.addDateTimeItem();
* item.setTitle('When do you want to meet?');
*/
export interface DateTimeItem {
createResponse(response: Date): ItemResponse;
duplicate(): DateTimeItem;
getHelpText(): string;
getId(): Integer;
getIndex(): Integer;
getTitle(): string;
getType(): ItemType;
includesYear(): boolean;
isRequired(): boolean;
setHelpText(text: string): DateTimeItem;
setIncludesYear(enableYear: boolean): DateTimeItem;
setRequired(enabled: boolean): DateTimeItem;
setTitle(title: string): DateTimeItem;
}
/**
* An enum representing the supported types of form-response destinations. All forms, including
* those that do not have a destination set explicitly,
* save
* a copy of responses in the form's response store. Destination types can be accessed from
* FormApp.DestinationType.
*
* // Open a form by ID and create a new spreadsheet.
* var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
* var ss = SpreadsheetApp.create('Spreadsheet Name');
*
* // Update the form's response destination.
* form.setDestination(FormApp.DestinationType.SPREADSHEET, ss.getId());
*/
export enum DestinationType { SPREADSHEET }
/**
* A question item that allows the respondent to indicate a length of time. Items can be accessed or
* created from a Form.
*
* // Open a form by ID and add a new duration item.
* var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
* var item = form.addDurationItem();
* item.setTitle('How long can you hold your breath?');
*/
export interface DurationItem {
createResponse(hours: Integer, minutes: Integer, seconds: Integer): ItemResponse;
duplicate(): DurationItem;
getHelpText(): string;
getId(): Integer;
getIndex(): Integer;
getTitle(): string;
getType(): ItemType;
isRequired(): boolean;
setHelpText(text: string): DurationItem;
setRequired(enabled: boolean): DurationItem;
setTitle(title: string): DurationItem;
}
/**
* A form that contains overall properties (such as title, settings, and where responses are stored)
* and items (which includes question items like checkboxes and layout items like page breaks).
* Forms can be accessed or created from FormApp.
*
* // Open a form by ID and create a new spreadsheet.
* var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
* var ss = SpreadsheetApp.create('Spreadsheet Name');
*
* // Update form properties via chaining.
* form.setTitle('Form Name')
* .setDescription('Description of form')
* .setConfirmationMessage('Thanks for responding!')
* .setAllowResponseEdits(true)
* .setAcceptingResponses(false);
*
* // Update the form's response destination.
* form.setDestination(FormApp.DestinationType.SPREADSHEET, ss.getId());
*/
export interface Form {
addCheckboxItem(): CheckboxItem;
addDateItem(): DateItem;
addDateTimeItem(): DateTimeItem;
addDurationItem(): DurationItem;
addEditor(emailAddress: string): Form;
addEditor(user: Base.User): Form;
addEditors(emailAddresses: String[]): Form;
addGridItem(): GridItem;
addImageItem(): ImageItem;
addListItem(): ListItem;
addMultipleChoiceItem(): MultipleChoiceItem;
addPageBreakItem(): PageBreakItem;
addParagraphTextItem(): ParagraphTextItem;
addScaleItem(): ScaleItem;
addSectionHeaderItem(): SectionHeaderItem;
addTextItem(): TextItem;
addTimeItem(): TimeItem;
addVideoItem(): VideoItem;
canEditResponse(): boolean;
collectsEmail(): boolean;
createResponse(): FormResponse;
deleteAllResponses(): Form;
deleteItem(index: Integer): void;
deleteItem(item: Item): void;
getConfirmationMessage(): string;
getCustomClosedFormMessage(): string;
getDescription(): string;
getDestinationId(): string;
getDestinationType(): DestinationType;
getEditUrl(): string;
getEditors(): Base.User[];
getId(): string;
getItemById(id: Integer): Item;
getItems(): Item[];
getItems(itemType: ItemType): Item[];
getPublishedUrl(): string;
getResponse(responseId: string): FormResponse;
getResponses(): FormResponse[];
getResponses(timestamp: Date): FormResponse[];
getShuffleQuestions(): boolean;
getSummaryUrl(): string;
getTitle(): string;
hasLimitOneResponsePerUser(): boolean;
hasProgressBar(): boolean;
hasRespondAgainLink(): boolean;
isAcceptingResponses(): boolean;
isPublishingSummary(): boolean;
moveItem(from: Integer, to: Integer): Item;
moveItem(item: Item, toIndex: Integer): Item;
removeDestination(): Form;
removeEditor(emailAddress: string): Form;
removeEditor(user: Base.User): Form;
requiresLogin(): boolean;
setAcceptingResponses(enabled: boolean): Form;
setAllowResponseEdits(enabled: boolean): Form;
setCollectEmail(collect: boolean): Form;
setConfirmationMessage(message: string): Form;
setCustomClosedFormMessage(message: string): Form;
setDescription(description: string): Form;
setDestination(type: DestinationType, id: string): Form;
setLimitOneResponsePerUser(enabled: boolean): Form;
setProgressBar(enabled: boolean): Form;
setPublishingSummary(enabled: boolean): Form;
setRequireLogin(requireLogin: boolean): Form;
setShowLinkToRespondAgain(enabled: boolean): Form;
setShuffleQuestions(shuffle: boolean): Form;
setTitle(title: string): Form;
shortenFormUrl(url: string): string;
}
/**
* Allows a script to open existing Forms or create new ones.
*
* // Open a form by ID.
* var existingForm = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
*
* // Create and open a form.
* var newForm = FormApp.create('Form Name');
*/
export interface FormApp {
Alignment: Alignment
DestinationType: DestinationType
ItemType: ItemType
PageNavigationType: PageNavigationType
create(title: string): Form;
getActiveForm(): Form;
getUi(): Base.Ui;
openById(id: string): Form;
openByUrl(url: string): Form;
}
/**
* A response to the form as a whole. Form responses have three main uses: they contain the answers
* submitted by a respondent (see getItemResponses(), they can be used to programmatically
* respond to the form (see withItemResponse(response) and submit()), and they
* can be used as a template to create a URL for the form with pre-filled answers. Form responses
* can be created or accessed from a Form.
*
* // Open a form by ID and log the responses to each question.
* var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
* var formResponses = form.getResponses();
* for (var i = 0; i < formResponses.length; i++) {
* var formResponse = formResponses[i];
* var itemResponses = formResponse.getItemResponses();
* for (var j = 0; j < itemResponses.length; j++) {
* var itemResponse = itemResponses[j];
* Logger.log('Response #%s to the question "%s" was "%s"',
* (i + 1).toString(),
* itemResponse.getItem().getTitle(),
* itemResponse.getResponse());
* }
* }
*/
export interface FormResponse {
getEditResponseUrl(): string;
getId(): string;
getItemResponses(): ItemResponse[];
getRespondentEmail(): string;
getResponseForItem(item: Item): ItemResponse;
getTimestamp(): Date;
submit(): FormResponse;
toPrefilledUrl(): string;
withItemResponse(response: ItemResponse): FormResponse;
}
/**
* A question item, presented as a grid of columns and rows, that allows the respondent to select
* one choice per row from a sequence of radio buttons. Items can be accessed or created from a
* Form.
*
* // Open a form by ID and add a new grid item.
* var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
* var item = form.addGridItem();
* item.setTitle('Rate your interests')
* .setRows(['Cars', 'Computers', 'Celebrities'])
* .setColumns(['Boring', 'So-so', 'Interesting']);
*/
export interface GridItem {
createResponse(responses: String[]): ItemResponse;
duplicate(): GridItem;
getColumns(): String[];
getHelpText(): string;
getId(): Integer;
getIndex(): Integer;
getRows(): String[];
getTitle(): string;
getType(): ItemType;
isRequired(): boolean;
setColumns(columns: String[]): GridItem;
setHelpText(text: string): GridItem;
setRequired(enabled: boolean): GridItem;
setRows(rows: String[]): GridItem;
setTitle(title: string): GridItem;
}
/**
* A layout item that displays an image. Items can be accessed or created from a Form.
*
* // Open a form by ID and add a new image item
* var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
* var img = UrlFetchApp.fetch('https://www.google.com/images/srpr/logo4w.png');
* form.addImageItem()
* .setTitle('Google')
* .setHelpText('Google Logo') // The help text is the image description
* .setImage(img);
*/
export interface ImageItem {
duplicate(): ImageItem;
getAlignment(): Alignment;
getHelpText(): string;
getId(): Integer;
getImage(): Base.Blob;
getIndex(): Integer;
getTitle(): string;
getType(): ItemType;
getWidth(): Integer;
setAlignment(alignment: Alignment): ImageItem;
setHelpText(text: string): ImageItem;
setImage(image: Base.BlobSource): ImageItem;
setTitle(title: string): ImageItem;
setWidth(width: Integer): ImageItem;
}
/**
* A generic form item that contains properties common to all items, such as title and help text.
* Items can be accessed or created from a Form.
*
* To operate on type-specific properties, use getType() to check the item's
* ItemType, then cast the item to the
* appropriate class using a method like asCheckboxItem().
*
* // Create a new form and add a text item.
* var form = FormApp.create('Form Name');
* form.addTextItem();
*
* // Access the text item as a generic item.
* var items = form.getItems();
* var item = items[0];
*
* // Cast the generic item to the text-item class.
* if (item.getType() == 'TEXT') {
* var textItem = item.asTextItem();
* textItem.setRequired(false);
* }
*/
export interface Item {
asCheckboxItem(): CheckboxItem;
asDateItem(): DateItem;
asDateTimeItem(): DateTimeItem;
asDurationItem(): DurationItem;
asGridItem(): GridItem;
asImageItem(): ImageItem;
asListItem(): ListItem;
asMultipleChoiceItem(): MultipleChoiceItem;
asPageBreakItem(): PageBreakItem;
asParagraphTextItem(): ParagraphTextItem;
asScaleItem(): ScaleItem;
asSectionHeaderItem(): SectionHeaderItem;
asTextItem(): TextItem;
asTimeItem(): TimeItem;
asVideoItem(): VideoItem;
duplicate(): Item;
getHelpText(): string;
getId(): Integer;
getIndex(): Integer;
getTitle(): string;
getType(): ItemType;
setHelpText(text: string): Item;
setTitle(title: string): Item;
}
/**
* A response to one question item within a form. Item responses can be accessed from
* FormResponse and created from any Item that asks the respondent to answer a
* question.
*
* // Open a form by ID and log the responses to each question.
* var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
* var formResponses = form.getResponses();
* for (var i = 0; i < formResponses.length; i++) {
* var formResponse = formResponses[i];
* var itemResponses = formResponse.getItemResponses();
* for (var j = 0; j < itemResponses.length; j++) {
* var itemResponse = itemResponses[j];
* Logger.log('Response #%s to the question "%s" was "%s"',
* (i + 1).toString(),
* itemResponse.getItem().getTitle(),
* itemResponse.getResponse());
* }
* }
*/
export interface ItemResponse {
getItem(): Item;
getResponse(): Object;
}
/**
* An enum representing the supported types of form items. Item types can be accessed from
* FormApp.ItemType.
*
* // Open a form by ID and add a new section header.
* var form = FormApp.create('Form Name');
* var item = form.addSectionHeaderItem();
* item.setTitle('Title of new section');
*
* // Check the item type.
* if (item.getType() == FormApp.ItemType.SECTION_HEADER) {
* item.setHelpText('Description of new section.');
* }
*/
export enum ItemType { CHECKBOX, DATE, DATETIME, DURATION, GRID, IMAGE, LIST, MULTIPLE_CHOICE, PAGE_BREAK, PARAGRAPH_TEXT, SCALE, SECTION_HEADER, TEXT, TIME }
/**
* A question item that allows the respondent to select one choice from a drop-down list. Items can
* be accessed or created from a Form.
*
* // Open a form by ID and add a new list item.
* var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
* var item = form.addListItem();
* item.setTitle('Do you prefer cats or dogs?')
* .setChoices([
* item.createChoice('Cats'),
* item.createChoice('Dogs')
* ]);
*/
export interface ListItem {
createChoice(value: string): Choice;
createChoice(value: string, navigationItem: PageBreakItem): Choice;
createChoice(value: string, navigationType: PageNavigationType): Choice;
createResponse(response: string): ItemResponse;
duplicate(): ListItem;
getChoices(): Choice[];
getHelpText(): string;
getId(): Integer;
getIndex(): Integer;
getTitle(): string;
getType(): ItemType;
isRequired(): boolean;
setChoiceValues(values: String[]): ListItem;
setChoices(choices: Choice[]): ListItem;
setHelpText(text: string): ListItem;
setRequired(enabled: boolean): ListItem;
setTitle(title: string): ListItem;
}
/**
* A question item that allows the respondent to select one choice from a list of radio buttons or
* an optional "other" field. Items can be accessed or created from a Form.
*
* // Open a form by ID and add a new multiple choice item.
* var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
* var item = form.addMultipleChoiceItem();
* item.setTitle('Do you prefer cats or dogs?')
* .setChoices([
* item.createChoice('Cats'),
* item.createChoice('Dogs')
* ])
* .showOtherOption(true);
*/
export interface MultipleChoiceItem {
createChoice(value: string): Choice;
createChoice(value: string, navigationItem: PageBreakItem): Choice;
createChoice(value: string, navigationType: PageNavigationType): Choice;
createResponse(response: string): ItemResponse;
duplicate(): MultipleChoiceItem;
getChoices(): Choice[];
getHelpText(): string;
getId(): Integer;
getIndex(): Integer;
getTitle(): string;
getType(): ItemType;
hasOtherOption(): boolean;
isRequired(): boolean;
setChoiceValues(values: String[]): MultipleChoiceItem;
setChoices(choices: Choice[]): MultipleChoiceItem;
setHelpText(text: string): MultipleChoiceItem;
setRequired(enabled: boolean): MultipleChoiceItem;
setTitle(title: string): MultipleChoiceItem;
showOtherOption(enabled: boolean): MultipleChoiceItem;
}
/**
* A layout item that marks the start of a page. Items can be accessed or
* created from a Form.
*
* // Create a form and add three page-break items.
* var form = FormApp.create('Form Name');
* var pageTwo = form.addPageBreakItem().setTitle('Page Two');
* var pageThree = form.addPageBreakItem().setTitle('Page Three');
*
* // Make the first two pages navigate elsewhere upon completion.
* pageTwo.setGoToPage(pageThree); // At end of page one (start of page two), jump to page three
* pageThree.setGoToPage(FormApp.PageNavigationType.RESTART); // At end of page two, restart form
*/
export interface PageBreakItem {
duplicate(): PageBreakItem;
getGoToPage(): PageBreakItem;
getHelpText(): string;
getId(): Integer;
getIndex(): Integer;
getPageNavigationType(): PageNavigationType;
getTitle(): string;
getType(): ItemType;
setGoToPage(goToPageItem: PageBreakItem): PageBreakItem;
setGoToPage(navigationType: PageNavigationType): PageBreakItem;
setHelpText(text: string): PageBreakItem;
setTitle(title: string): PageBreakItem;
}
/**
* An enum representing the supported types of page navigation. Page navigation types can be
* accessed from FormApp.PageNavigationType.
*
* The page navigation occurs after the respondent completes a page that contains the option, and
* only if the respondent chose that option. If the respondent chose multiple options with
* page-navigation instructions on the same page, only the last navigation option has any effect.
* Page navigation also has no effect on the last page of a form.
* Choices that use page navigation cannot be combined in the same item with choices that do not
* use page navigation.
*
* // Create a form and add a new multiple-choice item and a page-break item.
* var form = FormApp.create('Form Name');
* var item = form.addMultipleChoiceItem();
* var pageBreak = form.addPageBreakItem();
*
* // Set some choices with go-to-page logic.
* var rightChoice = item.createChoice('Vanilla', FormApp.PageNavigationType.SUBMIT);
* var wrongChoice = item.createChoice('Chocolate', FormApp.PageNavigationType.RESTART);
*
* // For GO_TO_PAGE, just pass in the page break item. For CONTINUE (normally the default), pass in
* // CONTINUE explicitly because page navigation cannot be mixed with non-navigation choices.
* var iffyChoice = item.createChoice('Peanut', pageBreak);
* var otherChoice = item.createChoice('Strawberry', FormApp.PageNavigationType.CONTINUE);
* item.setChoices([rightChoice, wrongChoice, iffyChoice, otherChoice]);
*/
export enum PageNavigationType { CONTINUE, GO_TO_PAGE, RESTART, SUBMIT }
/**
* A question item that allows the respondent to enter a block of text. Items can be accessed or
* created from a Form.
*
* // Open a form by ID and add a new paragraph text item.
* var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
* var item = form.addParagraphTextItem();
* item.setTitle('What is your address?');
*/
export interface ParagraphTextItem {
createResponse(response: string): ItemResponse;
duplicate(): ParagraphTextItem;
getHelpText(): string;
getId(): Integer;
getIndex(): Integer;
getTitle(): string;
getType(): ItemType;
isRequired(): boolean;
setHelpText(text: string): ParagraphTextItem;
setRequired(enabled: boolean): ParagraphTextItem;
setTitle(title: string): ParagraphTextItem;
}
/**
* A question item that allows the respondent to choose one option from a numbered sequence of radio
* buttons. Items can be accessed or created from a Form.
*
* // Open a form by ID and add a new scale item.
* var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
* var item = form.addScaleItem();
* item.setTitle('Pick a number between 1 and 10')
* .setBounds(1, 10);
*/
export interface ScaleItem {
createResponse(response: Integer): ItemResponse;
duplicate(): ScaleItem;
getHelpText(): string;
getId(): Integer;
getIndex(): Integer;
getLeftLabel(): string;
getLowerBound(): Integer;
getRightLabel(): string;
getTitle(): string;
getType(): ItemType;
getUpperBound(): Integer;
isRequired(): boolean;
setBounds(lower: Integer, upper: Integer): ScaleItem;
setHelpText(text: string): ScaleItem;
setLabels(lower: string, upper: string): ScaleItem;
setRequired(enabled: boolean): ScaleItem;
setTitle(title: string): ScaleItem;
}
/**
* A layout item that visually indicates the start of a section. Items can be accessed or created
* from a Form.
*
* // Open a form by ID and add a new section header.
* var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
* var item = form.addSectionHeaderItem();
* item.setTitle('Title of new section');
*/
export interface SectionHeaderItem {
duplicate(): SectionHeaderItem;
getHelpText(): string;
getId(): Integer;
getIndex(): Integer;
getTitle(): string;
getType(): ItemType;
setHelpText(text: string): SectionHeaderItem;
setTitle(title: string): SectionHeaderItem;
}
/**
* A question item that allows the respondent to enter a single line of text. Items can be accessed
* or created from a Form.
*
* // Open a form by ID and add a new text item.
* var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
* var item = form.addTextItem();
* item.setTitle('What is your name?');
*/
export interface TextItem {
createResponse(response: string): ItemResponse;
duplicate(): TextItem;
getHelpText(): string;
getId(): Integer;
getIndex(): Integer;
getTitle(): string;
getType(): ItemType;
isRequired(): boolean;
setHelpText(text: string): TextItem;
setRequired(enabled: boolean): TextItem;
setTitle(title: string): TextItem;
}
/**
* A question item that allows the respondent to indicate a time of day. Items can be accessed or
* created from a Form.
*
* // Open a form by ID and add a new time item.
* var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
* var item = form.addTimeItem();
* item.setTitle('What time do you usually wake up in the morning?');
*/
export interface TimeItem {
createResponse(hour: Integer, minute: Integer): ItemResponse;
duplicate(): TimeItem;
getHelpText(): string;
getId(): Integer;
getIndex(): Integer;
getTitle(): string;
getType(): ItemType;
isRequired(): boolean;
setHelpText(text: string): TimeItem;
setRequired(enabled: boolean): TimeItem;
setTitle(title: string): TimeItem;
}
/**
* A layout item that displays a video. Items can be accessed or created from a Form.
*
* // Open a form by ID and add three new video items, using a long URL,
* // a short URL, and a video ID.
* var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
* form.addVideoItem()
* .setTitle('Video Title')
* .setHelpText('Video Caption')
* .setVideoUrl('www.youtube.com/watch?v=1234abcdxyz');
*
* form.addVideoItem()
* .setTitle('Video Title')
* .setHelpText('Video Caption')
* .setVideoUrl('youtu.be/1234abcdxyz');
*
* form.addVideoItem()
* .setTitle('Video Title')
* .setHelpText('Video Caption')
* .setVideoUrl('1234abcdxyz');
*/
export interface VideoItem {
duplicate(): VideoItem;
getAlignment(): Alignment;
getHelpText(): string;
getId(): Integer;
getIndex(): Integer;
getTitle(): string;
getType(): ItemType;
getWidth(): Integer;
setAlignment(alignment: Alignment): VideoItem;
setHelpText(text: string): VideoItem;
setTitle(title: string): VideoItem;
setVideoUrl(youtubeUrl: string): VideoItem;
setWidth(width: Integer): VideoItem;
}
}
}
declare var FormApp: GoogleAppsScript.Forms.FormApp;
+205
View File
@@ -0,0 +1,205 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
/// <reference path="google-apps-script.base.d.ts" />
declare module GoogleAppsScript {
export module Gmail {
/**
* Provides access to Gmail threads, messages, and labels.
*/
export interface GmailApp {
createLabel(name: string): GmailLabel;
deleteLabel(label: GmailLabel): GmailApp;
getAliases(): String[];
getChatThreads(): GmailThread[];
getChatThreads(start: Integer, max: Integer): GmailThread[];
getDraftMessages(): GmailMessage[];
getInboxThreads(): GmailThread[];
getInboxThreads(start: Integer, max: Integer): GmailThread[];
getInboxUnreadCount(): Integer;
getMessageById(id: string): GmailMessage;
getMessagesForThread(thread: GmailThread): GmailMessage[];
getMessagesForThreads(threads: GmailThread[]): GmailMessage[][];
getPriorityInboxThreads(): GmailThread[];
getPriorityInboxThreads(start: Integer, max: Integer): GmailThread[];
getPriorityInboxUnreadCount(): Integer;
getSpamThreads(): GmailThread[];
getSpamThreads(start: Integer, max: Integer): GmailThread[];
getSpamUnreadCount(): Integer;
getStarredThreads(): GmailThread[];
getStarredThreads(start: Integer, max: Integer): GmailThread[];
getStarredUnreadCount(): Integer;
getThreadById(id: string): GmailThread;
getTrashThreads(): GmailThread[];
getTrashThreads(start: Integer, max: Integer): GmailThread[];
getUserLabelByName(name: string): GmailLabel;
getUserLabels(): GmailLabel[];
markMessageRead(message: GmailMessage): GmailApp;
markMessageUnread(message: GmailMessage): GmailApp;
markMessagesRead(messages: GmailMessage[]): GmailApp;
markMessagesUnread(messages: GmailMessage[]): GmailApp;
markThreadImportant(thread: GmailThread): GmailApp;
markThreadRead(thread: GmailThread): GmailApp;
markThreadUnimportant(thread: GmailThread): GmailApp;
markThreadUnread(thread: GmailThread): GmailApp;
markThreadsImportant(threads: GmailThread[]): GmailApp;
markThreadsRead(threads: GmailThread[]): GmailApp;
markThreadsUnimportant(threads: GmailThread[]): GmailApp;
markThreadsUnread(threads: GmailThread[]): GmailApp;
moveMessageToTrash(message: GmailMessage): GmailApp;
moveMessagesToTrash(messages: GmailMessage[]): GmailApp;
moveThreadToArchive(thread: GmailThread): GmailApp;
moveThreadToInbox(thread: GmailThread): GmailApp;
moveThreadToSpam(thread: GmailThread): GmailApp;
moveThreadToTrash(thread: GmailThread): GmailApp;
moveThreadsToArchive(threads: GmailThread[]): GmailApp;
moveThreadsToInbox(threads: GmailThread[]): GmailApp;
moveThreadsToSpam(threads: GmailThread[]): GmailApp;
moveThreadsToTrash(threads: GmailThread[]): GmailApp;
refreshMessage(message: GmailMessage): GmailApp;
refreshMessages(messages: GmailMessage[]): GmailApp;
refreshThread(thread: GmailThread): GmailApp;
refreshThreads(threads: GmailThread[]): GmailApp;
search(query: string): GmailThread[];
search(query: string, start: Integer, max: Integer): GmailThread[];
sendEmail(recipient: string, subject: string, body: string): GmailApp;
sendEmail(recipient: string, subject: string, body: string, options: Object): GmailApp;
starMessage(message: GmailMessage): GmailApp;
starMessages(messages: GmailMessage[]): GmailApp;
unstarMessage(message: GmailMessage): GmailApp;
unstarMessages(messages: GmailMessage[]): GmailApp;
}
/**
* An attachment from Gmail. This is a regular
* Blob except that it has an extra
* getSize() method that is faster than calling getBytes().length and does
* not count against the Gmail read quota.
*
* // Logs information about any attachments in the first 100 inbox threads.
* var threads = GmailApp.getInboxThreads(0, 100);
* var msgs = GmailApp.getMessagesForThreads(threads);
* for (var i = 0 ; i < msgs.length; i++) {
* for (var j = 0; j < msgs[i].length; j++) {
* var attachments = msgs[i][j].getAttachments();
* for (var k = 0; k < attachments.length; k++) {
* Logger.log('Message "%s" contains the attachment "%s" (%s bytes)',
* msgs[i][j].getSubject(), attachments[k].getName(), attachments[k].getSize());
* }
* }
* }
*/
export interface GmailAttachment {
copyBlob(): Base.Blob;
getAs(contentType: string): Base.Blob;
getBytes(): Byte[];
getContentType(): string;
getDataAsString(): string;
getDataAsString(charset: string): string;
getName(): string;
getSize(): Integer;
isGoogleType(): boolean;
setBytes(data: Byte[]): Base.Blob;
setContentType(contentType: string): Base.Blob;
setContentTypeFromExtension(): Base.Blob;
setDataFromString(string: string): Base.Blob;
setDataFromString(string: string, charset: string): Base.Blob;
setName(name: string): Base.Blob;
getAllBlobs(): Base.Blob[];
}
/**
* A user-created label in a user's Gmail account.
*/
export interface GmailLabel {
addToThread(thread: GmailThread): GmailLabel;
addToThreads(threads: GmailThread[]): GmailLabel;
deleteLabel(): void;
getName(): string;
getThreads(): GmailThread[];
getThreads(start: Integer, max: Integer): GmailThread[];
getUnreadCount(): Integer;
removeFromThread(thread: GmailThread): GmailLabel;
removeFromThreads(threads: GmailThread[]): GmailLabel;
}
/**
* A message in a user's Gmail account.
*/
export interface GmailMessage {
forward(recipient: string): GmailMessage;
forward(recipient: string, options: Object): GmailMessage;
getAttachments(): GmailAttachment[];
getBcc(): string;
getBody(): string;
getCc(): string;
getDate(): Date;
getFrom(): string;
getId(): string;
getPlainBody(): string;
getRawContent(): string;
getReplyTo(): string;
getSubject(): string;
getThread(): GmailThread;
getTo(): string;
isDraft(): boolean;
isInChats(): boolean;
isInInbox(): boolean;
isInTrash(): boolean;
isStarred(): boolean;
isUnread(): boolean;
markRead(): GmailMessage;
markUnread(): GmailMessage;
moveToTrash(): GmailMessage;
refresh(): GmailMessage;
reply(body: string): GmailMessage;
reply(body: string, options: Object): GmailMessage;
replyAll(body: string): GmailMessage;
replyAll(body: string, options: Object): GmailMessage;
star(): GmailMessage;
unstar(): GmailMessage;
}
/**
* A thread in a user's Gmail account.
*/
export interface GmailThread {
addLabel(label: GmailLabel): GmailThread;
getFirstMessageSubject(): string;
getId(): string;
getLabels(): GmailLabel[];
getLastMessageDate(): Date;
getMessageCount(): Integer;
getMessages(): GmailMessage[];
getPermalink(): string;
hasStarredMessages(): boolean;
isImportant(): boolean;
isInChats(): boolean;
isInInbox(): boolean;
isInSpam(): boolean;
isInTrash(): boolean;
isUnread(): boolean;
markImportant(): GmailThread;
markRead(): GmailThread;
markUnimportant(): GmailThread;
markUnread(): GmailThread;
moveToArchive(): GmailThread;
moveToInbox(): GmailThread;
moveToSpam(): GmailThread;
moveToTrash(): GmailThread;
refresh(): GmailThread;
removeLabel(label: GmailLabel): GmailThread;
reply(body: string): GmailThread;
reply(body: string, options: Object): GmailThread;
replyAll(body: string): GmailThread;
replyAll(body: string, options: Object): GmailThread;
}
}
}
declare var GmailApp: GoogleAppsScript.Gmail.GmailApp;
+67
View File
@@ -0,0 +1,67 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
/// <reference path="google-apps-script.base.d.ts" />
declare module GoogleAppsScript {
export module Groups {
/**
* A group object whose members and those members' roles within the group
* can be queried.
*
* Here's an example which shows the members of a group. Before running it,
* replace the email address of the group with that of one on your domain.
*
* function listGroupMembers() {
* var group = GroupsApp.getGroupByEmail("example@googlegroups.com");
* var s = group.getEmail() + ': ';
* var users = group.getUsers();
* for (var i = 0; i < users.length; i++) {
* var user = users[i];
* s = s + user.getEmail() + ", ";
* }
* Logger.log(s);
* }
*/
export interface Group {
getEmail(): string;
getRole(email: string): Role;
getRole(user: Base.User): Role;
getUsers(): Base.User[];
hasUser(email: string): boolean;
hasUser(user: Base.User): boolean;
}
/**
* This class provides access to Google Groups information. It can be used to
* query information such as a group's email address, or the list of groups in
* which the user is a direct member.
*
* Here's an example that shows how many groups the current user is a member of:
*
* var groups = GroupsApp.getGroups();
* Logger.log('You belong to ' + groups.length + ' groups.');
*/
export interface GroupsApp {
Role: Role
getGroupByEmail(email: string): Group;
getGroups(): Group[];
}
/**
* Possible roles of a user within a group, such as owner or ordinary member.
* Users subscribed to a group have exactly one role within the context of that
* group.
* See also
*
* Group.getRole(email)
*/
export enum Role { OWNER, MANAGER, MEMBER, INVITED, PENDING }
}
}
declare var GroupsApp: GoogleAppsScript.Groups.GroupsApp;
+108
View File
@@ -0,0 +1,108 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
/// <reference path="google-apps-script.base.d.ts" />
declare module GoogleAppsScript {
export module HTML {
/**
* An HtmlOutput object that can be served from a script. Due to security considerations,
* scripts cannot directly return HTML to a browser. Instead, they must sanitize it so that it
* cannot perform malicious actions. You can return sanitized HTML like this:
*
* function doGet() {
* return HtmlService.createHtmlOutput('<b>Hello, world!</b>');
* }
*
* HtmlOutput
* Google Caja
* guide to restrictions in HTML service
*/
export interface HtmlOutput {
append(addedContent: string): HtmlOutput;
appendUntrusted(addedContent: string): HtmlOutput;
asTemplate(): HtmlTemplate;
clear(): HtmlOutput;
getAs(contentType: string): Base.Blob;
getBlob(): Base.Blob;
getContent(): string;
getHeight(): Integer;
getTitle(): string;
getWidth(): Integer;
setContent(content: string): HtmlOutput;
setHeight(height: Integer): HtmlOutput;
setSandboxMode(mode: SandboxMode): HtmlOutput;
setTitle(title: string): HtmlOutput;
setWidth(width: Integer): HtmlOutput;
}
/**
* Service for returning HTML and other text content from a script.
*
* Due to security considerations, scripts cannot directly return content to a browser. Instead,
* they must sanitize the HTML so that it cannot perform malicious actions. See the description of
* HtmlOutput for what limitations this implies on what can be returned.
*/
export interface HtmlService {
SandboxMode: SandboxMode
createHtmlOutput(): HtmlOutput;
createHtmlOutput(blob: Base.BlobSource): HtmlOutput;
createHtmlOutput(html: string): HtmlOutput;
createHtmlOutputFromFile(filename: string): HtmlOutput;
createTemplate(blob: Base.BlobSource): HtmlTemplate;
createTemplate(html: string): HtmlTemplate;
createTemplateFromFile(filename: string): HtmlTemplate;
getUserAgent(): string;
}
/**
* A template object for dynamically constructing HTML. For more information, see the
* guide to templates.
*/
export interface HtmlTemplate {
evaluate(): HtmlOutput;
getCode(): string;
getCodeWithComments(): string;
getRawContent(): string;
}
/**
* An enum representing the sandbox modes that can be used for client-side HtmlService
* scripts. These values can be accessed from HtmlService.SandboxMode, and set by calling
* HtmlOutput.setSandboxMode(mode).
*
* To protect users from being served malicious HTML or JavaScript, client-side code served from
* HTML service executes in a security sandbox that imposes restrictions on the code. The method
* HtmlOutput.setSandboxMode(mode) allows script authors to choose between
* different versions of the sandbox. For more information, see the
* guide to restrictions in HTML service.
* If a script does not set a sandbox mode, Apps Script uses NATIVE mode as the default.
* Prior to February 2014, the default was EMULATED. The default is subject to change.
* The IFRAME mode imposes many fewer restrictions than the other sandbox modes and runs
* fastest, but does not work at all in certain older browsers, including Internet Explorer 9. By
* contrast, EMULATED mode is more likely to work in
* older browsers that do not support ECMAScript 5 strict
* mode, most notably Internet Explorer 9. NATIVE mode is the middle ground. If
* NATIVE mode is set but not supported in the user's browser, the sandbox mode falls back
* to EMULATED mode for that user.
*
* // Serve HTML with a defined sandbox mode (in Apps Script server-side code).
* var output = HtmlService.createHtmlOutput('<b>Hello, world!</b>');
* output.setSandboxMode(HtmlService.SandboxMode.IFRAME);
*
* google.script.sandbox.mode
*
* <!-- Read the sandbox mode (in a client-side script). -->
* <script>
* alert(google.script.sandbox.mode);
* </script>
*/
export enum SandboxMode { EMULATED, IFRAME, NATIVE }
}
}
declare var HtmlService: GoogleAppsScript.HTML.HtmlService;
+902
View File
@@ -0,0 +1,902 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
/// <reference path="google-apps-script.base.d.ts" />
declare module GoogleAppsScript {
export module JDBC {
/**
* The JDBC service allows scripts to connect to Google Cloud SQL, MySQL,
* Microsoft SQL Server, and Oracle databases. For more information, see the
* guide to JDBC.
*/
export interface Jdbc {
getCloudSqlConnection(url: string): JdbcConnection;
getCloudSqlConnection(url: string, info: Object): JdbcConnection;
getCloudSqlConnection(url: string, userName: string, password: string): JdbcConnection;
getConnection(url: string): JdbcConnection;
getConnection(url: string, info: Object): JdbcConnection;
getConnection(url: string, userName: string, password: string): JdbcConnection;
newDate(milliseconds: Integer): JdbcDate;
newTime(milliseconds: Integer): JdbcTime;
newTimestamp(milliseconds: Integer): JdbcTimestamp;
parseDate(date: string): JdbcDate;
parseTime(time: string): JdbcTime;
parseTimestamp(timestamp: string): JdbcTimestamp;
}
/**
* A JDBC Array. For documentation of this class, see java.sql.Array.
*/
export interface JdbcArray {
free(): void;
getArray(): Object;
getArray(index: Integer, count: Integer): Object;
getBaseType(): Integer;
getBaseTypeName(): string;
getResultSet(): JdbcResultSet;
getResultSet(index: Integer, count: Integer): JdbcResultSet;
}
/**
* A JDBC Blob. For documentation of this class, see java.sql.Blob.
*/
export interface JdbcBlob {
free(): void;
getAppsScriptBlob(): Base.Blob;
getAs(contentType: string): Base.Blob;
getBytes(position: Integer, length: Integer): Byte[];
length(): Integer;
position(pattern: Byte[], start: Integer): Integer;
position(pattern: JdbcBlob, start: Integer): Integer;
setBytes(position: Integer, blobSource: Base.BlobSource): Integer;
setBytes(position: Integer, blobSource: Base.BlobSource, offset: Integer, length: Integer): Integer;
setBytes(position: Integer, bytes: Byte[]): Integer;
setBytes(position: Integer, bytes: Byte[], offset: Integer, length: Integer): Integer;
truncate(length: Integer): void;
}
/**
* A JDBC CallableStatement. For documentation of this class, see
* java.sql.CallableStatement.
* See also
*
* CallableStatement
*/
export interface JdbcCallableStatement {
addBatch(): void;
addBatch(sql: string): void;
cancel(): void;
clearBatch(): void;
clearParameters(): void;
clearWarnings(): void;
close(): void;
execute(): boolean;
execute(sql: string): boolean;
execute(sql: string, autoGeneratedKeys: Integer, sql_: string, columnIndexes: Integer[]): boolean;
execute(sql: string, autoGeneratedKeys: Integer, sql_: string, columnIndexes: Integer[]): boolean;
execute(sql: string, columnNames: String[]): boolean;
executeBatch(): Integer[];
executeQuery(): JdbcResultSet;
executeQuery(sql: string): JdbcResultSet;
executeUpdate(): Integer;
executeUpdate(sql: string): Integer;
executeUpdate(sql: string, autoGeneratedKeys: Integer, sql_: string, columnIndexes: Integer[]): Integer;
executeUpdate(sql: string, autoGeneratedKeys: Integer, sql_: string, columnIndexes: Integer[]): Integer;
executeUpdate(sql: string, columnNames: String[]): Integer;
getArray(parameterIndex: Integer): JdbcArray;
getArray(parameterName: string): JdbcArray;
getBigDecimal(parameterIndex: Integer): BigNumber;
getBigDecimal(parameterName: string): BigNumber;
getBlob(parameterIndex: Integer): JdbcBlob;
getBlob(parameterName: string): JdbcBlob;
getBoolean(parameterIndex: Integer): boolean;
getBoolean(parameterName: string): boolean;
getByte(parameterIndex: Integer): Byte;
getByte(parameterName: string): Byte;
getBytes(parameterIndex: Integer): Byte[];
getBytes(parameterName: string): Byte[];
getClob(parameterIndex: Integer): JdbcClob;
getClob(parameterName: string): JdbcClob;
getConnection(): JdbcConnection;
getDate(parameterIndex: Integer): JdbcDate;
getDate(parameterIndex: Integer, timeZone: string): JdbcDate;
getDate(parameterName: string): JdbcDate;
getDate(parameterName: string, timeZone: string): JdbcDate;
getDouble(parameterIndex: Integer): Number;
getDouble(parameterName: string): Number;
getFetchDirection(): Integer;
getFetchSize(): Integer;
getFloat(parameterIndex: Integer): Number;
getFloat(parameterName: string): Number;
getGeneratedKeys(): JdbcResultSet;
getInt(parameterIndex: Integer): Integer;
getInt(parameterName: string): Integer;
getLong(parameterIndex: Integer): Integer;
getLong(parameterName: string): Integer;
getMaxFieldSize(): Integer;
getMaxRows(): Integer;
getMetaData(): JdbcResultSetMetaData;
getMoreResults(): boolean;
getMoreResults(current: Integer): boolean;
getNClob(parameterIndex: Integer): JdbcClob;
getNClob(parameterName: string): JdbcClob;
getNString(parameterIndex: Integer): string;
getNString(parameterName: string): string;
getObject(parameterIndex: Integer): Object;
getObject(parameterName: string): Object;
getParameterMetaData(): JdbcParameterMetaData;
getQueryTimeout(): Integer;
getRef(parameterIndex: Integer): JdbcRef;
getRef(parameterName: string): JdbcRef;
getResultSet(): JdbcResultSet;
getResultSetConcurrency(): Integer;
getResultSetHoldability(): Integer;
getResultSetType(): Integer;
getRowId(parameterIndex: Integer): JdbcRowId;
getRowId(parameterName: string): JdbcRowId;
getSQLXML(parameterIndex: Integer): JdbcSQLXML;
getSQLXML(parameterName: string): JdbcSQLXML;
getShort(parameterIndex: Integer): Integer;
getShort(parameterName: string): Integer;
getString(parameterIndex: Integer): string;
getString(parameterName: string): string;
getTime(parameterIndex: Integer): JdbcTime;
getTime(parameterIndex: Integer, timeZone: string): JdbcTime;
getTime(parameterName: string): JdbcTime;
getTime(parameterName: string, timeZone: string): JdbcTime;
getTimestamp(parameterIndex: Integer): JdbcTimestamp;
getTimestamp(parameterIndex: Integer, timeZone: string): JdbcTimestamp;
getTimestamp(parameterName: string): JdbcTimestamp;
getTimestamp(parameterName: string, timeZone: string): JdbcTimestamp;
getURL(parameterIndex: Integer): string;
getURL(parameterName: string): string;
getUpdateCount(): Integer;
getWarnings(): String[];
isClosed(): boolean;
isPoolable(): boolean;
registerOutParameter(parameterIndex: Integer, sqlType: Integer): void;
registerOutParameter(parameterIndex: Integer, sqlType: Integer, scale: Integer): void;
registerOutParameter(parameterIndex: Integer, sqlType: Integer, typeName: string): void;
registerOutParameter(parameterName: string, sqlType: Integer): void;
registerOutParameter(parameterName: string, sqlType: Integer, scale: Integer): void;
registerOutParameter(parameterName: string, sqlType: Integer, typeName: string): void;
setArray(parameterIndex: Integer, x: JdbcArray): void;
setBigDecimal(parameterIndex: Integer, x: BigNumber): void;
setBigDecimal(parameterName: string, x: BigNumber): void;
setBlob(parameterIndex: Integer, x: JdbcBlob): void;
setBlob(parameterName: string, x: JdbcBlob): void;
setBoolean(parameterIndex: Integer, x: boolean): void;
setBoolean(parameterName: string, x: boolean): void;
setByte(parameterIndex: Integer, x: Byte): void;
setByte(parameterName: string, x: Byte): void;
setBytes(parameterIndex: Integer, x: Byte[]): void;
setBytes(parameterName: string, x: Byte[]): void;
setClob(parameterIndex: Integer, x: JdbcClob): void;
setClob(parameterName: string, x: JdbcClob): void;
setCursorName(name: string): void;
setDate(parameterIndex: Integer, x: JdbcDate): void;
setDate(parameterIndex: Integer, x: JdbcDate, timeZone: string): void;
setDate(parameterName: string, x: JdbcDate): void;
setDate(parameterName: string, x: JdbcDate, timeZone: string): void;
setDouble(parameterIndex: Integer, x: Number): void;
setDouble(parameterName: string, x: Number): void;
setEscapeProcessing(enable: boolean): void;
setFetchDirection(direction: Integer): void;
setFetchSize(rows: Integer): void;
setFloat(parameterIndex: Integer, x: Number): void;
setFloat(parameterName: string, x: Number): void;
setInt(parameterIndex: Integer, x: Integer): void;
setInt(parameterName: string, x: Integer): void;
setLong(parameterIndex: Integer, x: Integer): void;
setLong(parameterName: string, x: Integer): void;
setMaxFieldSize(max: Integer): void;
setMaxRows(max: Integer): void;
setNClob(parameterIndex: Integer, x: JdbcClob): void;
setNClob(parameterName: string, value: JdbcClob): void;
setNString(parameterIndex: Integer, x: string): void;
setNString(parameterName: string, value: string): void;
setNull(parameterIndex: Integer, sqlType: Integer): void;
setNull(parameterIndex: Integer, sqlType: Integer, typeName: string): void;
setNull(parameterName: string, sqlType: Integer): void;
setNull(parameterName: string, sqlType: Integer, typeName: string): void;
setObject(index: Integer, x: Object): void;
setObject(parameterIndex: Integer, x: Object, targetSqlType: Integer): void;
setObject(parameterIndex: Integer, x: Object, targetSqlType: Integer, scaleOrLength: Integer): void;
setObject(parameterName: string, x: Object): void;
setObject(parameterName: string, x: Object, targetSqlType: Integer): void;
setObject(parameterName: string, x: Object, targetSqlType: Integer, scale: Integer): void;
setPoolable(poolable: boolean): void;
setQueryTimeout(seconds: Integer): void;
setRef(parameterIndex: Integer, x: JdbcRef): void;
setRowId(parameterIndex: Integer, x: JdbcRowId): void;
setRowId(parameterName: string, x: JdbcRowId): void;
setSQLXML(parameterIndex: Integer, x: JdbcSQLXML): void;
setSQLXML(parameterName: string, xmlObject: JdbcSQLXML): void;
setShort(parameterIndex: Integer, x: Integer): void;
setShort(parameterName: string, x: Integer): void;
setString(parameterIndex: Integer, x: string): void;
setString(parameterName: string, x: string): void;
setTime(parameterIndex: Integer, x: JdbcTime): void;
setTime(parameterIndex: Integer, x: JdbcTime, timeZone: string): void;
setTime(parameterName: string, x: JdbcTime): void;
setTime(parameterName: string, x: JdbcTime, timeZone: string): void;
setTimestamp(parameterIndex: Integer, x: JdbcTimestamp): void;
setTimestamp(parameterIndex: Integer, x: JdbcTimestamp, timeZone: string): void;
setTimestamp(parameterName: string, x: JdbcTimestamp): void;
setTimestamp(parameterName: string, x: JdbcTimestamp, timeZone: string): void;
setURL(parameterIndex: Integer, x: string): void;
setURL(parameterName: string, val: string): void;
wasNull(): boolean;
}
/**
* A JDBC Clob. For documentation of this class, see java.sql.Clob.
*/
export interface JdbcClob {
free(): void;
getAppsScriptBlob(): Base.Blob;
getAs(contentType: string): Base.Blob;
getSubString(position: Integer, length: Integer): string;
length(): Integer;
position(search: JdbcClob, start: Integer): Integer;
position(search: string, start: Integer): Integer;
setString(position: Integer, blobSource: Base.BlobSource): Integer;
setString(position: Integer, blobSource: Base.BlobSource, offset: Integer, len: Integer): Integer;
setString(position: Integer, value: string): Integer;
setString(position: Integer, value: string, offset: Integer, len: Integer): Integer;
truncate(length: Integer): void;
}
/**
* A JDBC Connection. For documentation of this class, see java.sql.Connection.
*/
export interface JdbcConnection {
clearWarnings(): void;
close(): void;
commit(): void;
createArrayOf(typeName: string, elements: Object[]): JdbcArray;
createBlob(): JdbcBlob;
createClob(): JdbcClob;
createNClob(): JdbcClob;
createSQLXML(): JdbcSQLXML;
createStatement(): JdbcStatement;
createStatement(resultSetType: Integer, resultSetConcurrency: Integer): JdbcStatement;
createStatement(resultSetType: Integer, resultSetConcurrency: Integer, resultSetHoldability: Integer): JdbcStatement;
createStruct(typeName: string, attributes: Object[]): JdbcStruct;
getAutoCommit(): boolean;
getCatalog(): string;
getHoldability(): Integer;
getMetaData(): JdbcDatabaseMetaData;
getTransactionIsolation(): Integer;
getWarnings(): String[];
isClosed(): boolean;
isReadOnly(): boolean;
isValid(timeout: Integer): boolean;
nativeSQL(sql: string): string;
prepareCall(sql: string): JdbcCallableStatement;
prepareCall(sql: string, resultSetType: Integer, resultSetConcurrency: Integer): JdbcCallableStatement;
prepareCall(sql: string, resultSetType: Integer, resultSetConcurrency: Integer, resultSetHoldability: Integer): JdbcCallableStatement;
prepareStatement(sql: string): JdbcPreparedStatement;
prepareStatement(sql: string, autoGeneratedKeys: Integer): JdbcPreparedStatement;
prepareStatement(sql: string, resultSetType: Integer, resultSetConcurrency: Integer): JdbcPreparedStatement;
prepareStatement(sql: string, resultSetType: Integer, resultSetConcurrency: Integer, resultSetHoldability: Integer): JdbcPreparedStatement;
prepareStatementByIndex(sql: string, indices: Integer[]): JdbcPreparedStatement;
prepareStatementByName(sql: string, columnNames: String[]): JdbcPreparedStatement;
releaseSavepoint(savepoint: JdbcSavepoint): void;
rollback(): void;
rollback(savepoint: JdbcSavepoint): void;
setAutoCommit(autoCommit: boolean): void;
setCatalog(catalog: string): void;
setHoldability(holdability: Integer): void;
setReadOnly(readOnly: boolean): void;
setSavepoint(): JdbcSavepoint;
setSavepoint(name: string): JdbcSavepoint;
setTransactionIsolation(level: Integer): void;
}
/**
* A JDBC DatabaseMetaData. For documentation of this class, see
* java.sql.DatabaseMetaData.
*/
export interface JdbcDatabaseMetaData {
allProceduresAreCallable(): boolean;
allTablesAreSelectable(): boolean;
autoCommitFailureClosesAllResultSets(): boolean;
dataDefinitionCausesTransactionCommit(): boolean;
dataDefinitionIgnoredInTransactions(): boolean;
deletesAreDetected(type: Integer): boolean;
doesMaxRowSizeIncludeBlobs(): boolean;
getAttributes(catalog: string, schemaPattern: string, typeNamePattern: string, attributeNamePattern: string): JdbcResultSet;
getBestRowIdentifier(catalog: string, schema: string, table: string, scope: Integer, nullable: boolean): JdbcResultSet;
getCatalogSeparator(): string;
getCatalogTerm(): string;
getCatalogs(): JdbcResultSet;
getClientInfoProperties(): JdbcResultSet;
getColumnPrivileges(catalog: string, schema: string, table: string, columnNamePattern: string): JdbcResultSet;
getColumns(catalog: string, schemaPattern: string, tableNamePattern: string, columnNamePattern: string): JdbcResultSet;
getConnection(): JdbcConnection;
getCrossReference(parentCatalog: string, parentSchema: string, parentTable: string, foreignCatalog: string, foreignSchema: string, foreignTable: string): JdbcResultSet;
getDatabaseMajorVersion(): Integer;
getDatabaseMinorVersion(): Integer;
getDatabaseProductName(): string;
getDatabaseProductVersion(): string;
getDefaultTransactionIsolation(): Integer;
getDriverMajorVersion(): Integer;
getDriverMinorVersion(): Integer;
getDriverName(): string;
getDriverVersion(): string;
getExportedKeys(catalog: string, schema: string, table: string): JdbcResultSet;
getExtraNameCharacters(): string;
getFunctionColumns(catalog: string, schemaPattern: string, functionNamePattern: string, columnNamePattern: string): JdbcResultSet;
getFunctions(catalog: string, schemaPattern: string, functionNamePattern: string): JdbcResultSet;
getIdentifierQuoteString(): string;
getImportedKeys(catalog: string, schema: string, table: string): JdbcResultSet;
getIndexInfo(catalog: string, schema: string, table: string, unique: boolean, approximate: boolean): JdbcResultSet;
getJDBCMajorVersion(): Integer;
getJDBCMinorVersion(): Integer;
getMaxBinaryLiteralLength(): Integer;
getMaxCatalogNameLength(): Integer;
getMaxCharLiteralLength(): Integer;
getMaxColumnNameLength(): Integer;
getMaxColumnsInGroupBy(): Integer;
getMaxColumnsInIndex(): Integer;
getMaxColumnsInOrderBy(): Integer;
getMaxColumnsInSelect(): Integer;
getMaxColumnsInTable(): Integer;
getMaxConnections(): Integer;
getMaxCursorNameLength(): Integer;
getMaxIndexLength(): Integer;
getMaxProcedureNameLength(): Integer;
getMaxRowSize(): Integer;
getMaxSchemaNameLength(): Integer;
getMaxStatementLength(): Integer;
getMaxStatements(): Integer;
getMaxTableNameLength(): Integer;
getMaxTablesInSelect(): Integer;
getMaxUserNameLength(): Integer;
getNumericFunctions(): string;
getPrimaryKeys(catalog: string, schema: string, table: string): JdbcResultSet;
getProcedureColumns(catalog: string, schemaPattern: string, procedureNamePattern: string, columnNamePattern: string): JdbcResultSet;
getProcedureTerm(): string;
getProcedures(catalog: string, schemaPattern: string, procedureNamePattern: string): JdbcResultSet;
getResultSetHoldability(): Integer;
getRowIdLifetime(): Integer;
getSQLKeywords(): string;
getSQLStateType(): Integer;
getSchemaTerm(): string;
getSchemas(): JdbcResultSet;
getSchemas(catalog: string, schemaPattern: string): JdbcResultSet;
getSearchStringEscape(): string;
getStringFunctions(): string;
getSuperTables(catalog: string, schemaPattern: string, tableNamePattern: string): JdbcResultSet;
getSuperTypes(catalog: string, schemaPattern: string, typeNamePattern: string): JdbcResultSet;
getSystemFunctions(): string;
getTablePrivileges(catalog: string, schemaPattern: string, tableNamePattern: string): JdbcResultSet;
getTableTypes(): JdbcResultSet;
getTables(catalog: string, schemaPattern: string, tableNamePattern: string, types: String[]): JdbcResultSet;
getTimeDateFunctions(): string;
getTypeInfo(): JdbcResultSet;
getUDTs(catalog: string, schemaPattern: string, typeNamePattern: string, types: Integer[]): JdbcResultSet;
getURL(): string;
getUserName(): string;
getVersionColumns(catalog: string, schema: string, table: string): JdbcResultSet;
insertsAreDetected(type: Integer): boolean;
isCatalogAtStart(): boolean;
isReadOnly(): boolean;
locatorsUpdateCopy(): boolean;
nullPlusNonNullIsNull(): boolean;
nullsAreSortedAtEnd(): boolean;
nullsAreSortedAtStart(): boolean;
nullsAreSortedHigh(): boolean;
nullsAreSortedLow(): boolean;
othersDeletesAreVisible(type: Integer): boolean;
othersInsertsAreVisible(type: Integer): boolean;
othersUpdatesAreVisible(type: Integer): boolean;
ownDeletesAreVisible(type: Integer): boolean;
ownInsertsAreVisible(type: Integer): boolean;
ownUpdatesAreVisible(type: Integer): boolean;
storesLowerCaseIdentifiers(): boolean;
storesLowerCaseQuotedIdentifiers(): boolean;
storesMixedCaseIdentifiers(): boolean;
storesMixedCaseQuotedIdentifiers(): boolean;
storesUpperCaseIdentifiers(): boolean;
storesUpperCaseQuotedIdentifiers(): boolean;
supportsANSI92EntryLevelSQL(): boolean;
supportsANSI92FullSQL(): boolean;
supportsANSI92IntermediateSQL(): boolean;
supportsAlterTableWithAddColumn(): boolean;
supportsAlterTableWithDropColumn(): boolean;
supportsBatchUpdates(): boolean;
supportsCatalogsInDataManipulation(): boolean;
supportsCatalogsInIndexDefinitions(): boolean;
supportsCatalogsInPrivilegeDefinitions(): boolean;
supportsCatalogsInProcedureCalls(): boolean;
supportsCatalogsInTableDefinitions(): boolean;
supportsColumnAliasing(): boolean;
supportsConvert(): boolean;
supportsConvert(fromType: Integer, toType: Integer): boolean;
supportsCoreSQLGrammar(): boolean;
supportsCorrelatedSubqueries(): boolean;
supportsDataDefinitionAndDataManipulationTransactions(): boolean;
supportsDataManipulationTransactionsOnly(): boolean;
supportsDifferentTableCorrelationNames(): boolean;
supportsExpressionsInOrderBy(): boolean;
supportsExtendedSQLGrammar(): boolean;
supportsFullOuterJoins(): boolean;
supportsGetGeneratedKeys(): boolean;
supportsGroupBy(): boolean;
supportsGroupByBeyondSelect(): boolean;
supportsGroupByUnrelated(): boolean;
supportsIntegrityEnhancementFacility(): boolean;
supportsLikeEscapeClause(): boolean;
supportsLimitedOuterJoins(): boolean;
supportsMinimumSQLGrammar(): boolean;
supportsMixedCaseIdentifiers(): boolean;
supportsMixedCaseQuotedIdentifiers(): boolean;
supportsMultipleOpenResults(): boolean;
supportsMultipleResultSets(): boolean;
supportsMultipleTransactions(): boolean;
supportsNamedParameters(): boolean;
supportsNonNullableColumns(): boolean;
supportsOpenCursorsAcrossCommit(): boolean;
supportsOpenCursorsAcrossRollback(): boolean;
supportsOpenStatementsAcrossCommit(): boolean;
supportsOpenStatementsAcrossRollback(): boolean;
supportsOrderByUnrelated(): boolean;
supportsOuterJoins(): boolean;
supportsPositionedDelete(): boolean;
supportsPositionedUpdate(): boolean;
supportsResultSetConcurrency(type: Integer, concurrency: Integer): boolean;
supportsResultSetHoldability(holdability: Integer): boolean;
supportsResultSetType(type: Integer): boolean;
supportsSavepoints(): boolean;
supportsSchemasInDataManipulation(): boolean;
supportsSchemasInIndexDefinitions(): boolean;
supportsSchemasInPrivilegeDefinitions(): boolean;
supportsSchemasInProcedureCalls(): boolean;
supportsSchemasInTableDefinitions(): boolean;
supportsSelectForUpdate(): boolean;
supportsStatementPooling(): boolean;
supportsStoredFunctionsUsingCallSyntax(): boolean;
supportsStoredProcedures(): boolean;
supportsSubqueriesInComparisons(): boolean;
supportsSubqueriesInExists(): boolean;
supportsSubqueriesInIns(): boolean;
supportsSubqueriesInQuantifieds(): boolean;
supportsTableCorrelationNames(): boolean;
supportsTransactionIsolationLevel(level: Integer): boolean;
supportsTransactions(): boolean;
supportsUnion(): boolean;
supportsUnionAll(): boolean;
updatesAreDetected(type: Integer): boolean;
usesLocalFilePerTable(): boolean;
usesLocalFiles(): boolean;
}
/**
* A JDBC Date. For documentation of this class, see java.sql.Date.
*/
export interface JdbcDate {
after(when: JdbcDate): boolean;
before(when: JdbcDate): boolean;
getDate(): Integer;
getMonth(): Integer;
getTime(): Integer;
getYear(): Integer;
setDate(date: Integer): void;
setMonth(month: Integer): void;
setTime(milliseconds: Integer): void;
setYear(year: Integer): void;
}
/**
* A JDBC ParameterMetaData. For documentation of this class, see
* java.sql.ParameterMetaData.
*/
export interface JdbcParameterMetaData {
getParameterClassName(param: Integer): string;
getParameterCount(): Integer;
getParameterMode(param: Integer): Integer;
getParameterType(param: Integer): Integer;
getParameterTypeName(param: Integer): string;
getPrecision(param: Integer): Integer;
getScale(param: Integer): Integer;
isNullable(param: Integer): Integer;
isSigned(param: Integer): boolean;
}
/**
* A JDBC PreparedStatement. For documentation of this class, see
* java.sql.PreparedStatement.
*/
export interface JdbcPreparedStatement {
addBatch(): void;
addBatch(sql: string): void;
cancel(): void;
clearBatch(): void;
clearParameters(): void;
clearWarnings(): void;
close(): void;
execute(): boolean;
execute(sql: string): boolean;
execute(sql: string, autoGeneratedKeys: Integer, sql_: string, columnIndexes: Integer[]): boolean;
execute(sql: string, autoGeneratedKeys: Integer, sql_: string, columnIndexes: Integer[]): boolean;
execute(sql: string, columnNames: String[]): boolean;
executeBatch(): Integer[];
executeQuery(): JdbcResultSet;
executeQuery(sql: string): JdbcResultSet;
executeUpdate(): Integer;
executeUpdate(sql: string): Integer;
executeUpdate(sql: string, autoGeneratedKeys: Integer, sql_: string, columnIndexes: Integer[]): Integer;
executeUpdate(sql: string, autoGeneratedKeys: Integer, sql_: string, columnIndexes: Integer[]): Integer;
executeUpdate(sql: string, columnNames: String[]): Integer;
getConnection(): JdbcConnection;
getFetchDirection(): Integer;
getFetchSize(): Integer;
getGeneratedKeys(): JdbcResultSet;
getMaxFieldSize(): Integer;
getMaxRows(): Integer;
getMetaData(): JdbcResultSetMetaData;
getMoreResults(): boolean;
getMoreResults(current: Integer): boolean;
getParameterMetaData(): JdbcParameterMetaData;
getQueryTimeout(): Integer;
getResultSet(): JdbcResultSet;
getResultSetConcurrency(): Integer;
getResultSetHoldability(): Integer;
getResultSetType(): Integer;
getUpdateCount(): Integer;
getWarnings(): String[];
isClosed(): boolean;
isPoolable(): boolean;
setArray(parameterIndex: Integer, x: JdbcArray): void;
setBigDecimal(parameterIndex: Integer, x: BigNumber): void;
setBlob(parameterIndex: Integer, x: JdbcBlob): void;
setBoolean(parameterIndex: Integer, x: boolean): void;
setByte(parameterIndex: Integer, x: Byte): void;
setBytes(parameterIndex: Integer, x: Byte[]): void;
setClob(parameterIndex: Integer, x: JdbcClob): void;
setCursorName(name: string): void;
setDate(parameterIndex: Integer, x: JdbcDate): void;
setDate(parameterIndex: Integer, x: JdbcDate, timeZone: string): void;
setDouble(parameterIndex: Integer, x: Number): void;
setEscapeProcessing(enable: boolean): void;
setFetchDirection(direction: Integer): void;
setFetchSize(rows: Integer): void;
setFloat(parameterIndex: Integer, x: Number): void;
setInt(parameterIndex: Integer, x: Integer): void;
setLong(parameterIndex: Integer, x: Integer): void;
setMaxFieldSize(max: Integer): void;
setMaxRows(max: Integer): void;
setNClob(parameterIndex: Integer, x: JdbcClob): void;
setNString(parameterIndex: Integer, x: string): void;
setNull(parameterIndex: Integer, sqlType: Integer): void;
setNull(parameterIndex: Integer, sqlType: Integer, typeName: string): void;
setObject(index: Integer, x: Object): void;
setObject(parameterIndex: Integer, x: Object, targetSqlType: Integer): void;
setObject(parameterIndex: Integer, x: Object, targetSqlType: Integer, scaleOrLength: Integer): void;
setPoolable(poolable: boolean): void;
setQueryTimeout(seconds: Integer): void;
setRef(parameterIndex: Integer, x: JdbcRef): void;
setRowId(parameterIndex: Integer, x: JdbcRowId): void;
setSQLXML(parameterIndex: Integer, x: JdbcSQLXML): void;
setShort(parameterIndex: Integer, x: Integer): void;
setString(parameterIndex: Integer, x: string): void;
setTime(parameterIndex: Integer, x: JdbcTime): void;
setTime(parameterIndex: Integer, x: JdbcTime, timeZone: string): void;
setTimestamp(parameterIndex: Integer, x: JdbcTimestamp): void;
setTimestamp(parameterIndex: Integer, x: JdbcTimestamp, timeZone: string): void;
setURL(parameterIndex: Integer, x: string): void;
}
/**
* A JDBC Ref. For documentation of this class, see java.sql.Ref.
*/
export interface JdbcRef {
getBaseTypeName(): string;
getObject(): Object;
setObject(object: Object): void;
}
/**
* A JDBC ResultSet. For documentation of this class, see java.sql.ResultSet.
*/
export interface JdbcResultSet {
absolute(row: Integer): boolean;
afterLast(): void;
beforeFirst(): void;
cancelRowUpdates(): void;
clearWarnings(): void;
close(): void;
deleteRow(): void;
findColumn(columnLabel: string): Integer;
first(): boolean;
getArray(columnIndex: Integer): JdbcArray;
getArray(columnLabel: string): JdbcArray;
getBigDecimal(columnIndex: Integer): BigNumber;
getBigDecimal(columnLabel: string): BigNumber;
getBlob(columnIndex: Integer): JdbcBlob;
getBlob(columnLabel: string): JdbcBlob;
getBoolean(columnIndex: Integer): boolean;
getBoolean(columnLabel: string): boolean;
getByte(columnIndex: Integer): Byte;
getByte(columnLabel: string): Byte;
getBytes(columnIndex: Integer): Byte[];
getBytes(columnLabel: string): Byte[];
getClob(columnIndex: Integer): JdbcClob;
getClob(columnLabel: string): JdbcClob;
getConcurrency(): Integer;
getCursorName(): string;
getDate(columnIndex: Integer): JdbcDate;
getDate(columnIndex: Integer, timeZone: string): JdbcDate;
getDate(columnLabel: string): JdbcDate;
getDate(columnLabel: string, timeZone: string): JdbcDate;
getDouble(columnIndex: Integer): Number;
getDouble(columnLabel: string): Number;
getFetchDirection(): Integer;
getFetchSize(): Integer;
getFloat(columnIndex: Integer): Number;
getFloat(columnLabel: string): Number;
getHoldability(): Integer;
getInt(columnIndex: Integer): Integer;
getInt(columnLabel: string): Integer;
getLong(columnIndex: Integer): Integer;
getLong(columnLabel: string): Integer;
getMetaData(): JdbcResultSetMetaData;
getNClob(columnIndex: Integer): JdbcClob;
getNClob(columnLabel: string): JdbcClob;
getNString(columnIndex: Integer): string;
getNString(columnLabel: string): string;
getObject(columnIndex: Integer): Object;
getObject(columnLabel: string): Object;
getRef(columnIndex: Integer): JdbcRef;
getRef(columnLabel: string): JdbcRef;
getRow(): Integer;
getRowId(columnIndex: Integer): JdbcRowId;
getRowId(columnLabel: string): JdbcRowId;
getSQLXML(columnIndex: Integer): JdbcSQLXML;
getSQLXML(columnLabel: string): JdbcSQLXML;
getShort(columnIndex: Integer): Integer;
getShort(columnLabel: string): Integer;
getStatement(): JdbcStatement;
getString(columnIndex: Integer): string;
getString(columnLabel: string): string;
getTime(columnIndex: Integer): JdbcTime;
getTime(columnIndex: Integer, timeZone: string): JdbcTime;
getTime(columnLabel: string): JdbcTime;
getTime(columnLabel: string, timeZone: string): JdbcTime;
getTimestamp(columnIndex: Integer): JdbcTimestamp;
getTimestamp(columnIndex: Integer, timeZone: string): JdbcTimestamp;
getTimestamp(columnLabel: string): JdbcTimestamp;
getTimestamp(columnLabel: string, timeZone: string): JdbcTimestamp;
getType(): Integer;
getURL(columnIndex: Integer): string;
getURL(columnLabel: string): string;
getWarnings(): String[];
insertRow(): void;
isAfterLast(): boolean;
isBeforeFirst(): boolean;
isClosed(): boolean;
isFirst(): boolean;
isLast(): boolean;
last(): boolean;
moveToCurrentRow(): void;
moveToInsertRow(): void;
next(): boolean;
previous(): boolean;
refreshRow(): void;
relative(rows: Integer): boolean;
rowDeleted(): boolean;
rowInserted(): boolean;
rowUpdated(): boolean;
setFetchDirection(direction: Integer): void;
setFetchSize(rows: Integer): void;
updateArray(columnIndex: Integer, x: JdbcArray): void;
updateArray(columnLabel: string, x: JdbcArray): void;
updateBigDecimal(columnIndex: Integer, x: BigNumber): void;
updateBigDecimal(columnLabel: string, x: BigNumber): void;
updateBlob(columnIndex: Integer, x: JdbcBlob): void;
updateBlob(columnLabel: string, x: JdbcBlob): void;
updateBoolean(columnIndex: Integer, x: boolean): void;
updateBoolean(columnLabel: string, x: boolean): void;
updateByte(columnIndex: Integer, x: Byte): void;
updateByte(columnLabel: string, x: Byte): void;
updateBytes(columnIndex: Integer, x: Byte[]): void;
updateBytes(columnLabel: string, x: Byte[]): void;
updateClob(columnIndex: Integer, x: JdbcClob): void;
updateClob(columnLabel: string, x: JdbcClob): void;
updateDate(columnIndex: Integer, x: JdbcDate): void;
updateDate(columnLabel: string, x: JdbcDate): void;
updateDouble(columnIndex: Integer, x: Number): void;
updateDouble(columnLabel: string, x: Number): void;
updateFloat(columnIndex: Integer, x: Number): void;
updateFloat(columnLabel: string, x: Number): void;
updateInt(columnIndex: Integer, x: Integer): void;
updateInt(columnLabel: string, x: Integer): void;
updateLong(columnIndex: Integer, x: Integer): void;
updateLong(columnLabel: string, x: Integer): void;
updateNClob(columnIndex: Integer, x: JdbcClob): void;
updateNClob(columnLabel: string, x: JdbcClob): void;
updateNString(columnIndex: Integer, x: string): void;
updateNString(columnLabel: string, x: string): void;
updateNull(columnIndex: Integer): void;
updateNull(columnLabel: string): void;
updateObject(columnIndex: Integer, x: Object): void;
updateObject(columnIndex: Integer, x: Object, scaleOrLength: Integer): void;
updateObject(columnLabel: string, x: Object): void;
updateObject(columnLabel: string, x: Object, scaleOrLength: Integer): void;
updateRef(columnIndex: Integer, x: JdbcRef): void;
updateRef(columnLabel: string, x: JdbcRef): void;
updateRow(): void;
updateRowId(columnIndex: Integer, x: JdbcRowId): void;
updateRowId(columnLabel: string, x: JdbcRowId): void;
updateSQLXML(columnIndex: Integer, x: JdbcSQLXML): void;
updateSQLXML(columnLabel: string, x: JdbcSQLXML): void;
updateShort(columnIndex: Integer, x: Integer): void;
updateShort(columnLabel: string, x: Integer): void;
updateString(columnIndex: Integer, x: string): void;
updateString(columnLabel: string, x: string): void;
updateTime(columnIndex: Integer, x: JdbcTime): void;
updateTime(columnLabel: string, x: JdbcTime): void;
updateTimestamp(columnIndex: Integer, x: JdbcTimestamp): void;
updateTimestamp(columnLabel: string, x: JdbcTimestamp): void;
wasNull(): boolean;
}
/**
* A JDBC ResultSetMetaData. For documentation of this class, see
* java.sql.ResultSetMetaData.
*/
export interface JdbcResultSetMetaData {
getCatalogName(column: Integer): string;
getColumnClassName(column: Integer): string;
getColumnCount(): Integer;
getColumnDisplaySize(column: Integer): Integer;
getColumnLabel(column: Integer): string;
getColumnName(column: Integer): string;
getColumnType(column: Integer): Integer;
getColumnTypeName(column: Integer): string;
getPrecision(column: Integer): Integer;
getScale(column: Integer): Integer;
getSchemaName(column: Integer): string;
getTableName(column: Integer): string;
isAutoIncrement(column: Integer): boolean;
isCaseSensitive(column: Integer): boolean;
isCurrency(column: Integer): boolean;
isDefinitelyWritable(column: Integer): boolean;
isNullable(column: Integer): Integer;
isReadOnly(column: Integer): boolean;
isSearchable(column: Integer): boolean;
isSigned(column: Integer): boolean;
isWritable(column: Integer): boolean;
}
/**
* A JDBC RowId. For documentation of this class, see java.sql.RowId.
*/
export interface JdbcRowId {
getBytes(): Byte[];
}
/**
* A JDBC SQLXML. For documentation of this class, see java.sql.SQLXML.
*/
export interface JdbcSQLXML {
free(): void;
getString(): string;
setString(value: string): void;
}
/**
* A JDBC Savepoint. For documentation of this class, see java.sql.Savepoint.
* See also
*
* Savepoint
*/
export interface JdbcSavepoint {
getSavepointId(): Integer;
getSavepointName(): string;
}
/**
* A JDBC Statement. For documentation of this class, see java.sql.Statement.
*/
export interface JdbcStatement {
addBatch(sql: string): void;
cancel(): void;
clearBatch(): void;
clearWarnings(): void;
close(): void;
execute(sql: string): boolean;
execute(sql: string, autoGeneratedKeys: Integer, sql_: string, columnIndexes: Integer[]): boolean;
execute(sql: string, autoGeneratedKeys: Integer, sql_: string, columnIndexes: Integer[]): boolean;
execute(sql: string, columnNames: String[]): boolean;
executeBatch(): Integer[];
executeQuery(sql: string): JdbcResultSet;
executeUpdate(sql: string): Integer;
executeUpdate(sql: string, autoGeneratedKeys: Integer, sql_: string, columnIndexes: Integer[]): Integer;
executeUpdate(sql: string, autoGeneratedKeys: Integer, sql_: string, columnIndexes: Integer[]): Integer;
executeUpdate(sql: string, columnNames: String[]): Integer;
getConnection(): JdbcConnection;
getFetchDirection(): Integer;
getFetchSize(): Integer;
getGeneratedKeys(): JdbcResultSet;
getMaxFieldSize(): Integer;
getMaxRows(): Integer;
getMoreResults(): boolean;
getMoreResults(current: Integer): boolean;
getQueryTimeout(): Integer;
getResultSet(): JdbcResultSet;
getResultSetConcurrency(): Integer;
getResultSetHoldability(): Integer;
getResultSetType(): Integer;
getUpdateCount(): Integer;
getWarnings(): String[];
isClosed(): boolean;
isPoolable(): boolean;
setCursorName(name: string): void;
setEscapeProcessing(enable: boolean): void;
setFetchDirection(direction: Integer): void;
setFetchSize(rows: Integer): void;
setMaxFieldSize(max: Integer): void;
setMaxRows(max: Integer): void;
setPoolable(poolable: boolean): void;
setQueryTimeout(seconds: Integer): void;
}
/**
* A JDBC Struct. For documentation of this class, see java.sql.Struct.
*/
export interface JdbcStruct {
getAttributes(): Object[];
getSQLTypeName(): string;
}
/**
* A JDBC Time. For documentation of this class, see java.sql.Time.
*/
export interface JdbcTime {
after(when: JdbcTime): boolean;
before(when: JdbcTime): boolean;
getHours(): Integer;
getMinutes(): Integer;
getSeconds(): Integer;
getTime(): Integer;
setHours(hours: Integer): void;
setMinutes(minutes: Integer): void;
setSeconds(seconds: Integer): void;
setTime(milliseconds: Integer): void;
}
/**
* A JDBC Timestamp. For documentation of this class, see java.sql.Timestamp.
*/
export interface JdbcTimestamp {
after(when: JdbcTimestamp): boolean;
before(when: JdbcTimestamp): boolean;
getDate(): Integer;
getHours(): Integer;
getMinutes(): Integer;
getMonth(): Integer;
getNanos(): Integer;
getSeconds(): Integer;
getTime(): Integer;
getYear(): Integer;
setDate(date: Integer): void;
setHours(hours: Integer): void;
setMinutes(minutes: Integer): void;
setMonth(month: Integer): void;
setNanos(nanoseconds: Integer): void;
setSeconds(seconds: Integer): void;
setTime(milliseconds: Integer): void;
setYear(year: Integer): void;
}
}
}
declare var Jdbc: GoogleAppsScript.JDBC.Jdbc;
+25
View File
@@ -0,0 +1,25 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
declare module GoogleAppsScript {
export module Language {
/**
* The Language service provides scripts a way to compute automatic translations of text.
*
* // The code below will write "Esta es una prueba" to the log.
* var spanish = LanguageApp.translate('This is a test', 'en', 'es');
* Logger.log(spanish);
*/
export interface LanguageApp {
translate(text: string, sourceLanguage: string, targetLanguage: string): string;
translate(text: string, sourceLanguage: string, targetLanguage: string, advancedArgs: Object): string;
}
}
}
declare var LanguageApp: GoogleAppsScript.Language.LanguageApp;
+60
View File
@@ -0,0 +1,60 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
declare module GoogleAppsScript {
export module Lock {
/**
* A representation of a mutual-exclusion lock.
*
* This class allows scripts to make sure that only one instance of the script is executing a given
* section of code at a time. This is particularly useful for callbacks and triggers, where a user
* action may cause changes to a shared resource and you want to ensure that aren't collisions.
*
* The following examples shows how to use a lock in a form submit handler.
*
* // Generates a unique ticket number for every form submission.
* function onFormSubmit(e) {
* var targetCell = e.range.offset(0, e.range.getNumColumns(), 1, 1);
*
* // Get a script lock, because we're about to modify a shared resource.
* var lock = LockService.getScriptLock();
* // Wait for up to 30 seconds for other processes to finish.
* lock.waitLock(30000);
*
* var ticketNumber = Number(ScriptProperties.getProperty('lastTicketNumber')) + 1;
* ScriptProperties.setProperty('lastTicketNumber', ticketNumber);
*
* // Release the lock so that other processes can continue.
* lock.releaseLock();
*
* targetCell.setValue(ticketNumber);
* }
*
* lastTicketNumber
* ScriptProperties
*/
export interface Lock {
hasLock(): boolean;
releaseLock(): void;
tryLock(timeoutInMillis: Integer): boolean;
waitLock(timeoutInMillis: Integer): void;
}
/**
* Prevents concurrent access to sections of code. This can be useful when you have multiple users
* or processes modifying a shared resource and want to prevent collisions.
*/
export interface LockService {
getDocumentLock(): Lock;
getScriptLock(): Lock;
getUserLock(): Lock;
}
}
}
declare var LockService: GoogleAppsScript.Lock.LockService;
+31
View File
@@ -0,0 +1,31 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
declare module GoogleAppsScript {
export module Mail {
/**
* Sends email.
*
* This service allows users to send emails with complete control over the
* content of the email. Unlike GmailApp, MailApp's sole purpose is sending email. MailApp cannot
* access a user's Gmail inbox.
*
* Changes to scripts written using GmailApp are more likely to trigger a re-authorization
* request from a user than MailApp scripts.
*/
export interface MailApp {
getRemainingDailyQuota(): Integer;
sendEmail(message: Object): void;
sendEmail(recipient: string, subject: string, body: string): void;
sendEmail(recipient: string, subject: string, body: string, options: Object): void;
sendEmail(to: string, replyTo: string, subject: string, body: string): void;
}
}
}
declare var MailApp: GoogleAppsScript.Mail.MailApp;
+319
View File
@@ -0,0 +1,319 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
/// <reference path="google-apps-script.base.d.ts" />
declare module GoogleAppsScript {
export module Maps {
/**
* An enum representing the types of restrictions to avoid when finding directions.
*/
export enum Avoid { TOLLS, HIGHWAYS }
/**
* An enum representing the named colors available to use in map images.
*/
export enum Color { BLACK, BROWN, GREEN, PURPLE, YELLOW, BLUE, GRAY, ORANGE, RED, WHITE }
/**
* Allows for the retrieval of directions between locations.
*
* The example below shows how you can use this class to get the directions from Times Square to
* Central Park, stopping first at Lincoln Center, plot the locations and path on a map,
* and send the map in an email.
*
* // Get the directions.
* var directions = Maps.newDirectionFinder()
* .setOrigin('Times Square, New York, NY')
* .addWaypoint('Lincoln Center, New York, NY')
* .setDestination('Central Park, New York, NY')
* .setMode(Maps.DirectionFinder.Mode.DRIVING)
* .getDirections();
* var route = directions.routes[0];
*
* // Set up marker styles.
* var markerSize = Maps.StaticMap.MarkerSize.MID;
* var markerColor = Maps.StaticMap.Color.GREEN
* var markerLetterCode = 'A'.charCodeAt();
*
* // Add markers to the map.
* var map = Maps.newStaticMap();
* for (var i = 0; i < route.legs.length; i++) {
* var leg = route.legs[i];
* if (i == 0) {
* // Add a marker for the start location of the first leg only.
* map.setMarkerStyle(markerSize, markerColor, String.fromCharCode(markerLetterCode));
* map.addMarker(leg.start_location.lat, leg.start_location.lng);
* markerLetterCode++;
* }
* map.setMarkerStyle(markerSize, markerColor, String.fromCharCode(markerLetterCode));
* map.addMarker(leg.end_location.lat, leg.end_location.lng);
* markerLetterCode++;
* }
*
* // Add a path for the entire route.
* map.addPath(route.overview_polyline.points);
*
* // Send the map in an email.
* var toAddress = Session.getActiveUser().getEmail();
* MailApp.sendEmail(toAddress, 'Directions', 'Please open: ' + map.getMapUrl(), {
* htmlBody: 'See below.<br/><img src="cid:mapImage">',
* inlineImages: {
* mapImage: Utilities.newBlob(map.getMapImage(), 'image/png')
* }
* });
*
* See also
*
* Google Directions API
*/
export interface DirectionFinder {
addWaypoint(latitude: Number, longitude: Number): DirectionFinder;
addWaypoint(address: string): DirectionFinder;
clearWaypoints(): DirectionFinder;
getDirections(): Object;
setAlternatives(useAlternatives: boolean): DirectionFinder;
setArrive(time: Date): DirectionFinder;
setAvoid(avoid: string): DirectionFinder;
setDepart(time: Date): DirectionFinder;
setDestination(latitude: Number, longitude: Number): DirectionFinder;
setDestination(address: string): DirectionFinder;
setLanguage(language: string): DirectionFinder;
setMode(mode: string): DirectionFinder;
setOptimizeWaypoints(optimizeOrder: boolean): DirectionFinder;
setOrigin(latitude: Number, longitude: Number): DirectionFinder;
setOrigin(address: string): DirectionFinder;
setRegion(region: string): DirectionFinder;
}
/**
* A collection of enums used by DirectionFinder.
*/
export interface DirectionFinderEnums {
Avoid: Avoid
Mode: Mode
}
/**
* Allows for the sampling of elevations at particular locations.
*
* The example below shows how you can use this class to determine the highest point along the route
* from Denver to Grand Junction in Colorado, plot it on a map, and save the map to Google Drive.
*
* // Get directions from Denver to Grand Junction.
* var directions = Maps.newDirectionFinder()
* .setOrigin('Denver, CO')
* .setDestination('Grand Junction, CO')
* .setMode(Maps.DirectionFinder.Mode.DRIVING)
* .getDirections();
* var route = directions.routes[0];
*
* // Get elevation samples along the route.
* var numberOfSamples = 30;
* var response = Maps.newElevationSampler()
* .samplePath(route.overview_polyline.points, numberOfSamples)
*
* // Determine highest point.
* var maxElevation = Number.MIN_VALUE;
* var highestPoint = null;
* for (var i = 0; i < response.results.length; i++) {
* var sample = response.results[i];
* if (sample.elevation > maxElevation) {
* maxElevation = sample.elevation;
* highestPoint = sample.location;
* }
* }
*
* // Add the path and marker to a map.
* var map = Maps.newStaticMap()
* .addPath(route.overview_polyline.points)
* .addMarker(highestPoint.lat, highestPoint.lng);
*
* // Save the map to your drive
* DocsList.createFile(Utilities.newBlob(map.getMapImage(), 'image/png', 'map.png'));
*
* See also
*
* Google Elevation API
*/
export interface ElevationSampler {
sampleLocation(latitude: Number, longitude: Number): Object;
sampleLocations(points: Number[]): Object;
sampleLocations(encodedPolyline: string): Object;
samplePath(points: Number[], numSamples: Integer): Object;
samplePath(encodedPolyline: string, numSamples: Integer): Object;
}
/**
* An enum representing the format of the map image.
* See also
*
* Google Static Maps API
*/
export enum Format { PNG, PNG8, PNG32, GIF, JPG, JPG_BASELINE }
/**
* Allows for the conversion between an address and geographical coordinates.
*
* The example below shows how you can use this class find the top nine matches for the location
* "Main St" in Colorado, add them to a map, and then embed it in a new Google Doc.
*
* // Find the best matches for "Main St" in Colorado.
* var response = Maps.newGeocoder()
* // The latitudes and longitudes of southwest and northeast corners of Colorado, respectively.
* .setBounds(36.998166, -109.045486, 41.001666,-102.052002)
* .geocode('Main St');
*
* // Create a Google Doc and map.
* var doc = DocumentApp.create('My Map');
* var map = Maps.newStaticMap();
*
* // Add each result to the map and doc.
* for (var i = 0; i < response.results.length && i < 9; i++) {
* var result = response.results[i];
* map.setMarkerStyle(null, null, i + 1);
* map.addMarker(result.geometry.location.lat, result.geometry.location.lng);
* doc.appendListItem(result.formatted_address);
* }
*
* // Add the finished map to the doc.
* doc.appendImage(Utilities.newBlob(map.getMapImage(), 'image/png'));
*
* See also
*
* Google Geocoding API
*/
export interface Geocoder {
geocode(address: string): Object;
reverseGeocode(latitude: Number, longitude: Number): Object;
reverseGeocode(swLatitude: Number, swLongitude: Number, neLatitude: Number, neLongitude: Number): Object;
setBounds(swLatitude: Number, swLongitude: Number, neLatitude: Number, neLongitude: Number): Geocoder;
setLanguage(language: string): Geocoder;
setRegion(region: string): Geocoder;
}
/**
* Allows for direction finding, geocoding, elevation sampling and the creation of static map
* images.
*/
export interface Maps {
DirectionFinder: DirectionFinderEnums
StaticMap: StaticMapEnums
decodePolyline(polyline: string): Number[];
encodePolyline(points: Number[]): string;
newDirectionFinder(): DirectionFinder;
newElevationSampler(): ElevationSampler;
newGeocoder(): Geocoder;
newStaticMap(): StaticMap;
setAuthentication(clientId: string, signingKey: string): void;
}
/**
* An enum representing the size of a marker added to a map.
* See also
*
* Google Static Maps API
*/
export enum MarkerSize { TINY, MID, SMALL }
/**
* An enum representing the mode of travel to use when finding directions.
*/
export enum Mode { DRIVING, WALKING, BICYCLING, TRANSIT }
/**
* Allows for the creation and decoration of static map images.
*
* The example below shows how you can use this class to create a map of New York City's Theatre
* District, including nearby train stations, and display it in a simple web app.
*
* function doGet(event) {
* // Create a map centered on Times Square.
* var map = Maps.newStaticMap()
* .setSize(600, 600)
* .setCenter('Times Square, New York, NY');
*
* // Add markers for the nearbye train stations.
* map.setMarkerStyle(Maps.StaticMap.MarkerSize.MID, Maps.StaticMap.Color.RED, 'T');
* map.addMarker('Grand Central Station, New York, NY');
* map.addMarker('Penn Station, New York, NY');
*
* // Show the boundaries of the Theatre District.
* var corners = [
* '8th Ave & 53rd St, New York, NY',
* '6th Ave & 53rd St, New York, NY',
* '6th Ave & 40th St, New York, NY',
* '8th Ave & 40th St, New York, NY'
* ];
* map.setPathStyle(4, Maps.StaticMap.Color.BLACK, Maps.StaticMap.Color.BLUE);
* map.beginPath();
* for (var i = 0; i < corners.length; i++) {
* map.addAddress(corners[i]);
* }
*
* // Create the user interface and add the map image.
* var app = UiApp.createApplication().setTitle('NYC Theatre District');
* app.add(app.createImage(map.getMapUrl()));
* return app;
* }
*
* See also
*
* Google Static Maps API
*/
export interface StaticMap {
addAddress(address: string): StaticMap;
addMarker(latitude: Number, longitude: Number): StaticMap;
addMarker(address: string): StaticMap;
addPath(points: Number[]): StaticMap;
addPath(polyline: string): StaticMap;
addPoint(latitude: Number, longitude: Number): StaticMap;
addVisible(latitude: Number, longitude: Number): StaticMap;
addVisible(address: string): StaticMap;
beginPath(): StaticMap;
clearMarkers(): StaticMap;
clearPaths(): StaticMap;
clearVisibles(): StaticMap;
endPath(): StaticMap;
getAs(contentType: string): Base.Blob;
getBlob(): Base.Blob;
getMapImage(): Byte[];
getMapUrl(): string;
setCenter(latitude: Number, longitude: Number): StaticMap;
setCenter(address: string): StaticMap;
setCustomMarkerStyle(imageUrl: string, useShadow: boolean): StaticMap;
setFormat(format: string): StaticMap;
setLanguage(language: string): StaticMap;
setMapType(mapType: string): StaticMap;
setMarkerStyle(size: string, color: string, label: string): StaticMap;
setMobile(useMobileTiles: boolean): StaticMap;
setPathStyle(weight: Integer, color: string, fillColor: string): StaticMap;
setSize(width: Integer, height: Integer): StaticMap;
setZoom(zoom: Integer): StaticMap;
}
/**
* A collection of enums used by StaticMap.
*/
export interface StaticMapEnums {
Color: Color
Format: Format
MarkerSize: MarkerSize
Type: Type
}
/**
* An enum representing the type of map to render.
* See also
*
* Google Static Maps API
*/
export enum Type { ROADMAP, SATELLITE, TERRAIN, HYBRID }
}
}
declare var Maps: GoogleAppsScript.Maps.Maps;
+228
View File
@@ -0,0 +1,228 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
declare module GoogleAppsScript {
export module Optimization {
/**
* Object storing a linear constraint of the form lowerBound ≤ Sum(a(i) x(i)) ≤ upperBound
* where lowerBound and upperBound are constants, a(i) are constant
* coefficients and x(i) are variables (unknowns).
*
* The example below creates one variable x with values between 0 and 5 and
* creates the constraint 0 ≤ 2 * x ≤ 5. This is done by first creating a constraint with
* the lower bound 5 and upper bound 5. Then the coefficient for variable x
* in this constraint is set to 2.
*
* var engine = LinearOptimizationService.createEngine();
* // Create a variable so we can add it to the constraint
* engine.addVariable('x', 0, 5);
* // Create a linear constraint with the bounds 0 and 10
* var constraint = engine.addConstraint(0, 10);
* // Set the coefficient of the variable in the constraint. The constraint is now:
* // 0 <= 2 * x <= 5
* constraint.setCoefficient('x', 2);
*/
export interface LinearOptimizationConstraint {
setCoefficient(variableName: string, coefficient: Number): LinearOptimizationConstraint;
}
/**
* The engine used to model and solve a linear program. The example below solves the following
* linear program:
*
* Two variables, x and y:
*
* 0 ≤ x ≤ 10
*
* 0 ≤ y ≤ 5
*
* Constraints:
*
* 0 ≤ 2 * x + 5 * y ≤ 10
*
* 0 ≤ 10 * x + 3 * y ≤ 20
*
* Objective:
* Maximize x + y
*
* var engine = LinearOptimizationService.createEngine();
*
* // Add variables, constraints and define the objective with addVariable(), addConstraint(), etc
* // Add two variables, 0 <= x <= 10 and 0 <= y <= 5
* engine.addVariable('x', 0, 10);
* engine.addVariable('y', 0, 5);
*
* // Create the constraint: 0 <= 2 * x + 5 * y <= 10
* var constraint = engine.addConstraint(0, 10);
* constraint.setCoefficient('x', 2);
* constraint.setCoefficient('y', 5);
*
* // Create the constraint: 0 <= 10 * x + 3 * y <= 20
* var constraint = engine.addConstraint(0, 20);
* constraint.setCoefficient('x', 10);
* constraint.setCoefficient('y', 3);
*
* // Set the objective to be x + y
* engine.setObjectiveCoefficient('x', 1);
* engine.setObjectiveCoefficient('y', 1);
*
* // Engine should maximize the objective
* engine.setMaximization();
*
* // Solve the linear program
* var solution = engine.solve();
* if (!solution.isValid()) {
* Logger.log('No solution ' + solution.getStatus());
* } else {
* Logger.log('Value of x: ' + solution.getVariableValue('x'));
* Logger.log('Value of y: ' + solution.getVariableValue('y'));
* }
*/
export interface LinearOptimizationEngine {
addConstraint(lowerBound: Number, upperBound: Number): LinearOptimizationConstraint;
addVariable(name: string, lowerBound: Number, upperBound: Number): LinearOptimizationEngine;
addVariable(name: string, lowerBound: Number, upperBound: Number, type: VariableType): LinearOptimizationEngine;
setMaximization(): LinearOptimizationEngine;
setMinimization(): LinearOptimizationEngine;
setObjectiveCoefficient(variableName: string, coefficient: Number): LinearOptimizationEngine;
solve(): LinearOptimizationSolution;
solve(seconds: Number): LinearOptimizationSolution;
}
/**
* The linear optimization service, used to model and solve linear and mixed-integer linear
* programs. The example below solves the following linear program:
*
* Two variables, x and y:
*
* 0 ≤ x ≤ 10
*
* 0 ≤ y ≤ 5
*
* Constraints:
*
* 0 ≤ 2 * x + 5 * y ≤ 10
*
* 0 ≤ 10 * x + 3 * y ≤ 20
*
* Objective:
* Maximize x + y
*
* var engine = LinearOptimizationService.createEngine();
*
* // Add variables, constraints and define the objective using addVariable(), addConstraint(), etc.
* // Add two variables, 0 <= x <= 10 and 0 <= y <= 5
* engine.addVariable('x', 0, 10);
* engine.addVariable('y', 0, 5);
*
* // Create the constraint: 0 <= 2 * x + 5 * y <= 10
* var constraint = engine.addConstraint(0, 10);
* constraint.setCoefficient('x', 2);
* constraint.setCoefficient('y', 5);
*
* // Create the constraint: 0 <= 10 * x + 3 * y <= 20
* var constraint = engine.addConstraint(0, 20);
* constraint.setCoefficient('x', 10);
* constraint.setCoefficient('y', 3);
*
* // Set the objective to be x + y
* engine.setObjectiveCoefficient('x', 1);
* engine.setObjectiveCoefficient('y', 1);
*
* // Engine should maximize the objective.
* engine.setMaximization();
*
* // Solve the linear program
* var solution = engine.solve();
* if (!solution.isValid()) {
* Logger.log('No solution ' + solution.getStatus());
* } else {
* Logger.log('Value of x: ' + solution.getVariableValue('x'));
* Logger.log('Value of y: ' + solution.getVariableValue('y'));
* }
*/
export interface LinearOptimizationService {
Status: Status
VariableType: VariableType
createEngine(): LinearOptimizationEngine;
}
/**
* The solution of a linear program. The example below solves the following linear program:
*
* Two variables, x and y:
*
* 0 ≤ x ≤ 10
*
* 0 ≤ y ≤ 5
*
* Constraints:
*
* 0 ≤ 2 * x + 5 * y ≤ 10
*
* 0 ≤ 10 * x + 3 * y ≤ 20
*
* Objective:
* Maximize x + y
*
* var engine = LinearOptimizationService.createEngine();
*
* // Add variables, constraints and define the objective with addVariable(), addConstraint(), etc.
* // Add two variables, 0 <= x <= 10 and 0 <= y <= 5
* engine.addVariable('x', 0, 10);
* engine.addVariable('y', 0, 5);
*
* // Create the constraint: 0 <= 2 * x + 5 * y <= 10
* var constraint = engine.addConstraint(0, 10);
* constraint.setCoefficient('x', 2);
* constraint.setCoefficient('y', 5);
*
* // Create the constraint: 0 <= 10 * x + 3 * y <= 20
* var constraint = engine.addConstraint(0, 20);
* constraint.setCoefficient('x', 10);
* constraint.setCoefficient('y', 3);
*
* // Set the objective to be x + y
* engine.setObjectiveCoefficient('x', 1);
* engine.setObjectiveCoefficient('y', 1);
*
* // Engine should maximize the objective
* engine.setMaximization();
*
* // Solve the linear program
* var solution = engine.solve();
* if (!solution.isValid()) {
* Logger.log('No solution ' + solution.getStatus());
* } else {
* Logger.log('Objective value: ' + solution.getObjectiveValue());
* Logger.log('Value of x: ' + solution.getVariableValue('x'));
* Logger.log('Value of y: ' + solution.getVariableValue('y'));
* }
*/
export interface LinearOptimizationSolution {
getObjectiveValue(): Number;
getStatus(): Status;
getVariableValue(variableName: string): Number;
isValid(): boolean;
}
/**
* Status of the solution. Before solving a problem the status will be NOT_SOLVED;
* afterwards it will take any of the other values depending if it successfully found a solution and
* if the solution is optimal.
*/
export enum Status { OPTIMAL, FEASIBLE, INFEASIBLE, UNBOUNDED, ABNORMAL, MODEL_INVALID, NOT_SOLVED }
/**
* Type of variables created by the engine.
*/
export enum VariableType { INTEGER, CONTINUOUS }
}
}
declare var LinearOptimizationService: GoogleAppsScript.Optimization.LinearOptimizationService;
+91
View File
@@ -0,0 +1,91 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
declare module GoogleAppsScript {
export module Properties {
/**
* The properties object acts as the interface to access user, document, or script properties.
* The specific property type depends on which of the three methods of
* PropertiesService the script called:
* PropertiesService.getDocumentProperties(),
* PropertiesService.getUserProperties(), or
* PropertiesService.getScriptProperties(). Properties cannot be shared between scripts. For
* more information about property types, see the
* guide to the Properties service.
*/
export interface Properties {
deleteAllProperties(): Properties;
deleteProperty(key: string): Properties;
getKeys(): String[];
getProperties(): Object;
getProperty(key: string): string;
setProperties(properties: Object): Properties;
setProperties(properties: Object, deleteAllOthers: boolean): Properties;
setProperty(key: string, value: string): Properties;
}
/**
* Allows scripts to store simple data in key-value pairs scoped to one script, one user of a
* script, or one document in which an add-on is used. Properties cannot be shared between scripts.
* For more information about when to use each type of property, see the
* guide to the Properties service.
*
* // Sets three properties of different types.
* var documentProperties = PropertiesService.getDocumentProperties();
* var scriptProperties = PropertiesService.getScriptProperties();
* var userProperties = PropertiesService.getUserProperties();
*
* documentProperties.setProperty('DAYS_TO_FETCH', '5');
* scriptProperties.setProperty('SERVER_URL', 'http://www.example.com/MyWeatherService/');
* userProperties.setProperty('DISPLAY_UNITS', 'metric');
*/
export interface PropertiesService {
getDocumentProperties(): Properties;
getScriptProperties(): Properties;
getUserProperties(): Properties;
}
/**
*
* Deprecated. This class is deprecated and should not be used in new scripts.
* Script Properties are key-value pairs stored by a script in a persistent store. Script Properties
* are scoped per script, regardless of which user runs the script.
*/
export interface ScriptProperties {
deleteAllProperties(): ScriptProperties;
deleteProperty(key: string): ScriptProperties;
getKeys(): String[];
getProperties(): Object;
getProperty(key: string): string;
setProperties(properties: Object): ScriptProperties;
setProperties(properties: Object, deleteAllOthers: boolean): ScriptProperties;
setProperty(key: string, value: string): ScriptProperties;
}
/**
*
* Deprecated. This class is deprecated and should not be used in new scripts.
* User Properties are key-value pairs unique to a user. User Properties are scoped per user; any
* script running under the identity of a user can access User Properties for that user only.
*/
export interface UserProperties {
deleteAllProperties(): UserProperties;
deleteProperty(key: string): UserProperties;
getKeys(): String[];
getProperties(): Object;
getProperty(key: string): string;
setProperties(properties: Object): UserProperties;
setProperties(properties: Object, deleteAllOthers: boolean): UserProperties;
setProperty(key: string, value: string): UserProperties;
}
}
}
declare var PropertiesService: GoogleAppsScript.Properties.PropertiesService;
declare var ScriptProperties: GoogleAppsScript.Properties.ScriptProperties;
declare var UserProperties: GoogleAppsScript.Properties.UserProperties;
+215
View File
@@ -0,0 +1,215 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
/// <reference path="google-apps-script.base.d.ts" />
/// <reference path="google-apps-script.document.d.ts" />
/// <reference path="google-apps-script.forms.d.ts" />
/// <reference path="google-apps-script.spreadsheet.d.ts" />
declare module GoogleAppsScript {
export module Script {
/**
* An enumeration that identifies which categories of authorized services Apps Script
* is able to execute through a triggered function. These values are exposed in
* triggered functions as the authMode
* property of the event parameter, e. For
* more information, see the
* guide to the authorization lifecycle for add-ons.
*
* function onOpen(e) {
* var menu = SpreadsheetApp.getUi().createAddonMenu();
* if (e && e.authMode == ScriptApp.AuthMode.NONE) {
* // Add a normal menu item (works in all authorization modes).
* menu.addItem('Start workflow', 'startWorkflow');
* } else {
* // Add a menu item based on properties (doesn't work in AuthMode.NONE).
* var properties = PropertiesService.getDocumentProperties();
* var workflowStarted = properties.getProperty('workflowStarted');
* if (workflowStarted) {
* menu.addItem('Check workflow status', 'checkWorkflow');
* } else {
* menu.addItem('Start workflow', 'startWorkflow');
* }
* // Record analytics.
* UrlFetchApp.fetch('http://www.example.com/analytics?event=open');
* }
* menu.addToUi();
* }
*/
export enum AuthMode { NONE, CUSTOM_FUNCTION, LIMITED, FULL }
/**
* An object used to determine whether the user needs to authorize this script to use
* one or more services, and to provide the URL for an authorization dialog. If the script
* is published as an add-on that uses
* installable triggers, this information
* can be used to control access to sections of code for which the user lacks the necessary
* authorization. Alternately, the add-on can ask the user to open the URL for the
* authorization dialog to resolve the problem.
*
* This object is returned by
* ScriptApp.getAuthorizationInfo(authMode). In almost all cases,
* scripts should call
* ScriptApp.getAuthorizationInfo(ScriptApp.AuthMode.FULL), since no other
* authorization mode requires that users grant authorization.
*/
export interface AuthorizationInfo {
getAuthorizationStatus(): AuthorizationStatus;
getAuthorizationUrl(): string;
}
/**
* An enumeration denoting the authorization status of a script.
*/
export enum AuthorizationStatus { REQUIRED, NOT_REQUIRED }
/**
* A builder for clock triggers.
*/
export interface ClockTriggerBuilder {
after(durationMilliseconds: Integer): ClockTriggerBuilder;
at(date: Date): ClockTriggerBuilder;
atDate(year: Integer, month: Integer, day: Integer): ClockTriggerBuilder;
atHour(hour: Integer): ClockTriggerBuilder;
create(): Trigger;
everyDays(n: Integer): ClockTriggerBuilder;
everyHours(n: Integer): ClockTriggerBuilder;
everyMinutes(n: Integer): ClockTriggerBuilder;
everyWeeks(n: Integer): ClockTriggerBuilder;
inTimezone(timezone: string): ClockTriggerBuilder;
nearMinute(minute: Integer): ClockTriggerBuilder;
onMonthDay(day: Integer): ClockTriggerBuilder;
onWeekDay(day: Base.Weekday): ClockTriggerBuilder;
}
/**
* A builder for document triggers.
*/
export interface DocumentTriggerBuilder {
create(): Trigger;
onOpen(): DocumentTriggerBuilder;
}
/**
* An enumeration denoting the type of triggered event.
*/
export enum EventType { CLOCK, ON_OPEN, ON_EDIT, ON_FORM_SUBMIT, ON_CHANGE }
/**
* A builder for form triggers.
*/
export interface FormTriggerBuilder {
create(): Trigger;
onFormSubmit(): FormTriggerBuilder;
onOpen(): FormTriggerBuilder;
}
/**
* An enumeration that indicates how the script came to be installed as an add-on for the
* current user.
*/
export enum InstallationSource { APPS_MARKETPLACE_DOMAIN_ADD_ON, NONE, WEB_STORE_ADD_ON }
/**
* Access and manipulate script publishing and triggers. This class allows users to create script
* triggers and control publishing the script as a service.
*/
export interface ScriptApp {
AuthMode: AuthMode
AuthorizationStatus: AuthorizationStatus
EventType: EventType
InstallationSource: InstallationSource
TriggerSource: TriggerSource
WeekDay: Base.Weekday
deleteTrigger(trigger: Trigger): void;
getAuthorizationInfo(authMode: AuthMode): AuthorizationInfo;
getInstallationSource(): InstallationSource;
getOAuthToken(): string;
getProjectKey(): string;
getProjectTriggers(): Trigger[];
getService(): Service;
getUserTriggers(document: Document.Document): Trigger[];
getUserTriggers(form: Forms.Form): Trigger[];
getUserTriggers(spreadsheet: Spreadsheet.Spreadsheet): Trigger[];
invalidateAuth(): void;
newStateToken(): StateTokenBuilder;
newTrigger(functionName: string): TriggerBuilder;
getScriptTriggers(): Trigger[];
}
/**
*
*/
export enum Service { MYSELF, DOMAIN, ALL }
/**
* Builder for spreadsheet triggers.
*/
export interface SpreadsheetTriggerBuilder {
create(): Trigger;
onChange(): SpreadsheetTriggerBuilder;
onEdit(): SpreadsheetTriggerBuilder;
onFormSubmit(): SpreadsheetTriggerBuilder;
onOpen(): SpreadsheetTriggerBuilder;
}
/**
* Allows scripts to create state tokens that can be used in callback APIs (like OAuth flows).
*
* // Reusable function to generate a callback URL, assuming the script has been published as a
* // web app (necessary to obtain the URL programmatically). If the script has not been published
* // as a web app, set `var url` in the first line to the URL of your script project (which
* // cannot be obtained programmatically).
* function getCallbackURL(callbackFunction){
* var url = ScriptApp.getService().getUrl(); // Ends in /exec (for a web app)
* url = url.slice(0, -4) + 'usercallback?state='; // Change /exec to /usercallback
* var stateToken = ScriptApp.newStateToken()
* .withMethod(callbackFunction)
* .withTimeout(120)
* .createToken();
* return url + stateToken;
* }
*/
export interface StateTokenBuilder {
createToken(): string;
withArgument(name: string, value: string): StateTokenBuilder;
withMethod(method: string): StateTokenBuilder;
withTimeout(seconds: Integer): StateTokenBuilder;
}
/**
* A script trigger.
*/
export interface Trigger {
getEventType(): EventType;
getHandlerFunction(): string;
getTriggerSource(): TriggerSource;
getTriggerSourceId(): string;
getUniqueId(): string;
}
/**
* A generic builder for script triggers.
*/
export interface TriggerBuilder {
forDocument(document: Document.Document): DocumentTriggerBuilder;
forDocument(key: string): DocumentTriggerBuilder;
forForm(form: Forms.Form): FormTriggerBuilder;
forForm(key: string): FormTriggerBuilder;
forSpreadsheet(sheet: Spreadsheet.Spreadsheet): SpreadsheetTriggerBuilder;
forSpreadsheet(key: string): SpreadsheetTriggerBuilder;
timeBased(): ClockTriggerBuilder;
}
/**
* An enumeration denoting the source of the event that causes the trigger to fire.
*/
export enum TriggerSource { SPREADSHEETS, CLOCK, FORMS, DOCUMENTS }
}
}
declare var ScriptApp: GoogleAppsScript.Script.ScriptApp;
+241
View File
@@ -0,0 +1,241 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
/// <reference path="google-apps-script.base.d.ts" />
declare module GoogleAppsScript {
export module Sites {
/**
* A Sites Attachment such as a file attached to a page.
*
* Note that an Attachment is a Blob and can be used anywhere Blob input is expected.
*
* var filesPage = SitesApp.getSite('example.com', 'mysite').getChildByName("files");
* var attachments = filesPage.getAttachments();
*
* // DocsList.createFile accepts a blob input. Since an Attachment is just a blob, we can
* // just pass it directly to that method
* var file = DocsList.createFile(attachments[0]);
*/
export interface Attachment {
deleteAttachment(): void;
getAs(contentType: string): Base.Blob;
getAttachmentType(): AttachmentType;
getBlob(): Base.Blob;
getContentType(): string;
getDatePublished(): Date;
getDescription(): string;
getLastUpdated(): Date;
getParent(): Page;
getTitle(): string;
getUrl(): string;
setContentType(contentType: string): Attachment;
setDescription(description: string): Attachment;
setFrom(blob: Base.BlobSource): Attachment;
setParent(parent: Page): Attachment;
setTitle(title: string): Attachment;
setUrl(url: string): Attachment;
}
/**
* A typesafe enum for sites attachment type.
*/
export enum AttachmentType { WEB, HOSTED }
/**
* A Sites Column - a column from a Sites List page.
*/
export interface Column {
deleteColumn(): void;
getName(): string;
getParent(): Page;
setName(name: string): Column;
}
/**
* A Comment attached to any Sites page.
*/
export interface Comment {
deleteComment(): void;
getAuthorEmail(): string;
getAuthorName(): string;
getContent(): string;
getDatePublished(): Date;
getLastUpdated(): Date;
getParent(): Page;
setContent(content: string): Comment;
setParent(parent: Page): Comment;
}
/**
* A Sites ListItem - a list element from a Sites List page.
*/
export interface ListItem {
deleteListItem(): void;
getDatePublished(): Date;
getLastUpdated(): Date;
getParent(): Page;
getValueByIndex(index: Integer): string;
getValueByName(name: string): string;
setParent(parent: Page): ListItem;
setValueByIndex(index: Integer, value: string): ListItem;
setValueByName(name: string, value: string): ListItem;
}
/**
* A Page on a Google Site.
*/
export interface Page {
addColumn(name: string): Column;
addHostedAttachment(blob: Base.BlobSource): Attachment;
addHostedAttachment(blob: Base.BlobSource, description: string): Attachment;
addListItem(values: String[]): ListItem;
addWebAttachment(title: string, description: string, url: string): Attachment;
createAnnouncement(title: string, html: string): Page;
createAnnouncement(title: string, html: string, asDraft: boolean): Page;
createAnnouncementsPage(title: string, name: string, html: string): Page;
createFileCabinetPage(title: string, name: string, html: string): Page;
createListPage(title: string, name: string, html: string, columnNames: String[]): Page;
createPageFromTemplate(title: string, name: string, template: Page): Page;
createWebPage(title: string, name: string, html: string): Page;
deletePage(): void;
getAllDescendants(): Page[];
getAllDescendants(options: Object): Page[];
getAnnouncements(): Page[];
getAnnouncements(optOptions: Object): Page[];
getAttachments(): Attachment[];
getAttachments(optOptions: Object): Attachment[];
getAuthors(): String[];
getChildByName(name: string): Page;
getChildren(): Page[];
getChildren(options: Object): Page[];
getColumns(): Column[];
getComments(): Comment[];
getComments(optOptions: Object): Comment[];
getDatePublished(): Date;
getHtmlContent(): string;
getIsDraft(): boolean;
getLastEdited(): Date;
getLastUpdated(): Date;
getListItems(): ListItem[];
getListItems(optOptions: Object): ListItem[];
getName(): string;
getPageType(): PageType;
getParent(): Page;
getTextContent(): string;
getTitle(): string;
getUrl(): string;
isDeleted(): boolean;
isTemplate(): boolean;
publishAsTemplate(name: string): Page;
search(query: string): Page[];
search(query: string, options: Object): Page[];
setHtmlContent(html: string): Page;
setIsDraft(draft: boolean): Page;
setName(name: string): Page;
setParent(parent: Page): Page;
setTitle(title: string): Page;
addComment(content: string): Comment;
getPageName(): string;
getSelfLink(): string;
}
/**
* A typesafe enum for sites page type.
*/
export enum PageType { WEB_PAGE, LIST_PAGE, ANNOUNCEMENT, ANNOUNCEMENTS_PAGE, FILE_CABINET_PAGE }
/**
* An object representing a Google Site.
*/
export interface Site {
addEditor(emailAddress: string): Site;
addEditor(user: Base.User): Site;
addEditors(emailAddresses: String[]): Site;
addOwner(email: string): Site;
addOwner(user: Base.User): Site;
addViewer(emailAddress: string): Site;
addViewer(user: Base.User): Site;
addViewers(emailAddresses: String[]): Site;
createAnnouncementsPage(title: string, name: string, html: string): Page;
createFileCabinetPage(title: string, name: string, html: string): Page;
createListPage(title: string, name: string, html: string, columnNames: String[]): Page;
createPageFromTemplate(title: string, name: string, template: Page): Page;
createWebPage(title: string, name: string, html: string): Page;
getAllDescendants(): Page[];
getAllDescendants(options: Object): Page[];
getChildByName(name: string): Page;
getChildren(): Page[];
getChildren(options: Object): Page[];
getEditors(): Base.User[];
getName(): string;
getOwners(): Base.User[];
getSummary(): string;
getTemplates(): Page[];
getTheme(): string;
getTitle(): string;
getUrl(): string;
getViewers(): Base.User[];
removeEditor(emailAddress: string): Site;
removeEditor(user: Base.User): Site;
removeOwner(email: string): Site;
removeOwner(user: Base.User): Site;
removeViewer(emailAddress: string): Site;
removeViewer(user: Base.User): Site;
search(query: string): Page[];
search(query: string, options: Object): Page[];
setSummary(summary: string): Site;
setTheme(theme: string): Site;
setTitle(title: string): Site;
addCollaborator(email: string): Site;
addCollaborator(user: Base.User): Site;
createAnnouncement(title: string, html: string, parent: Page): Page;
createComment(inReplyTo: string, html: string, parent: Page): Comment;
createListItem(html: string, columnNames: String[], values: String[], parent: Page): ListItem;
createWebAttachment(title: string, url: string, parent: Page): Attachment;
deleteSite(): void;
getAnnouncements(): Page[];
getAnnouncementsPages(): Page[];
getAttachments(): Attachment[];
getCollaborators(): Base.User[];
getComments(): Comment[];
getFileCabinetPages(): Page[];
getListItems(): ListItem[];
getListPages(): Page[];
getSelfLink(): string;
getSiteName(): string;
getWebAttachments(): Attachment[];
getWebPages(): Page[];
removeCollaborator(email: string): Site;
removeCollaborator(user: Base.User): Site;
}
/**
* Create and access Google Sites.
*/
export interface SitesApp {
AttachmentType: AttachmentType
PageType: PageType
copySite(domain: string, name: string, title: string, summary: string, site: Site): Site;
createSite(domain: string, name: string, title: string, summary: string): Site;
getActivePage(): Page;
getActiveSite(): Site;
getAllSites(domain: string): Site[];
getAllSites(domain: string, start: Integer, max: Integer): Site[];
getPageByUrl(url: string): Page;
getSite(name: string): Site;
getSite(domain: string, name: string): Site;
getSiteByUrl(url: string): Site;
getSites(): Site[];
getSites(start: Integer, max: Integer): Site[];
getSites(domain: string): Site[];
getSites(domain: string, start: Integer, max: Integer): Site[];
}
}
}
declare var SitesApp: GoogleAppsScript.Sites.SitesApp;
+918
View File
@@ -0,0 +1,918 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
/// <reference path="google-apps-script.charts.d.ts" />
/// <reference path="google-apps-script.base.d.ts" />
/// <reference path="google-apps-script.drive.d.ts" />
declare module GoogleAppsScript {
export module Spreadsheet {
/**
* The chart's position within a sheet. Can be updated using the EmbeddedChart.modify()
* function.
*
* chart = chart.modify().setPosition(5, 5, 0, 0).build();
* sheet.updateChart(chart);
*/
export interface ContainerInfo {
getAnchorColumn(): Integer;
getAnchorRow(): Integer;
getOffsetX(): Integer;
getOffsetY(): Integer;
}
/**
* This class allows users to access existing data-validation rules. To create a new rule, see
* SpreadsheetApp.newDataValidation(), DataValidationBuilder, and
* Range.setDataValidation(rule).
*
* // Log information about the data-validation rule for cell A1.
* var cell = SpreadsheetApp.getActive().getRange('A1');
* var rule = cell.getDataValidation();
* if (rule != null) {
* var criteria = rule.getCriteriaType();
* var args = rule.getCriteriaValues();
* Logger.log('The data-validation rule is %s %s', criteria, args);
* } else {
* Logger.log('The cell does not have a data-validation rule.')
* }
*/
export interface DataValidation {
copy(): DataValidationBuilder;
getAllowInvalid(): boolean;
getCriteriaType(): DataValidationCriteria;
getCriteriaValues(): Object[];
getHelpText(): string;
}
/**
* Builder for data-validation rules.
*
* // Set the data validation for cell A1 to require a value from B1:B10.
* var cell = SpreadsheetApp.getActive().getRange('A1');
* var range = SpreadsheetApp.getActive().getRange('B1:B10');
* var rule = SpreadsheetApp.newDataValidation().requireValueInRange(range).build();
* cell.setDataValidation(rule);
*/
export interface DataValidationBuilder {
build(): DataValidation;
copy(): DataValidationBuilder;
getAllowInvalid(): boolean;
getCriteriaType(): DataValidationCriteria;
getCriteriaValues(): Object[];
getHelpText(): string;
requireDate(): DataValidationBuilder;
requireDateAfter(date: Date): DataValidationBuilder;
requireDateBefore(date: Date): DataValidationBuilder;
requireDateBetween(start: Date, end: Date): DataValidationBuilder;
requireDateEqualTo(date: Date): DataValidationBuilder;
requireDateNotBetween(start: Date, end: Date): DataValidationBuilder;
requireDateOnOrAfter(date: Date): DataValidationBuilder;
requireDateOnOrBefore(date: Date): DataValidationBuilder;
requireFormulaSatisfied(formula: string): DataValidationBuilder;
requireNumberBetween(start: Number, end: Number): DataValidationBuilder;
requireNumberEqualTo(number: Number): DataValidationBuilder;
requireNumberGreaterThan(number: Number): DataValidationBuilder;
requireNumberGreaterThanOrEqualTo(number: Number): DataValidationBuilder;
requireNumberLessThan(number: Number): DataValidationBuilder;
requireNumberLessThanOrEqualTo(number: Number): DataValidationBuilder;
requireNumberNotBetween(start: Number, end: Number): DataValidationBuilder;
requireNumberNotEqualTo(number: Number): DataValidationBuilder;
requireTextContains(text: string): DataValidationBuilder;
requireTextDoesNotContain(text: string): DataValidationBuilder;
requireTextEqualTo(text: string): DataValidationBuilder;
requireTextIsEmail(): DataValidationBuilder;
requireTextIsUrl(): DataValidationBuilder;
requireValueInList(values: String[]): DataValidationBuilder;
requireValueInList(values: String[], showDropdown: boolean): DataValidationBuilder;
requireValueInRange(range: Range): DataValidationBuilder;
requireValueInRange(range: Range, showDropdown: boolean): DataValidationBuilder;
setAllowInvalid(allowInvalidData: boolean): DataValidationBuilder;
setHelpText(helpText: string): DataValidationBuilder;
withCriteria(criteria: DataValidationCriteria, args: Object[]): DataValidationBuilder;
}
/**
* An enumeration representing the data-validation criteria that can be set on a range.
*
* // Change existing data-validation rules that require a date in 2013 to require a date in 2014.
* var oldDates = [new Date('1/1/2013'), new Date('12/31/2013')];
* var newDates = [new Date('1/1/2014'), new Date('12/31/2014')];
* var sheet = SpreadsheetApp.getActiveSheet();
* var range = sheet.getRange(1, 1, sheet.getMaxRows(), sheet.getMaxColumns());
* var rules = range.getDataValidations();
*
* for (var i = 0; i < rules.length; i++) {
* for (var j = 0; j < rules[i].length; j++) {
* var rule = rules[i][j];
*
* if (rule != null) {
* var criteria = rule.getCriteriaType();
* var args = rule.getCriteriaValues();
*
* if (criteria == SpreadsheetApp.DataValidationCriteria.DATE_BETWEEN
* && args[0].getTime() == oldDates[0].getTime()
* && args[1].getTime() == oldDates[1].getTime()) {
* // Create a builder from the existing rule, then change the dates.
* rules[i][j] = rule.copy().withCriteria(criteria, newDates).build();
* }
* }
* }
* }
* range.setDataValidations(rules);
*/
export enum DataValidationCriteria { DATE_AFTER, DATE_BEFORE, DATE_BETWEEN, DATE_EQUAL_TO, DATE_IS_VALID_DATE, DATE_NOT_BETWEEN, DATE_ON_OR_AFTER, DATE_ON_OR_BEFORE, NUMBER_BETWEEN, NUMBER_EQUAL_TO, NUMBER_GREATER_THAN, NUMBER_GREATER_THAN_OR_EQUAL_TO, NUMBER_LESS_THAN, NUMBER_LESS_THAN_OR_EQUAL_TO, NUMBER_NOT_BETWEEN, NUMBER_NOT_EQUAL_TO, TEXT_CONTAINS, TEXT_DOES_NOT_CONTAIN, TEXT_EQUAL_TO, TEXT_IS_VALID_EMAIL, TEXT_IS_VALID_URL, VALUE_IN_LIST, VALUE_IN_RANGE, CUSTOM_FORMULA }
/**
* Builder for area charts. For more details, see the Gviz
* documentation.
*/
export interface EmbeddedAreaChartBuilder {
addRange(range: Range): EmbeddedChartBuilder;
asAreaChart(): EmbeddedAreaChartBuilder;
asBarChart(): EmbeddedBarChartBuilder;
asColumnChart(): EmbeddedColumnChartBuilder;
asLineChart(): EmbeddedLineChartBuilder;
asPieChart(): EmbeddedPieChartBuilder;
asScatterChart(): EmbeddedScatterChartBuilder;
asTableChart(): EmbeddedTableChartBuilder;
build(): EmbeddedChart;
getChartType(): Charts.ChartType;
getContainer(): ContainerInfo;
getRanges(): Range[];
removeRange(range: Range): EmbeddedChartBuilder;
reverseCategories(): EmbeddedAreaChartBuilder;
setBackgroundColor(cssValue: string): EmbeddedAreaChartBuilder;
setChartType(type: Charts.ChartType): EmbeddedChartBuilder;
setColors(cssValues: String[]): EmbeddedAreaChartBuilder;
setLegendPosition(position: Charts.Position): EmbeddedAreaChartBuilder;
setLegendTextStyle(textStyle: Charts.TextStyle): EmbeddedAreaChartBuilder;
setOption(option: string, value: Object): EmbeddedChartBuilder;
setPointStyle(style: Charts.PointStyle): EmbeddedAreaChartBuilder;
setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): EmbeddedChartBuilder;
setRange(start: Number, end: Number): EmbeddedAreaChartBuilder;
setStacked(): EmbeddedAreaChartBuilder;
setTitle(chartTitle: string): EmbeddedAreaChartBuilder;
setTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedAreaChartBuilder;
setXAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedAreaChartBuilder;
setXAxisTitle(title: string): EmbeddedAreaChartBuilder;
setXAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedAreaChartBuilder;
setYAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedAreaChartBuilder;
setYAxisTitle(title: string): EmbeddedAreaChartBuilder;
setYAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedAreaChartBuilder;
useLogScale(): EmbeddedAreaChartBuilder;
}
/**
* Builder for bar charts. For more details, see the Gviz
* documentation.
*/
export interface EmbeddedBarChartBuilder {
addRange(range: Range): EmbeddedChartBuilder;
asAreaChart(): EmbeddedAreaChartBuilder;
asBarChart(): EmbeddedBarChartBuilder;
asColumnChart(): EmbeddedColumnChartBuilder;
asLineChart(): EmbeddedLineChartBuilder;
asPieChart(): EmbeddedPieChartBuilder;
asScatterChart(): EmbeddedScatterChartBuilder;
asTableChart(): EmbeddedTableChartBuilder;
build(): EmbeddedChart;
getChartType(): Charts.ChartType;
getContainer(): ContainerInfo;
getRanges(): Range[];
removeRange(range: Range): EmbeddedChartBuilder;
reverseCategories(): EmbeddedBarChartBuilder;
reverseDirection(): EmbeddedBarChartBuilder;
setBackgroundColor(cssValue: string): EmbeddedBarChartBuilder;
setChartType(type: Charts.ChartType): EmbeddedChartBuilder;
setColors(cssValues: String[]): EmbeddedBarChartBuilder;
setLegendPosition(position: Charts.Position): EmbeddedBarChartBuilder;
setLegendTextStyle(textStyle: Charts.TextStyle): EmbeddedBarChartBuilder;
setOption(option: string, value: Object): EmbeddedChartBuilder;
setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): EmbeddedChartBuilder;
setRange(start: Number, end: Number): EmbeddedBarChartBuilder;
setStacked(): EmbeddedBarChartBuilder;
setTitle(chartTitle: string): EmbeddedBarChartBuilder;
setTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedBarChartBuilder;
setXAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedBarChartBuilder;
setXAxisTitle(title: string): EmbeddedBarChartBuilder;
setXAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedBarChartBuilder;
setYAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedBarChartBuilder;
setYAxisTitle(title: string): EmbeddedBarChartBuilder;
setYAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedBarChartBuilder;
useLogScale(): EmbeddedBarChartBuilder;
}
/**
* Represents a chart that has been embedded into a Spreadsheet.
*
* This example shows how to modify an existing chart:
*
* var sheet = SpreadsheetApp.getActiveSheet();
* var range = sheet.getRange("A2:B8")
* var chart = sheet.getCharts()[0];
* chart = chart.modify()
* .addRange(range)
* .setOption('title', 'Updated!')
* .setOption('animation.duration', 500)
* .setPosition(2,2,0,0)
* .build();
* sheet.updateChart(chart);
*
* This example shows how to create a new chart:
*
* function newChart(range, sheet) {
* var sheet = SpreadsheetApp.getActiveSheet();
* var chartBuilder = sheet.newChart();
* chartBuilder.addRange(range)
* .setChartType(Charts.ChartType.LINE)
* .setOption('title', 'My Line Chart!');
* sheet.insertChart(chartBuilder.build());
* }
*/
export interface EmbeddedChart {
getAs(contentType: string): Base.Blob;
getBlob(): Base.Blob;
getContainerInfo(): ContainerInfo;
getId(): string;
getOptions(): Charts.ChartOptions;
getRanges(): Range[];
getType(): string;
modify(): EmbeddedChartBuilder;
setId(id: string): Charts.Chart;
}
/**
* This builder allows you to edit an EmbeddedChart. Make sure to call
* sheet.updateChart(builder.build()) to save your changes.
*
* var sheet = SpreadsheetApp.getActiveSheet();
* var range = sheet.getRange("A1:B8");
* var chart = sheet.getCharts()[0];
* chart = chart.modify()
* .addRange(range)
* .setOption('title', 'Updated!')
* .setOption('animation.duration', 500)
* .setPosition(2,2,0,0)
* .build();
* sheet.updateChart(chart);
*/
export interface EmbeddedChartBuilder {
addRange(range: Range): EmbeddedChartBuilder;
asAreaChart(): EmbeddedAreaChartBuilder;
asBarChart(): EmbeddedBarChartBuilder;
asColumnChart(): EmbeddedColumnChartBuilder;
asLineChart(): EmbeddedLineChartBuilder;
asPieChart(): EmbeddedPieChartBuilder;
asScatterChart(): EmbeddedScatterChartBuilder;
asTableChart(): EmbeddedTableChartBuilder;
build(): EmbeddedChart;
getChartType(): Charts.ChartType;
getContainer(): ContainerInfo;
getRanges(): Range[];
removeRange(range: Range): EmbeddedChartBuilder;
setChartType(type: Charts.ChartType): EmbeddedChartBuilder;
setOption(option: string, value: Object): EmbeddedChartBuilder;
setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): EmbeddedChartBuilder;
}
/**
* Builder for column charts. For more details, see the Gviz
* documentation.
*/
export interface EmbeddedColumnChartBuilder {
addRange(range: Range): EmbeddedChartBuilder;
asAreaChart(): EmbeddedAreaChartBuilder;
asBarChart(): EmbeddedBarChartBuilder;
asColumnChart(): EmbeddedColumnChartBuilder;
asLineChart(): EmbeddedLineChartBuilder;
asPieChart(): EmbeddedPieChartBuilder;
asScatterChart(): EmbeddedScatterChartBuilder;
asTableChart(): EmbeddedTableChartBuilder;
build(): EmbeddedChart;
getChartType(): Charts.ChartType;
getContainer(): ContainerInfo;
getRanges(): Range[];
removeRange(range: Range): EmbeddedChartBuilder;
reverseCategories(): EmbeddedColumnChartBuilder;
setBackgroundColor(cssValue: string): EmbeddedColumnChartBuilder;
setChartType(type: Charts.ChartType): EmbeddedChartBuilder;
setColors(cssValues: String[]): EmbeddedColumnChartBuilder;
setLegendPosition(position: Charts.Position): EmbeddedColumnChartBuilder;
setLegendTextStyle(textStyle: Charts.TextStyle): EmbeddedColumnChartBuilder;
setOption(option: string, value: Object): EmbeddedChartBuilder;
setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): EmbeddedChartBuilder;
setRange(start: Number, end: Number): EmbeddedColumnChartBuilder;
setStacked(): EmbeddedColumnChartBuilder;
setTitle(chartTitle: string): EmbeddedColumnChartBuilder;
setTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedColumnChartBuilder;
setXAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedColumnChartBuilder;
setXAxisTitle(title: string): EmbeddedColumnChartBuilder;
setXAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedColumnChartBuilder;
setYAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedColumnChartBuilder;
setYAxisTitle(title: string): EmbeddedColumnChartBuilder;
setYAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedColumnChartBuilder;
useLogScale(): EmbeddedColumnChartBuilder;
}
/**
* Builder for line charts. For more details, see the Gviz
* documentation.
*/
export interface EmbeddedLineChartBuilder {
addRange(range: Range): EmbeddedChartBuilder;
asAreaChart(): EmbeddedAreaChartBuilder;
asBarChart(): EmbeddedBarChartBuilder;
asColumnChart(): EmbeddedColumnChartBuilder;
asLineChart(): EmbeddedLineChartBuilder;
asPieChart(): EmbeddedPieChartBuilder;
asScatterChart(): EmbeddedScatterChartBuilder;
asTableChart(): EmbeddedTableChartBuilder;
build(): EmbeddedChart;
getChartType(): Charts.ChartType;
getContainer(): ContainerInfo;
getRanges(): Range[];
removeRange(range: Range): EmbeddedChartBuilder;
reverseCategories(): EmbeddedLineChartBuilder;
setBackgroundColor(cssValue: string): EmbeddedLineChartBuilder;
setChartType(type: Charts.ChartType): EmbeddedChartBuilder;
setColors(cssValues: String[]): EmbeddedLineChartBuilder;
setCurveStyle(style: Charts.CurveStyle): EmbeddedLineChartBuilder;
setLegendPosition(position: Charts.Position): EmbeddedLineChartBuilder;
setLegendTextStyle(textStyle: Charts.TextStyle): EmbeddedLineChartBuilder;
setOption(option: string, value: Object): EmbeddedChartBuilder;
setPointStyle(style: Charts.PointStyle): EmbeddedLineChartBuilder;
setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): EmbeddedChartBuilder;
setRange(start: Number, end: Number): EmbeddedLineChartBuilder;
setTitle(chartTitle: string): EmbeddedLineChartBuilder;
setTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedLineChartBuilder;
setXAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedLineChartBuilder;
setXAxisTitle(title: string): EmbeddedLineChartBuilder;
setXAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedLineChartBuilder;
setYAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedLineChartBuilder;
setYAxisTitle(title: string): EmbeddedLineChartBuilder;
setYAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedLineChartBuilder;
useLogScale(): EmbeddedLineChartBuilder;
}
/**
* Builder for pie charts. For more details, see the Gviz
* documentation.
*/
export interface EmbeddedPieChartBuilder {
addRange(range: Range): EmbeddedChartBuilder;
asAreaChart(): EmbeddedAreaChartBuilder;
asBarChart(): EmbeddedBarChartBuilder;
asColumnChart(): EmbeddedColumnChartBuilder;
asLineChart(): EmbeddedLineChartBuilder;
asPieChart(): EmbeddedPieChartBuilder;
asScatterChart(): EmbeddedScatterChartBuilder;
asTableChart(): EmbeddedTableChartBuilder;
build(): EmbeddedChart;
getChartType(): Charts.ChartType;
getContainer(): ContainerInfo;
getRanges(): Range[];
removeRange(range: Range): EmbeddedChartBuilder;
reverseCategories(): EmbeddedPieChartBuilder;
set3D(): EmbeddedPieChartBuilder;
setBackgroundColor(cssValue: string): EmbeddedPieChartBuilder;
setChartType(type: Charts.ChartType): EmbeddedChartBuilder;
setColors(cssValues: String[]): EmbeddedPieChartBuilder;
setLegendPosition(position: Charts.Position): EmbeddedPieChartBuilder;
setLegendTextStyle(textStyle: Charts.TextStyle): EmbeddedPieChartBuilder;
setOption(option: string, value: Object): EmbeddedChartBuilder;
setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): EmbeddedChartBuilder;
setTitle(chartTitle: string): EmbeddedPieChartBuilder;
setTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedPieChartBuilder;
}
/**
* Builder for scatter charts. For more details, see the Gviz
* documentation.
*/
export interface EmbeddedScatterChartBuilder {
addRange(range: Range): EmbeddedChartBuilder;
asAreaChart(): EmbeddedAreaChartBuilder;
asBarChart(): EmbeddedBarChartBuilder;
asColumnChart(): EmbeddedColumnChartBuilder;
asLineChart(): EmbeddedLineChartBuilder;
asPieChart(): EmbeddedPieChartBuilder;
asScatterChart(): EmbeddedScatterChartBuilder;
asTableChart(): EmbeddedTableChartBuilder;
build(): EmbeddedChart;
getChartType(): Charts.ChartType;
getContainer(): ContainerInfo;
getRanges(): Range[];
removeRange(range: Range): EmbeddedChartBuilder;
setBackgroundColor(cssValue: string): EmbeddedScatterChartBuilder;
setChartType(type: Charts.ChartType): EmbeddedChartBuilder;
setColors(cssValues: String[]): EmbeddedScatterChartBuilder;
setLegendPosition(position: Charts.Position): EmbeddedScatterChartBuilder;
setLegendTextStyle(textStyle: Charts.TextStyle): EmbeddedScatterChartBuilder;
setOption(option: string, value: Object): EmbeddedChartBuilder;
setPointStyle(style: Charts.PointStyle): EmbeddedScatterChartBuilder;
setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): EmbeddedChartBuilder;
setTitle(chartTitle: string): EmbeddedScatterChartBuilder;
setTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedScatterChartBuilder;
setXAxisLogScale(): EmbeddedScatterChartBuilder;
setXAxisRange(start: Number, end: Number): EmbeddedScatterChartBuilder;
setXAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedScatterChartBuilder;
setXAxisTitle(title: string): EmbeddedScatterChartBuilder;
setXAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedScatterChartBuilder;
setYAxisLogScale(): EmbeddedScatterChartBuilder;
setYAxisRange(start: Number, end: Number): EmbeddedScatterChartBuilder;
setYAxisTextStyle(textStyle: Charts.TextStyle): EmbeddedScatterChartBuilder;
setYAxisTitle(title: string): EmbeddedScatterChartBuilder;
setYAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedScatterChartBuilder;
}
/**
* Builder for table charts. For more details, see the Gviz
* documentation.
*/
export interface EmbeddedTableChartBuilder {
addRange(range: Range): EmbeddedChartBuilder;
asAreaChart(): EmbeddedAreaChartBuilder;
asBarChart(): EmbeddedBarChartBuilder;
asColumnChart(): EmbeddedColumnChartBuilder;
asLineChart(): EmbeddedLineChartBuilder;
asPieChart(): EmbeddedPieChartBuilder;
asScatterChart(): EmbeddedScatterChartBuilder;
asTableChart(): EmbeddedTableChartBuilder;
build(): EmbeddedChart;
enablePaging(enablePaging: boolean): EmbeddedTableChartBuilder;
enablePaging(pageSize: Integer): EmbeddedTableChartBuilder;
enablePaging(pageSize: Integer, startPage: Integer): EmbeddedTableChartBuilder;
enableRtlTable(rtlEnabled: boolean): EmbeddedTableChartBuilder;
enableSorting(enableSorting: boolean): EmbeddedTableChartBuilder;
getChartType(): Charts.ChartType;
getContainer(): ContainerInfo;
getRanges(): Range[];
removeRange(range: Range): EmbeddedChartBuilder;
setChartType(type: Charts.ChartType): EmbeddedChartBuilder;
setFirstRowNumber(number: Integer): EmbeddedTableChartBuilder;
setInitialSortingAscending(column: Integer): EmbeddedTableChartBuilder;
setInitialSortingDescending(column: Integer): EmbeddedTableChartBuilder;
setOption(option: string, value: Object): EmbeddedChartBuilder;
setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): EmbeddedChartBuilder;
showRowNumberColumn(showRowNumber: boolean): EmbeddedTableChartBuilder;
useAlternatingRowStyle(alternate: boolean): EmbeddedTableChartBuilder;
}
/**
*
* Deprecated. For spreadsheets created in the newer version of Google Sheets, use the more powerful
* Protection class instead. Although this class is deprecated, it will remain
* available for compatibility with the older version of Sheets.
* Access and modify protected sheets in the older version of Google Sheets.
*/
export interface PageProtection {
addUser(email: string): void;
getUsers(): String[];
isProtected(): boolean;
removeUser(user: string): void;
setProtected(protection: boolean): void;
}
/**
* Access and modify protected ranges and sheets. A protected range can protect either a static
* range of cells or a named range. A protected sheet may include unprotected regions. For
* spreadsheets created with the older version of Google Sheets, use the PageProtection
* class instead.
*
* // Protect range A1:B10, then remove all other users from the list of editors.
* var ss = SpreadsheetApp.getActive();
* var range = ss.getRange('A1:B10');
* var protection = range.protect().setDescription('Sample protected range');
*
* // Ensure the current user is an editor before removing others. Otherwise, if the user's edit
* // permission comes from a group, the script will throw an exception upon removing the group.
* var me = Session.getEffectiveUser();
* protection.addEditor(me);
* protection.removeEditors(protection.getEditors());
* if (protection.canDomainEdit()) {
* protection.setDomainEdit(false);
* }
*
* // Remove all range protections in the spreadsheet that the user has permission to edit.
* var ss = SpreadsheetApp.getActive();
* var protections = ss.getProtections(SpreadsheetApp.ProtectionType.RANGE);
* for (var i = 0; i < protections.length; i++) {
* var protection = protections[i];
* if (protection.canEdit()) {
* protection.remove();
* }
* }
*
* // Protect the active sheet, then remove all other users from the list of editors.
* var sheet = SpreadsheetApp.getActiveSheet();
* var protection = sheet.protect().setDescription('Sample protected sheet');
*
* // Ensure the current user is an editor before removing others. Otherwise, if the user's edit
* // permission comes from a group, the script will throw an exception upon removing the group.
* var me = Session.getEffectiveUser();
* protection.addEditor(me);
* protection.removeEditors(protection.getEditors());
* if (protection.canDomainEdit()) {
* protection.setDomainEdit(false);
* }
*/
export interface Protection {
addEditor(emailAddress: string): Protection;
addEditor(user: Base.User): Protection;
addEditors(emailAddresses: String[]): Protection;
canDomainEdit(): boolean;
canEdit(): boolean;
getDescription(): string;
getEditors(): Base.User[];
getProtectionType(): ProtectionType;
getRange(): Range;
getRangeName(): string;
getUnprotectedRanges(): Range[];
isWarningOnly(): boolean;
remove(): void;
removeEditor(emailAddress: string): Protection;
removeEditor(user: Base.User): Protection;
removeEditors(emailAddresses: String[]): Protection;
setDescription(description: string): Protection;
setDomainEdit(editable: boolean): Protection;
setRange(range: Range): Protection;
setRangeName(rangeName: string): Protection;
setUnprotectedRanges(ranges: Range[]): Protection;
setWarningOnly(warningOnly: boolean): Protection;
}
/**
* An enumeration representing the parts of a spreadsheet that can be protected from edits.
*
* // Remove all range protections in the spreadsheet that the user has permission to edit.
* var ss = SpreadsheetApp.getActive();
* var protections = ss.getProtections(SpreadsheetApp.ProtectionType.RANGE);
* for (var i = 0; i < protections.length; i++) {
* var protection = protections[i];
* if (protection.canEdit()) {
* protection.remove();
* }
* }
*
* // Removes sheet protection from the active sheet, if the user has permission to edit it.
* var sheet = SpreadsheetApp.getActiveSheet();
* var protection = sheet.getProtections(SpreadsheetApp.ProtectionType.SHEET)[0];
* if (protection && protection.canEdit()) {
* protection.remove();
* }
*/
export enum ProtectionType { RANGE, SHEET }
/**
* Access and modify spreadsheet ranges.
*
* This class allows users to access and modify ranges in Google Sheets. A range can be
* a single cell in a sheet or a range of cells in a sheet.
*/
export interface Range {
activate(): Range;
breakApart(): Range;
canEdit(): boolean;
clear(): Range;
clear(options: Object): Range;
clearContent(): Range;
clearDataValidations(): Range;
clearFormat(): Range;
clearNote(): Range;
copyFormatToRange(gridId: Integer, column: Integer, columnEnd: Integer, row: Integer, rowEnd: Integer): void;
copyFormatToRange(sheet: Sheet, column: Integer, columnEnd: Integer, row: Integer, rowEnd: Integer): void;
copyTo(destination: Range): void;
copyTo(destination: Range, options: Object): void;
copyValuesToRange(gridId: Integer, column: Integer, columnEnd: Integer, row: Integer, rowEnd: Integer): void;
copyValuesToRange(sheet: Sheet, column: Integer, columnEnd: Integer, row: Integer, rowEnd: Integer): void;
getA1Notation(): string;
getBackground(): string;
getBackgrounds(): String[][];
getCell(row: Integer, column: Integer): Range;
getColumn(): Integer;
getDataSourceUrl(): string;
getDataTable(): Charts.DataTable;
getDataTable(firstRowIsHeader: boolean): Charts.DataTable;
getDataValidation(): DataValidation;
getDataValidations(): DataValidation[][];
getFontColor(): string;
getFontColors(): String[][];
getFontFamilies(): String[][];
getFontFamily(): string;
getFontLine(): string;
getFontLines(): String[][];
getFontSize(): Integer;
getFontSizes(): Integer[][];
getFontStyle(): string;
getFontStyles(): String[][];
getFontWeight(): string;
getFontWeights(): String[][];
getFormula(): string;
getFormulaR1C1(): string;
getFormulas(): String[][];
getFormulasR1C1(): String[][];
getGridId(): Integer;
getHeight(): Integer;
getHorizontalAlignment(): string;
getHorizontalAlignments(): String[][];
getLastColumn(): Integer;
getLastRow(): Integer;
getNote(): string;
getNotes(): String[][];
getNumColumns(): Integer;
getNumRows(): Integer;
getNumberFormat(): string;
getNumberFormats(): String[][];
getRow(): Integer;
getRowIndex(): Integer;
getSheet(): Sheet;
getValue(): Object;
getValues(): Object[][];
getVerticalAlignment(): string;
getVerticalAlignments(): String[][];
getWidth(): Integer;
getWrap(): boolean;
getWraps(): Boolean[][];
isBlank(): boolean;
isEndColumnBounded(): boolean;
isEndRowBounded(): boolean;
isStartColumnBounded(): boolean;
isStartRowBounded(): boolean;
merge(): Range;
mergeAcross(): Range;
mergeVertically(): Range;
moveTo(target: Range): void;
offset(rowOffset: Integer, columnOffset: Integer): Range;
offset(rowOffset: Integer, columnOffset: Integer, numRows: Integer): Range;
offset(rowOffset: Integer, columnOffset: Integer, numRows: Integer, numColumns: Integer): Range;
protect(): Protection;
setBackground(color: string): Range;
setBackgroundRGB(red: Integer, green: Integer, blue: Integer): Range;
setBackgrounds(color: String[][]): Range;
setBorder(top: boolean, left: boolean, bottom: boolean, right: boolean, vertical: boolean, horizontal: boolean): Range;
setDataValidation(rule: DataValidation): Range;
setDataValidations(rules: DataValidation[][]): Range;
setFontColor(color: string): Range;
setFontColors(colors: Object[][]): Range;
setFontFamilies(fontFamilies: Object[][]): Range;
setFontFamily(fontFamily: string): Range;
setFontLine(fontLine: string): Range;
setFontLines(fontLines: Object[][]): Range;
setFontSize(size: Integer): Range;
setFontSizes(sizes: Object[][]): Range;
setFontStyle(fontStyle: string): Range;
setFontStyles(fontStyles: Object[][]): Range;
setFontWeight(fontWeight: string): Range;
setFontWeights(fontWeights: Object[][]): Range;
setFormula(formula: string): Range;
setFormulaR1C1(formula: string): Range;
setFormulas(formulas: String[][]): Range;
setFormulasR1C1(formulas: String[][]): Range;
setHorizontalAlignment(alignment: string): Range;
setHorizontalAlignments(alignments: Object[][]): Range;
setNote(note: string): Range;
setNotes(notes: Object[][]): Range;
setNumberFormat(numberFormat: string): Range;
setNumberFormats(numberFormats: Object[][]): Range;
setValue(value: Object): Range;
setValues(values: Object[][]): Range;
setVerticalAlignment(alignment: string): Range;
setVerticalAlignments(alignments: Object[][]): Range;
setWrap(isWrapEnabled: boolean): Range;
setWraps(isWrapEnabled: Object[][]): Range;
sort(sortSpecObj: Object): Range;
}
/**
* Access and modify spreadsheet sheets. Common operations
* are renaming a sheet and accessing range objects from the sheet.
*/
export interface Sheet {
activate(): Sheet;
appendRow(rowContents: Object[]): Sheet;
autoResizeColumn(columnPosition: Integer): Sheet;
clear(): Sheet;
clear(options: Object): Sheet;
clearContents(): Sheet;
clearFormats(): Sheet;
clearNotes(): Sheet;
copyTo(spreadsheet: Spreadsheet): Sheet;
deleteColumn(columnPosition: Integer): Sheet;
deleteColumns(columnPosition: Integer, howMany: Integer): void;
deleteRow(rowPosition: Integer): Sheet;
deleteRows(rowPosition: Integer, howMany: Integer): void;
getActiveCell(): Range;
getActiveRange(): Range;
getCharts(): EmbeddedChart[];
getColumnWidth(columnPosition: Integer): Integer;
getDataRange(): Range;
getFrozenColumns(): Integer;
getFrozenRows(): Integer;
getIndex(): Integer;
getLastColumn(): Integer;
getLastRow(): Integer;
getMaxColumns(): Integer;
getMaxRows(): Integer;
getName(): string;
getParent(): Spreadsheet;
getProtections(type: ProtectionType): Protection[];
getRange(row: Integer, column: Integer): Range;
getRange(row: Integer, column: Integer, numRows: Integer): Range;
getRange(row: Integer, column: Integer, numRows: Integer, numColumns: Integer): Range;
getRange(a1Notation: string): Range;
getRowHeight(rowPosition: Integer): Integer;
getSheetId(): Integer;
getSheetName(): string;
getSheetValues(startRow: Integer, startColumn: Integer, numRows: Integer, numColumns: Integer): Object[][];
hideColumn(column: Range): void;
hideColumns(columnIndex: Integer): void;
hideColumns(columnIndex: Integer, numColumns: Integer): void;
hideRow(row: Range): void;
hideRows(rowIndex: Integer): void;
hideRows(rowIndex: Integer, numRows: Integer): void;
hideSheet(): Sheet;
insertChart(chart: EmbeddedChart): void;
insertColumnAfter(afterPosition: Integer): Sheet;
insertColumnBefore(beforePosition: Integer): Sheet;
insertColumns(columnIndex: Integer): void;
insertColumns(columnIndex: Integer, numColumns: Integer): void;
insertColumnsAfter(afterPosition: Integer, howMany: Integer): Sheet;
insertColumnsBefore(beforePosition: Integer, howMany: Integer): Sheet;
insertImage(blob: Base.Blob, column: Integer, row: Integer): void;
insertImage(blob: Base.Blob, column: Integer, row: Integer, offsetX: Integer, offsetY: Integer): void;
insertImage(url: string, column: Integer, row: Integer): void;
insertImage(url: string, column: Integer, row: Integer, offsetX: Integer, offsetY: Integer): void;
insertRowAfter(afterPosition: Integer): Sheet;
insertRowBefore(beforePosition: Integer): Sheet;
insertRows(rowIndex: Integer): void;
insertRows(rowIndex: Integer, numRows: Integer): void;
insertRowsAfter(afterPosition: Integer, howMany: Integer): Sheet;
insertRowsBefore(beforePosition: Integer, howMany: Integer): Sheet;
isSheetHidden(): boolean;
newChart(): EmbeddedChartBuilder;
protect(): Protection;
removeChart(chart: EmbeddedChart): void;
setActiveRange(range: Range): Range;
setActiveSelection(range: Range): Range;
setActiveSelection(a1Notation: string): Range;
setColumnWidth(columnPosition: Integer, width: Integer): Sheet;
setFrozenColumns(columns: Integer): void;
setFrozenRows(rows: Integer): void;
setName(name: string): Sheet;
setRowHeight(rowPosition: Integer, height: Integer): Sheet;
showColumns(columnIndex: Integer): void;
showColumns(columnIndex: Integer, numColumns: Integer): void;
showRows(rowIndex: Integer): void;
showRows(rowIndex: Integer, numRows: Integer): void;
showSheet(): Sheet;
sort(columnPosition: Integer): Sheet;
sort(columnPosition: Integer, ascending: boolean): Sheet;
unhideColumn(column: Range): void;
unhideRow(row: Range): void;
updateChart(chart: EmbeddedChart): void;
getSheetProtection(): PageProtection;
setSheetProtection(permissions: PageProtection): void;
}
/**
* This class allows users to access and modify Google Sheets files. Common operations are adding
* new sheets and adding collaborators.
*/
export interface Spreadsheet {
addEditor(emailAddress: string): Spreadsheet;
addEditor(user: Base.User): Spreadsheet;
addEditors(emailAddresses: String[]): Spreadsheet;
addMenu(name: string, subMenus: Object[]): void;
addViewer(emailAddress: string): Spreadsheet;
addViewer(user: Base.User): Spreadsheet;
addViewers(emailAddresses: String[]): Spreadsheet;
appendRow(rowContents: Object[]): Sheet;
autoResizeColumn(columnPosition: Integer): Sheet;
copy(name: string): Spreadsheet;
deleteActiveSheet(): Sheet;
deleteColumn(columnPosition: Integer): Sheet;
deleteColumns(columnPosition: Integer, howMany: Integer): void;
deleteRow(rowPosition: Integer): Sheet;
deleteRows(rowPosition: Integer, howMany: Integer): void;
deleteSheet(sheet: Sheet): void;
duplicateActiveSheet(): Sheet;
getActiveCell(): Range;
getActiveRange(): Range;
getActiveSheet(): Sheet;
getAs(contentType: string): Base.Blob;
getBlob(): Base.Blob;
getColumnWidth(columnPosition: Integer): Integer;
getDataRange(): Range;
getEditors(): Base.User[];
getFormUrl(): string;
getFrozenColumns(): Integer;
getFrozenRows(): Integer;
getId(): string;
getLastColumn(): Integer;
getLastRow(): Integer;
getName(): string;
getNumSheets(): Integer;
getOwner(): Base.User;
getProtections(type: ProtectionType): Protection[];
getRange(a1Notation: string): Range;
getRangeByName(name: string): Range;
getRowHeight(rowPosition: Integer): Integer;
getSheetByName(name: string): Sheet;
getSheetId(): Integer;
getSheetName(): string;
getSheetValues(startRow: Integer, startColumn: Integer, numRows: Integer, numColumns: Integer): Object[][];
getSheets(): Sheet[];
getSpreadsheetLocale(): string;
getSpreadsheetTimeZone(): string;
getUrl(): string;
getViewers(): Base.User[];
hideColumn(column: Range): void;
hideRow(row: Range): void;
insertColumnAfter(afterPosition: Integer): Sheet;
insertColumnBefore(beforePosition: Integer): Sheet;
insertColumnsAfter(afterPosition: Integer, howMany: Integer): Sheet;
insertColumnsBefore(beforePosition: Integer, howMany: Integer): Sheet;
insertImage(blob: Base.Blob, column: Integer, row: Integer): void;
insertImage(blob: Base.Blob, column: Integer, row: Integer, offsetX: Integer, offsetY: Integer): void;
insertImage(url: string, column: Integer, row: Integer): void;
insertImage(url: string, column: Integer, row: Integer, offsetX: Integer, offsetY: Integer): void;
insertRowAfter(afterPosition: Integer): Sheet;
insertRowBefore(beforePosition: Integer): Sheet;
insertRowsAfter(afterPosition: Integer, howMany: Integer): Sheet;
insertRowsBefore(beforePosition: Integer, howMany: Integer): Sheet;
insertSheet(): Sheet;
insertSheet(sheetIndex: Integer): Sheet;
insertSheet(sheetIndex: Integer, options: Object): Sheet;
insertSheet(options: Object): Sheet;
insertSheet(sheetName: string): Sheet;
insertSheet(sheetName: string, sheetIndex: Integer): Sheet;
insertSheet(sheetName: string, sheetIndex: Integer, options: Object): Sheet;
insertSheet(sheetName: string, options: Object): Sheet;
moveActiveSheet(pos: Integer): void;
removeEditor(emailAddress: string): Spreadsheet;
removeEditor(user: Base.User): Spreadsheet;
removeMenu(name: string): void;
removeNamedRange(name: string): void;
removeViewer(emailAddress: string): Spreadsheet;
removeViewer(user: Base.User): Spreadsheet;
rename(newName: string): void;
renameActiveSheet(newName: string): void;
setActiveRange(range: Range): Range;
setActiveSelection(range: Range): Range;
setActiveSelection(a1Notation: string): Range;
setActiveSheet(sheet: Sheet): Sheet;
setColumnWidth(columnPosition: Integer, width: Integer): Sheet;
setFrozenColumns(columns: Integer): void;
setFrozenRows(rows: Integer): void;
setNamedRange(name: string, range: Range): void;
setRowHeight(rowPosition: Integer, height: Integer): Sheet;
setSpreadsheetLocale(locale: string): void;
setSpreadsheetTimeZone(timezone: string): void;
show(userInterface: Object): void;
sort(columnPosition: Integer): Sheet;
sort(columnPosition: Integer, ascending: boolean): Sheet;
toast(msg: string): void;
toast(msg: string, title: string): void;
toast(msg: string, title: string, timeoutSeconds: Number): void;
unhideColumn(column: Range): void;
unhideRow(row: Range): void;
updateMenu(name: string, subMenus: Object[]): void;
getSheetProtection(): PageProtection;
isAnonymousView(): boolean;
isAnonymousWrite(): boolean;
setAnonymousAccess(anonymousReadAllowed: boolean, anonymousWriteAllowed: boolean): void;
setSheetProtection(permissions: PageProtection): void;
}
/**
* This class allows users to open Google Sheets files and to create new ones. This class is
* the parent class for the Spreadsheet service.
*/
export interface SpreadsheetApp {
DataValidationCriteria: DataValidationCriteria
ProtectionType: ProtectionType
create(name: string): Spreadsheet;
create(name: string, rows: Integer, columns: Integer): Spreadsheet;
flush(): void;
getActive(): Spreadsheet;
getActiveRange(): Range;
getActiveSheet(): Sheet;
getActiveSpreadsheet(): Spreadsheet;
getUi(): Base.Ui;
newDataValidation(): DataValidationBuilder;
open(file: Drive.File): Spreadsheet;
openById(id: string): Spreadsheet;
openByUrl(url: string): Spreadsheet;
setActiveRange(range: Range): Range;
setActiveSheet(sheet: Sheet): Sheet;
setActiveSpreadsheet(newActiveSpreadsheet: Spreadsheet): void;
}
}
}
declare var SpreadsheetApp: GoogleAppsScript.Spreadsheet.SpreadsheetApp;
+12
View File
@@ -0,0 +1,12 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module GoogleAppsScript {
type BigNumber = any;
type Byte = number;
type Integer = number;
type Char = string;
type JdbcSQL_XML = any;
}
File diff suppressed because it is too large. Load diff
+77
View File
@@ -0,0 +1,77 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
/// <reference path="google-apps-script.base.d.ts" />
declare module GoogleAppsScript {
export module URL_Fetch {
/**
* This class allows users to access specific information on HTTP responses.
* See also
*
* UrlFetchApp
*/
export interface HTTPResponse {
getAllHeaders(): Object;
getAs(contentType: string): Base.Blob;
getBlob(): Base.Blob;
getContent(): Byte[];
getContentText(): string;
getContentText(charset: string): string;
getHeaders(): Object;
getResponseCode(): Integer;
}
/**
*
* Deprecated. This class is deprecated and should not be used in new scripts.
* Represents configuration settings for an OAuth-enabled remote service.
* See also
*
* UrlFetchApp
*/
export interface OAuthConfig {
getAccessTokenUrl(): string;
getAuthorizationUrl(): string;
getMethod(): string;
getParamLocation(): string;
getRequestTokenUrl(): string;
getServiceName(): string;
setAccessTokenUrl(url: string): void;
setAuthorizationUrl(url: string): void;
setConsumerKey(consumerKey: string): void;
setConsumerSecret(consumerSecret: string): void;
setMethod(method: string): void;
setParamLocation(location: string): void;
setRequestTokenUrl(url: string): void;
}
/**
* Fetch resources and communicate with other hosts over the Internet.
*
* This service allows scripts to communicate with other applications or access other resources on
* the web by fetching URLs. A script can use the URL Fetch service to issue HTTP and HTTPS requests
* and receive responses. The URL Fetch service uses Google's network infrastructure for efficiency
* and scaling purposes.
* See also
*
* OAuthConfig
*
* HTTPResponse
*/
export interface UrlFetchApp {
fetch(url: string): HTTPResponse;
fetch(url: string, params: Object): HTTPResponse;
getRequest(url: string): Object;
getRequest(url: string, params: Object): Object;
addOAuthService(serviceName: string): OAuthConfig;
removeOAuthService(serviceName: string): void;
}
}
}
declare var UrlFetchApp: GoogleAppsScript.URL_Fetch.UrlFetchApp;
+76
View File
@@ -0,0 +1,76 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
/// <reference path="google-apps-script.base.d.ts" />
declare module GoogleAppsScript {
export module Utilities {
/**
* A typesafe enum for character sets.
*/
export enum Charset { US_ASCII, UTF_8 }
/**
* Selector of Digest algorithm
*/
export enum DigestAlgorithm { MD2, MD5, SHA_1, SHA_256, SHA_384, SHA_512 }
/**
* Selector of MAC algorithm
*/
export enum MacAlgorithm { HMAC_MD5, HMAC_SHA_1, HMAC_SHA_256, HMAC_SHA_384, HMAC_SHA_512 }
/**
* This service provides utilities for string encoding/decoding, date formatting, JSON manipulation,
* and other miscellaneous tasks.
*/
export interface Utilities {
Charset: Charset
DigestAlgorithm: DigestAlgorithm
MacAlgorithm: MacAlgorithm
base64Decode(encoded: string): Byte[];
base64Decode(encoded: string, charset: Charset): Byte[];
base64DecodeWebSafe(encoded: string): Byte[];
base64DecodeWebSafe(encoded: string, charset: Charset): Byte[];
base64Encode(data: Byte[]): string;
base64Encode(data: string): string;
base64Encode(data: string, charset: Charset): string;
base64EncodeWebSafe(data: Byte[]): string;
base64EncodeWebSafe(data: string): string;
base64EncodeWebSafe(data: string, charset: Charset): string;
computeDigest(algorithm: DigestAlgorithm, value: string): Byte[];
computeDigest(algorithm: DigestAlgorithm, value: string, charset: Charset): Byte[];
computeHmacSha256Signature(value: string, key: string): Byte[];
computeHmacSha256Signature(value: string, key: string, charset: Charset): Byte[];
computeHmacSignature(algorithm: MacAlgorithm, value: string, key: string): Byte[];
computeHmacSignature(algorithm: MacAlgorithm, value: string, key: string, charset: Charset): Byte[];
computeRsaSha256Signature(value: string, key: string): Byte[];
computeRsaSha256Signature(value: string, key: string, charset: Charset): Byte[];
formatDate(date: Date, timeZone: string, format: string): string;
formatString(template: string, ...args: Object[]): string;
newBlob(data: Byte[]): Base.Blob;
newBlob(data: Byte[], contentType: string): Base.Blob;
newBlob(data: Byte[], contentType: string, name: string): Base.Blob;
newBlob(data: string): Base.Blob;
newBlob(data: string, contentType: string): Base.Blob;
newBlob(data: string, contentType: string, name: string): Base.Blob;
parseCsv(csv: string): String[][];
parseCsv(csv: string, delimiter: Char): String[][];
sleep(milliseconds: Integer): void;
unzip(blob: Base.BlobSource): Base.Blob[];
zip(blobs: Base.BlobSource[]): Base.Blob;
zip(blobs: Base.BlobSource[], name: string): Base.Blob;
jsonParse(jsonString: string): Object;
jsonStringify(obj: Object): string;
}
}
}
declare var Charset: GoogleAppsScript.Utilities.Charset;
declare var DigestAlgorithm: GoogleAppsScript.Utilities.DigestAlgorithm;
declare var MacAlgorithm: GoogleAppsScript.Utilities.MacAlgorithm;
declare var Utilities: GoogleAppsScript.Utilities.Utilities;
+347
View File
@@ -0,0 +1,347 @@
// Type definitions for Google Apps Script 2015-11-12
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen <https://github.com/motemen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.types.d.ts" />
declare module GoogleAppsScript {
export module XML_Service {
/**
* A representation of an XML attribute.
*
* // Reads the first and last name of each person and adds a new attribute with the full name.
* var xml = '<roster>'
* + '<person first="John" last="Doe"/>'
* + '<person first="Mary" last="Smith"/>'
* + '</roster>';
* var document = XmlService.parse(xml);
* var people = document.getRootElement().getChildren('person');
* for (var i = 0; i < people.length; i++) {
* var person = people[i];
* var firstName = person.getAttribute('first').getValue();
* var lastName = person.getAttribute('last').getValue();
* person.setAttribute('full', firstName + ' ' + lastName);
* }
* xml = XmlService.getPrettyFormat().format(document);
* Logger.log(xml);
*/
export interface Attribute {
getName(): string;
getNamespace(): Namespace;
getValue(): string;
setName(name: string): Attribute;
setNamespace(namespace: Namespace): Attribute;
setValue(value: string): Attribute;
}
/**
* A representation of an XML CDATASection node.
*
* // Create and log an XML document that shows how special characters like '<', '>', and '&' are
* // stored in a CDATASection node as compared to in a Text node.
* var illegalCharacters = '<em>The Amazing Adventures of Kavalier & Clay</em>';
* var cdata = XmlService.createCdata(illegalCharacters);
* var text = XmlService.createText(illegalCharacters);
* var root = XmlService.createElement('root').addContent(cdata).addContent(text);
* var document = XmlService.createDocument(root);
* var xml = XmlService.getPrettyFormat().format(document);
* Logger.log(xml);
*/
export interface Cdata {
append(text: string): Text;
detach(): Content;
getParentElement(): Element;
getText(): string;
getValue(): string;
setText(text: string): Text;
}
/**
* A representation of an XML Comment node.
*/
export interface Comment {
detach(): Content;
getParentElement(): Element;
getText(): string;
getValue(): string;
setText(text: string): Comment;
}
/**
* A representation of a generic XML node.
* Implementing classes
*
* NameBrief description
*
* CdataA representation of an XML CDATASection node.
*
* CommentA representation of an XML Comment node.
*
* DocTypeA representation of an XML DocumentType node.
*
* ElementA representation of an XML Element node.
*
* EntityRefA representation of an XML EntityReference node.
*
* ProcessingInstructionA representation of an XML ProcessingInstruction node.
*
* TextA representation of an XML Text node.
*/
export interface Content {
asCdata(): Cdata;
asComment(): Comment;
asDocType(): DocType;
asElement(): Element;
asEntityRef(): EntityRef;
asProcessingInstruction(): ProcessingInstruction;
asText(): Text;
detach(): Content;
getParentElement(): Element;
getType(): ContentType;
getValue(): string;
}
/**
* An enumeration representing the types of XML content nodes.
*/
export enum ContentType { CDATA, COMMENT, DOCTYPE, ELEMENT, ENTITYREF, PROCESSINGINSTRUCTION, TEXT }
/**
* A representation of an XML DocumentType node.
*/
export interface DocType {
detach(): Content;
getElementName(): string;
getInternalSubset(): string;
getParentElement(): Element;
getPublicId(): string;
getSystemId(): string;
getValue(): string;
setElementName(name: string): DocType;
setInternalSubset(data: string): DocType;
setPublicId(id: string): DocType;
setSystemId(id: string): DocType;
}
/**
* A representation of an XML document.
*/
export interface Document {
addContent(content: Content): Document;
addContent(index: Integer, content: Content): Document;
cloneContent(): Content[];
detachRootElement(): Element;
getAllContent(): Content[];
getContent(index: Integer): Content;
getContentSize(): Integer;
getDescendants(): Content[];
getDocType(): DocType;
getRootElement(): Element;
hasRootElement(): boolean;
removeContent(): Content[];
removeContent(content: Content): boolean;
removeContent(index: Integer): Content;
setDocType(docType: DocType): Document;
setRootElement(element: Element): Document;
}
/**
* A representation of an XML Element node.
*
* // Adds up the values listed in a sample XML document and adds a new element with the total.
* var xml = '<things>'
* + '<plates>12</plates>'
* + '<bowls>18</bowls>'
* + '<cups>25</cups>'
* + '</things>';
* var document = XmlService.parse(xml);
* var root = document.getRootElement();
* var items = root.getChildren();
* var total = 0;
* for (var i = 0; i < items.length; i++) {
* total += Number(items[i].getText());
* }
* var totalElement = XmlService.createElement('total').setText(total);
* root.addContent(totalElement);
* xml = XmlService.getPrettyFormat().format(document);
* Logger.log(xml);
*/
export interface Element {
addContent(content: Content): Element;
addContent(index: Integer, content: Content): Element;
cloneContent(): Content[];
detach(): Content;
getAllContent(): Content[];
getAttribute(name: string): Attribute;
getAttribute(name: string, namespace: Namespace): Attribute;
getAttributes(): Attribute[];
getChild(name: string): Element;
getChild(name: string, namespace: Namespace): Element;
getChildText(name: string): string;
getChildText(name: string, namespace: Namespace): string;
getChildren(): Element[];
getChildren(name: string): Element[];
getChildren(name: string, namespace: Namespace): Element[];
getContent(index: Integer): Content;
getContentSize(): Integer;
getDescendants(): Content[];
getDocument(): Document;
getName(): string;
getNamespace(): Namespace;
getNamespace(prefix: string): Namespace;
getParentElement(): Element;
getQualifiedName(): string;
getText(): string;
getValue(): string;
isAncestorOf(other: Element): boolean;
isRootElement(): boolean;
removeAttribute(attribute: Attribute): boolean;
removeAttribute(attributeName: string): boolean;
removeAttribute(attributeName: string, namespace: Namespace): boolean;
removeContent(): Content[];
removeContent(content: Content): boolean;
removeContent(index: Integer): Content;
setAttribute(attribute: Attribute): Element;
setAttribute(name: string, value: string): Element;
setAttribute(name: string, value: string, namespace: Namespace): Element;
setName(name: string): Element;
setNamespace(namespace: Namespace): Element;
setText(text: string): Element;
}
/**
* A representation of an XML EntityReference node.
*/
export interface EntityRef {
detach(): Content;
getName(): string;
getParentElement(): Element;
getPublicId(): string;
getSystemId(): string;
getValue(): string;
setName(name: string): EntityRef;
setPublicId(id: string): EntityRef;
setSystemId(id: string): EntityRef;
}
/**
* A formatter for outputting an XML document, with three pre-defined formats that can be further
* customized.
*
* // Log an XML document with specified formatting options.
* var xml = '<root><a><b>Text!</b><b>More text!</b></a></root>';
* var document = XmlService.parse(xml);
* var output = XmlService.getCompactFormat()
* .setLineSeparator('\n')
* .setEncoding('UTF-8')
* .setIndent(' ')
* .format(document);
* Logger.log(output);
*/
export interface Format {
format(document: Document): string;
format(element: Element): string;
setEncoding(encoding: string): Format;
setIndent(indent: string): Format;
setLineSeparator(separator: string): Format;
setOmitDeclaration(omitDeclaration: boolean): Format;
setOmitEncoding(omitEncoding: boolean): Format;
}
/**
* A representation of an XML namespace.
*/
export interface Namespace {
getPrefix(): string;
getURI(): string;
}
/**
* A representation of an XML ProcessingInstruction node.
*/
export interface ProcessingInstruction {
detach(): Content;
getData(): string;
getParentElement(): Element;
getTarget(): string;
getValue(): string;
}
/**
* A representation of an XML Text node.
*/
export interface Text {
append(text: string): Text;
detach(): Content;
getParentElement(): Element;
getText(): string;
getValue(): string;
setText(text: string): Text;
}
/**
* This service allows scripts to parse, navigate, and programmatically create XML documents.
*
* // Log the title and labels for the first page of blog posts on the Google Apps Developer blog.
* function parseXml() {
* var url = 'http://googleappsdeveloper.blogspot.com/atom.xml';
* var xml = UrlFetchApp.fetch(url).getContentText();
* var document = XmlService.parse(xml);
* var root = document.getRootElement();
* var atom = XmlService.getNamespace('http://www.w3.org/2005/Atom');
*
* var entries = document.getRootElement().getChildren('entry', atom);
* for (var i = 0; i < entries.length; i++) {
* var title = entries[i].getChild('title', atom).getText();
* var categoryElements = entries[i].getChildren('category', atom);
* var labels = [];
* for (var j = 0; j < categoryElements.length; j++) {
* labels.push(categoryElements[j].getAttribute('term').getValue());
* }
* Logger.log('%s (%s)', title, labels.join(', '));
* }
* }
*
* // Create and log an XML representation of the threads in your Gmail inbox.
* function createXml() {
* var root = XmlService.createElement('threads');
* var threads = GmailApp.getInboxThreads();
* for (var i = 0; i < threads.length; i++) {
* var child = XmlService.createElement('thread')
* .setAttribute('messageCount', threads[i].getMessageCount())
* .setAttribute('isUnread', threads[i].isUnread())
* .setText(threads[i].getFirstMessageSubject());
* root.addContent(child);
* }
* var document = XmlService.createDocument(root);
* var xml = XmlService.getPrettyFormat().format(document);
* Logger.log(xml);
* }
*/
export interface XmlService {
ContentTypes: ContentType
createCdata(text: string): Cdata;
createComment(text: string): Comment;
createDocType(elementName: string): DocType;
createDocType(elementName: string, systemId: string): DocType;
createDocType(elementName: string, publicId: string, systemId: string): DocType;
createDocument(): Document;
createDocument(rootElement: Element): Document;
createElement(name: string): Element;
createElement(name: string, namespace: Namespace): Element;
createText(text: string): Text;
getCompactFormat(): Format;
getNamespace(uri: string): Namespace;
getNamespace(prefix: string, uri: string): Namespace;
getNoNamespace(): Namespace;
getPrettyFormat(): Format;
getRawFormat(): Format;
getXmlNamespace(): Namespace;
parse(xml: string): Document;
}
}
}
declare var XmlService: GoogleAppsScript.XML_Service.XmlService;
@@ -483,6 +483,36 @@ declare module gapi.drive.realtime {
saveAs(fileId:string) : void;
}
// INCOMPLETE
// https://developers.google.com/google-apps/realtime/reference/gapi.drive.realtime.Error
export class Error { }
// Complete
// Opens the debugger application on the current page. The debugger shows all realtime documents that the
// page has loaded and is able to view, edit and debug all aspects of each realtime document.
export function debug() : void;
/* Creates a new file with fake network communications. This file will not talk to the server and will only
exist in memory for as long as the browser session persists.
https://developers.google.com/google-apps/realtime/reference/gapi.drive.realtime#.newInMemoryDocument
@Param opt_onLoaded {function(non-null gapi.drive.realtime.Document)}
A callback that will be called when the realtime document is ready. The created or opened realtime document
object will be passed to this function.
@Param opt_initializerFn {function(non-null gapi.drive.realtime.Model)}
An optional initialization function that will be called before onLoaded only the first time that the document
is loaded. The document's gapi.drive.realtime.Model object will be passed to this function.
@Param opt_errorFn {function(non-null gapi.drive.realtime.Error)}
An optional error handling function that will be called if an error occurs while the document is being
loaded or edited. A gapi.drive.realtime.Error object describing the error will be passed to this function.
*/
export function newInMemoryDocument(
opt_onLoaded? : (d:Document) => void,
opt_initializerFn? : (m:Model) => void,
opt_errorFn? : (e:gapi.drive.realtime.Error) => void
) : Document;
}
+1
View File
@@ -1338,6 +1338,7 @@ declare module google.maps {
lightness?: number;
saturation?: number;
visibility?: string;
weight?: number;
}
/***** Layers *****/
+12
View File
@@ -0,0 +1,12 @@
/// <reference path="graham_scan.d.ts" />
// Based on the README.MD
//Create a new instance.
var convexHull = new ConvexHullGrahamScan();
//add points (needs to be done for each point, a foreach loop on the input array can be used.)
convexHull.addPoint(1, 2);
//getHull() returns the array of points that make up the convex hull.
var hullPoints = convexHull.getHull();
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for graham_scan v1.0.2
// Project: https://github.com/brian3kb/graham_scan_js
// Definitions by: Harm Berntsen <https://github.com/hberntsen>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare class ConvexHullGrahamScan {
addPoint(x: number, y: number): void;
getHull(): {x: number, y: number}[];
}
+1 -1
View File
@@ -1,4 +1,4 @@
// Type definitions for gulp-csso v5.0.1
// Type definitions for gulp-rev v5.0.1
// Project: https://github.com/sindresorhus/gulp-rev
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
+59
View File
@@ -0,0 +1,59 @@
/// <reference path="helmet.d.ts" />
import helmet = require("helmet");
/**
* @summary Test for {@see helmet}.
*/
function helmetTest() {
helmet();
}
/**
* @summary Test for {@see helmet#xssFilter} function.
*/
function contentSecurityPolicyTest() {
helmet.xssFilter();
helmet.xssFilter({ setOnOldIE: true });
}
/**
* @summary Test for {@see helmet#frameguard} function.
*/
function frameguardTest() {
helmet.frameguard();
helmet.frameguard("sameorigin");
}
/**
* @summary Test for {@see helmet#hsts} function.
*/
function hstsTest() {
helmet.hsts();
helmet.hsts({ maxAge: 7776000000 });
}
/**
* @summary Test for {@see helmet#ieNoOpen} function.
*/
function ieNoOpenTest() {
helmet.ieNoOpen();
}
/**
* @summary Test for {@see helmet#noSniff} function.
*/
function noSniffTest() {
helmet.noSniff();
}
/**
* @summary Test for {@see helmet#publicKeyPins} function.
*/
function publicKeyPinsTest() {
helmet.publicKeyPins({
sha256s: ["AbCdEf123=", "ZyXwVu456="],
includeSubdomains: true,
reportUri: "http://example.com"
});
}
+57
View File
@@ -0,0 +1,57 @@
// Type definitions for helmet
// Project: https://github.com/helmetjs/helmet
// Definitions by: Cyril Schumacher <https://github.com/cyrilschumacher>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface Helmet {
(): void;
/**
* @summary Prevent clickjacking.
* @param {string} header The header.
*/
frameguard(header ?: string): void;
/**
* @summary Hide "X-Powered-By" header.
* @param {Object} options The options.
*/
hidePoweredBy(options ?: Object): void;
/**
* @summary Adds the "Strict-Transport-Security" header.
* @param {Object} options The options.
*/
hsts(options ?: Object): void;
/**
* @summary Add the "X-Download-Options" header.
*/
ieNoOpen(): void;
/**
* @summary Add the "Cache-Control" and "Pragma" headers to stop caching.
*/
nocache(options ?: Object): void;
/**
* @summary Adds the "X-Content-Type-Options" header.
*/
noSniff(): void;
/**
* @summary Adds the "Public-Key-Pins" header.
*/
publicKeyPins(options ?: Object): void;
/**
* @summary Prevent Cross-site scripting attacks.
* @param {Object} options The options.
*/
xssFilter(options ?: Object): void;
}
declare module "helmet" {
var helmet: Helmet;
export = helmet;
}
+1 -1
View File
@@ -1,4 +1,4 @@
/// <reference path="highcharts.d.ts" />
/// <reference path="highcharts.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />
function originalTests() {
-2
View File
@@ -3,8 +3,6 @@
// Definitions by: Damiano Gambarotto <http://github.com/damianog>, Dan Lewi Harkestad <http://github.com/baltie>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path='../jquery/jquery.d.ts' />
interface HighchartsPosition {
align?: string;
verticalAlign?: string;
+3 -3
View File
@@ -1,4 +1,5 @@
/// <reference path="highstock.d.ts" />
/// <reference path="highstock.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />
var someData = [1, 2, 3, 4, 5, 6, 7, 8, 9];
@@ -46,7 +47,7 @@ $(function () {
inputBoxHeight: 18,
inputStyle: {
color: '#039',
fontWeight: 'bold'
fontWeight: 'bold'
},
labelStyle: {
color: 'silver',
@@ -61,4 +62,3 @@ $(function () {
}]
});
});
+1 -1
View File
@@ -1,4 +1,4 @@
// Type definitions for Highstock 2.1.5
// Type definitions for Highstock 2.1.5
// Project: http://www.highcharts.com/
// Definitions by: David Deutsch <http://github.com/DavidKDeutsch>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
+21
View File
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<script>
function myFunction {
document.getElementById("demo").innerHTML = "Hello JavaScript!";
}
</script>
</head>
<body>
<p>
<b>bold</b>
</p>
<p>
<i>italic</i>
</p>
</body>
</html>
+29
View File
@@ -0,0 +1,29 @@
/// <reference path="html-to-text.d.ts" />
import * as htmlToText from 'html-to-text';
let htmlOptions: HtmlToTextOptions = {
wordwrap: null,
tables: true,
hideLinkHrefIfSameAsText: true,
ignoreImage: true
};
function callback(err: string, result: string) {
console.log(`callback called with result ${result}`);
}
console.log("Processing file with default options");
htmlToText.fromFile("h2t-test.html", callback);
console.log("Processing file with custom options");
htmlToText.fromFile("h2t-test.html", htmlOptions, callback);
let htmlString = "<p><b>bold</b></p><p><i>italic</i></p>";
console.log("Processing string with default options");
console.log(htmlToText.fromString(htmlString));
console.log("Processing string with custom options");
console.log(htmlToText.fromString(htmlString, htmlOptions));
+84
View File
@@ -0,0 +1,84 @@
// Type definitions for html-to-text v1.4.0
// Project: https://github.com/werk85/node-html-to-text
// Definitions by: Eryk Warren <https://github.com/erykwarren/>
// Definitions: https://github.com/DefinitelyTyped/html-to-text
interface HtmlToTextStatic {
/**
* Convert html content of file to text
*
* @param file String with the path of the html file to convert
* @param options Hash of options
* @param callback Function with signature function(err, result) called when the conversion is completed
*
*/
fromFile(file: string, options: HtmlToTextOptions, callback: Function): void;
/**
* Convert html content of file to text with the default options.
*
* @param file String with the path of the html file to convert
* @param callback Function with signature function(err, result) called when the conversion is completed
*
*/
fromFile(file: string, callback: Function): void;
/**
* Convert html string to text
*
* @param file String with the path of the html file to convert
* @param options Hash of options
*
* @return String with the converted text.
*/
fromString(str: string, options?: HtmlToTextOptions): string;
}
interface HtmlToTextOptions {
/**
* Defines after how many chars a line break should follow in p elements.
* Set to null or false to disable word-wrapping. Default: 80
*/
wordwrap?: number;
/**
* Allows to select certain tables by the class or id attribute from the HTML
* document. This is necessary because the majority of HTML E-Mails uses a
* table based layout. Prefix your table selectors with an . for the class
* and with a # for the id attribute. All other tables are ignored.
* You can assign true to this attribute to select all tables. Default: []
*/
tables?: Array<string> | boolean;
/**
* By default links are translated the following
* <a href='link'>text</a> => becomes => text [link].
* If this option is set to true and link and text are the same,
* [link] will be hidden and only text visible.
*/
hideLinkHrefIfSameAsText?: boolean;
/**
* Allows you to specify the server host for href attributes, where the links start at the root (/).
* For example, linkHrefBaseUrl = 'http://asdf.com' and <a href='/dir/subdir'>...</a>
* the link in the text will be http://asdf.com/dir/subdir.
* Keep in mind that linkHrefBaseUrl shouldn't end with a /.
*/
linkHrefBaseUrl?: string;
/**
* Ignore all document links if true.
*/
ignoreHref?: boolean;
/**
* Ignore all document images if true.
*/
ignoreImage?: boolean;
}
declare module "html-to-text" {
export = htmlToText;
}
declare var htmlToText: HtmlToTextStatic;
+54
View File
@@ -0,0 +1,54 @@
/// <reference path="intro.js.d.ts" />
var intro = introJs();
intro.setOption('doneLabel', 'Next page');
intro.setOptions({
steps: [
{
intro: "Hello world!"
},
{
element: document.querySelector('#step1'),
intro : "This is a tooltip."
},
{
element : document.querySelectorAll('#step2')[0],
intro : "Ok, wasn't that fun?",
position: 'right'
},
{
element : '#step3',
intro : 'More features, more fun.',
position: 'left'
},
{
element : '#step4',
intro : "Another step.",
position: 'bottom'
},
{
element: '#step5',
intro : 'Get it, use it.'
}
]
});
intro.start()
.nextStep()
.previousStep()
.goToStep(2)
.exit()
.refresh()
.onbeforechange(function (element) {
element.getAttribute('class');
})
.onafterchange(function (element) {
element.getAttribute('class');
})
.onchange(function () {
alert('Changed');
})
.oncomplete(function () {
alert('Done');
});
+70
View File
@@ -0,0 +1,70 @@
// Type definitions for intro.js 1.0.0
// Project: https://github.com/usablica/intro.js
// Definitions by: Maxime Fabre <https://github.com/anahkiasen/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module IntroJs {
enum Positions {
top,
left,
right,
bottom
}
interface Step {
intro: string;
element?: string|HTMLElement;
position?: Positions;
}
interface Options {
nextLabel?: string;
prevLabel?: string;
skipLabel?: string;
doneLabel?: string;
tooltipPosition?: string;
tooltipClass?: string;
highlightClass?: string;
exitOnEsc?: boolean;
exitOnOverlayClick?: boolean;
showStepNumbers?: boolean;
keyboardNavigation?: boolean;
showButtons?: boolean;
showBullets?: boolean;
showProgress?: boolean;
scrollToElement?: boolean;
overlayOpacity?: number;
positionPrecedence?: string[];
disableInteraction?: boolean;
steps: Step[];
}
interface IntroJs {
start(): IntroJs;
exit(): IntroJs;
goToStep(step: number): IntroJs;
nextStep(): IntroJs;
previousStep(): IntroJs;
refresh(): IntroJs;
setOption(option: string, value: string|number): IntroJs;
setOptions(options: Options): IntroJs;
onexit(callback: Function): IntroJs;
onbeforechange(callback: (element: HTMLElement) => any): IntroJs;
onafterchange(callback: (element: HTMLElement) => any): IntroJs;
onchange(callback: Function): IntroJs;
oncomplete(callback: Function): IntroJs;
}
interface Factory {
(element?: string): IntroJs;
}
}
declare var introJs: IntroJs.Factory;
declare module 'intro.js' {
export = IntroJs;
}
+4
View File
@@ -106,6 +106,10 @@ interface ColorboxSettings {
*/
close?: string;
/**
* Set to false to remove the close button.
*/
closeButton?: boolean;
/**
* Error message given when ajax content for a given URL cannot be loaded.
*/
xhrError?: string;
+58 -1
View File
@@ -13,10 +13,67 @@ var options: GridsterOptions = {
x: wgd.row,
y: wgd.col
};
}
},
widget_base_dimensions: [100, 100]
};
var gridster: Gridster = $('.gridster ul').gridster(options).data('gridster');
gridster.add_widget('<li class="new">The HTML of the widget...</li>', 2, 1);
gridster.remove_widget($('gridster li').eq(3).get(0));
var json = gridster.serialize<SerializeData>();
var coords: GridsterCoords = gridster.get_highest_occupied_cell();
var position = coords.col + coords.row;
options.widget_base_dimensions = [100, 200];
gridster.resize_widget_dimensions(options);
gridster.set_widget_min_size(0, [1, 2]);
function noOptions() {
var grid: Gridster = $('.gridster ul').gridster().data('gridster')
}
function widgetSelectorHTMLElements() {
var opts: GridsterOptions = {
widget_selector: $('.gridster ul li').get()
};
var grid: Gridster = $('.gridster ul').gridster(opts).data('gridster')
}
function widgetSelectorString() {
var opts: GridsterOptions = {
widget_selector: '.gridster ul li'
};
var grid: Gridster = $('.gridster ul').gridster(opts).data('gridster')
}
function withNamespace() {
var grid: Gridster = $('.gridster ul').gridster({
namespace: 'custom-gridster'
}).data('gridster')
}
function withStylesheet() {
var grid: Gridster = $('.gridster ul').gridster({
autogenerate_stylesheet: false
}).data('gridster')
}
function withResize() {
var grid: Gridster = $('.gridster ul').gridster({
resize: {
enabled: true,
axes: ['both'],
handle_append_to: 'li .handle-container',
handle_class: '.handle',
max_size: [5, 5],
min_size: [1, 1],
resize: (event: Event, ui: GridsterUi, $el: JQuery) => {},
start: (event: Event, ui: { helper: JQuery; }, $el: JQuery) => {},
stop: (event: Event, ui: { helper: JQuery; }, $el: JQuery) => {},
}
}).data('gridster')
}
+65 -9
View File
@@ -1,4 +1,4 @@
// Type definitions for jQuery.gridster 0.1.0
// Type definitions for jQuery.gridster 0.5.6
// Project: https://github.com/jbaldwin/gridster
// Definitions by: Josh Baldwin <https://github.com/jbaldwin>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -32,13 +32,26 @@ OTHER DEALINGS IN THE SOFTWARE.
/// <reference path="../jquery/jquery.d.ts"/>
interface GridsterDraggable {
items: any;
distance: number;
limit: boolean;
offset_left: number;
drag: (event: Event, ui: GridsterUi) => void;
start: (event: Event, ui: { helper: JQuery; }) => void;
stop: (event: Event, ui: { helper: JQuery; }) => void;
items?: any;
distance?: number;
limit?: boolean;
offset_left?: number;
handle?: string;
drag?: (event: Event, ui: GridsterUi) => void;
start?: (event: Event, ui: { helper: JQuery; }) => void;
stop?: (event: Event, ui: { helper: JQuery; }) => void;
}
interface GridsterResizable {
enabled?: boolean;
axes?: string[];
handle_append_to?: string;
handle_class?: string;
max_size?: number[];
min_size?: number[];
resize?: (event: Event, ui: GridsterUi, $el: JQuery) => void;
start?: (event: Event, ui: { helper: JQuery; }, $el: JQuery) => void;
stop?: (event: Event, ui: { helper: JQuery; }, $el: JQuery) => void;
}
interface GridsterUi {
@@ -78,7 +91,7 @@ interface GridsterOptions {
* Type => HTMLElement[]
* Default = 'li'
**/
widget_selector?: any;
widget_selector?: string|HTMLElement[];
/**
* Margin between widgets. The first index for the horizontal margin (left, right) and the second for the vertical margin (top, bottom).
@@ -154,6 +167,21 @@ interface GridsterOptions {
* An object with all options for Draggable class you want to overwrite. @see GridsterDraggable or docs for more info.
**/
draggable?: GridsterDraggable;
/**
* A string to differentiate one gridster from another
**/
namespace?: string;
/**
* A boolean to specify if the stylesheet should be generated or not
**/
autogenerate_stylesheet?: boolean;
/**
* An object with all options for Resizable class you want to overwrite. @see GridsterResizable or docs for more info.
**/
resize?: GridsterResizable;
}
interface JQuery {
@@ -189,6 +217,12 @@ interface Gridster {
**/
add_widget(html: JQuery, size_x?: number, size_y?: number, col?: number, row?: number): JQuery;
/**
* Get the highest occupied cell.
* @return Returns the farthest position {row: number, col: number} occupied in the grid.
**/
get_highest_occupied_cell(): GridsterCoords;
/**
* Change the size of a widget.
* @param $widget The jQuery wrapped HTMLElement that represents the widget is going to be resized.
@@ -199,6 +233,14 @@ interface Gridster {
**/
resize_widget($widget: JQuery, size_x?: number, size_y?: number, callback?: (size_x: number, size_y: number) => void): JQuery;
/**
* Resize all the widgets in the grid.
* @param options The options to use to resize the widgets.
* @return Returns the instance of the Gridster class.
**/
resize_widget_dimensions(options: GridsterOptions): Gridster;
/**
* Remove a widget from the grid.
* @param el The jQuery wrapped HTMLElement you want to remove.
@@ -223,6 +265,14 @@ interface Gridster {
**/
remove_widget(el: JQuery, callback: (el: HTMLElement) => void): Gridster;
/**
* Resize a widget in the grid.
* @param widget The index of the widget to be resized.
* @param size An array representing the size (x, y) to set on the widget.
* @return Returns the instance of the Gridster class.
**/
set_widget_min_size(widget: number, size: number[]): Gridster;
/**
* Returns a serialized array of the widgets in the grid.
* @param $widgets The collection of jQuery wrap ed HTMLElements you want to serialize. If no argument is passed a l widgets will be serialized.
@@ -247,4 +297,10 @@ interface Gridster {
* @return Returns the instance of the Gridster class.
**/
disable(): Gridster;
/**
* Returns the options used to initialize the grid
* @return Returns the options used to initialize the grid
**/
options: GridsterOptions;
}
+1
View File
@@ -590,6 +590,7 @@ declare module JQueryUI {
resize?: ResizableEvent;
start?: ResizableEvent;
stop?: ResizableEvent;
create?: ResizableEvents;
}
interface Resizable extends Widget, ResizableOptions {
+5 -9
View File
@@ -13,16 +13,12 @@ declare module JSData {
}
interface DS {
bindAll<T>(resourceName:string, params:DSFilterParams, scope:ng.IScope, expr:string, cb?:(err:DSError, items:Array<T>)=>void):Function;
bindOne<T>(resourceName:string, id:string | number, scope:ng.IScope, expr:string, cb?:(err:DSError, item:T)=>void):Function;
bindAll<T>(resourceName:string, params:DSFilterParams, scope:ng.IScope, expr:string, cb?:(err:DSError, items:Array<T & DSInstanceShorthands<T>>)=>void):Function;
bindOne<T>(resourceName:string, id:string | number, scope:ng.IScope, expr:string, cb?:(err:DSError, item:T & DSInstanceShorthands<T>)=>void):Function;
}
interface DSResourceDefinition<T> {
bindAll<T>(params:DSFilterParams, scope:ng.IScope, expr:string, cb?:(err:DSError, items:Array<T>)=>void):Function;
bindOne<T>(id:string | number, scope:ng.IScope, expr:string, cb?:(err:DSError, item:T)=>void):Function;
bindAll(params:DSFilterParams, scope:ng.IScope, expr:string, cb?:(err:DSError, items:Array<T & DSInstanceShorthands<T>>)=>void):Function;
bindOne(id:string | number, scope:ng.IScope, expr:string, cb?:(err:DSError, item:T & DSInstanceShorthands<T>)=>void):Function;
}
}
}
+2 -2
View File
@@ -28,7 +28,7 @@ ADocument.inject({ id: 5, author: 'John' });
ADocument.inject({ id: 6, author: 'John' });
// bypass the data store
adapter.updateAll<{ id?: number; author: string; }>(ADocument, { author: 'Johnny' }, { author: 'John' }).then(function (documents) {
adapter.updateAll(ADocument, { author: 'Johnny' }, { author: 'John' }).then(function (documents) {
documents[0]; // { id: 5, author: 'Johnny' }
// The updated documents have NOT been injected into the data store because we bypassed the data store
@@ -37,7 +37,7 @@ adapter.updateAll<{ id?: number; author: string; }>(ADocument, { author: 'Johnny
});
// Normally you would just go through the data store
ADocument.updateAll<{ id?: number; author: string; }>({ author: 'Johnny' }, { author: 'John' }).then(function (documents) {
ADocument.updateAll({ author: 'Johnny' }, { author: 'John' }).then(function (documents) {
documents[0]; // { id: 5, author: 'Johnny' }
// the updated documents have been injected into the data store
Loaded 100 of 177 files, more files were not shown because too many files have changed in this diff. Show more